From chenshaoqiang at buaa.edu.cn Sun Oct 1 09:53:07 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Sun, 1 Oct 2017 21:53:07 +0800 Subject: [vtkusers] How to draw a raster text strings at a 3D positon? Message-ID: <7A48A19D30984951B965AA7741F13CDE@chensqPC> Hi, vtkers. I can draw vector text strings at any 3D position. But it changes its size when zooming. This is undesirable sometimes. Can anyone suggest me how to draw a fixed-size text string (e.g. raster text strings) at a 3D postion? Thank you in advance. Sincerely Chen. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Oct 2 02:41:25 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 2 Oct 2017 08:41:25 +0200 Subject: [vtkusers] Help with vtkImageData() In-Reply-To: References: Message-ID: Den 28 sep. 2017 11:07 em skrev "Nick Torenvliet" : Hi there, I've attached a python script and a small pickle with associated data. A code snippet, from the file, is found below and some debug output is found below. My code is a quick hack of a working use of vtkImageData() from the mailing list archives. I've taken out the original author's (thanks quentan) data source and put in place my pickle file. When I run the script I get a window, but nothing visible in it except a black back-ground. I haven't looked in detail at the code, but it looks like you're trying to use a vtkPolyDataMapper to visualize a vtkImageData. vtkPolyDataMapper is for visualizing polygonal data. Normally to visualize a vtkImageData (a volume) you'd use a volume mapper such as vtkSmartVolumeMapper or vtkGPUVolumeRayCastMapper. Also, in order to do that I think the volume needs to be > 1 in all dimensions, as VTK interpolates between datapoints to form a visual voxel. But I may of course be misunderstanding, I'm somewhat new to VTK myself. Elvis I'm not sure if its data representation issues, viewport/camera issues, or pipeline issues; I'm open to all three actually - but I think its probably pipeline... the full extent of which is in the attached script. The original author has an (n1, n2, n3) matrix generated with a bunch of trig, but I am using an (n1, n2, 1) matrix that I can view in matplotlib as an image. My data numpy array on a grid generated by mlab.griddata. bscan_grid graphs well, as an image, in other packages, so I believe the issue is somewhere in the block below(with the missing pipeline). I was hoping to get a surface plot, or height map of my bscan_grid, with z mapped onto xy The attached script has a bunch of debug statements, the output when used on the attached pickle is underneath the code snippet. I've stripped the code out and put a subsection below to illustrate my question, which is how do I get my lovely vtkImdateData objectto chain over and into the mapper and render my surface? Thanks, Nick data_matrix = bscan_grid #bscan_grid comes from the attached pickle and is 997x148x1 vtk_data_array = numpy_support.numpy_to_vtk(num_array=data_matrix.ravel(), deep=True, array_type=vtk.VTK_FLOAT ) img_vtk = vtk.vtkImageData() img_vtk.SetOrigin(minax, minrot, 0) img_vtk.SetSpacing(bscan_adelta, bscan_rdelta, 1) img_vtk.SetDimensions(data_matrix.shape) img_vtk.GetPointData().SetScalars(vtk_data_array) ** Insert the magic filter widget view or transfrom thingy that connects a vtkImage to a mapper here ** ** Or alternatively, is there something wrong with the line below *** mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(magic.GetOutputPort()) mapper.SetScalarVisibility(0) actor = vtk.vtkActor() actor.SetMapper(mapper) actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) xmins = [8830] xmaxs = [8930] ymins = [34] ymaxs = [50] render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) renderer.ResetCamera() renderer.SetViewport(xmins[0], ymins[0], xmaxs[0], ymaxs[0]) render_window.SetSize(600, 600) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(render_window) interactor_style = vtk.vtkInteractorStyleTrackballCamera() iren.SetInteractorStyle(interactor_style) iren.Initialize() iren.Start() ####DEBUG STATEMENTS#### data_matrix intended x axis length 396 data_matrix intended x axis structured grid delta 0.100386432911 data_matrix intended x axis lower bound 8839.26083655 data_matrix intended x axis upper bound 8878.91347755 data_matrix intended y axis length 48 data_matrix intended y axis structured grid delta 0.104253241356 data_matrix intended y axis lower bound 34.1994628906 data_matrix intended y axis upper bound 39.0993652344 data_matrix intended z/scalar min -9.41352769373 data_matrix intended z/scalar max 19.5618770894 <(561)%20877-0894> data_matrix dimensions (396, 48, 1) _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 allison.vacanti at kitware.com Mon Oct 2 10:20:59 2017 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Mon, 2 Oct 2017 10:20:59 -0400 Subject: [vtkusers] How to draw a raster text strings at a 3D positon? In-Reply-To: <7A48A19D30984951B965AA7741F13CDE@chensqPC> References: <7A48A19D30984951B965AA7741F13CDE@chensqPC> Message-ID: See vtkTextActor3D, or vtkBillboardTextActor3D. On Sun, Oct 1, 2017 at 9:53 AM, chensq wrote: > Hi, vtkers. > I can draw vector text strings at any 3D position. But it changes its size > when zooming. This is undesirable sometimes. > Can anyone suggest me how to draw a fixed-size text string (e.g. raster > text strings) at a 3D postion? > Thank you in advance. > Sincerely Chen. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 clement.douarre at gmail.com Mon Oct 2 11:35:57 2017 From: clement.douarre at gmail.com (=?UTF-8?B?Q2zDqW1lbnQgRC4=?=) Date: Mon, 2 Oct 2017 17:35:57 +0200 Subject: [vtkusers] Trouble using cx_freeze Message-ID: Hello all, I'm am using cx_freeze on Windows to create an executable of a Python Script which includes vtk. The python script executes fine. Vtk is correctly installed and PYTHONPATH and PATH variables are set accordingly. I ran cx_freeze using a setup.py file, which created a build folder with an executable of the script and the necessary libraries, including the vtk files necessary for it to run in a "vtk" subfolder. No major problem there. Double clicking on the .exe file in that folder launchs the program. Double clicking on the .exe file after temporaly deleting my C:\Python folder also works. So at that point I thought my .exe file was indeed "stand alone" and needed only the subfolders in the build folder (like the vtk one) to work on its own. However, when I sent this build folder to a colleague, the execution fails because of vtk, with message : Traceback (most recent call last): File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\__startup_.py", line 14 in run File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.pu", line 26, in run File "PediLoc_Main.py", line 28 in File "C:\Users\Philippe\Documents\Friz\PediLoc_Result.py", line 109 in File "C:\Python27\Lib\site-packages\vtk\lib\python2.7\ site-packages\vtk\__init__.py", line 41 in File "C:\Python27\Lib\site-packages\vtk\lib\python2.7\site-packages\vtk\vtkCommonCore.py", line 9, in Import Error : DLL load failed : The specified module could not be found. In the vtk subfolder of the build, there is vtkCommonCore-8.0.dll. So I'm sort of stumped here. The .exe works on my computer, even when I take out Python juste to see if execution is possible without the python (and therefore, vtk) libraries. But not on another computer.... Using VTK 8.0.1, Python 2.7, both my computer and my colleague's one are Windows 7, 64 bits machines. Thanks for any insight, Cl?ment -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mlr at gmx.de Mon Oct 2 14:17:32 2017 From: j.mlr at gmx.de (vtkBeginner) Date: Mon, 2 Oct 2017 11:17:32 -0700 (MST) Subject: [vtkusers] vtkBlending and vtkResliceimageviewer with different lookup tables Message-ID: <1506968252132-0.post@n5.nabble.com> Hi, I am trying to set up a pipeline blendng N medial imaging data sets which may have different lookup tables. {vtkImageReader2 => vtkImageMapToColors}N => vtkImageBlend => vtkRescliceImageViewer I tried to adapt the examples ImageMapToColors, Colored2DImageFusion, and CombineImages from /www.vtk.org/Wiki/VTK/Examples/Cxx/ to my needs, but I probably failed to transfer the data properly into vtkRescliceImageViewer. I needed imgViewer2->GetImageActor()->GetMapper()->SetInputConnection(imgBlend->GetOutputPort()) to transfer the LUT information and imgViewer2->SetInputConnection(imgBlend->GetOutputPort()) to enable browsing through the slides. Two input connections look weird and I lost the interactor function to change the level/window. How are such pipelines supposed to be set up ? Thanks an advance, Jorg #include #include #include #include #include #include #include #include #include #include #include #include int main(int, char*[]) { vtkSmartPointer image = vtkSmartPointer::New(); vtkSmartPointer image2 = vtkSmartPointer::New(); int imageExtent[6] = { 0, 7, 0, 7, 0, 3 }; image->SetExtent(imageExtent); image2->SetExtent(imageExtent); image->AllocateScalars(VTK_DOUBLE, 1); image2->AllocateScalars(VTK_DOUBLE, 1); for (int z = imageExtent[4]; z <= imageExtent[5]; z++){ for (int y = imageExtent[2]; y <= imageExtent[3]; y++){ for (int x = imageExtent[0]; x <= imageExtent[1]; x++){ double* pixel = static_cast(image->GetScalarPointer(x, y, z)); double* pixel2 = static_cast(image2->GetScalarPointer(y, x, z)); pixel[0] = scalarvalue*x; pixel2[0]= scalarvalue*y; scalarvalue += 1.0; } } } // Map the scalar values in the image to colors with a lookup table: vtkSmartPointer lookupTable = vtkSmartPointer::New(); lookupTable->SetHueRange( 0.0, 0.2 ); lookupTable->SetRange(0.0, 511.0); lookupTable->Build(); vtkSmartPointer lookupTable2 = vtkSmartPointer::New(); lookupTable2->SetHueRange( 0.5, 0.7 ); lookupTable2->SetRange(0.0, 511.0); lookupTable2->Build(); // Pass the original image and the LUT to a filter to create a color image: vtkSmartPointer scalarValuesToColors = vtkSmartPointer::New(); scalarValuesToColors->SetLookupTable(lookupTable); scalarValuesToColors->PassAlphaToOutputOn(); scalarValuesToColors->SetInputData(image); vtkSmartPointer scalarValuesToColors2 = vtkSmartPointer::New(); scalarValuesToColors2->SetLookupTable(lookupTable2); scalarValuesToColors2->PassAlphaToOutputOn(); scalarValuesToColors2->SetInputData(image2); vtkSmartPointer imgBlend = vtkSmartPointer::New(); imgBlend->AddInputConnection(scalarValuesToColors->GetOutputPort()); imgBlend->AddInputConnection(scalarValuesToColors2->GetOutputPort()); imgBlend->SetOpacity(0,0.5); imgBlend->SetOpacity(1,0.5); imgBlend->Update(); vtkResliceImageViewer* imgViewer2=vtkResliceImageViewer::New(); vtkRenderWindowInteractor* renWinIact=vtkRenderWindowInteractor::New(); imgViewer2->DebugOn(); imgViewer2->SetupInteractor(renWinIact); imgViewer2->GetImageActor()->GetMapper()->SetInputConnection(imgBlend->GetOutputPort()); // required for LUT imgViewer2->SetInputConnection(imgBlend->GetOutputPort()); // required to display all slices imgViewer2->GetImageActor()->GetProperty()->SetInterpolationTypeToNearest(); imgViewer2->GetRenderer()->ResetCamera(); imgViewer2->GetRenderWindow()->Render(); imgViewer2->GetInteractor()->Initialize(); imgViewer2->GetInteractor()->Start(); } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lovstakk at gmail.com Mon Oct 2 17:26:40 2017 From: lovstakk at gmail.com (lovstakk) Date: Mon, 2 Oct 2017 14:26:40 -0700 (MST) Subject: [vtkusers] Vector field visualization issue Message-ID: <1506979600014-0.post@n5.nabble.com> Dear VTK users, I am a novice VTK user and need help, I hope you have some time. 1. I have created a structured grid and filled it with both vector data (a velocity field) and scalar data (the velocity magnitude). This is set as point data. The data is initially in numpy format and converted to vtk using numpy_to_vtk. 2. I visualize the vector Field using Glyph3D and everything looks great, both vector direction, scaling, and color mapping is correct. Great so far, very happy with the results. Then the issue: 3. I try to use vkStreamTracer to create streamlines from the exact same data structure. It seemingly does use the vector field when visualized using wither polylines or through a tubefilter, but: a) I get strange vertical blocking artifacts, where the streamlines don't cross (out_of_domain) b) The colors mapped are also way off, following the same blocking artifacts Any ideas? Best Regard, Lasse Lovstakken I inserted an image to illustrate: -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chenshaoqiang at buaa.edu.cn Tue Oct 3 02:59:52 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Tue, 3 Oct 2017 14:59:52 +0800 Subject: [vtkusers] [SPAM] Re: How to draw a raster text strings at a 3D positon? In-Reply-To: References: <7A48A19D30984951B965AA7741F13CDE@chensqPC> Message-ID: Great! the vtkBillboardTextActor3D is what I want. Thank you so much Allie Vacanti. Chen. From: Allie Vacanti Sent: Monday, October 02, 2017 10:20 PM To: chensq Cc: vtkusers Subject: [SPAM] Re: [vtkusers] How to draw a raster text strings at a 3D positon? See vtkTextActor3D, or vtkBillboardTextActor3D. On Sun, Oct 1, 2017 at 9:53 AM, chensq wrote: Hi, vtkers. I can draw vector text strings at any 3D position. But it changes its size when zooming. This is undesirable sometimes. Can anyone suggest me how to draw a fixed-size text string (e.g. raster text strings) at a 3D postion? Thank you in advance. Sincerely Chen. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 natorenvliet at gmail.com Tue Oct 3 10:09:15 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Tue, 3 Oct 2017 10:09:15 -0400 Subject: [vtkusers] Textbook and User Guide PDFs Message-ID: Hi, I am reading through the vtk textbook and user guide, both available for download on the vtk main site. I am finding that most of the equation formatting is pretty messed up. I've tried every pdf reader available, and nothing seems to help. How do I get well formatted equations? Am I missing something simple here? Regards, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Tue Oct 3 12:35:01 2017 From: jose.de.paula at live.com (Jose Barreto) Date: Tue, 3 Oct 2017 09:35:01 -0700 (MST) Subject: [vtkusers] vtkImageActor Opacity with vtkVolume Message-ID: <1507048501495-0.post@n5.nabble.com> Is not vtkImageActor transparent when I have a vtkVolume in renderer? If I change vtkImageActor-> opacity (0.5) I have the image in the input scured, plus the 3D does not show on the other side. I tried using vtkLookupTable with vtkImageMapToColors and I had the same result. Opacity in 100% Opacity in 50% -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From hernanunpa at Gmail.com Tue Oct 3 13:23:34 2017 From: hernanunpa at Gmail.com (hernan) Date: Tue, 3 Oct 2017 10:23:34 -0700 (MST) Subject: [vtkusers] Populate a vtkDataSet(vtkStructuredGrid) with data stored in a vtkDataArray an get it back? Message-ID: <1507051414148-0.post@n5.nabble.com> I'm using an structured grid. I want to store multiple attribute data for each cell using a vtkDataArray(vtkDenseArray for example), as shown in the VTKUsersGuide 11th edition, 26th page image. How can i store those values? I couldn't find any specific examples related to the issue. Thank you all, Hernan. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Tue Oct 3 13:42:16 2017 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 3 Oct 2017 13:42:16 -0400 Subject: [vtkusers] Changes in diffuse properties of material. In-Reply-To: References: Message-ID: You would need to give me a more specific example for me to help. That change mostly impacted meshes that use scalar coloring. But in general the color on screen is driven by diffuse ambient and specular colors and properties make sure those are set to reasonable values. Maybe find a mesh where you see an issue and let me know what the ambient/diffuse/specular colors and intensities are for the mesh. No texturing. No backface properties. No scalar coloring. Maybe go from there... On Tue, Oct 3, 2017 at 1:34 PM, Seun Odutola wrote: > Hi everyone, > > I recently discovered whilst working with VTK master that some meshes > are completely rendered dark in colour compared to others; meshes that rely > on their material (actor?s properties) are mostly affected. I tracked the > occurrence of this change down to the following commit below and was > wondering the essence of the change, also if need be how can one replicate > the previous rendering behaviour. > > - commit 7bc7e58334bcd1eac12adb6db22d6c45cf8fca74 > Author: Ken Martin > Date: Thu Aug 31 13:08:58 2017 -0400 > > update handling of scalar material mode > > Previously scalar material mode when used > with scalars would ignore the ambient and diffuse > material intensities and when mapping one of them > set that one to 1.0 while leaving th eother alone. > This caused lots of odd situations where objects would be > over illuminated etc or where changing the diffuse or > ambient seemed to have o impact. > > With this change the diffuse and ambient intensities > are always used. The sclaar simply controls the color > not the intensity. > > > Thanks. > > Regards, > Seun. > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From seun at rogue-research.com Tue Oct 3 13:34:13 2017 From: seun at rogue-research.com (Seun Odutola) Date: Tue, 3 Oct 2017 13:34:13 -0400 Subject: [vtkusers] Changes in diffuse properties of material. Message-ID: Hi everyone, I recently discovered whilst working with VTK master that some meshes are completely rendered dark in colour compared to others; meshes that rely on their material (actor?s properties) are mostly affected. I tracked the occurrence of this change down to the following commit below and was wondering the essence of the change, also if need be how can one replicate the previous rendering behaviour. - commit 7bc7e58334bcd1eac12adb6db22d6c45cf8fca74 Author: Ken Martin Date: Thu Aug 31 13:08:58 2017 -0400 update handling of scalar material mode Previously scalar material mode when used with scalars would ignore the ambient and diffuse material intensities and when mapping one of them set that one to 1.0 while leaving th eother alone. This caused lots of odd situations where objects would be over illuminated etc or where changing the diffuse or ambient seemed to have o impact. With this change the diffuse and ambient intensities are always used. The sclaar simply controls the color not the intensity. Thanks. Regards, Seun. From weihuayi at xtu.edu.cn Tue Oct 3 20:28:01 2017 From: weihuayi at xtu.edu.cn (=?utf-8?B?d2VpaHVheWk=?=) Date: Wed, 4 Oct 2017 08:28:01 +0800 Subject: [vtkusers] How to just change the surface appearance of the transform object in paraview? Message-ID: Hi, There, Sorry first, I know this email should sent to the paraview user email-list. But I can't joint it until now. I have a triangular sphere surface with two scalars on every point. In paraview, I transform the surface and get two new triangular spheres, see the attachment figure and data. I want to change the colormap of the third one, but paraview will also change the first one. So is it possible to just change the colormap of the every surface independently? Best Huayi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plot.png Type: application/octet-stream Size: 383537 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sph-cly-test1-1.vtu Type: application/octet-stream Size: 89855 bytes Desc: not available URL: From sur.chiranjib at gmail.com Wed Oct 4 04:08:22 2017 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Wed, 4 Oct 2017 13:38:22 +0530 Subject: [vtkusers] compare polydata Message-ID: Hi, Is there any implementation available in VTK where I can compare two polydata and know if they are different? I want to design a function like this int polydataCompare(polydata1, polydata2) if they are different the function will return 1 else return 0 Thanks and regards, Chiranjib -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Wed Oct 4 04:14:02 2017 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Wed, 4 Oct 2017 10:14:02 +0200 Subject: [vtkusers] [Paraview-developers] compare polydata In-Reply-To: References: Message-ID: Hello Since you asked on the ParaView ML as well, this can be easilly done in a ParaView Programmable Filter, where you could compare all points, cells, point data, cell data and filed data of the inputs datasets. Best, Mathieu Westphal On Wed, Oct 4, 2017 at 10:08 AM, Chiranjib Sur wrote: > Hi, > Is there any implementation available in VTK where I can compare two > polydata and know if they are different? > > I want to design a function like this > > int polydataCompare(polydata1, polydata2) > > if they are different the function will return 1 else return 0 > > Thanks and regards, > Chiranjib > > _______________________________________________ > 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= > Paraview-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/paraview-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sur.chiranjib at gmail.com Wed Oct 4 04:17:50 2017 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Wed, 4 Oct 2017 13:47:50 +0530 Subject: [vtkusers] [Paraview-developers] compare polydata In-Reply-To: References: Message-ID: Thanks Mathieu, any pointers for that? Actually my solution is within ParaView and internally I use VTK classes. Thanks and regards, Chiranjib On Wed, Oct 4, 2017 at 1:44 PM, Mathieu Westphal < mathieu.westphal at kitware.com> wrote: > Hello > > Since you asked on the ParaView ML as well, this can be easilly done in a > ParaView Programmable Filter, > where you could compare all points, cells, point data, cell data and filed > data of the inputs datasets. > > Best, > > Mathieu Westphal > > On Wed, Oct 4, 2017 at 10:08 AM, Chiranjib Sur > wrote: > >> Hi, >> Is there any implementation available in VTK where I can compare two >> polydata and know if they are different? >> >> I want to design a function like this >> >> int polydataCompare(polydata1, polydata2) >> >> if they are different the function will return 1 else return 0 >> >> Thanks and regards, >> Chiranjib >> >> _______________________________________________ >> 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= >> Paraview-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/paraview-developers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcog.ghiani at gmail.com Wed Oct 4 04:29:43 2017 From: marcog.ghiani at gmail.com (Marco Ghiani) Date: Wed, 4 Oct 2017 09:29:43 +0100 Subject: [vtkusers] format file algorithm Message-ID: <8684d8a7-6bdf-1b75-39f8-34cb353a6b81@gmail.com> I'm Marco I've just started my phD last week , about computational fluid dynamics of polymeric turbulent flow , I would really understand the algorithm for write a generic script that given a set of point x,y,z construct a file in this format : # vtk DataFile Version 3.0 vtk output ASCII DATASET POLYDATA POINTS 3 float 1.0 0.5 1.5 0.2 0.1 0.8 0.4 0.2 2.3 LINES 2 6 2 0 1 2 0 2 VERTICES 3 6 1 0 1 1 1 2 POINT_DATA 3 SCALARS element float LOOKUP_TABLE default 8 1 1 SCALARS somefield float LOOKUP_TABLE default 0.687 0.262 0.185 I have no idea how to set the LINES and VERTICES starting from only a number of spatial point ! could somebody help me please ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Wed Oct 4 05:04:14 2017 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Wed, 4 Oct 2017 11:04:14 +0200 Subject: [vtkusers] [Paraview-developers] compare polydata In-Reply-To: References: Message-ID: Hello I've included a very simple state file that compare the number of points in two different datasets. You can expand the python programmable script to compare anything you want. You can find examples here : https://www.paraview.org/Wiki/Python_Programmable_Filter Best, Mathieu Westphal On Wed, Oct 4, 2017 at 10:17 AM, Chiranjib Sur wrote: > Thanks Mathieu, any pointers for that? Actually my solution is within > ParaView and internally I use VTK classes. > > > Thanks and regards, > Chiranjib > > On Wed, Oct 4, 2017 at 1:44 PM, Mathieu Westphal < > mathieu.westphal at kitware.com> wrote: > >> Hello >> >> Since you asked on the ParaView ML as well, this can be easilly done in a >> ParaView Programmable Filter, >> where you could compare all points, cells, point data, cell data and >> filed data of the inputs datasets. >> >> Best, >> >> Mathieu Westphal >> >> On Wed, Oct 4, 2017 at 10:08 AM, Chiranjib Sur >> wrote: >> >>> Hi, >>> Is there any implementation available in VTK where I can compare two >>> polydata and know if they are different? >>> >>> I want to design a function like this >>> >>> int polydataCompare(polydata1, polydata2) >>> >>> if they are different the function will return 1 else return 0 >>> >>> Thanks and regards, >>> Chiranjib >>> >>> _______________________________________________ >>> 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= >>> Paraview-developers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/paraview-developers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compareDatasetsProgFilter.pvsm Type: application/octet-stream Size: 304379 bytes Desc: not available URL: From xuzhijing008 at 163.com Wed Oct 4 05:07:03 2017 From: xuzhijing008 at 163.com (Jane) Date: Wed, 4 Oct 2017 02:07:03 -0700 (MST) Subject: [vtkusers] some errors when use vtkTecplotReader Message-ID: <1507108023045-0.post@n5.nabble.com> Hi everyone, I am trying to use the vtkTecplotReader to read the *.dat file which is produced by Tecplot, however, there are always some errors, such as "The record type ** found in the file is unknown." and "Tecplot zone record parameter 'STRANDID' is currently unsupported". And if I try to use the Paraview to read the Tecplot file, the same errors are also existed. So I do not know how to deal with this, and I wonder if I need to write a new tecplot reader or is there anyone who has solved these problems. Thanks. Regards, Jane -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bakkari.abdelkhalek at hotmail.fr Wed Oct 4 05:07:51 2017 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Wed, 4 Oct 2017 09:07:51 +0000 Subject: [vtkusers] image scale using vtk Message-ID: Dear VTK users, How can I change the scale of the image based on the following code lines : double center2[3] = {image_vtk->GetCenter()[0], image_vtk->GetCenter()[1], image_vtk->GetCenter()[2]}; if (image_vtk->GetExtent()[0] % 2 == 1) { center2[0] = image_vtk->GetCenter()[0] + 0.5*image_vtk->GetSpacing()[0]; center2[1] = image_vtk->GetCenter()[1]; center2[2] = image_vtk->GetCenter()[2]; } // Setting camera to view the rendered slice to the whole viewport. float xc = image_vtk->GetOrigin()[0] + 0.5*(image_vtk->GetExtent()[0]+ image_vtk->GetExtent()[1])*image_vtk->GetSpacing()[0]; float yc = image_vtk->GetOrigin()[1] + 0.5*(image_vtk->GetExtent()[2] + image_vtk->GetExtent()[3])*image_vtk->GetSpacing()[1]; float yd = (image_vtk->GetExtent()[3] - image_vtk->GetExtent()[2] + 1)*image_vtk->GetSpacing()[1]; float d = camera->GetDistance(); camera->SetParallelScale(yd); Kind regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From rakesh.mandal at essteyr.com Wed Oct 4 07:57:29 2017 From: rakesh.mandal at essteyr.com (essindia) Date: Wed, 4 Oct 2017 04:57:29 -0700 (MST) Subject: [vtkusers] Design and development of 3D renderer using VTK Message-ID: <1507118249746-0.post@n5.nabble.com> Dear Colleagues, We are developing fluid flow simulation software. We are looking for engineer who is having exposure with Design and development of 3D renderer using VTK. Experience: Less than 4 years Location: Bangalore (India) Joining: Immediate Interested people can drop their profile at rakesh.mandal at essteyr.com Regards, Rakesh -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From elvis.stansvik at orexplore.com Wed Oct 4 08:22:58 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 4 Oct 2017 14:22:58 +0200 Subject: [vtkusers] Strange rendering with 2-voxel thick volume Message-ID: Hi all, In the test case below, I render one 200x200x2 volume and one 200x200x3 volume, both with the same settings. The 200x200x3 volume looks as expected (the light gray one in the attached screenshot), while the 200x200x2 one looks strange (too dark, and with some kind of gradient artifact). Is there some limitation on rendering a volume that is only 2 thick in one of the dimensions? I can understand why a volume of thickness 1 can't be rendered properly, since VTK must have values to interpolate between, but 2 should be OK right? Thanks for any help. Elvis main.cpp: #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char *argv[]) { vtkNew colorFunction; colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); vtkNew opacityFunction; opacityFunction->AddPoint(0.0, 0.0); opacityFunction->AddPoint(1.0, 1.0); // A 200x200x2 volume vtkNew imageData; imageData->SetExtent(0, 199, 0, 199, 0, 1); imageData->AllocateScalars(VTK_FLOAT, 1); std::fill_n(static_cast(imageData->GetScalarPointer()), 200 * 200 * 2, 0.01); vtkNew volumeMapper; volumeMapper->SetInputData(imageData.Get()); vtkNew volumeProperty; volumeProperty->SetScalarOpacity(opacityFunction.Get()); volumeProperty->SetColor(colorFunction.Get()); volumeProperty->ShadeOff(); vtkNew volume; volume->SetMapper(volumeMapper.Get()); volume->SetProperty(volumeProperty.Get()); volume->SetPosition(120, 0, 0); // A 200x200x3 volume vtkNew imageData2; imageData2->SetExtent(0, 199, 0, 199, 0, 2); imageData2->AllocateScalars(VTK_FLOAT, 1); std::fill_n(static_cast(imageData2->GetScalarPointer()), 200 * 200 * 3, 0.01); vtkNew volumeMapper2; volumeMapper2->SetInputData(imageData2.Get()); vtkNew volumeProperty2; volumeProperty2->SetScalarOpacity(opacityFunction.Get()); volumeProperty2->SetColor(colorFunction.Get()); volumeProperty2->ShadeOff(); vtkNew volume2; volume2->SetMapper(volumeMapper2.Get()); volume2->SetProperty(volumeProperty2.Get()); volume2->SetPosition(-120, 0, 0); vtkNew renderer; renderer->AddVolume(volume.Get()); renderer->AddVolume(volume2.Get()); renderer->SetBackground(1.0, 1.0, 1.0); // Render with "plain" render window / interactor vtkNew window; window->SetMultiSamples(0); window->AddRenderer(renderer.Get()); vtkNew interactor; interactor->SetRenderWindow(window.Get()); interactor->Start(); return 0; } CMakeLists.txt: cmake_minimum_required(VERSION 3.1) project(TestCase) find_package(VTK 8.0 COMPONENTS vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkFiltersSources vtkGUISupportQt vtkInteractionStyle vtkRenderingCore vtkRenderingOpenGL2 vtkRenderingVolume vtkRenderingVolumeOpenGL2 REQUIRED ) add_executable(TestCase main.cpp) target_link_libraries(TestCase PUBLIC vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkFiltersSources vtkInteractionStyle vtkRenderingCore vtkRenderingOpenGL2 vtkRenderingVolume vtkRenderingVolumeOpenGL2 ) target_include_directories(TestCase PUBLIC ${VTK_INCLUDE_DIRS} ) target_compile_definitions(TestCase PUBLIC ${VTK_DEFINITIONS} ) set_target_properties(TestCase PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON ) -------------- next part -------------- A non-text attachment was scrubbed... Name: result.png Type: image/png Size: 25837 bytes Desc: not available URL: From chenshaoqiang at buaa.edu.cn Wed Oct 4 08:40:50 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Wed, 4 Oct 2017 20:40:50 +0800 Subject: [vtkusers] Can I set the tick span of vtkCubeAxesActor? Message-ID: I can?t find a method that set the tick span of vtkCubeAxesActor. It seems be set automatically. I also want to know if I can specify the distance between the labels. Hope your help. chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Wed Oct 4 09:26:02 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 4 Oct 2017 09:26:02 -0400 Subject: [vtkusers] Deprecate Qt4 Message-ID: Hi all, We are working to deprecate VTK use of Qt4. https://gitlab.kitware.com/vtk/vtk/merge_requests/3300 After this merge request is in, VTK_QT_VERSION will be 5 by default and you'll get warnings if you switch it to 4 and use VTK with Qt4. You can silence the warnings using VTK_LEGACY_SILENT=ON You can remove all legacy features using VTK_LEGACY_REMOVE=ON (You may want to do that if you compile with Qt5, to make sure you don't use by mistake Qt4 features). VTK + Qt applications using Qt5 need to use QVTKOpenGLWidget instead of QVTKWidget that was used for Qt4. https://www.vtk.org/doc/nightly/html/classQVTKOpenGLWidget.html We converted all VTK Qt examples and the examples from VTKExamples to use QVTKOpenGLWidget. Here is the pull request for VTKExamples https://github.com/lorensen/VTKExamples/pull/28 Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Oct 4 09:47:21 2017 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 04 Oct 2017 13:47:21 +0000 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: Please make sure that your sampling distance is less than < 2. You can set the sampling distance manually in the API. On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik wrote: > Hi all, > > In the test case below, I render one 200x200x2 volume and one > 200x200x3 volume, both with the same settings. > > The 200x200x3 volume looks as expected (the light gray one in the > attached screenshot), while the 200x200x2 one looks strange (too dark, > and with some kind of gradient artifact). > > Is there some limitation on rendering a volume that is only 2 thick in > one of the dimensions? I can understand why a volume of thickness 1 > can't be rendered properly, since VTK must have values to interpolate > between, but 2 should be OK right? > > Thanks for any help. > > Elvis > > > main.cpp: > > #include > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > int main(int argc, char *argv[]) > { > vtkNew colorFunction; > colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); > colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); > > vtkNew opacityFunction; > opacityFunction->AddPoint(0.0, 0.0); > opacityFunction->AddPoint(1.0, 1.0); > > // A 200x200x2 volume > vtkNew imageData; > imageData->SetExtent(0, 199, 0, 199, 0, 1); > imageData->AllocateScalars(VTK_FLOAT, 1); > std::fill_n(static_cast(imageData->GetScalarPointer()), > 200 * 200 * 2, 0.01); > > vtkNew volumeMapper; > volumeMapper->SetInputData(imageData.Get()); > > vtkNew volumeProperty; > volumeProperty->SetScalarOpacity(opacityFunction.Get()); > volumeProperty->SetColor(colorFunction.Get()); > volumeProperty->ShadeOff(); > > vtkNew volume; > volume->SetMapper(volumeMapper.Get()); > volume->SetProperty(volumeProperty.Get()); > volume->SetPosition(120, 0, 0); > > // A 200x200x3 volume > vtkNew imageData2; > imageData2->SetExtent(0, 199, 0, 199, 0, 2); > imageData2->AllocateScalars(VTK_FLOAT, 1); > std::fill_n(static_cast(imageData2->GetScalarPointer()), > 200 * 200 * 3, 0.01); > > vtkNew volumeMapper2; > volumeMapper2->SetInputData(imageData2.Get()); > > vtkNew volumeProperty2; > volumeProperty2->SetScalarOpacity(opacityFunction.Get()); > volumeProperty2->SetColor(colorFunction.Get()); > volumeProperty2->ShadeOff(); > > vtkNew volume2; > volume2->SetMapper(volumeMapper2.Get()); > volume2->SetProperty(volumeProperty2.Get()); > volume2->SetPosition(-120, 0, 0); > > vtkNew renderer; > renderer->AddVolume(volume.Get()); > renderer->AddVolume(volume2.Get()); > renderer->SetBackground(1.0, 1.0, 1.0); > > // Render with "plain" render window / interactor > vtkNew window; > window->SetMultiSamples(0); > window->AddRenderer(renderer.Get()); > > vtkNew interactor; > interactor->SetRenderWindow(window.Get()); > interactor->Start(); > > return 0; > } > > > CMakeLists.txt: > > cmake_minimum_required(VERSION 3.1) > > project(TestCase) > > find_package(VTK 8.0 COMPONENTS > vtkCommonCore > vtkCommonDataModel > vtkCommonExecutionModel > vtkCommonMath > vtkFiltersSources > vtkGUISupportQt > vtkInteractionStyle > vtkRenderingCore > vtkRenderingOpenGL2 > vtkRenderingVolume > vtkRenderingVolumeOpenGL2 > REQUIRED > ) > > add_executable(TestCase main.cpp) > > target_link_libraries(TestCase PUBLIC > vtkCommonCore > vtkCommonDataModel > vtkCommonExecutionModel > vtkCommonMath > vtkFiltersSources > vtkInteractionStyle > vtkRenderingCore > vtkRenderingOpenGL2 > vtkRenderingVolume > vtkRenderingVolumeOpenGL2 > ) > > target_include_directories(TestCase PUBLIC > ${VTK_INCLUDE_DIRS} > ) > > target_compile_definitions(TestCase PUBLIC > ${VTK_DEFINITIONS} > ) > > set_target_properties(TestCase PROPERTIES > CXX_STANDARD 14 > CXX_STANDARD_REQUIRED ON > ) > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Oct 4 10:09:36 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 4 Oct 2017 16:09:36 +0200 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: Hi Aashish, 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary : > Please make sure that your sampling distance is less than < 2. You can set > the sampling distance manually in the API. Hm. I don't think it's related to sampling distance. In the test case I'm not setting sampling distance at all, so I think it should default to 1, and then be automatically adjusted during interaction. In any case, even if I amend the test case with e.g.: volumeMapper->AutoAdjustSampleDistancesOff(); volumeMapper->SetSampleDistance(0.2); ... volumeMapper2->AutoAdjustSampleDistancesOff(); volumeMapper2->SetSampleDistance(0.2); The result is the same. Elvis > > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik > wrote: >> >> Hi all, >> >> In the test case below, I render one 200x200x2 volume and one >> 200x200x3 volume, both with the same settings. >> >> The 200x200x3 volume looks as expected (the light gray one in the >> attached screenshot), while the 200x200x2 one looks strange (too dark, >> and with some kind of gradient artifact). >> >> Is there some limitation on rendering a volume that is only 2 thick in >> one of the dimensions? I can understand why a volume of thickness 1 >> can't be rendered properly, since VTK must have values to interpolate >> between, but 2 should be OK right? >> >> Thanks for any help. >> >> Elvis >> >> >> main.cpp: >> >> #include >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> >> int main(int argc, char *argv[]) >> { >> vtkNew colorFunction; >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); >> >> vtkNew opacityFunction; >> opacityFunction->AddPoint(0.0, 0.0); >> opacityFunction->AddPoint(1.0, 1.0); >> >> // A 200x200x2 volume >> vtkNew imageData; >> imageData->SetExtent(0, 199, 0, 199, 0, 1); >> imageData->AllocateScalars(VTK_FLOAT, 1); >> std::fill_n(static_cast(imageData->GetScalarPointer()), >> 200 * 200 * 2, 0.01); >> >> vtkNew volumeMapper; >> volumeMapper->SetInputData(imageData.Get()); >> >> vtkNew volumeProperty; >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); >> volumeProperty->SetColor(colorFunction.Get()); >> volumeProperty->ShadeOff(); >> >> vtkNew volume; >> volume->SetMapper(volumeMapper.Get()); >> volume->SetProperty(volumeProperty.Get()); >> volume->SetPosition(120, 0, 0); >> >> // A 200x200x3 volume >> vtkNew imageData2; >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); >> imageData2->AllocateScalars(VTK_FLOAT, 1); >> std::fill_n(static_cast(imageData2->GetScalarPointer()), >> 200 * 200 * 3, 0.01); >> >> vtkNew volumeMapper2; >> volumeMapper2->SetInputData(imageData2.Get()); >> >> vtkNew volumeProperty2; >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); >> volumeProperty2->SetColor(colorFunction.Get()); >> volumeProperty2->ShadeOff(); >> >> vtkNew volume2; >> volume2->SetMapper(volumeMapper2.Get()); >> volume2->SetProperty(volumeProperty2.Get()); >> volume2->SetPosition(-120, 0, 0); >> >> vtkNew renderer; >> renderer->AddVolume(volume.Get()); >> renderer->AddVolume(volume2.Get()); >> renderer->SetBackground(1.0, 1.0, 1.0); >> >> // Render with "plain" render window / interactor >> vtkNew window; >> window->SetMultiSamples(0); >> window->AddRenderer(renderer.Get()); >> >> vtkNew interactor; >> interactor->SetRenderWindow(window.Get()); >> interactor->Start(); >> >> return 0; >> } >> >> >> CMakeLists.txt: >> >> cmake_minimum_required(VERSION 3.1) >> >> project(TestCase) >> >> find_package(VTK 8.0 COMPONENTS >> vtkCommonCore >> vtkCommonDataModel >> vtkCommonExecutionModel >> vtkCommonMath >> vtkFiltersSources >> vtkGUISupportQt >> vtkInteractionStyle >> vtkRenderingCore >> vtkRenderingOpenGL2 >> vtkRenderingVolume >> vtkRenderingVolumeOpenGL2 >> REQUIRED >> ) >> >> add_executable(TestCase main.cpp) >> >> target_link_libraries(TestCase PUBLIC >> vtkCommonCore >> vtkCommonDataModel >> vtkCommonExecutionModel >> vtkCommonMath >> vtkFiltersSources >> vtkInteractionStyle >> vtkRenderingCore >> vtkRenderingOpenGL2 >> vtkRenderingVolume >> vtkRenderingVolumeOpenGL2 >> ) >> >> target_include_directories(TestCase PUBLIC >> ${VTK_INCLUDE_DIRS} >> ) >> >> target_compile_definitions(TestCase PUBLIC >> ${VTK_DEFINITIONS} >> ) >> >> set_target_properties(TestCase PROPERTIES >> CXX_STANDARD 14 >> CXX_STANDARD_REQUIRED ON >> ) >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 briend at cyceron.fr Wed Oct 4 10:43:48 2017 From: briend at cyceron.fr (briend at cyceron.fr) Date: Wed, 4 Oct 2017 07:43:48 -0700 (MST) Subject: [vtkusers] Calculate geodesic distance Message-ID: <1507128228972-0.post@n5.nabble.com> Hello all, I woulkd like to calculate, in python, the geodesic distance between two points on a surface(polydata) with vtkDijkstraGraphGeodesicPath. But I fail to understand how to do that. Any help is much appreciated. Thanks, My code: import vtk cylinder= vtk.vtkSphereSource() cylinder.SetCenter(0.0, 0.0, 0.0) cylinder.SetRadius(0.5) dijkstra = vtk.vtkDijkstraGraphGeodesicPath() dijkstra.SetInputConnection(cylinder.GetOutputPort()) dijkstra.SetStartVertex(2) dijkstra.SetEndVertex(10) dijkstra.Update() pathMapper = vtk.vtkPolyDataMapper() pathMapper.SetInputConnection(dijkstra.GetOutputPort()) cylinderMapper = vtk.vtkPolyDataMapper() cylinderMapper.SetInputConnection(cylinder.GetOutputPort()) pathActor = vtk.vtkActor() pathActor.SetMapper(pathMapper); pathActor.GetProperty().SetColor(1,0,0)# Red pathActor.GetProperty().SetLineWidth(4); cylinderActor = vtk.vtkActor() cylinderActor.SetMapper(cylinderMapper) cylinderActor.GetProperty().SetColor(0,0,1) # (0,0,1) or tomato cylinderActor.RotateX(30.0) cylinderActor.RotateY(-45.0) #distance? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From MEEHANBT at nv.doe.gov Wed Oct 4 10:43:03 2017 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Wed, 4 Oct 2017 14:43:03 +0000 Subject: [vtkusers] [EXTERNAL] format file algorithm In-Reply-To: <201710040830.v948U6Rv002974-v948U6Rw002974@mta-1.nv.doe.gov> References: <201710040830.v948U6Rv002974-v948U6Rw002974@mta-1.nv.doe.gov> Message-ID: There are a many sources on the internet that explain the format: https://www.vtk.org/doc/nightly/html/IOLegacyInformationFormat.html https://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf http://www.cacr.caltech.edu/~slombey/asci/vtk/vtk_formats.simple.html https://www.vtk.org/Wiki/VTK/Writing_VTK_files_using_python#.22legacy.22 The reason that the lines and vertices are recorded the way they are is probably to save space. In your small example it may not be readily apparent, but once you start to get a semi-large dataset, such as a 3D CFD mesh, it will make much more sense why it is done that way. Just as an example of how you might do this in something like python, here is a script that writes out a circle: #!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import * N = 20 points = [] vertices = [] segments = [] for i in range(N): points.append((0., cos(i*2.*pi/N), sin(i*2.*pi/N))) vertices.append((1, i)) segments.append((2, i, (i + 1) % N)) print("""# vtk DataFile Version 3.0 vtk output ASCII DATASET POLYDATA\n""") print("POINTS {} float".format(N)) for point in points: print("{} {} {}".format(*point)) print() print("LINES {} {}".format(N, 3*N)) for segment in segments: print("{} {} {}".format(*segment)) print() print("VERTICES {} {}".format(N, 2*N)) for vert in vertices: print("{} {}".format(*vert)) print() From: vtkusers > on behalf of Marco Ghiani > Date: Wednesday, October 4, 2017 at 1:29 AM To: "vtkusers at vtk.org" > Subject: [EXTERNAL] [vtkusers] format file algorithm I'm Marco I've just started my phD last week , about computational fluid dynamics of polymeric turbulent flow , I would really understand the algorithm for write a generic script that given a set of point x,y,z construct a file in this format : # vtk DataFile Version 3.0 vtk output ASCII DATASET POLYDATA POINTS 3 float 1.0 0.5 1.5 0.2 0.1 0.8 0.4 0.2 2.3 LINES 2 6 2 0 1 2 0 2 VERTICES 3 6 1 0 1 1 1 2 POINT_DATA 3 SCALARS element float LOOKUP_TABLE default 8 1 1 SCALARS somefield float LOOKUP_TABLE default 0.687 0.262 0.185 I have no idea how to set the LINES and VERTICES starting from only a number of spatial point ! could somebody help me please ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From hernanunpa at Gmail.com Wed Oct 4 11:16:37 2017 From: hernanunpa at Gmail.com (hernan) Date: Wed, 4 Oct 2017 08:16:37 -0700 (MST) Subject: [vtkusers] Enable or disable pan, rotation and zoom on key pressed event Message-ID: <1507130197973-0.post@n5.nabble.com> I'm trying to set up a MouseInteractor Class (vtkInteractorStyleTrackballCamera) handling events to disable pan, zoom, or rotation. Each of these functions would be enabled or disabled according to an user's pressed key. I think the most common way of doing it, is to generate an event handler function for each different key and, inside it's block setting some flag of the class vtkRenderWindowInteractor to false or true using a function like setPan(false) or setPan(true), etc. But as you may know there's no such function or method on the vtkRenderWindowInteractor class. Is my aprroach correct? Does someone have a better idea? Thank you all. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aashish.chaudhary at kitware.com Wed Oct 4 11:43:22 2017 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 04 Oct 2017 15:43:22 +0000 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: thanks..I just wanted to make sure that we remove that as one of the culprit. I am wondering if it is something to do with the geometry (bbox) or something to do with some edge case (calculation that is going off because of very small delta). Although in the past we have tried very think volumes Is it possible for you to send a sample dataset to us? On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik wrote: > Hi Aashish, > > 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > > Please make sure that your sampling distance is less than < 2. You can > set > > the sampling distance manually in the API. > > Hm. I don't think it's related to sampling distance. In the test case > I'm not setting sampling distance at all, so I think it should default > to 1, and then be automatically adjusted during interaction. > > In any case, even if I amend the test case with e.g.: > > volumeMapper->AutoAdjustSampleDistancesOff(); > volumeMapper->SetSampleDistance(0.2); > ... > volumeMapper2->AutoAdjustSampleDistancesOff(); > volumeMapper2->SetSampleDistance(0.2); > > The result is the same. > > Elvis > > > > > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik < > elvis.stansvik at orexplore.com> > > wrote: > >> > >> Hi all, > >> > >> In the test case below, I render one 200x200x2 volume and one > >> 200x200x3 volume, both with the same settings. > >> > >> The 200x200x3 volume looks as expected (the light gray one in the > >> attached screenshot), while the 200x200x2 one looks strange (too dark, > >> and with some kind of gradient artifact). > >> > >> Is there some limitation on rendering a volume that is only 2 thick in > >> one of the dimensions? I can understand why a volume of thickness 1 > >> can't be rendered properly, since VTK must have values to interpolate > >> between, but 2 should be OK right? > >> > >> Thanks for any help. > >> > >> Elvis > >> > >> > >> main.cpp: > >> > >> #include > >> > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> > >> int main(int argc, char *argv[]) > >> { > >> vtkNew colorFunction; > >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); > >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); > >> > >> vtkNew opacityFunction; > >> opacityFunction->AddPoint(0.0, 0.0); > >> opacityFunction->AddPoint(1.0, 1.0); > >> > >> // A 200x200x2 volume > >> vtkNew imageData; > >> imageData->SetExtent(0, 199, 0, 199, 0, 1); > >> imageData->AllocateScalars(VTK_FLOAT, 1); > >> std::fill_n(static_cast(imageData->GetScalarPointer()), > >> 200 * 200 * 2, 0.01); > >> > >> vtkNew volumeMapper; > >> volumeMapper->SetInputData(imageData.Get()); > >> > >> vtkNew volumeProperty; > >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); > >> volumeProperty->SetColor(colorFunction.Get()); > >> volumeProperty->ShadeOff(); > >> > >> vtkNew volume; > >> volume->SetMapper(volumeMapper.Get()); > >> volume->SetProperty(volumeProperty.Get()); > >> volume->SetPosition(120, 0, 0); > >> > >> // A 200x200x3 volume > >> vtkNew imageData2; > >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); > >> imageData2->AllocateScalars(VTK_FLOAT, 1); > >> std::fill_n(static_cast(imageData2->GetScalarPointer()), > >> 200 * 200 * 3, 0.01); > >> > >> vtkNew volumeMapper2; > >> volumeMapper2->SetInputData(imageData2.Get()); > >> > >> vtkNew volumeProperty2; > >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); > >> volumeProperty2->SetColor(colorFunction.Get()); > >> volumeProperty2->ShadeOff(); > >> > >> vtkNew volume2; > >> volume2->SetMapper(volumeMapper2.Get()); > >> volume2->SetProperty(volumeProperty2.Get()); > >> volume2->SetPosition(-120, 0, 0); > >> > >> vtkNew renderer; > >> renderer->AddVolume(volume.Get()); > >> renderer->AddVolume(volume2.Get()); > >> renderer->SetBackground(1.0, 1.0, 1.0); > >> > >> // Render with "plain" render window / interactor > >> vtkNew window; > >> window->SetMultiSamples(0); > >> window->AddRenderer(renderer.Get()); > >> > >> vtkNew interactor; > >> interactor->SetRenderWindow(window.Get()); > >> interactor->Start(); > >> > >> return 0; > >> } > >> > >> > >> CMakeLists.txt: > >> > >> cmake_minimum_required(VERSION 3.1) > >> > >> project(TestCase) > >> > >> find_package(VTK 8.0 COMPONENTS > >> vtkCommonCore > >> vtkCommonDataModel > >> vtkCommonExecutionModel > >> vtkCommonMath > >> vtkFiltersSources > >> vtkGUISupportQt > >> vtkInteractionStyle > >> vtkRenderingCore > >> vtkRenderingOpenGL2 > >> vtkRenderingVolume > >> vtkRenderingVolumeOpenGL2 > >> REQUIRED > >> ) > >> > >> add_executable(TestCase main.cpp) > >> > >> target_link_libraries(TestCase PUBLIC > >> vtkCommonCore > >> vtkCommonDataModel > >> vtkCommonExecutionModel > >> vtkCommonMath > >> vtkFiltersSources > >> vtkInteractionStyle > >> vtkRenderingCore > >> vtkRenderingOpenGL2 > >> vtkRenderingVolume > >> vtkRenderingVolumeOpenGL2 > >> ) > >> > >> target_include_directories(TestCase PUBLIC > >> ${VTK_INCLUDE_DIRS} > >> ) > >> > >> target_compile_definitions(TestCase PUBLIC > >> ${VTK_DEFINITIONS} > >> ) > >> > >> set_target_properties(TestCase PROPERTIES > >> CXX_STANDARD 14 > >> CXX_STANDARD_REQUIRED ON > >> ) > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Oct 4 12:07:07 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 4 Oct 2017 18:07:07 +0200 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary : > thanks..I just wanted to make sure that we remove that as one of the > culprit. I am wondering if it is something to do with the geometry (bbox) or > something to do with some edge case (calculation that is going off because > of very small delta). Although in the past we have tried very think volumes > > Is it possible for you to send a sample dataset to us? My test case includes the data used. It's simply a 200x200x2 volume filled with all data points set to 0.01. Elvis > > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik > wrote: >> >> Hi Aashish, >> >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary >> : >> > Please make sure that your sampling distance is less than < 2. You can >> > set >> > the sampling distance manually in the API. >> >> Hm. I don't think it's related to sampling distance. In the test case >> I'm not setting sampling distance at all, so I think it should default >> to 1, and then be automatically adjusted during interaction. >> >> In any case, even if I amend the test case with e.g.: >> >> volumeMapper->AutoAdjustSampleDistancesOff(); >> volumeMapper->SetSampleDistance(0.2); >> ... >> volumeMapper2->AutoAdjustSampleDistancesOff(); >> volumeMapper2->SetSampleDistance(0.2); >> >> The result is the same. >> >> Elvis >> >> > >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik >> > >> > wrote: >> >> >> >> Hi all, >> >> >> >> In the test case below, I render one 200x200x2 volume and one >> >> 200x200x3 volume, both with the same settings. >> >> >> >> The 200x200x3 volume looks as expected (the light gray one in the >> >> attached screenshot), while the 200x200x2 one looks strange (too dark, >> >> and with some kind of gradient artifact). >> >> >> >> Is there some limitation on rendering a volume that is only 2 thick in >> >> one of the dimensions? I can understand why a volume of thickness 1 >> >> can't be rendered properly, since VTK must have values to interpolate >> >> between, but 2 should be OK right? >> >> >> >> Thanks for any help. >> >> >> >> Elvis >> >> >> >> >> >> main.cpp: >> >> >> >> #include >> >> >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> >> >> int main(int argc, char *argv[]) >> >> { >> >> vtkNew colorFunction; >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); >> >> >> >> vtkNew opacityFunction; >> >> opacityFunction->AddPoint(0.0, 0.0); >> >> opacityFunction->AddPoint(1.0, 1.0); >> >> >> >> // A 200x200x2 volume >> >> vtkNew imageData; >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); >> >> imageData->AllocateScalars(VTK_FLOAT, 1); >> >> std::fill_n(static_cast(imageData->GetScalarPointer()), >> >> 200 * 200 * 2, 0.01); >> >> >> >> vtkNew volumeMapper; >> >> volumeMapper->SetInputData(imageData.Get()); >> >> >> >> vtkNew volumeProperty; >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); >> >> volumeProperty->SetColor(colorFunction.Get()); >> >> volumeProperty->ShadeOff(); >> >> >> >> vtkNew volume; >> >> volume->SetMapper(volumeMapper.Get()); >> >> volume->SetProperty(volumeProperty.Get()); >> >> volume->SetPosition(120, 0, 0); >> >> >> >> // A 200x200x3 volume >> >> vtkNew imageData2; >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); >> >> std::fill_n(static_cast(imageData2->GetScalarPointer()), >> >> 200 * 200 * 3, 0.01); >> >> >> >> vtkNew volumeMapper2; >> >> volumeMapper2->SetInputData(imageData2.Get()); >> >> >> >> vtkNew volumeProperty2; >> >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); >> >> volumeProperty2->SetColor(colorFunction.Get()); >> >> volumeProperty2->ShadeOff(); >> >> >> >> vtkNew volume2; >> >> volume2->SetMapper(volumeMapper2.Get()); >> >> volume2->SetProperty(volumeProperty2.Get()); >> >> volume2->SetPosition(-120, 0, 0); >> >> >> >> vtkNew renderer; >> >> renderer->AddVolume(volume.Get()); >> >> renderer->AddVolume(volume2.Get()); >> >> renderer->SetBackground(1.0, 1.0, 1.0); >> >> >> >> // Render with "plain" render window / interactor >> >> vtkNew window; >> >> window->SetMultiSamples(0); >> >> window->AddRenderer(renderer.Get()); >> >> >> >> vtkNew interactor; >> >> interactor->SetRenderWindow(window.Get()); >> >> interactor->Start(); >> >> >> >> return 0; >> >> } >> >> >> >> >> >> CMakeLists.txt: >> >> >> >> cmake_minimum_required(VERSION 3.1) >> >> >> >> project(TestCase) >> >> >> >> find_package(VTK 8.0 COMPONENTS >> >> vtkCommonCore >> >> vtkCommonDataModel >> >> vtkCommonExecutionModel >> >> vtkCommonMath >> >> vtkFiltersSources >> >> vtkGUISupportQt >> >> vtkInteractionStyle >> >> vtkRenderingCore >> >> vtkRenderingOpenGL2 >> >> vtkRenderingVolume >> >> vtkRenderingVolumeOpenGL2 >> >> REQUIRED >> >> ) >> >> >> >> add_executable(TestCase main.cpp) >> >> >> >> target_link_libraries(TestCase PUBLIC >> >> vtkCommonCore >> >> vtkCommonDataModel >> >> vtkCommonExecutionModel >> >> vtkCommonMath >> >> vtkFiltersSources >> >> vtkInteractionStyle >> >> vtkRenderingCore >> >> vtkRenderingOpenGL2 >> >> vtkRenderingVolume >> >> vtkRenderingVolumeOpenGL2 >> >> ) >> >> >> >> target_include_directories(TestCase PUBLIC >> >> ${VTK_INCLUDE_DIRS} >> >> ) >> >> >> >> target_compile_definitions(TestCase PUBLIC >> >> ${VTK_DEFINITIONS} >> >> ) >> >> >> >> set_target_properties(TestCase PROPERTIES >> >> CXX_STANDARD 14 >> >> CXX_STANDARD_REQUIRED ON >> >> ) >> >> _______________________________________________ >> >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> >> http://www.kitware.com/opensource/opensource.html >> >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >> >> 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 aashish.chaudhary at kitware.com Wed Oct 4 12:12:07 2017 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 04 Oct 2017 16:12:07 +0000 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: Got it, thanks! On Wed, Oct 4, 2017 at 12:07 PM Elvis Stansvik wrote: > 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > > thanks..I just wanted to make sure that we remove that as one of the > > culprit. I am wondering if it is something to do with the geometry > (bbox) or > > something to do with some edge case (calculation that is going off > because > > of very small delta). Although in the past we have tried very think > volumes > > > > Is it possible for you to send a sample dataset to us? > > My test case includes the data used. It's simply a 200x200x2 volume > filled with all data points set to 0.01. > > Elvis > > > > > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik > > wrote: > >> > >> Hi Aashish, > >> > >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary > >> : > >> > Please make sure that your sampling distance is less than < 2. You can > >> > set > >> > the sampling distance manually in the API. > >> > >> Hm. I don't think it's related to sampling distance. In the test case > >> I'm not setting sampling distance at all, so I think it should default > >> to 1, and then be automatically adjusted during interaction. > >> > >> In any case, even if I amend the test case with e.g.: > >> > >> volumeMapper->AutoAdjustSampleDistancesOff(); > >> volumeMapper->SetSampleDistance(0.2); > >> ... > >> volumeMapper2->AutoAdjustSampleDistancesOff(); > >> volumeMapper2->SetSampleDistance(0.2); > >> > >> The result is the same. > >> > >> Elvis > >> > >> > > >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik > >> > > >> > wrote: > >> >> > >> >> Hi all, > >> >> > >> >> In the test case below, I render one 200x200x2 volume and one > >> >> 200x200x3 volume, both with the same settings. > >> >> > >> >> The 200x200x3 volume looks as expected (the light gray one in the > >> >> attached screenshot), while the 200x200x2 one looks strange (too > dark, > >> >> and with some kind of gradient artifact). > >> >> > >> >> Is there some limitation on rendering a volume that is only 2 thick > in > >> >> one of the dimensions? I can understand why a volume of thickness 1 > >> >> can't be rendered properly, since VTK must have values to interpolate > >> >> between, but 2 should be OK right? > >> >> > >> >> Thanks for any help. > >> >> > >> >> Elvis > >> >> > >> >> > >> >> main.cpp: > >> >> > >> >> #include > >> >> > >> >> #include > >> >> #include > >> >> #include > >> >> #include > >> >> #include > >> >> #include > >> >> #include > >> >> #include > >> >> #include > >> >> #include > >> >> #include > >> >> #include > >> >> > >> >> int main(int argc, char *argv[]) > >> >> { > >> >> vtkNew colorFunction; > >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); > >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); > >> >> > >> >> vtkNew opacityFunction; > >> >> opacityFunction->AddPoint(0.0, 0.0); > >> >> opacityFunction->AddPoint(1.0, 1.0); > >> >> > >> >> // A 200x200x2 volume > >> >> vtkNew imageData; > >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); > >> >> imageData->AllocateScalars(VTK_FLOAT, 1); > >> >> std::fill_n(static_cast(imageData->GetScalarPointer()), > >> >> 200 * 200 * 2, 0.01); > >> >> > >> >> vtkNew volumeMapper; > >> >> volumeMapper->SetInputData(imageData.Get()); > >> >> > >> >> vtkNew volumeProperty; > >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); > >> >> volumeProperty->SetColor(colorFunction.Get()); > >> >> volumeProperty->ShadeOff(); > >> >> > >> >> vtkNew volume; > >> >> volume->SetMapper(volumeMapper.Get()); > >> >> volume->SetProperty(volumeProperty.Get()); > >> >> volume->SetPosition(120, 0, 0); > >> >> > >> >> // A 200x200x3 volume > >> >> vtkNew imageData2; > >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); > >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); > >> >> std::fill_n(static_cast(imageData2->GetScalarPointer()), > >> >> 200 * 200 * 3, 0.01); > >> >> > >> >> vtkNew volumeMapper2; > >> >> volumeMapper2->SetInputData(imageData2.Get()); > >> >> > >> >> vtkNew volumeProperty2; > >> >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); > >> >> volumeProperty2->SetColor(colorFunction.Get()); > >> >> volumeProperty2->ShadeOff(); > >> >> > >> >> vtkNew volume2; > >> >> volume2->SetMapper(volumeMapper2.Get()); > >> >> volume2->SetProperty(volumeProperty2.Get()); > >> >> volume2->SetPosition(-120, 0, 0); > >> >> > >> >> vtkNew renderer; > >> >> renderer->AddVolume(volume.Get()); > >> >> renderer->AddVolume(volume2.Get()); > >> >> renderer->SetBackground(1.0, 1.0, 1.0); > >> >> > >> >> // Render with "plain" render window / interactor > >> >> vtkNew window; > >> >> window->SetMultiSamples(0); > >> >> window->AddRenderer(renderer.Get()); > >> >> > >> >> vtkNew interactor; > >> >> interactor->SetRenderWindow(window.Get()); > >> >> interactor->Start(); > >> >> > >> >> return 0; > >> >> } > >> >> > >> >> > >> >> CMakeLists.txt: > >> >> > >> >> cmake_minimum_required(VERSION 3.1) > >> >> > >> >> project(TestCase) > >> >> > >> >> find_package(VTK 8.0 COMPONENTS > >> >> vtkCommonCore > >> >> vtkCommonDataModel > >> >> vtkCommonExecutionModel > >> >> vtkCommonMath > >> >> vtkFiltersSources > >> >> vtkGUISupportQt > >> >> vtkInteractionStyle > >> >> vtkRenderingCore > >> >> vtkRenderingOpenGL2 > >> >> vtkRenderingVolume > >> >> vtkRenderingVolumeOpenGL2 > >> >> REQUIRED > >> >> ) > >> >> > >> >> add_executable(TestCase main.cpp) > >> >> > >> >> target_link_libraries(TestCase PUBLIC > >> >> vtkCommonCore > >> >> vtkCommonDataModel > >> >> vtkCommonExecutionModel > >> >> vtkCommonMath > >> >> vtkFiltersSources > >> >> vtkInteractionStyle > >> >> vtkRenderingCore > >> >> vtkRenderingOpenGL2 > >> >> vtkRenderingVolume > >> >> vtkRenderingVolumeOpenGL2 > >> >> ) > >> >> > >> >> target_include_directories(TestCase PUBLIC > >> >> ${VTK_INCLUDE_DIRS} > >> >> ) > >> >> > >> >> target_compile_definitions(TestCase PUBLIC > >> >> ${VTK_DEFINITIONS} > >> >> ) > >> >> > >> >> set_target_properties(TestCase PROPERTIES > >> >> CXX_STANDARD 14 > >> >> CXX_STANDARD_REQUIRED ON > >> >> ) > >> >> _______________________________________________ > >> >> Powered by www.kitware.com > >> >> > >> >> Visit other Kitware open-source projects at > >> >> http://www.kitware.com/opensource/opensource.html > >> >> > >> >> Please keep messages on-topic and check the VTK FAQ at: > >> >> http://www.vtk.org/Wiki/VTK_FAQ > >> >> > >> >> 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 seb.an at icloud.com Wed Oct 4 18:33:48 2017 From: seb.an at icloud.com (sebastian_a) Date: Wed, 4 Oct 2017 15:33:48 -0700 (MST) Subject: [vtkusers] Solidify vtkPolyData Message-ID: <1507156428979-0.post@n5.nabble.com> Hello everyone, does vtk include a similar filter or is there a method like the Solidify Modifier in Blender ( link )? Basically I have a non watertight vtkPolyData containing faces which I want to solidify by adding opposite faces on their backs. Thanks a lot, Sebastian -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Wed Oct 4 20:01:08 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 4 Oct 2017 17:01:08 -0700 Subject: [vtkusers] Windows 10 does not support Microsoft Video 1 In-Reply-To: References: <599FE3AD.4060803@chello.at> Message-ID: On Mon, Sep 11, 2017 at 12:20 AM, Entwicklung Kornicki < kornicki.entwicklung at chello.at> wrote: > There is a class called vtkAVIWriter. We use this class to record the > video. > > https://www.vtk.org/doc/nightly/html/classvtkAVIWriter.html > > This class has a couple of methods such as PromptCompressionOptionsOn > which allow to set whether the compressor options should be displayed, but > I do not see any possibility to modify in detail which compressor options > should be selectable. > Yikes, a VTK class shouldn't present user interface elements like that, but rather leave it up to the application. My problem is that when I run our program and start capturing the video, it > displays "Micosoft Video 1" as the first item of possible codecs to be > used, but videos created using "Microsoft Video 1" apparently cannot be > played by the standard video player of Windows 10. That is why I would like > to remove this option but don't know how to do that. > Unfortunately, I don't know if that is possible from outside vtkAVIWriter. See https://msdn.microsoft.com/en-us/library/windows/desktop/dd756791(v=vs.85).aspx how you can choose a different default from within vtkAVIWriter.cxx. Best, Cory > Best regards, > Claus Volko > > > > Am 07.09.2017 um 17:08 schrieb Cory Quammen: > >> With Kitware VTK 5.8, when using the functionality to save the action that >>> is going on in the window as an AVI file and prompting compressor >>> options, >>> the default codec is "Microsoft Video 1". Unfortunately, I noticed that >>> when >>> you save an AVI file with this codec, the default video player of >>> Windows 10 >>> will not be able to play the video. That's a bad thing. However, if I >>> choose >>> another codec from the list, such as "Intel IYUV Codec", playback works. >>> That's the good news. >>> >>> Is there some way to make Kitware VTK 5.8 show only such codecs that work >>> with the default video player of Windows 10? >>> >> I'm not sure what you mean by the "functionality to save the action". >> Could you describe what you are doing? Are you running an example? >> >> Thanks, >> Cory >> >> Best regards, >>> Claus Volko >>> >>> >>> --- >>> This email has been checked for viruses by Avast antivirus software. >>> https://www.avast.com/antivirus >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> > > --- > Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft. > https://www.avast.com/antivirus > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marceloduartetrevisani at gmail.com Thu Oct 5 01:34:35 2017 From: marceloduartetrevisani at gmail.com (Marcelo Duarte Trevisani) Date: Thu, 5 Oct 2017 02:34:35 -0300 Subject: [vtkusers] Performance comparison between VTk7.0.0 and VTK8.0.1 Message-ID: Hello folks, I was doing a performance comparison between the VTK 7.0.0 with OpenGL1 and SMP as sequential against VTK 8.0.1 with VTKm, OpenGL2 and SMP with OpenMP but I saw no difference of the rendering process at all. I think it's a bit strange, I read some articles in Kitware about the vantages to use VTKm and OpenGL2 but in my simple test there is no difference. Does anyone know what it's happening? Or Do I need to activate or do something different ? Attached on this e-mail is the code which I used. In terms of performance what are the vantages in VTK 8.0.1 when compared to VTK 7.0.0? Thanks in advance. Best Regards, -- Marcelo Duarte Trevisani "Success is walking from failure to failure with no loss of enthusiasm." Winston Churchill -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.py Type: text/x-python Size: 1723 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Thu Oct 5 04:38:36 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 5 Oct 2017 10:38:36 +0200 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: 2017-10-04 18:12 GMT+02:00 Aashish Chaudhary : > Got it, thanks! Although I'm not familiar at all with the code, I suspect this is what happens with my 200x200x2 volume: In void vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() { this->CellToPointMatrix->Identity(); this->AdjustedTexMin[0] = this->AdjustedTexMin[1] = this->AdjustedTexMin[2] = 0.0f; this->AdjustedTexMin[3] = 1.0f; this->AdjustedTexMax[0] = this->AdjustedTexMax[1] = this->AdjustedTexMax[2] = 1.0f; this->AdjustedTexMax[3] = 1.0f; if (!this->Parent->CellFlag) // point data { float delta[3]; delta[0] = this->Extents[1] - this->Extents[0]; delta[1] = this->Extents[3] - this->Extents[2]; delta[2] = this->Extents[5] - this->Extents[4]; float min[3]; min[0] = 0.5f / delta[0]; min[1] = 0.5f / delta[1]; min[2] = 0.5f / delta[2]; float range[3]; // max - min range[0] = (delta[0] - 0.5f) / delta[0] - min[0]; range[1] = (delta[1] - 0.5f) / delta[1] - min[1]; range[2] = (delta[2] - 0.5f) / delta[2] - min[2]; this->CellToPointMatrix->SetElement(0, 0, range[0]); // Scale diag this->CellToPointMatrix->SetElement(1, 1, range[1]); this->CellToPointMatrix->SetElement(2, 2, range[2]); this->CellToPointMatrix->SetElement(0, 3, min[0]); // t vector this->CellToPointMatrix->SetElement(1, 3, min[1]); this->CellToPointMatrix->SetElement(2, 3, min[2]); // Adjust limit coordinates for texture access. float const zeros[4] = {0.0f, 0.0f, 0.0f, 1.0f}; // GL tex min float const ones[4] = {1.0f, 1.0f, 1.0f, 1.0f}; // GL tex max this->CellToPointMatrix->MultiplyPoint(zeros, this->AdjustedTexMin); this->CellToPointMatrix->MultiplyPoint(ones, this->AdjustedTexMax); } } delta[2] = 1 ==> min[2] = 0.5 ==> range[2] = 0 So the scale factor in the third dimension will be 0 in CellToPointMatrix, right? I guess this could be what accounts for the strange rendering? Could/should this code be updated to take into account when the extent delta is just 1, so that volumes 2 data points thick can be rendered? Elvis > > On Wed, Oct 4, 2017 at 12:07 PM Elvis Stansvik > wrote: >> >> 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary >> : >> > thanks..I just wanted to make sure that we remove that as one of the >> > culprit. I am wondering if it is something to do with the geometry >> > (bbox) or >> > something to do with some edge case (calculation that is going off >> > because >> > of very small delta). Although in the past we have tried very think >> > volumes >> > >> > Is it possible for you to send a sample dataset to us? >> >> My test case includes the data used. It's simply a 200x200x2 volume >> filled with all data points set to 0.01. >> >> Elvis >> >> > >> > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik >> > wrote: >> >> >> >> Hi Aashish, >> >> >> >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary >> >> : >> >> > Please make sure that your sampling distance is less than < 2. You >> >> > can >> >> > set >> >> > the sampling distance manually in the API. >> >> >> >> Hm. I don't think it's related to sampling distance. In the test case >> >> I'm not setting sampling distance at all, so I think it should default >> >> to 1, and then be automatically adjusted during interaction. >> >> >> >> In any case, even if I amend the test case with e.g.: >> >> >> >> volumeMapper->AutoAdjustSampleDistancesOff(); >> >> volumeMapper->SetSampleDistance(0.2); >> >> ... >> >> volumeMapper2->AutoAdjustSampleDistancesOff(); >> >> volumeMapper2->SetSampleDistance(0.2); >> >> >> >> The result is the same. >> >> >> >> Elvis >> >> >> >> > >> >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik >> >> > >> >> > wrote: >> >> >> >> >> >> Hi all, >> >> >> >> >> >> In the test case below, I render one 200x200x2 volume and one >> >> >> 200x200x3 volume, both with the same settings. >> >> >> >> >> >> The 200x200x3 volume looks as expected (the light gray one in the >> >> >> attached screenshot), while the 200x200x2 one looks strange (too >> >> >> dark, >> >> >> and with some kind of gradient artifact). >> >> >> >> >> >> Is there some limitation on rendering a volume that is only 2 thick >> >> >> in >> >> >> one of the dimensions? I can understand why a volume of thickness 1 >> >> >> can't be rendered properly, since VTK must have values to >> >> >> interpolate >> >> >> between, but 2 should be OK right? >> >> >> >> >> >> Thanks for any help. >> >> >> >> >> >> Elvis >> >> >> >> >> >> >> >> >> main.cpp: >> >> >> >> >> >> #include >> >> >> >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> #include >> >> >> >> >> >> int main(int argc, char *argv[]) >> >> >> { >> >> >> vtkNew colorFunction; >> >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); >> >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); >> >> >> >> >> >> vtkNew opacityFunction; >> >> >> opacityFunction->AddPoint(0.0, 0.0); >> >> >> opacityFunction->AddPoint(1.0, 1.0); >> >> >> >> >> >> // A 200x200x2 volume >> >> >> vtkNew imageData; >> >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); >> >> >> imageData->AllocateScalars(VTK_FLOAT, 1); >> >> >> std::fill_n(static_cast(imageData->GetScalarPointer()), >> >> >> 200 * 200 * 2, 0.01); >> >> >> >> >> >> vtkNew volumeMapper; >> >> >> volumeMapper->SetInputData(imageData.Get()); >> >> >> >> >> >> vtkNew volumeProperty; >> >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); >> >> >> volumeProperty->SetColor(colorFunction.Get()); >> >> >> volumeProperty->ShadeOff(); >> >> >> >> >> >> vtkNew volume; >> >> >> volume->SetMapper(volumeMapper.Get()); >> >> >> volume->SetProperty(volumeProperty.Get()); >> >> >> volume->SetPosition(120, 0, 0); >> >> >> >> >> >> // A 200x200x3 volume >> >> >> vtkNew imageData2; >> >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); >> >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); >> >> >> std::fill_n(static_cast> >> >> *>(imageData2->GetScalarPointer()), >> >> >> 200 * 200 * 3, 0.01); >> >> >> >> >> >> vtkNew volumeMapper2; >> >> >> volumeMapper2->SetInputData(imageData2.Get()); >> >> >> >> >> >> vtkNew volumeProperty2; >> >> >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); >> >> >> volumeProperty2->SetColor(colorFunction.Get()); >> >> >> volumeProperty2->ShadeOff(); >> >> >> >> >> >> vtkNew volume2; >> >> >> volume2->SetMapper(volumeMapper2.Get()); >> >> >> volume2->SetProperty(volumeProperty2.Get()); >> >> >> volume2->SetPosition(-120, 0, 0); >> >> >> >> >> >> vtkNew renderer; >> >> >> renderer->AddVolume(volume.Get()); >> >> >> renderer->AddVolume(volume2.Get()); >> >> >> renderer->SetBackground(1.0, 1.0, 1.0); >> >> >> >> >> >> // Render with "plain" render window / interactor >> >> >> vtkNew window; >> >> >> window->SetMultiSamples(0); >> >> >> window->AddRenderer(renderer.Get()); >> >> >> >> >> >> vtkNew interactor; >> >> >> interactor->SetRenderWindow(window.Get()); >> >> >> interactor->Start(); >> >> >> >> >> >> return 0; >> >> >> } >> >> >> >> >> >> >> >> >> CMakeLists.txt: >> >> >> >> >> >> cmake_minimum_required(VERSION 3.1) >> >> >> >> >> >> project(TestCase) >> >> >> >> >> >> find_package(VTK 8.0 COMPONENTS >> >> >> vtkCommonCore >> >> >> vtkCommonDataModel >> >> >> vtkCommonExecutionModel >> >> >> vtkCommonMath >> >> >> vtkFiltersSources >> >> >> vtkGUISupportQt >> >> >> vtkInteractionStyle >> >> >> vtkRenderingCore >> >> >> vtkRenderingOpenGL2 >> >> >> vtkRenderingVolume >> >> >> vtkRenderingVolumeOpenGL2 >> >> >> REQUIRED >> >> >> ) >> >> >> >> >> >> add_executable(TestCase main.cpp) >> >> >> >> >> >> target_link_libraries(TestCase PUBLIC >> >> >> vtkCommonCore >> >> >> vtkCommonDataModel >> >> >> vtkCommonExecutionModel >> >> >> vtkCommonMath >> >> >> vtkFiltersSources >> >> >> vtkInteractionStyle >> >> >> vtkRenderingCore >> >> >> vtkRenderingOpenGL2 >> >> >> vtkRenderingVolume >> >> >> vtkRenderingVolumeOpenGL2 >> >> >> ) >> >> >> >> >> >> target_include_directories(TestCase PUBLIC >> >> >> ${VTK_INCLUDE_DIRS} >> >> >> ) >> >> >> >> >> >> target_compile_definitions(TestCase PUBLIC >> >> >> ${VTK_DEFINITIONS} >> >> >> ) >> >> >> >> >> >> set_target_properties(TestCase PROPERTIES >> >> >> CXX_STANDARD 14 >> >> >> CXX_STANDARD_REQUIRED ON >> >> >> ) >> >> >> _______________________________________________ >> >> >> Powered by www.kitware.com >> >> >> >> >> >> Visit other Kitware open-source projects at >> >> >> http://www.kitware.com/opensource/opensource.html >> >> >> >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> >> >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >> >> >> >> 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 dave.demarle at kitware.com Thu Oct 5 05:46:25 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 5 Oct 2017 05:46:25 -0400 Subject: [vtkusers] Performance comparison between VTk7.0.0 and VTK8.0.1 In-Reply-To: References: Message-ID: 1000 points isn't challenging enough. Try 1 million. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Oct 5, 2017 at 1:34 AM, Marcelo Duarte Trevisani < marceloduartetrevisani at gmail.com> wrote: > Hello folks, > > I was doing a performance comparison between the VTK 7.0.0 with OpenGL1 > and SMP as sequential against VTK 8.0.1 with VTKm, OpenGL2 and SMP with > OpenMP but I saw no difference of the rendering process at all. I think > it's a bit strange, I read some articles in Kitware about the vantages to > use VTKm and OpenGL2 but in my simple test there is no difference. Does > anyone know what it's happening? Or Do I need to activate or do something > different ? > > Attached on this e-mail is the code which I used. > > In terms of performance what are the vantages in VTK 8.0.1 when compared > to VTK 7.0.0? > > Thanks in advance. > > Best Regards, > > > -- > Marcelo Duarte Trevisani > > "Success is walking from failure to failure with no loss of enthusiasm." > Winston Churchill > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 marceloduartetrevisani at gmail.com Thu Oct 5 06:00:00 2017 From: marceloduartetrevisani at gmail.com (Marcelo Duarte Trevisani) Date: Thu, 5 Oct 2017 07:00:00 -0300 Subject: [vtkusers] Performance comparison between VTk7.0.0 and VTK8.0.1 In-Reply-To: References: Message-ID: Do you already have a benchmark code to test the differences of performance between this two versions? Because I'm thinking to migrate a software to vtk8 + vtkm + opengl2 + tbb or openmp, but I have to show to my colleagues the advantages regarding the performance of this new version compiled with these flags, to see if will be prioritize or not. I will try to do what you said as well. Thanks. On Thu, Oct 5, 2017 at 6:46 AM, David E DeMarle wrote: > 1000 points isn't challenging enough. Try 1 million. > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > > Clifton Park, NY 12065 > > -8662 > Phone: 518-881-4909 > > On Thu, Oct 5, 2017 at 1:34 AM, Marcelo Duarte Trevisani < > marceloduartetrevisani at gmail.com> wrote: > >> Hello folks, >> >> I was doing a performance comparison between the VTK 7.0.0 with OpenGL1 >> and SMP as sequential against VTK 8.0.1 with VTKm, OpenGL2 and SMP with >> OpenMP but I saw no difference of the rendering process at all. I think >> it's a bit strange, I read some articles in Kitware about the vantages to >> use VTKm and OpenGL2 but in my simple test there is no difference. Does >> anyone know what it's happening? Or Do I need to activate or do something >> different ? >> >> Attached on this e-mail is the code which I used. >> >> In terms of performance what are the vantages in VTK 8.0.1 when compared >> to VTK 7.0.0? >> >> Thanks in advance. >> >> Best Regards, >> >> >> -- >> Marcelo Duarte Trevisani >> >> "Success is walking from failure to failure with no loss of enthusiasm." >> Winston Churchill >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -- Marcelo Duarte Trevisani Engenheiro de Controle e Automa??o pela Universidade Federal de Minas Gerais - (UFMG) Certificate Professional Scrum Master by Scrum.org "Success is walking from failure to failure with no loss of enthusiasm." Winston Churchill -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Oct 5 06:06:15 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 5 Oct 2017 06:06:15 -0400 Subject: [vtkusers] Performance comparison between VTk7.0.0 and VTK8.0.1 In-Reply-To: References: Message-ID: Yes, turn on the Module_vtkUtilitiesBenchmarks. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Oct 5, 2017 at 6:00 AM, Marcelo Duarte Trevisani < marceloduartetrevisani at gmail.com> wrote: > Do you already have a benchmark code to test the differences of > performance between this two versions? > > Because I'm thinking to migrate a software to vtk8 + vtkm + opengl2 + tbb > or openmp, but I have to show to my colleagues the advantages regarding the > performance of this new version compiled with these flags, to see if will > be prioritize or not. > > I will try to do what you said as well. Thanks. > > > On Thu, Oct 5, 2017 at 6:46 AM, David E DeMarle > wrote: > >> 1000 points isn't challenging enough. Try 1 million. >> >> >> David E DeMarle >> Kitware, Inc. >> Principal Engineer >> 21 Corporate Drive >> >> Clifton Park, NY 12065 >> >> -8662 >> Phone: 518-881-4909 <(518)%20881-4909> >> >> On Thu, Oct 5, 2017 at 1:34 AM, Marcelo Duarte Trevisani < >> marceloduartetrevisani at gmail.com> wrote: >> >>> Hello folks, >>> >>> I was doing a performance comparison between the VTK 7.0.0 with OpenGL1 >>> and SMP as sequential against VTK 8.0.1 with VTKm, OpenGL2 and SMP with >>> OpenMP but I saw no difference of the rendering process at all. I think >>> it's a bit strange, I read some articles in Kitware about the vantages to >>> use VTKm and OpenGL2 but in my simple test there is no difference. Does >>> anyone know what it's happening? Or Do I need to activate or do something >>> different ? >>> >>> Attached on this e-mail is the code which I used. >>> >>> In terms of performance what are the vantages in VTK 8.0.1 when compared >>> to VTK 7.0.0? >>> >>> Thanks in advance. >>> >>> Best Regards, >>> >>> >>> -- >>> Marcelo Duarte Trevisani >>> >>> "Success is walking from failure to failure with no loss of enthusiasm." >>> Winston Churchill >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > > > -- > Marcelo Duarte Trevisani > Engenheiro de Controle e Automa??o > pela Universidade Federal de Minas Gerais - (UFMG) > > Certificate Professional Scrum Master by Scrum.org > > "Success is walking from failure to failure with no loss of enthusiasm." > Winston Churchill > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Oct 5 08:39:39 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 5 Oct 2017 14:39:39 +0200 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: 2017-10-05 10:38 GMT+02:00 Elvis Stansvik : > 2017-10-04 18:12 GMT+02:00 Aashish Chaudhary : >> Got it, thanks! > > Although I'm not familiar at all with the code, I suspect this is what > happens with my 200x200x2 volume: > > In void vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() > { > this->CellToPointMatrix->Identity(); > this->AdjustedTexMin[0] = this->AdjustedTexMin[1] = > this->AdjustedTexMin[2] = 0.0f; > this->AdjustedTexMin[3] = 1.0f; > this->AdjustedTexMax[0] = this->AdjustedTexMax[1] = > this->AdjustedTexMax[2] = 1.0f; > this->AdjustedTexMax[3] = 1.0f; > > if (!this->Parent->CellFlag) // point data > { > float delta[3]; > delta[0] = this->Extents[1] - this->Extents[0]; > delta[1] = this->Extents[3] - this->Extents[2]; > delta[2] = this->Extents[5] - this->Extents[4]; > > float min[3]; > min[0] = 0.5f / delta[0]; > min[1] = 0.5f / delta[1]; > min[2] = 0.5f / delta[2]; > > float range[3]; // max - min > range[0] = (delta[0] - 0.5f) / delta[0] - min[0]; > range[1] = (delta[1] - 0.5f) / delta[1] - min[1]; > range[2] = (delta[2] - 0.5f) / delta[2] - min[2]; > > this->CellToPointMatrix->SetElement(0, 0, range[0]); // Scale diag > this->CellToPointMatrix->SetElement(1, 1, range[1]); > this->CellToPointMatrix->SetElement(2, 2, range[2]); > this->CellToPointMatrix->SetElement(0, 3, min[0]); // t vector > this->CellToPointMatrix->SetElement(1, 3, min[1]); > this->CellToPointMatrix->SetElement(2, 3, min[2]); > > // Adjust limit coordinates for texture access. > float const zeros[4] = {0.0f, 0.0f, 0.0f, 1.0f}; // GL tex min > float const ones[4] = {1.0f, 1.0f, 1.0f, 1.0f}; // GL tex max > this->CellToPointMatrix->MultiplyPoint(zeros, this->AdjustedTexMin); > this->CellToPointMatrix->MultiplyPoint(ones, this->AdjustedTexMax); > } > } > > delta[2] = 1 ==> min[2] = 0.5 ==> range[2] = 0 > > So the scale factor in the third dimension will be 0 in > CellToPointMatrix, right? I guess this could be what accounts for the > strange rendering? > > Could/should this code be updated to take into account when the extent > delta is just 1, so that volumes 2 data points thick can be rendered? I've only tested it briefly, but this seems to give the correct rendering even with a 2 point thick input: diff --git a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx index 8767bd0..88bbcba 100644 --- a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx +++ b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx @@ -1495,9 +1495,9 @@ void vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() if (!this->Parent->CellFlag) // point data { float delta[3]; - delta[0] = this->Extents[1] - this->Extents[0]; - delta[1] = this->Extents[3] - this->Extents[2]; - delta[2] = this->Extents[5] - this->Extents[4]; + delta[0] = std::max(2, this->Extents[1] - this->Extents[0]); + delta[1] = std::max(2, this->Extents[3] - this->Extents[2]); + delta[2] = std::max(2, this->Extents[5] - this->Extents[4]); float min[3]; min[0] = 0.5f / delta[0]; This ensures the texture does not collapse into 0 when the extent delta is 1. Would you consider this a correct fix? Elvis > > Elvis > >> >> On Wed, Oct 4, 2017 at 12:07 PM Elvis Stansvik >> wrote: >>> >>> 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary >>> : >>> > thanks..I just wanted to make sure that we remove that as one of the >>> > culprit. I am wondering if it is something to do with the geometry >>> > (bbox) or >>> > something to do with some edge case (calculation that is going off >>> > because >>> > of very small delta). Although in the past we have tried very think >>> > volumes >>> > >>> > Is it possible for you to send a sample dataset to us? >>> >>> My test case includes the data used. It's simply a 200x200x2 volume >>> filled with all data points set to 0.01. >>> >>> Elvis >>> >>> > >>> > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik >>> > wrote: >>> >> >>> >> Hi Aashish, >>> >> >>> >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary >>> >> : >>> >> > Please make sure that your sampling distance is less than < 2. You >>> >> > can >>> >> > set >>> >> > the sampling distance manually in the API. >>> >> >>> >> Hm. I don't think it's related to sampling distance. In the test case >>> >> I'm not setting sampling distance at all, so I think it should default >>> >> to 1, and then be automatically adjusted during interaction. >>> >> >>> >> In any case, even if I amend the test case with e.g.: >>> >> >>> >> volumeMapper->AutoAdjustSampleDistancesOff(); >>> >> volumeMapper->SetSampleDistance(0.2); >>> >> ... >>> >> volumeMapper2->AutoAdjustSampleDistancesOff(); >>> >> volumeMapper2->SetSampleDistance(0.2); >>> >> >>> >> The result is the same. >>> >> >>> >> Elvis >>> >> >>> >> > >>> >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik >>> >> > >>> >> > wrote: >>> >> >> >>> >> >> Hi all, >>> >> >> >>> >> >> In the test case below, I render one 200x200x2 volume and one >>> >> >> 200x200x3 volume, both with the same settings. >>> >> >> >>> >> >> The 200x200x3 volume looks as expected (the light gray one in the >>> >> >> attached screenshot), while the 200x200x2 one looks strange (too >>> >> >> dark, >>> >> >> and with some kind of gradient artifact). >>> >> >> >>> >> >> Is there some limitation on rendering a volume that is only 2 thick >>> >> >> in >>> >> >> one of the dimensions? I can understand why a volume of thickness 1 >>> >> >> can't be rendered properly, since VTK must have values to >>> >> >> interpolate >>> >> >> between, but 2 should be OK right? >>> >> >> >>> >> >> Thanks for any help. >>> >> >> >>> >> >> Elvis >>> >> >> >>> >> >> >>> >> >> main.cpp: >>> >> >> >>> >> >> #include >>> >> >> >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> #include >>> >> >> >>> >> >> int main(int argc, char *argv[]) >>> >> >> { >>> >> >> vtkNew colorFunction; >>> >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); >>> >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); >>> >> >> >>> >> >> vtkNew opacityFunction; >>> >> >> opacityFunction->AddPoint(0.0, 0.0); >>> >> >> opacityFunction->AddPoint(1.0, 1.0); >>> >> >> >>> >> >> // A 200x200x2 volume >>> >> >> vtkNew imageData; >>> >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); >>> >> >> imageData->AllocateScalars(VTK_FLOAT, 1); >>> >> >> std::fill_n(static_cast(imageData->GetScalarPointer()), >>> >> >> 200 * 200 * 2, 0.01); >>> >> >> >>> >> >> vtkNew volumeMapper; >>> >> >> volumeMapper->SetInputData(imageData.Get()); >>> >> >> >>> >> >> vtkNew volumeProperty; >>> >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); >>> >> >> volumeProperty->SetColor(colorFunction.Get()); >>> >> >> volumeProperty->ShadeOff(); >>> >> >> >>> >> >> vtkNew volume; >>> >> >> volume->SetMapper(volumeMapper.Get()); >>> >> >> volume->SetProperty(volumeProperty.Get()); >>> >> >> volume->SetPosition(120, 0, 0); >>> >> >> >>> >> >> // A 200x200x3 volume >>> >> >> vtkNew imageData2; >>> >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); >>> >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); >>> >> >> std::fill_n(static_cast>> >> >> *>(imageData2->GetScalarPointer()), >>> >> >> 200 * 200 * 3, 0.01); >>> >> >> >>> >> >> vtkNew volumeMapper2; >>> >> >> volumeMapper2->SetInputData(imageData2.Get()); >>> >> >> >>> >> >> vtkNew volumeProperty2; >>> >> >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); >>> >> >> volumeProperty2->SetColor(colorFunction.Get()); >>> >> >> volumeProperty2->ShadeOff(); >>> >> >> >>> >> >> vtkNew volume2; >>> >> >> volume2->SetMapper(volumeMapper2.Get()); >>> >> >> volume2->SetProperty(volumeProperty2.Get()); >>> >> >> volume2->SetPosition(-120, 0, 0); >>> >> >> >>> >> >> vtkNew renderer; >>> >> >> renderer->AddVolume(volume.Get()); >>> >> >> renderer->AddVolume(volume2.Get()); >>> >> >> renderer->SetBackground(1.0, 1.0, 1.0); >>> >> >> >>> >> >> // Render with "plain" render window / interactor >>> >> >> vtkNew window; >>> >> >> window->SetMultiSamples(0); >>> >> >> window->AddRenderer(renderer.Get()); >>> >> >> >>> >> >> vtkNew interactor; >>> >> >> interactor->SetRenderWindow(window.Get()); >>> >> >> interactor->Start(); >>> >> >> >>> >> >> return 0; >>> >> >> } >>> >> >> >>> >> >> >>> >> >> CMakeLists.txt: >>> >> >> >>> >> >> cmake_minimum_required(VERSION 3.1) >>> >> >> >>> >> >> project(TestCase) >>> >> >> >>> >> >> find_package(VTK 8.0 COMPONENTS >>> >> >> vtkCommonCore >>> >> >> vtkCommonDataModel >>> >> >> vtkCommonExecutionModel >>> >> >> vtkCommonMath >>> >> >> vtkFiltersSources >>> >> >> vtkGUISupportQt >>> >> >> vtkInteractionStyle >>> >> >> vtkRenderingCore >>> >> >> vtkRenderingOpenGL2 >>> >> >> vtkRenderingVolume >>> >> >> vtkRenderingVolumeOpenGL2 >>> >> >> REQUIRED >>> >> >> ) >>> >> >> >>> >> >> add_executable(TestCase main.cpp) >>> >> >> >>> >> >> target_link_libraries(TestCase PUBLIC >>> >> >> vtkCommonCore >>> >> >> vtkCommonDataModel >>> >> >> vtkCommonExecutionModel >>> >> >> vtkCommonMath >>> >> >> vtkFiltersSources >>> >> >> vtkInteractionStyle >>> >> >> vtkRenderingCore >>> >> >> vtkRenderingOpenGL2 >>> >> >> vtkRenderingVolume >>> >> >> vtkRenderingVolumeOpenGL2 >>> >> >> ) >>> >> >> >>> >> >> target_include_directories(TestCase PUBLIC >>> >> >> ${VTK_INCLUDE_DIRS} >>> >> >> ) >>> >> >> >>> >> >> target_compile_definitions(TestCase PUBLIC >>> >> >> ${VTK_DEFINITIONS} >>> >> >> ) >>> >> >> >>> >> >> set_target_properties(TestCase PROPERTIES >>> >> >> CXX_STANDARD 14 >>> >> >> CXX_STANDARD_REQUIRED ON >>> >> >> ) >>> >> >> _______________________________________________ >>> >> >> Powered by www.kitware.com >>> >> >> >>> >> >> Visit other Kitware open-source projects at >>> >> >> http://www.kitware.com/opensource/opensource.html >>> >> >> >>> >> >> Please keep messages on-topic and check the VTK FAQ at: >>> >> >> http://www.vtk.org/Wiki/VTK_FAQ >>> >> >> >>> >> >> 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 denis.ducreux at icloud.com Thu Oct 5 07:52:06 2017 From: denis.ducreux at icloud.com (Denis Ducreux) Date: Thu, 05 Oct 2017 13:52:06 +0200 Subject: [vtkusers] VTK OpenVR issue and questions Message-ID: <500335EB-9FA1-4A2B-88DE-CC3AAF8F67B0@icloud.com> Hi, I?m quite new to VTK coding ; I downloaded and compiled the last git master version and I would like to know : 1- When using Volume Rendering (such as in Medical4 example) in OpenVR, no volume is displayed at all in the VR Headset. When I try to add for example legacy .vtk files (in polydata) to the scene, the whole rendering is flickering, and the volume rendering is not displayed, but the polydata are displayed with flickering and lagging. 2- When using the OpenVR rendering, it is possible to clip the whole scene (choice from user?s menu). How could I : 2.1 - Map a slice from an ImageData Volume to the clipped scene ? 2.2 - I have a data volume (binary raw, displayed after marching cube) and a polydata file (legacy .vtk) ; I would like to clip the volume only, not the poly data inside the OpenVR rendering.How could I do this ? Thanks for your help :-) From ken.martin at kitware.com Thu Oct 5 09:03:15 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 5 Oct 2017 09:03:15 -0400 Subject: [vtkusers] VTK OpenVR issue and questions In-Reply-To: <500335EB-9FA1-4A2B-88DE-CC3AAF8F67B0@icloud.com> References: <500335EB-9FA1-4A2B-88DE-CC3AAF8F67B0@icloud.com> Message-ID: For (1) Make sure you set yourRenderWindow->SetMultiSamples(0) before the first render, that could be the issue. Not sure about flickering and lagging but if you have a nvidia card make sure you open the nvidia control panel and set your preferred graphics processor to be the high performance nvidia processor and set vertical sync to Off (I forget which it is). Apply those settings and then try again. 2) the clipping should clip whatever is in the scene. Changing it to clip only some actors is not supported. You would need to look at the code in vtkOpenVRInteractorStyle.cxx and see how we do the clipping and then use similar logic in your code. On Thu, Oct 5, 2017 at 7:52 AM, Denis Ducreux wrote: > Hi, > I?m quite new to VTK coding ; I downloaded and compiled the last git > master version and I would like to know : > > 1- When using Volume Rendering (such as in Medical4 example) in OpenVR, no > volume is displayed at all in the VR Headset. When I try to add for example > legacy .vtk files (in polydata) to the scene, the whole rendering is > flickering, and the volume rendering is not displayed, but the polydata are > displayed with flickering and lagging. > > 2- When using the OpenVR rendering, it is possible to clip the whole scene > (choice from user?s menu). > How could I : > 2.1 - Map a slice from an ImageData Volume to the clipped scene ? > 2.2 - I have a data volume (binary raw, displayed after marching > cube) and a polydata file (legacy .vtk) ; I would like to clip the volume > only, not the poly data inside the OpenVR rendering.How could I do this ? > > Thanks for your help :-) > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Oct 5 10:34:09 2017 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 05 Oct 2017 14:34:09 +0000 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: Thanks we are looking into it, earlier we moved the math from the shader to a matrix that now we are forming in C++ so at this point we are looking at the equation carefully. But yes, I thought you may have found a bug. - aashish On Thu, Oct 5, 2017 at 8:39 AM Elvis Stansvik wrote: > 2017-10-05 10:38 GMT+02:00 Elvis Stansvik : > > 2017-10-04 18:12 GMT+02:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Got it, thanks! > > > > Although I'm not familiar at all with the code, I suspect this is what > > happens with my 200x200x2 volume: > > > > In void > vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() > > { > > this->CellToPointMatrix->Identity(); > > this->AdjustedTexMin[0] = this->AdjustedTexMin[1] = > > this->AdjustedTexMin[2] = 0.0f; > > this->AdjustedTexMin[3] = 1.0f; > > this->AdjustedTexMax[0] = this->AdjustedTexMax[1] = > > this->AdjustedTexMax[2] = 1.0f; > > this->AdjustedTexMax[3] = 1.0f; > > > > if (!this->Parent->CellFlag) // point data > > { > > float delta[3]; > > delta[0] = this->Extents[1] - this->Extents[0]; > > delta[1] = this->Extents[3] - this->Extents[2]; > > delta[2] = this->Extents[5] - this->Extents[4]; > > > > float min[3]; > > min[0] = 0.5f / delta[0]; > > min[1] = 0.5f / delta[1]; > > min[2] = 0.5f / delta[2]; > > > > float range[3]; // max - min > > range[0] = (delta[0] - 0.5f) / delta[0] - min[0]; > > range[1] = (delta[1] - 0.5f) / delta[1] - min[1]; > > range[2] = (delta[2] - 0.5f) / delta[2] - min[2]; > > > > this->CellToPointMatrix->SetElement(0, 0, range[0]); // Scale diag > > this->CellToPointMatrix->SetElement(1, 1, range[1]); > > this->CellToPointMatrix->SetElement(2, 2, range[2]); > > this->CellToPointMatrix->SetElement(0, 3, min[0]); // t vector > > this->CellToPointMatrix->SetElement(1, 3, min[1]); > > this->CellToPointMatrix->SetElement(2, 3, min[2]); > > > > // Adjust limit coordinates for texture access. > > float const zeros[4] = {0.0f, 0.0f, 0.0f, 1.0f}; // GL tex min > > float const ones[4] = {1.0f, 1.0f, 1.0f, 1.0f}; // GL tex max > > this->CellToPointMatrix->MultiplyPoint(zeros, this->AdjustedTexMin); > > this->CellToPointMatrix->MultiplyPoint(ones, this->AdjustedTexMax); > > } > > } > > > > delta[2] = 1 ==> min[2] = 0.5 ==> range[2] = 0 > > > > So the scale factor in the third dimension will be 0 in > > CellToPointMatrix, right? I guess this could be what accounts for the > > strange rendering? > > > > Could/should this code be updated to take into account when the extent > > delta is just 1, so that volumes 2 data points thick can be rendered? > > I've only tested it briefly, but this seems to give the correct > rendering even with a 2 point thick input: > > diff --git a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx > b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx > index 8767bd0..88bbcba 100644 > --- a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx > +++ b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx > @@ -1495,9 +1495,9 @@ void > vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() > if (!this->Parent->CellFlag) // point data > { > float delta[3]; > - delta[0] = this->Extents[1] - this->Extents[0]; > - delta[1] = this->Extents[3] - this->Extents[2]; > - delta[2] = this->Extents[5] - this->Extents[4]; > + delta[0] = std::max(2, this->Extents[1] - this->Extents[0]); > + delta[1] = std::max(2, this->Extents[3] - this->Extents[2]); > + delta[2] = std::max(2, this->Extents[5] - this->Extents[4]); > > float min[3]; > min[0] = 0.5f / delta[0]; > > This ensures the texture does not collapse into 0 when the extent > delta is 1. Would you consider this a correct fix? > > Elvis > > > > > Elvis > > > >> > >> On Wed, Oct 4, 2017 at 12:07 PM Elvis Stansvik > >> wrote: > >>> > >>> 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary > >>> : > >>> > thanks..I just wanted to make sure that we remove that as one of the > >>> > culprit. I am wondering if it is something to do with the geometry > >>> > (bbox) or > >>> > something to do with some edge case (calculation that is going off > >>> > because > >>> > of very small delta). Although in the past we have tried very think > >>> > volumes > >>> > > >>> > Is it possible for you to send a sample dataset to us? > >>> > >>> My test case includes the data used. It's simply a 200x200x2 volume > >>> filled with all data points set to 0.01. > >>> > >>> Elvis > >>> > >>> > > >>> > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik > >>> > wrote: > >>> >> > >>> >> Hi Aashish, > >>> >> > >>> >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary > >>> >> : > >>> >> > Please make sure that your sampling distance is less than < 2. You > >>> >> > can > >>> >> > set > >>> >> > the sampling distance manually in the API. > >>> >> > >>> >> Hm. I don't think it's related to sampling distance. In the test > case > >>> >> I'm not setting sampling distance at all, so I think it should > default > >>> >> to 1, and then be automatically adjusted during interaction. > >>> >> > >>> >> In any case, even if I amend the test case with e.g.: > >>> >> > >>> >> volumeMapper->AutoAdjustSampleDistancesOff(); > >>> >> volumeMapper->SetSampleDistance(0.2); > >>> >> ... > >>> >> volumeMapper2->AutoAdjustSampleDistancesOff(); > >>> >> volumeMapper2->SetSampleDistance(0.2); > >>> >> > >>> >> The result is the same. > >>> >> > >>> >> Elvis > >>> >> > >>> >> > > >>> >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik > >>> >> > > >>> >> > wrote: > >>> >> >> > >>> >> >> Hi all, > >>> >> >> > >>> >> >> In the test case below, I render one 200x200x2 volume and one > >>> >> >> 200x200x3 volume, both with the same settings. > >>> >> >> > >>> >> >> The 200x200x3 volume looks as expected (the light gray one in the > >>> >> >> attached screenshot), while the 200x200x2 one looks strange (too > >>> >> >> dark, > >>> >> >> and with some kind of gradient artifact). > >>> >> >> > >>> >> >> Is there some limitation on rendering a volume that is only 2 > thick > >>> >> >> in > >>> >> >> one of the dimensions? I can understand why a volume of > thickness 1 > >>> >> >> can't be rendered properly, since VTK must have values to > >>> >> >> interpolate > >>> >> >> between, but 2 should be OK right? > >>> >> >> > >>> >> >> Thanks for any help. > >>> >> >> > >>> >> >> Elvis > >>> >> >> > >>> >> >> > >>> >> >> main.cpp: > >>> >> >> > >>> >> >> #include > >>> >> >> > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> #include > >>> >> >> > >>> >> >> int main(int argc, char *argv[]) > >>> >> >> { > >>> >> >> vtkNew colorFunction; > >>> >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); > >>> >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); > >>> >> >> > >>> >> >> vtkNew opacityFunction; > >>> >> >> opacityFunction->AddPoint(0.0, 0.0); > >>> >> >> opacityFunction->AddPoint(1.0, 1.0); > >>> >> >> > >>> >> >> // A 200x200x2 volume > >>> >> >> vtkNew imageData; > >>> >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); > >>> >> >> imageData->AllocateScalars(VTK_FLOAT, 1); > >>> >> >> std::fill_n(static_cast *>(imageData->GetScalarPointer()), > >>> >> >> 200 * 200 * 2, 0.01); > >>> >> >> > >>> >> >> vtkNew volumeMapper; > >>> >> >> volumeMapper->SetInputData(imageData.Get()); > >>> >> >> > >>> >> >> vtkNew volumeProperty; > >>> >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); > >>> >> >> volumeProperty->SetColor(colorFunction.Get()); > >>> >> >> volumeProperty->ShadeOff(); > >>> >> >> > >>> >> >> vtkNew volume; > >>> >> >> volume->SetMapper(volumeMapper.Get()); > >>> >> >> volume->SetProperty(volumeProperty.Get()); > >>> >> >> volume->SetPosition(120, 0, 0); > >>> >> >> > >>> >> >> // A 200x200x3 volume > >>> >> >> vtkNew imageData2; > >>> >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); > >>> >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); > >>> >> >> std::fill_n(static_cast >>> >> >> *>(imageData2->GetScalarPointer()), > >>> >> >> 200 * 200 * 3, 0.01); > >>> >> >> > >>> >> >> vtkNew volumeMapper2; > >>> >> >> volumeMapper2->SetInputData(imageData2.Get()); > >>> >> >> > >>> >> >> vtkNew volumeProperty2; > >>> >> >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); > >>> >> >> volumeProperty2->SetColor(colorFunction.Get()); > >>> >> >> volumeProperty2->ShadeOff(); > >>> >> >> > >>> >> >> vtkNew volume2; > >>> >> >> volume2->SetMapper(volumeMapper2.Get()); > >>> >> >> volume2->SetProperty(volumeProperty2.Get()); > >>> >> >> volume2->SetPosition(-120, 0, 0); > >>> >> >> > >>> >> >> vtkNew renderer; > >>> >> >> renderer->AddVolume(volume.Get()); > >>> >> >> renderer->AddVolume(volume2.Get()); > >>> >> >> renderer->SetBackground(1.0, 1.0, 1.0); > >>> >> >> > >>> >> >> // Render with "plain" render window / interactor > >>> >> >> vtkNew window; > >>> >> >> window->SetMultiSamples(0); > >>> >> >> window->AddRenderer(renderer.Get()); > >>> >> >> > >>> >> >> vtkNew interactor; > >>> >> >> interactor->SetRenderWindow(window.Get()); > >>> >> >> interactor->Start(); > >>> >> >> > >>> >> >> return 0; > >>> >> >> } > >>> >> >> > >>> >> >> > >>> >> >> CMakeLists.txt: > >>> >> >> > >>> >> >> cmake_minimum_required(VERSION 3.1) > >>> >> >> > >>> >> >> project(TestCase) > >>> >> >> > >>> >> >> find_package(VTK 8.0 COMPONENTS > >>> >> >> vtkCommonCore > >>> >> >> vtkCommonDataModel > >>> >> >> vtkCommonExecutionModel > >>> >> >> vtkCommonMath > >>> >> >> vtkFiltersSources > >>> >> >> vtkGUISupportQt > >>> >> >> vtkInteractionStyle > >>> >> >> vtkRenderingCore > >>> >> >> vtkRenderingOpenGL2 > >>> >> >> vtkRenderingVolume > >>> >> >> vtkRenderingVolumeOpenGL2 > >>> >> >> REQUIRED > >>> >> >> ) > >>> >> >> > >>> >> >> add_executable(TestCase main.cpp) > >>> >> >> > >>> >> >> target_link_libraries(TestCase PUBLIC > >>> >> >> vtkCommonCore > >>> >> >> vtkCommonDataModel > >>> >> >> vtkCommonExecutionModel > >>> >> >> vtkCommonMath > >>> >> >> vtkFiltersSources > >>> >> >> vtkInteractionStyle > >>> >> >> vtkRenderingCore > >>> >> >> vtkRenderingOpenGL2 > >>> >> >> vtkRenderingVolume > >>> >> >> vtkRenderingVolumeOpenGL2 > >>> >> >> ) > >>> >> >> > >>> >> >> target_include_directories(TestCase PUBLIC > >>> >> >> ${VTK_INCLUDE_DIRS} > >>> >> >> ) > >>> >> >> > >>> >> >> target_compile_definitions(TestCase PUBLIC > >>> >> >> ${VTK_DEFINITIONS} > >>> >> >> ) > >>> >> >> > >>> >> >> set_target_properties(TestCase PROPERTIES > >>> >> >> CXX_STANDARD 14 > >>> >> >> CXX_STANDARD_REQUIRED ON > >>> >> >> ) > >>> >> >> _______________________________________________ > >>> >> >> Powered by www.kitware.com > >>> >> >> > >>> >> >> Visit other Kitware open-source projects at > >>> >> >> http://www.kitware.com/opensource/opensource.html > >>> >> >> > >>> >> >> Please keep messages on-topic and check the VTK FAQ at: > >>> >> >> http://www.vtk.org/Wiki/VTK_FAQ > >>> >> >> > >>> >> >> Search the list archives at: > http://markmail.org/search/?q=vtkusers > >>> >> >> > >>> >> >> Follow this link to subscribe/unsubscribe: > >>> >> >> http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Oct 5 10:48:33 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 5 Oct 2017 16:48:33 +0200 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: 2017-10-05 16:34 GMT+02:00 Aashish Chaudhary : > Thanks we are looking into it, earlier we moved the math from the shader to > a matrix that now we are forming in C++ so at this point we are looking at > the equation carefully. But yes, I thought you may have found a bug. Thanks for having a look. I suspect my std::max(..) is just a workaround and not a proper fix. Me and a colleague had another look, but I think we were both too tired to figure out if something was fundamentally wrong with the equations. Too late in the day :) Elvis > > - aashish > > On Thu, Oct 5, 2017 at 8:39 AM Elvis Stansvik > wrote: >> >> 2017-10-05 10:38 GMT+02:00 Elvis Stansvik : >> > 2017-10-04 18:12 GMT+02:00 Aashish Chaudhary >> > : >> >> Got it, thanks! >> > >> > Although I'm not familiar at all with the code, I suspect this is what >> > happens with my 200x200x2 volume: >> > >> > In void >> > vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() >> > { >> > this->CellToPointMatrix->Identity(); >> > this->AdjustedTexMin[0] = this->AdjustedTexMin[1] = >> > this->AdjustedTexMin[2] = 0.0f; >> > this->AdjustedTexMin[3] = 1.0f; >> > this->AdjustedTexMax[0] = this->AdjustedTexMax[1] = >> > this->AdjustedTexMax[2] = 1.0f; >> > this->AdjustedTexMax[3] = 1.0f; >> > >> > if (!this->Parent->CellFlag) // point data >> > { >> > float delta[3]; >> > delta[0] = this->Extents[1] - this->Extents[0]; >> > delta[1] = this->Extents[3] - this->Extents[2]; >> > delta[2] = this->Extents[5] - this->Extents[4]; >> > >> > float min[3]; >> > min[0] = 0.5f / delta[0]; >> > min[1] = 0.5f / delta[1]; >> > min[2] = 0.5f / delta[2]; >> > >> > float range[3]; // max - min >> > range[0] = (delta[0] - 0.5f) / delta[0] - min[0]; >> > range[1] = (delta[1] - 0.5f) / delta[1] - min[1]; >> > range[2] = (delta[2] - 0.5f) / delta[2] - min[2]; >> > >> > this->CellToPointMatrix->SetElement(0, 0, range[0]); // Scale diag >> > this->CellToPointMatrix->SetElement(1, 1, range[1]); >> > this->CellToPointMatrix->SetElement(2, 2, range[2]); >> > this->CellToPointMatrix->SetElement(0, 3, min[0]); // t vector >> > this->CellToPointMatrix->SetElement(1, 3, min[1]); >> > this->CellToPointMatrix->SetElement(2, 3, min[2]); >> > >> > // Adjust limit coordinates for texture access. >> > float const zeros[4] = {0.0f, 0.0f, 0.0f, 1.0f}; // GL tex min >> > float const ones[4] = {1.0f, 1.0f, 1.0f, 1.0f}; // GL tex max >> > this->CellToPointMatrix->MultiplyPoint(zeros, this->AdjustedTexMin); >> > this->CellToPointMatrix->MultiplyPoint(ones, this->AdjustedTexMax); >> > } >> > } >> > >> > delta[2] = 1 ==> min[2] = 0.5 ==> range[2] = 0 >> > >> > So the scale factor in the third dimension will be 0 in >> > CellToPointMatrix, right? I guess this could be what accounts for the >> > strange rendering? >> > >> > Could/should this code be updated to take into account when the extent >> > delta is just 1, so that volumes 2 data points thick can be rendered? >> >> I've only tested it briefly, but this seems to give the correct >> rendering even with a 2 point thick input: >> >> diff --git a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> index 8767bd0..88bbcba 100644 >> --- a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> +++ b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> @@ -1495,9 +1495,9 @@ void >> vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() >> if (!this->Parent->CellFlag) // point data >> { >> float delta[3]; >> - delta[0] = this->Extents[1] - this->Extents[0]; >> - delta[1] = this->Extents[3] - this->Extents[2]; >> - delta[2] = this->Extents[5] - this->Extents[4]; >> + delta[0] = std::max(2, this->Extents[1] - this->Extents[0]); >> + delta[1] = std::max(2, this->Extents[3] - this->Extents[2]); >> + delta[2] = std::max(2, this->Extents[5] - this->Extents[4]); >> >> float min[3]; >> min[0] = 0.5f / delta[0]; >> >> This ensures the texture does not collapse into 0 when the extent >> delta is 1. Would you consider this a correct fix? >> >> Elvis >> >> > >> > Elvis >> > >> >> >> >> On Wed, Oct 4, 2017 at 12:07 PM Elvis Stansvik >> >> wrote: >> >>> >> >>> 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary >> >>> : >> >>> > thanks..I just wanted to make sure that we remove that as one of the >> >>> > culprit. I am wondering if it is something to do with the geometry >> >>> > (bbox) or >> >>> > something to do with some edge case (calculation that is going off >> >>> > because >> >>> > of very small delta). Although in the past we have tried very think >> >>> > volumes >> >>> > >> >>> > Is it possible for you to send a sample dataset to us? >> >>> >> >>> My test case includes the data used. It's simply a 200x200x2 volume >> >>> filled with all data points set to 0.01. >> >>> >> >>> Elvis >> >>> >> >>> > >> >>> > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik >> >>> > wrote: >> >>> >> >> >>> >> Hi Aashish, >> >>> >> >> >>> >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary >> >>> >> : >> >>> >> > Please make sure that your sampling distance is less than < 2. >> >>> >> > You >> >>> >> > can >> >>> >> > set >> >>> >> > the sampling distance manually in the API. >> >>> >> >> >>> >> Hm. I don't think it's related to sampling distance. In the test >> >>> >> case >> >>> >> I'm not setting sampling distance at all, so I think it should >> >>> >> default >> >>> >> to 1, and then be automatically adjusted during interaction. >> >>> >> >> >>> >> In any case, even if I amend the test case with e.g.: >> >>> >> >> >>> >> volumeMapper->AutoAdjustSampleDistancesOff(); >> >>> >> volumeMapper->SetSampleDistance(0.2); >> >>> >> ... >> >>> >> volumeMapper2->AutoAdjustSampleDistancesOff(); >> >>> >> volumeMapper2->SetSampleDistance(0.2); >> >>> >> >> >>> >> The result is the same. >> >>> >> >> >>> >> Elvis >> >>> >> >> >>> >> > >> >>> >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik >> >>> >> > >> >>> >> > wrote: >> >>> >> >> >> >>> >> >> Hi all, >> >>> >> >> >> >>> >> >> In the test case below, I render one 200x200x2 volume and one >> >>> >> >> 200x200x3 volume, both with the same settings. >> >>> >> >> >> >>> >> >> The 200x200x3 volume looks as expected (the light gray one in >> >>> >> >> the >> >>> >> >> attached screenshot), while the 200x200x2 one looks strange (too >> >>> >> >> dark, >> >>> >> >> and with some kind of gradient artifact). >> >>> >> >> >> >>> >> >> Is there some limitation on rendering a volume that is only 2 >> >>> >> >> thick >> >>> >> >> in >> >>> >> >> one of the dimensions? I can understand why a volume of >> >>> >> >> thickness 1 >> >>> >> >> can't be rendered properly, since VTK must have values to >> >>> >> >> interpolate >> >>> >> >> between, but 2 should be OK right? >> >>> >> >> >> >>> >> >> Thanks for any help. >> >>> >> >> >> >>> >> >> Elvis >> >>> >> >> >> >>> >> >> >> >>> >> >> main.cpp: >> >>> >> >> >> >>> >> >> #include >> >>> >> >> >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> #include >> >>> >> >> >> >>> >> >> int main(int argc, char *argv[]) >> >>> >> >> { >> >>> >> >> vtkNew colorFunction; >> >>> >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); >> >>> >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); >> >>> >> >> >> >>> >> >> vtkNew opacityFunction; >> >>> >> >> opacityFunction->AddPoint(0.0, 0.0); >> >>> >> >> opacityFunction->AddPoint(1.0, 1.0); >> >>> >> >> >> >>> >> >> // A 200x200x2 volume >> >>> >> >> vtkNew imageData; >> >>> >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); >> >>> >> >> imageData->AllocateScalars(VTK_FLOAT, 1); >> >>> >> >> std::fill_n(static_cast> >>> >> >> *>(imageData->GetScalarPointer()), >> >>> >> >> 200 * 200 * 2, 0.01); >> >>> >> >> >> >>> >> >> vtkNew volumeMapper; >> >>> >> >> volumeMapper->SetInputData(imageData.Get()); >> >>> >> >> >> >>> >> >> vtkNew volumeProperty; >> >>> >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); >> >>> >> >> volumeProperty->SetColor(colorFunction.Get()); >> >>> >> >> volumeProperty->ShadeOff(); >> >>> >> >> >> >>> >> >> vtkNew volume; >> >>> >> >> volume->SetMapper(volumeMapper.Get()); >> >>> >> >> volume->SetProperty(volumeProperty.Get()); >> >>> >> >> volume->SetPosition(120, 0, 0); >> >>> >> >> >> >>> >> >> // A 200x200x3 volume >> >>> >> >> vtkNew imageData2; >> >>> >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); >> >>> >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); >> >>> >> >> std::fill_n(static_cast> >>> >> >> *>(imageData2->GetScalarPointer()), >> >>> >> >> 200 * 200 * 3, 0.01); >> >>> >> >> >> >>> >> >> vtkNew volumeMapper2; >> >>> >> >> volumeMapper2->SetInputData(imageData2.Get()); >> >>> >> >> >> >>> >> >> vtkNew volumeProperty2; >> >>> >> >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); >> >>> >> >> volumeProperty2->SetColor(colorFunction.Get()); >> >>> >> >> volumeProperty2->ShadeOff(); >> >>> >> >> >> >>> >> >> vtkNew volume2; >> >>> >> >> volume2->SetMapper(volumeMapper2.Get()); >> >>> >> >> volume2->SetProperty(volumeProperty2.Get()); >> >>> >> >> volume2->SetPosition(-120, 0, 0); >> >>> >> >> >> >>> >> >> vtkNew renderer; >> >>> >> >> renderer->AddVolume(volume.Get()); >> >>> >> >> renderer->AddVolume(volume2.Get()); >> >>> >> >> renderer->SetBackground(1.0, 1.0, 1.0); >> >>> >> >> >> >>> >> >> // Render with "plain" render window / interactor >> >>> >> >> vtkNew window; >> >>> >> >> window->SetMultiSamples(0); >> >>> >> >> window->AddRenderer(renderer.Get()); >> >>> >> >> >> >>> >> >> vtkNew interactor; >> >>> >> >> interactor->SetRenderWindow(window.Get()); >> >>> >> >> interactor->Start(); >> >>> >> >> >> >>> >> >> return 0; >> >>> >> >> } >> >>> >> >> >> >>> >> >> >> >>> >> >> CMakeLists.txt: >> >>> >> >> >> >>> >> >> cmake_minimum_required(VERSION 3.1) >> >>> >> >> >> >>> >> >> project(TestCase) >> >>> >> >> >> >>> >> >> find_package(VTK 8.0 COMPONENTS >> >>> >> >> vtkCommonCore >> >>> >> >> vtkCommonDataModel >> >>> >> >> vtkCommonExecutionModel >> >>> >> >> vtkCommonMath >> >>> >> >> vtkFiltersSources >> >>> >> >> vtkGUISupportQt >> >>> >> >> vtkInteractionStyle >> >>> >> >> vtkRenderingCore >> >>> >> >> vtkRenderingOpenGL2 >> >>> >> >> vtkRenderingVolume >> >>> >> >> vtkRenderingVolumeOpenGL2 >> >>> >> >> REQUIRED >> >>> >> >> ) >> >>> >> >> >> >>> >> >> add_executable(TestCase main.cpp) >> >>> >> >> >> >>> >> >> target_link_libraries(TestCase PUBLIC >> >>> >> >> vtkCommonCore >> >>> >> >> vtkCommonDataModel >> >>> >> >> vtkCommonExecutionModel >> >>> >> >> vtkCommonMath >> >>> >> >> vtkFiltersSources >> >>> >> >> vtkInteractionStyle >> >>> >> >> vtkRenderingCore >> >>> >> >> vtkRenderingOpenGL2 >> >>> >> >> vtkRenderingVolume >> >>> >> >> vtkRenderingVolumeOpenGL2 >> >>> >> >> ) >> >>> >> >> >> >>> >> >> target_include_directories(TestCase PUBLIC >> >>> >> >> ${VTK_INCLUDE_DIRS} >> >>> >> >> ) >> >>> >> >> >> >>> >> >> target_compile_definitions(TestCase PUBLIC >> >>> >> >> ${VTK_DEFINITIONS} >> >>> >> >> ) >> >>> >> >> >> >>> >> >> set_target_properties(TestCase PROPERTIES >> >>> >> >> CXX_STANDARD 14 >> >>> >> >> CXX_STANDARD_REQUIRED ON >> >>> >> >> ) >> >>> >> >> _______________________________________________ >> >>> >> >> Powered by www.kitware.com >> >>> >> >> >> >>> >> >> Visit other Kitware open-source projects at >> >>> >> >> http://www.kitware.com/opensource/opensource.html >> >>> >> >> >> >>> >> >> Please keep messages on-topic and check the VTK FAQ at: >> >>> >> >> http://www.vtk.org/Wiki/VTK_FAQ >> >>> >> >> >> >>> >> >> 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 aashish.chaudhary at kitware.com Thu Oct 5 11:48:29 2017 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 05 Oct 2017 15:48:29 +0000 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: No worries...so we just checked the math the cell to point offset matrix seems to be right but the delta seems wrong. Can you change this > delta[0] = this->Extents[1] - this->Extents[0]; > delta[1] = this->Extents[3] - this->Extents[2]; > delta[2] = this->Extents[5] - this->Extents[4]; to this delta[0] = this->Extents[1] - this->Extents[0] + 1; delta[1] = this->Extents[3] - this->Extents[2] + 1; delta[2] = this->Extents[5] - this->Extents[4] + 1; Thanks, On Thu, Oct 5, 2017 at 10:48 AM Elvis Stansvik wrote: > 2017-10-05 16:34 GMT+02:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > > Thanks we are looking into it, earlier we moved the math from the shader > to > > a matrix that now we are forming in C++ so at this point we are looking > at > > the equation carefully. But yes, I thought you may have found a bug. > > Thanks for having a look. I suspect my std::max(..) is just a > workaround and not a proper fix. > > Me and a colleague had another look, but I think we were both too > tired to figure out if something was fundamentally wrong with the > equations. Too late in the day :) > > Elvis > > > > > - aashish > > > > On Thu, Oct 5, 2017 at 8:39 AM Elvis Stansvik < > elvis.stansvik at orexplore.com> > > wrote: > >> > >> 2017-10-05 10:38 GMT+02:00 Elvis Stansvik >: > >> > 2017-10-04 18:12 GMT+02:00 Aashish Chaudhary > >> > : > >> >> Got it, thanks! > >> > > >> > Although I'm not familiar at all with the code, I suspect this is what > >> > happens with my 200x200x2 volume: > >> > > >> > In void > >> > > vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() > >> > { > >> > this->CellToPointMatrix->Identity(); > >> > this->AdjustedTexMin[0] = this->AdjustedTexMin[1] = > >> > this->AdjustedTexMin[2] = 0.0f; > >> > this->AdjustedTexMin[3] = 1.0f; > >> > this->AdjustedTexMax[0] = this->AdjustedTexMax[1] = > >> > this->AdjustedTexMax[2] = 1.0f; > >> > this->AdjustedTexMax[3] = 1.0f; > >> > > >> > if (!this->Parent->CellFlag) // point data > >> > { > >> > float delta[3]; > >> > delta[0] = this->Extents[1] - this->Extents[0]; > >> > delta[1] = this->Extents[3] - this->Extents[2]; > >> > delta[2] = this->Extents[5] - this->Extents[4]; > >> > > >> > float min[3]; > >> > min[0] = 0.5f / delta[0]; > >> > min[1] = 0.5f / delta[1]; > >> > min[2] = 0.5f / delta[2]; > >> > > >> > float range[3]; // max - min > >> > range[0] = (delta[0] - 0.5f) / delta[0] - min[0]; > >> > range[1] = (delta[1] - 0.5f) / delta[1] - min[1]; > >> > range[2] = (delta[2] - 0.5f) / delta[2] - min[2]; > >> > > >> > this->CellToPointMatrix->SetElement(0, 0, range[0]); // Scale diag > >> > this->CellToPointMatrix->SetElement(1, 1, range[1]); > >> > this->CellToPointMatrix->SetElement(2, 2, range[2]); > >> > this->CellToPointMatrix->SetElement(0, 3, min[0]); // t vector > >> > this->CellToPointMatrix->SetElement(1, 3, min[1]); > >> > this->CellToPointMatrix->SetElement(2, 3, min[2]); > >> > > >> > // Adjust limit coordinates for texture access. > >> > float const zeros[4] = {0.0f, 0.0f, 0.0f, 1.0f}; // GL tex min > >> > float const ones[4] = {1.0f, 1.0f, 1.0f, 1.0f}; // GL tex max > >> > this->CellToPointMatrix->MultiplyPoint(zeros, > this->AdjustedTexMin); > >> > this->CellToPointMatrix->MultiplyPoint(ones, > this->AdjustedTexMax); > >> > } > >> > } > >> > > >> > delta[2] = 1 ==> min[2] = 0.5 ==> range[2] = 0 > >> > > >> > So the scale factor in the third dimension will be 0 in > >> > CellToPointMatrix, right? I guess this could be what accounts for the > >> > strange rendering? > >> > > >> > Could/should this code be updated to take into account when the extent > >> > delta is just 1, so that volumes 2 data points thick can be rendered? > >> > >> I've only tested it briefly, but this seems to give the correct > >> rendering even with a 2 point thick input: > >> > >> diff --git a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx > >> b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx > >> index 8767bd0..88bbcba 100644 > >> --- a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx > >> +++ b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx > >> @@ -1495,9 +1495,9 @@ void > >> vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() > >> if (!this->Parent->CellFlag) // point data > >> { > >> float delta[3]; > >> - delta[0] = this->Extents[1] - this->Extents[0]; > >> - delta[1] = this->Extents[3] - this->Extents[2]; > >> - delta[2] = this->Extents[5] - this->Extents[4]; > >> + delta[0] = std::max(2, this->Extents[1] - this->Extents[0]); > >> + delta[1] = std::max(2, this->Extents[3] - this->Extents[2]); > >> + delta[2] = std::max(2, this->Extents[5] - this->Extents[4]); > >> > >> float min[3]; > >> min[0] = 0.5f / delta[0]; > >> > >> This ensures the texture does not collapse into 0 when the extent > >> delta is 1. Would you consider this a correct fix? > >> > >> Elvis > >> > >> > > >> > Elvis > >> > > >> >> > >> >> On Wed, Oct 4, 2017 at 12:07 PM Elvis Stansvik > >> >> wrote: > >> >>> > >> >>> 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary > >> >>> : > >> >>> > thanks..I just wanted to make sure that we remove that as one of > the > >> >>> > culprit. I am wondering if it is something to do with the geometry > >> >>> > (bbox) or > >> >>> > something to do with some edge case (calculation that is going off > >> >>> > because > >> >>> > of very small delta). Although in the past we have tried very > think > >> >>> > volumes > >> >>> > > >> >>> > Is it possible for you to send a sample dataset to us? > >> >>> > >> >>> My test case includes the data used. It's simply a 200x200x2 volume > >> >>> filled with all data points set to 0.01. > >> >>> > >> >>> Elvis > >> >>> > >> >>> > > >> >>> > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik > >> >>> > wrote: > >> >>> >> > >> >>> >> Hi Aashish, > >> >>> >> > >> >>> >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary > >> >>> >> : > >> >>> >> > Please make sure that your sampling distance is less than < 2. > >> >>> >> > You > >> >>> >> > can > >> >>> >> > set > >> >>> >> > the sampling distance manually in the API. > >> >>> >> > >> >>> >> Hm. I don't think it's related to sampling distance. In the test > >> >>> >> case > >> >>> >> I'm not setting sampling distance at all, so I think it should > >> >>> >> default > >> >>> >> to 1, and then be automatically adjusted during interaction. > >> >>> >> > >> >>> >> In any case, even if I amend the test case with e.g.: > >> >>> >> > >> >>> >> volumeMapper->AutoAdjustSampleDistancesOff(); > >> >>> >> volumeMapper->SetSampleDistance(0.2); > >> >>> >> ... > >> >>> >> volumeMapper2->AutoAdjustSampleDistancesOff(); > >> >>> >> volumeMapper2->SetSampleDistance(0.2); > >> >>> >> > >> >>> >> The result is the same. > >> >>> >> > >> >>> >> Elvis > >> >>> >> > >> >>> >> > > >> >>> >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik > >> >>> >> > > >> >>> >> > wrote: > >> >>> >> >> > >> >>> >> >> Hi all, > >> >>> >> >> > >> >>> >> >> In the test case below, I render one 200x200x2 volume and one > >> >>> >> >> 200x200x3 volume, both with the same settings. > >> >>> >> >> > >> >>> >> >> The 200x200x3 volume looks as expected (the light gray one in > >> >>> >> >> the > >> >>> >> >> attached screenshot), while the 200x200x2 one looks strange > (too > >> >>> >> >> dark, > >> >>> >> >> and with some kind of gradient artifact). > >> >>> >> >> > >> >>> >> >> Is there some limitation on rendering a volume that is only 2 > >> >>> >> >> thick > >> >>> >> >> in > >> >>> >> >> one of the dimensions? I can understand why a volume of > >> >>> >> >> thickness 1 > >> >>> >> >> can't be rendered properly, since VTK must have values to > >> >>> >> >> interpolate > >> >>> >> >> between, but 2 should be OK right? > >> >>> >> >> > >> >>> >> >> Thanks for any help. > >> >>> >> >> > >> >>> >> >> Elvis > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> main.cpp: > >> >>> >> >> > >> >>> >> >> #include > >> >>> >> >> > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> #include > >> >>> >> >> > >> >>> >> >> int main(int argc, char *argv[]) > >> >>> >> >> { > >> >>> >> >> vtkNew colorFunction; > >> >>> >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); > >> >>> >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); > >> >>> >> >> > >> >>> >> >> vtkNew opacityFunction; > >> >>> >> >> opacityFunction->AddPoint(0.0, 0.0); > >> >>> >> >> opacityFunction->AddPoint(1.0, 1.0); > >> >>> >> >> > >> >>> >> >> // A 200x200x2 volume > >> >>> >> >> vtkNew imageData; > >> >>> >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); > >> >>> >> >> imageData->AllocateScalars(VTK_FLOAT, 1); > >> >>> >> >> std::fill_n(static_cast >> >>> >> >> *>(imageData->GetScalarPointer()), > >> >>> >> >> 200 * 200 * 2, 0.01); > >> >>> >> >> > >> >>> >> >> vtkNew volumeMapper; > >> >>> >> >> volumeMapper->SetInputData(imageData.Get()); > >> >>> >> >> > >> >>> >> >> vtkNew volumeProperty; > >> >>> >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); > >> >>> >> >> volumeProperty->SetColor(colorFunction.Get()); > >> >>> >> >> volumeProperty->ShadeOff(); > >> >>> >> >> > >> >>> >> >> vtkNew volume; > >> >>> >> >> volume->SetMapper(volumeMapper.Get()); > >> >>> >> >> volume->SetProperty(volumeProperty.Get()); > >> >>> >> >> volume->SetPosition(120, 0, 0); > >> >>> >> >> > >> >>> >> >> // A 200x200x3 volume > >> >>> >> >> vtkNew imageData2; > >> >>> >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); > >> >>> >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); > >> >>> >> >> std::fill_n(static_cast >> >>> >> >> *>(imageData2->GetScalarPointer()), > >> >>> >> >> 200 * 200 * 3, 0.01); > >> >>> >> >> > >> >>> >> >> vtkNew volumeMapper2; > >> >>> >> >> volumeMapper2->SetInputData(imageData2.Get()); > >> >>> >> >> > >> >>> >> >> vtkNew volumeProperty2; > >> >>> >> >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); > >> >>> >> >> volumeProperty2->SetColor(colorFunction.Get()); > >> >>> >> >> volumeProperty2->ShadeOff(); > >> >>> >> >> > >> >>> >> >> vtkNew volume2; > >> >>> >> >> volume2->SetMapper(volumeMapper2.Get()); > >> >>> >> >> volume2->SetProperty(volumeProperty2.Get()); > >> >>> >> >> volume2->SetPosition(-120, 0, 0); > >> >>> >> >> > >> >>> >> >> vtkNew renderer; > >> >>> >> >> renderer->AddVolume(volume.Get()); > >> >>> >> >> renderer->AddVolume(volume2.Get()); > >> >>> >> >> renderer->SetBackground(1.0, 1.0, 1.0); > >> >>> >> >> > >> >>> >> >> // Render with "plain" render window / interactor > >> >>> >> >> vtkNew window; > >> >>> >> >> window->SetMultiSamples(0); > >> >>> >> >> window->AddRenderer(renderer.Get()); > >> >>> >> >> > >> >>> >> >> vtkNew interactor; > >> >>> >> >> interactor->SetRenderWindow(window.Get()); > >> >>> >> >> interactor->Start(); > >> >>> >> >> > >> >>> >> >> return 0; > >> >>> >> >> } > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> CMakeLists.txt: > >> >>> >> >> > >> >>> >> >> cmake_minimum_required(VERSION 3.1) > >> >>> >> >> > >> >>> >> >> project(TestCase) > >> >>> >> >> > >> >>> >> >> find_package(VTK 8.0 COMPONENTS > >> >>> >> >> vtkCommonCore > >> >>> >> >> vtkCommonDataModel > >> >>> >> >> vtkCommonExecutionModel > >> >>> >> >> vtkCommonMath > >> >>> >> >> vtkFiltersSources > >> >>> >> >> vtkGUISupportQt > >> >>> >> >> vtkInteractionStyle > >> >>> >> >> vtkRenderingCore > >> >>> >> >> vtkRenderingOpenGL2 > >> >>> >> >> vtkRenderingVolume > >> >>> >> >> vtkRenderingVolumeOpenGL2 > >> >>> >> >> REQUIRED > >> >>> >> >> ) > >> >>> >> >> > >> >>> >> >> add_executable(TestCase main.cpp) > >> >>> >> >> > >> >>> >> >> target_link_libraries(TestCase PUBLIC > >> >>> >> >> vtkCommonCore > >> >>> >> >> vtkCommonDataModel > >> >>> >> >> vtkCommonExecutionModel > >> >>> >> >> vtkCommonMath > >> >>> >> >> vtkFiltersSources > >> >>> >> >> vtkInteractionStyle > >> >>> >> >> vtkRenderingCore > >> >>> >> >> vtkRenderingOpenGL2 > >> >>> >> >> vtkRenderingVolume > >> >>> >> >> vtkRenderingVolumeOpenGL2 > >> >>> >> >> ) > >> >>> >> >> > >> >>> >> >> target_include_directories(TestCase PUBLIC > >> >>> >> >> ${VTK_INCLUDE_DIRS} > >> >>> >> >> ) > >> >>> >> >> > >> >>> >> >> target_compile_definitions(TestCase PUBLIC > >> >>> >> >> ${VTK_DEFINITIONS} > >> >>> >> >> ) > >> >>> >> >> > >> >>> >> >> set_target_properties(TestCase PROPERTIES > >> >>> >> >> CXX_STANDARD 14 > >> >>> >> >> CXX_STANDARD_REQUIRED ON > >> >>> >> >> ) > >> >>> >> >> _______________________________________________ > >> >>> >> >> Powered by www.kitware.com > >> >>> >> >> > >> >>> >> >> Visit other Kitware open-source projects at > >> >>> >> >> http://www.kitware.com/opensource/opensource.html > >> >>> >> >> > >> >>> >> >> Please keep messages on-topic and check the VTK FAQ at: > >> >>> >> >> http://www.vtk.org/Wiki/VTK_FAQ > >> >>> >> >> > >> >>> >> >> 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 5 12:01:39 2017 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 05 Oct 2017 16:01:39 +0000 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: Here is the merge request we are testing: https://gitlab.kitware.com/vtk/vtk/merge_requests/3413 It will require probably some more work to ensure correctness at other places but this is a start that should fix your problem. -Aashish On Thu, Oct 5, 2017 at 11:48 AM Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > No worries...so we just checked the math the cell to point offset matrix > seems to be right but the delta seems wrong. Can you change this > > > delta[0] = this->Extents[1] - this->Extents[0]; > > delta[1] = this->Extents[3] - this->Extents[2]; > > delta[2] = this->Extents[5] - this->Extents[4]; > > to this > > delta[0] = this->Extents[1] - this->Extents[0] + 1; > delta[1] = this->Extents[3] - this->Extents[2] + 1; > delta[2] = this->Extents[5] - this->Extents[4] + 1; > > Thanks, > > > > > > On Thu, Oct 5, 2017 at 10:48 AM Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> 2017-10-05 16:34 GMT+02:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> > Thanks we are looking into it, earlier we moved the math from the >> shader to >> > a matrix that now we are forming in C++ so at this point we are looking >> at >> > the equation carefully. But yes, I thought you may have found a bug. >> >> Thanks for having a look. I suspect my std::max(..) is just a >> workaround and not a proper fix. >> >> Me and a colleague had another look, but I think we were both too >> tired to figure out if something was fundamentally wrong with the >> equations. Too late in the day :) >> >> Elvis >> >> > >> > - aashish >> > >> > On Thu, Oct 5, 2017 at 8:39 AM Elvis Stansvik < >> elvis.stansvik at orexplore.com> >> > wrote: >> >> >> >> 2017-10-05 10:38 GMT+02:00 Elvis Stansvik < >> elvis.stansvik at orexplore.com>: >> >> > 2017-10-04 18:12 GMT+02:00 Aashish Chaudhary >> >> > : >> >> >> Got it, thanks! >> >> > >> >> > Although I'm not familiar at all with the code, I suspect this is >> what >> >> > happens with my 200x200x2 volume: >> >> > >> >> > In void >> >> > >> vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() >> >> > { >> >> > this->CellToPointMatrix->Identity(); >> >> > this->AdjustedTexMin[0] = this->AdjustedTexMin[1] = >> >> > this->AdjustedTexMin[2] = 0.0f; >> >> > this->AdjustedTexMin[3] = 1.0f; >> >> > this->AdjustedTexMax[0] = this->AdjustedTexMax[1] = >> >> > this->AdjustedTexMax[2] = 1.0f; >> >> > this->AdjustedTexMax[3] = 1.0f; >> >> > >> >> > if (!this->Parent->CellFlag) // point data >> >> > { >> >> > float delta[3]; >> >> > delta[0] = this->Extents[1] - this->Extents[0]; >> >> > delta[1] = this->Extents[3] - this->Extents[2]; >> >> > delta[2] = this->Extents[5] - this->Extents[4]; >> >> > >> >> > float min[3]; >> >> > min[0] = 0.5f / delta[0]; >> >> > min[1] = 0.5f / delta[1]; >> >> > min[2] = 0.5f / delta[2]; >> >> > >> >> > float range[3]; // max - min >> >> > range[0] = (delta[0] - 0.5f) / delta[0] - min[0]; >> >> > range[1] = (delta[1] - 0.5f) / delta[1] - min[1]; >> >> > range[2] = (delta[2] - 0.5f) / delta[2] - min[2]; >> >> > >> >> > this->CellToPointMatrix->SetElement(0, 0, range[0]); // Scale >> diag >> >> > this->CellToPointMatrix->SetElement(1, 1, range[1]); >> >> > this->CellToPointMatrix->SetElement(2, 2, range[2]); >> >> > this->CellToPointMatrix->SetElement(0, 3, min[0]); // t vector >> >> > this->CellToPointMatrix->SetElement(1, 3, min[1]); >> >> > this->CellToPointMatrix->SetElement(2, 3, min[2]); >> >> > >> >> > // Adjust limit coordinates for texture access. >> >> > float const zeros[4] = {0.0f, 0.0f, 0.0f, 1.0f}; // GL tex min >> >> > float const ones[4] = {1.0f, 1.0f, 1.0f, 1.0f}; // GL tex max >> >> > this->CellToPointMatrix->MultiplyPoint(zeros, >> this->AdjustedTexMin); >> >> > this->CellToPointMatrix->MultiplyPoint(ones, >> this->AdjustedTexMax); >> >> > } >> >> > } >> >> > >> >> > delta[2] = 1 ==> min[2] = 0.5 ==> range[2] = 0 >> >> > >> >> > So the scale factor in the third dimension will be 0 in >> >> > CellToPointMatrix, right? I guess this could be what accounts for the >> >> > strange rendering? >> >> > >> >> > Could/should this code be updated to take into account when the >> extent >> >> > delta is just 1, so that volumes 2 data points thick can be rendered? >> >> >> >> I've only tested it briefly, but this seems to give the correct >> >> rendering even with a 2 point thick input: >> >> >> >> diff --git >> a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> >> b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> >> index 8767bd0..88bbcba 100644 >> >> --- a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> >> +++ b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> >> @@ -1495,9 +1495,9 @@ void >> >> >> vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() >> >> if (!this->Parent->CellFlag) // point data >> >> { >> >> float delta[3]; >> >> - delta[0] = this->Extents[1] - this->Extents[0]; >> >> - delta[1] = this->Extents[3] - this->Extents[2]; >> >> - delta[2] = this->Extents[5] - this->Extents[4]; >> >> + delta[0] = std::max(2, this->Extents[1] - this->Extents[0]); >> >> + delta[1] = std::max(2, this->Extents[3] - this->Extents[2]); >> >> + delta[2] = std::max(2, this->Extents[5] - this->Extents[4]); >> >> >> >> float min[3]; >> >> min[0] = 0.5f / delta[0]; >> >> >> >> This ensures the texture does not collapse into 0 when the extent >> >> delta is 1. Would you consider this a correct fix? >> >> >> >> Elvis >> >> >> >> > >> >> > Elvis >> >> > >> >> >> >> >> >> On Wed, Oct 4, 2017 at 12:07 PM Elvis Stansvik >> >> >> wrote: >> >> >>> >> >> >>> 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary >> >> >>> : >> >> >>> > thanks..I just wanted to make sure that we remove that as one of >> the >> >> >>> > culprit. I am wondering if it is something to do with the >> geometry >> >> >>> > (bbox) or >> >> >>> > something to do with some edge case (calculation that is going >> off >> >> >>> > because >> >> >>> > of very small delta). Although in the past we have tried very >> think >> >> >>> > volumes >> >> >>> > >> >> >>> > Is it possible for you to send a sample dataset to us? >> >> >>> >> >> >>> My test case includes the data used. It's simply a 200x200x2 volume >> >> >>> filled with all data points set to 0.01. >> >> >>> >> >> >>> Elvis >> >> >>> >> >> >>> > >> >> >>> > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik >> >> >>> > wrote: >> >> >>> >> >> >> >>> >> Hi Aashish, >> >> >>> >> >> >> >>> >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary >> >> >>> >> : >> >> >>> >> > Please make sure that your sampling distance is less than < 2. >> >> >>> >> > You >> >> >>> >> > can >> >> >>> >> > set >> >> >>> >> > the sampling distance manually in the API. >> >> >>> >> >> >> >>> >> Hm. I don't think it's related to sampling distance. In the test >> >> >>> >> case >> >> >>> >> I'm not setting sampling distance at all, so I think it should >> >> >>> >> default >> >> >>> >> to 1, and then be automatically adjusted during interaction. >> >> >>> >> >> >> >>> >> In any case, even if I amend the test case with e.g.: >> >> >>> >> >> >> >>> >> volumeMapper->AutoAdjustSampleDistancesOff(); >> >> >>> >> volumeMapper->SetSampleDistance(0.2); >> >> >>> >> ... >> >> >>> >> volumeMapper2->AutoAdjustSampleDistancesOff(); >> >> >>> >> volumeMapper2->SetSampleDistance(0.2); >> >> >>> >> >> >> >>> >> The result is the same. >> >> >>> >> >> >> >>> >> Elvis >> >> >>> >> >> >> >>> >> > >> >> >>> >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik >> >> >>> >> > >> >> >>> >> > wrote: >> >> >>> >> >> >> >> >>> >> >> Hi all, >> >> >>> >> >> >> >> >>> >> >> In the test case below, I render one 200x200x2 volume and one >> >> >>> >> >> 200x200x3 volume, both with the same settings. >> >> >>> >> >> >> >> >>> >> >> The 200x200x3 volume looks as expected (the light gray one in >> >> >>> >> >> the >> >> >>> >> >> attached screenshot), while the 200x200x2 one looks strange >> (too >> >> >>> >> >> dark, >> >> >>> >> >> and with some kind of gradient artifact). >> >> >>> >> >> >> >> >>> >> >> Is there some limitation on rendering a volume that is only 2 >> >> >>> >> >> thick >> >> >>> >> >> in >> >> >>> >> >> one of the dimensions? I can understand why a volume of >> >> >>> >> >> thickness 1 >> >> >>> >> >> can't be rendered properly, since VTK must have values to >> >> >>> >> >> interpolate >> >> >>> >> >> between, but 2 should be OK right? >> >> >>> >> >> >> >> >>> >> >> Thanks for any help. >> >> >>> >> >> >> >> >>> >> >> Elvis >> >> >>> >> >> >> >> >>> >> >> >> >> >>> >> >> main.cpp: >> >> >>> >> >> >> >> >>> >> >> #include >> >> >>> >> >> >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> >> >> >>> >> >> int main(int argc, char *argv[]) >> >> >>> >> >> { >> >> >>> >> >> vtkNew colorFunction; >> >> >>> >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); >> >> >>> >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); >> >> >>> >> >> >> >> >>> >> >> vtkNew opacityFunction; >> >> >>> >> >> opacityFunction->AddPoint(0.0, 0.0); >> >> >>> >> >> opacityFunction->AddPoint(1.0, 1.0); >> >> >>> >> >> >> >> >>> >> >> // A 200x200x2 volume >> >> >>> >> >> vtkNew imageData; >> >> >>> >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); >> >> >>> >> >> imageData->AllocateScalars(VTK_FLOAT, 1); >> >> >>> >> >> std::fill_n(static_cast> >> >>> >> >> *>(imageData->GetScalarPointer()), >> >> >>> >> >> 200 * 200 * 2, 0.01); >> >> >>> >> >> >> >> >>> >> >> vtkNew volumeMapper; >> >> >>> >> >> volumeMapper->SetInputData(imageData.Get()); >> >> >>> >> >> >> >> >>> >> >> vtkNew volumeProperty; >> >> >>> >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); >> >> >>> >> >> volumeProperty->SetColor(colorFunction.Get()); >> >> >>> >> >> volumeProperty->ShadeOff(); >> >> >>> >> >> >> >> >>> >> >> vtkNew volume; >> >> >>> >> >> volume->SetMapper(volumeMapper.Get()); >> >> >>> >> >> volume->SetProperty(volumeProperty.Get()); >> >> >>> >> >> volume->SetPosition(120, 0, 0); >> >> >>> >> >> >> >> >>> >> >> // A 200x200x3 volume >> >> >>> >> >> vtkNew imageData2; >> >> >>> >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); >> >> >>> >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); >> >> >>> >> >> std::fill_n(static_cast> >> >>> >> >> *>(imageData2->GetScalarPointer()), >> >> >>> >> >> 200 * 200 * 3, 0.01); >> >> >>> >> >> >> >> >>> >> >> vtkNew volumeMapper2; >> >> >>> >> >> volumeMapper2->SetInputData(imageData2.Get()); >> >> >>> >> >> >> >> >>> >> >> vtkNew volumeProperty2; >> >> >>> >> >> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); >> >> >>> >> >> volumeProperty2->SetColor(colorFunction.Get()); >> >> >>> >> >> volumeProperty2->ShadeOff(); >> >> >>> >> >> >> >> >>> >> >> vtkNew volume2; >> >> >>> >> >> volume2->SetMapper(volumeMapper2.Get()); >> >> >>> >> >> volume2->SetProperty(volumeProperty2.Get()); >> >> >>> >> >> volume2->SetPosition(-120, 0, 0); >> >> >>> >> >> >> >> >>> >> >> vtkNew renderer; >> >> >>> >> >> renderer->AddVolume(volume.Get()); >> >> >>> >> >> renderer->AddVolume(volume2.Get()); >> >> >>> >> >> renderer->SetBackground(1.0, 1.0, 1.0); >> >> >>> >> >> >> >> >>> >> >> // Render with "plain" render window / interactor >> >> >>> >> >> vtkNew window; >> >> >>> >> >> window->SetMultiSamples(0); >> >> >>> >> >> window->AddRenderer(renderer.Get()); >> >> >>> >> >> >> >> >>> >> >> vtkNew interactor; >> >> >>> >> >> interactor->SetRenderWindow(window.Get()); >> >> >>> >> >> interactor->Start(); >> >> >>> >> >> >> >> >>> >> >> return 0; >> >> >>> >> >> } >> >> >>> >> >> >> >> >>> >> >> >> >> >>> >> >> CMakeLists.txt: >> >> >>> >> >> >> >> >>> >> >> cmake_minimum_required(VERSION 3.1) >> >> >>> >> >> >> >> >>> >> >> project(TestCase) >> >> >>> >> >> >> >> >>> >> >> find_package(VTK 8.0 COMPONENTS >> >> >>> >> >> vtkCommonCore >> >> >>> >> >> vtkCommonDataModel >> >> >>> >> >> vtkCommonExecutionModel >> >> >>> >> >> vtkCommonMath >> >> >>> >> >> vtkFiltersSources >> >> >>> >> >> vtkGUISupportQt >> >> >>> >> >> vtkInteractionStyle >> >> >>> >> >> vtkRenderingCore >> >> >>> >> >> vtkRenderingOpenGL2 >> >> >>> >> >> vtkRenderingVolume >> >> >>> >> >> vtkRenderingVolumeOpenGL2 >> >> >>> >> >> REQUIRED >> >> >>> >> >> ) >> >> >>> >> >> >> >> >>> >> >> add_executable(TestCase main.cpp) >> >> >>> >> >> >> >> >>> >> >> target_link_libraries(TestCase PUBLIC >> >> >>> >> >> vtkCommonCore >> >> >>> >> >> vtkCommonDataModel >> >> >>> >> >> vtkCommonExecutionModel >> >> >>> >> >> vtkCommonMath >> >> >>> >> >> vtkFiltersSources >> >> >>> >> >> vtkInteractionStyle >> >> >>> >> >> vtkRenderingCore >> >> >>> >> >> vtkRenderingOpenGL2 >> >> >>> >> >> vtkRenderingVolume >> >> >>> >> >> vtkRenderingVolumeOpenGL2 >> >> >>> >> >> ) >> >> >>> >> >> >> >> >>> >> >> target_include_directories(TestCase PUBLIC >> >> >>> >> >> ${VTK_INCLUDE_DIRS} >> >> >>> >> >> ) >> >> >>> >> >> >> >> >>> >> >> target_compile_definitions(TestCase PUBLIC >> >> >>> >> >> ${VTK_DEFINITIONS} >> >> >>> >> >> ) >> >> >>> >> >> >> >> >>> >> >> set_target_properties(TestCase PROPERTIES >> >> >>> >> >> CXX_STANDARD 14 >> >> >>> >> >> CXX_STANDARD_REQUIRED ON >> >> >>> >> >> ) >> >> >>> >> >> _______________________________________________ >> >> >>> >> >> Powered by www.kitware.com >> >> >>> >> >> >> >> >>> >> >> Visit other Kitware open-source projects at >> >> >>> >> >> http://www.kitware.com/opensource/opensource.html >> >> >>> >> >> >> >> >>> >> >> Please keep messages on-topic and check the VTK FAQ at: >> >> >>> >> >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >>> >> >> >> >> >>> >> >> 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 elhassan.abdou at gmail.com Thu Oct 5 12:03:22 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Thu, 5 Oct 2017 18:03:22 +0200 Subject: [vtkusers] ANGLE for VTK In-Reply-To: References: Message-ID: Hi , I am trying to build VTK using ANGLE with openglES. I made some modifications to the CMake. I set the OPENGL_HAS_EGL to on and set the values of accompanyed EGL and opengl values correctly. While building the vtkRenderingOpenGL2 project, I ran in compilation error that some gl functions are defined in both glew and gles files. My question is shall I remove glew from the CMake file? I read that glew can not be built with opengl es. How can I remove this module?. Regards Elhassan On Wed, Sep 27, 2017 at 9:26 AM, Elhassan Abdou wrote: > Hi , > > I am wondering if there is a tutorial or a whitepaper that explains the > CMake files of VTK. I understand CMake but I am afraid to lose my way in > the CMake files in the VTK subprojects . > > Regards > > Elhassan > > > > On Tue, Sep 26, 2017 at 7:16 PM, Ken Martin > wrote: > >> VTK supports gles 3.0 as part of its iOS/Android support. But you would >> need to make some cmakelist and maybe header file changes to build the ES >> code paths while on windows. I've never tried it but it seems reasonable. >> >> On Tue, Sep 26, 2017 at 12:21 PM, Elhassan Abdou < >> elhassan.abdou at gmail.com> wrote: >> >>> Hi all, >>> >>> I want to force VTK to use ANGLE gles implementation instead of using >>> opengl in windows environment without using QT. >>> Any idea how can I do so? >>> >>> >>> Regards >>> Elhassan Abdou >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Ken Martin PhD >> Distinguished Engineer >> Kitware Inc. >> 28 Corporate Drive >> >> Clifton Park NY 12065 >> >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Oct 5 12:36:19 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 5 Oct 2017 18:36:19 +0200 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: Det 5 okt. 2017 6:01 em skrev "Aashish Chaudhary" < aashish.chaudhary at kitware.com>: Here is the merge request we are testing: https://gitlab. kitware.com/vtk/vtk/merge_requests/3413 It will require probably some more work to ensure correctness at other places but this is a start that should fix your problem. Thanks! That's one of the things me and my colleague tried out during our session here. It will fix my specific problem, but I think we found that it gave ill effects in other cases. I'll continue the discussion on the MR, I have a testcase I can share when I'm home (on the bus atm). Elvis -Aashish On Thu, Oct 5, 2017 at 11:48 AM Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > No worries...so we just checked the math the cell to point offset matrix > seems to be right but the delta seems wrong. Can you change this > > > delta[0] = this->Extents[1] - this->Extents[0]; > > delta[1] = this->Extents[3] - this->Extents[2]; > > delta[2] = this->Extents[5] - this->Extents[4]; > > to this > > delta[0] = this->Extents[1] - this->Extents[0] + 1; > delta[1] = this->Extents[3] - this->Extents[2] + 1; > delta[2] = this->Extents[5] - this->Extents[4] + 1; > > Thanks, > > > > > > On Thu, Oct 5, 2017 at 10:48 AM Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> 2017-10-05 16:34 GMT+02:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> > Thanks we are looking into it, earlier we moved the math from the >> shader to >> > a matrix that now we are forming in C++ so at this point we are looking >> at >> > the equation carefully. But yes, I thought you may have found a bug. >> >> Thanks for having a look. I suspect my std::max(..) is just a >> workaround and not a proper fix. >> >> Me and a colleague had another look, but I think we were both too >> tired to figure out if something was fundamentally wrong with the >> equations. Too late in the day :) >> >> Elvis >> >> > >> > - aashish >> > >> > On Thu, Oct 5, 2017 at 8:39 AM Elvis Stansvik < >> elvis.stansvik at orexplore.com> >> > wrote: >> >> >> >> 2017-10-05 10:38 GMT+02:00 Elvis Stansvik < >> elvis.stansvik at orexplore.com>: >> >> > 2017-10-04 18:12 GMT+02:00 Aashish Chaudhary >> >> > : >> >> >> Got it, thanks! >> >> > >> >> > Although I'm not familiar at all with the code, I suspect this is >> what >> >> > happens with my 200x200x2 volume: >> >> > >> >> > In void >> >> > vtkOpenGLGPUVolumeRayCastMapper::vtkInternal:: >> ComputeCellToPointMatrix() >> >> > { >> >> > this->CellToPointMatrix->Identity(); >> >> > this->AdjustedTexMin[0] = this->AdjustedTexMin[1] = >> >> > this->AdjustedTexMin[2] = 0.0f; >> >> > this->AdjustedTexMin[3] = 1.0f; >> >> > this->AdjustedTexMax[0] = this->AdjustedTexMax[1] = >> >> > this->AdjustedTexMax[2] = 1.0f; >> >> > this->AdjustedTexMax[3] = 1.0f; >> >> > >> >> > if (!this->Parent->CellFlag) // point data >> >> > { >> >> > float delta[3]; >> >> > delta[0] = this->Extents[1] - this->Extents[0]; >> >> > delta[1] = this->Extents[3] - this->Extents[2]; >> >> > delta[2] = this->Extents[5] - this->Extents[4]; >> >> > >> >> > float min[3]; >> >> > min[0] = 0.5f / delta[0]; >> >> > min[1] = 0.5f / delta[1]; >> >> > min[2] = 0.5f / delta[2]; >> >> > >> >> > float range[3]; // max - min >> >> > range[0] = (delta[0] - 0.5f) / delta[0] - min[0]; >> >> > range[1] = (delta[1] - 0.5f) / delta[1] - min[1]; >> >> > range[2] = (delta[2] - 0.5f) / delta[2] - min[2]; >> >> > >> >> > this->CellToPointMatrix->SetElement(0, 0, range[0]); // Scale >> diag >> >> > this->CellToPointMatrix->SetElement(1, 1, range[1]); >> >> > this->CellToPointMatrix->SetElement(2, 2, range[2]); >> >> > this->CellToPointMatrix->SetElement(0, 3, min[0]); // t vector >> >> > this->CellToPointMatrix->SetElement(1, 3, min[1]); >> >> > this->CellToPointMatrix->SetElement(2, 3, min[2]); >> >> > >> >> > // Adjust limit coordinates for texture access. >> >> > float const zeros[4] = {0.0f, 0.0f, 0.0f, 1.0f}; // GL tex min >> >> > float const ones[4] = {1.0f, 1.0f, 1.0f, 1.0f}; // GL tex max >> >> > this->CellToPointMatrix->MultiplyPoint(zeros, >> this->AdjustedTexMin); >> >> > this->CellToPointMatrix->MultiplyPoint(ones, >> this->AdjustedTexMax); >> >> > } >> >> > } >> >> > >> >> > delta[2] = 1 ==> min[2] = 0.5 ==> range[2] = 0 >> >> > >> >> > So the scale factor in the third dimension will be 0 in >> >> > CellToPointMatrix, right? I guess this could be what accounts for the >> >> > strange rendering? >> >> > >> >> > Could/should this code be updated to take into account when the >> extent >> >> > delta is just 1, so that volumes 2 data points thick can be rendered? >> >> >> >> I've only tested it briefly, but this seems to give the correct >> >> rendering even with a 2 point thick input: >> >> >> >> diff --git a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMappe >> r.cxx >> >> b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> >> index 8767bd0..88bbcba 100644 >> >> --- a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> >> +++ b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >> >> @@ -1495,9 +1495,9 @@ void >> >> vtkOpenGLGPUVolumeRayCastMapper::vtkInternal:: >> ComputeCellToPointMatrix() >> >> if (!this->Parent->CellFlag) // point data >> >> { >> >> float delta[3]; >> >> - delta[0] = this->Extents[1] - this->Extents[0]; >> >> - delta[1] = this->Extents[3] - this->Extents[2]; >> >> - delta[2] = this->Extents[5] - this->Extents[4]; >> >> + delta[0] = std::max(2, this->Extents[1] - this->Extents[0]); >> >> + delta[1] = std::max(2, this->Extents[3] - this->Extents[2]); >> >> + delta[2] = std::max(2, this->Extents[5] - this->Extents[4]); >> >> >> >> float min[3]; >> >> min[0] = 0.5f / delta[0]; >> >> >> >> This ensures the texture does not collapse into 0 when the extent >> >> delta is 1. Would you consider this a correct fix? >> >> >> >> Elvis >> >> >> >> > >> >> > Elvis >> >> > >> >> >> >> >> >> On Wed, Oct 4, 2017 at 12:07 PM Elvis Stansvik >> >> >> wrote: >> >> >>> >> >> >>> 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary >> >> >>> : >> >> >>> > thanks..I just wanted to make sure that we remove that as one of >> the >> >> >>> > culprit. I am wondering if it is something to do with the >> geometry >> >> >>> > (bbox) or >> >> >>> > something to do with some edge case (calculation that is going >> off >> >> >>> > because >> >> >>> > of very small delta). Although in the past we have tried very >> think >> >> >>> > volumes >> >> >>> > >> >> >>> > Is it possible for you to send a sample dataset to us? >> >> >>> >> >> >>> My test case includes the data used. It's simply a 200x200x2 volume >> >> >>> filled with all data points set to 0.01. >> >> >>> >> >> >>> Elvis >> >> >>> >> >> >>> > >> >> >>> > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik >> >> >>> > wrote: >> >> >>> >> >> >> >>> >> Hi Aashish, >> >> >>> >> >> >> >>> >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary >> >> >>> >> : >> >> >>> >> > Please make sure that your sampling distance is less than < 2. >> >> >>> >> > You >> >> >>> >> > can >> >> >>> >> > set >> >> >>> >> > the sampling distance manually in the API. >> >> >>> >> >> >> >>> >> Hm. I don't think it's related to sampling distance. In the test >> >> >>> >> case >> >> >>> >> I'm not setting sampling distance at all, so I think it should >> >> >>> >> default >> >> >>> >> to 1, and then be automatically adjusted during interaction. >> >> >>> >> >> >> >>> >> In any case, even if I amend the test case with e.g.: >> >> >>> >> >> >> >>> >> volumeMapper->AutoAdjustSampleDistancesOff(); >> >> >>> >> volumeMapper->SetSampleDistance(0.2); >> >> >>> >> ... >> >> >>> >> volumeMapper2->AutoAdjustSampleDistancesOff(); >> >> >>> >> volumeMapper2->SetSampleDistance(0.2); >> >> >>> >> >> >> >>> >> The result is the same. >> >> >>> >> >> >> >>> >> Elvis >> >> >>> >> >> >> >>> >> > >> >> >>> >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik >> >> >>> >> > >> >> >>> >> > wrote: >> >> >>> >> >> >> >> >>> >> >> Hi all, >> >> >>> >> >> >> >> >>> >> >> In the test case below, I render one 200x200x2 volume and one >> >> >>> >> >> 200x200x3 volume, both with the same settings. >> >> >>> >> >> >> >> >>> >> >> The 200x200x3 volume looks as expected (the light gray one in >> >> >>> >> >> the >> >> >>> >> >> attached screenshot), while the 200x200x2 one looks strange >> (too >> >> >>> >> >> dark, >> >> >>> >> >> and with some kind of gradient artifact). >> >> >>> >> >> >> >> >>> >> >> Is there some limitation on rendering a volume that is only 2 >> >> >>> >> >> thick >> >> >>> >> >> in >> >> >>> >> >> one of the dimensions? I can understand why a volume of >> >> >>> >> >> thickness 1 >> >> >>> >> >> can't be rendered properly, since VTK must have values to >> >> >>> >> >> interpolate >> >> >>> >> >> between, but 2 should be OK right? >> >> >>> >> >> >> >> >>> >> >> Thanks for any help. >> >> >>> >> >> >> >> >>> >> >> Elvis >> >> >>> >> >> >> >> >>> >> >> >> >> >>> >> >> main.cpp: >> >> >>> >> >> >> >> >>> >> >> #include >> >> >>> >> >> >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> #include >> >> >>> >> >> >> >> >>> >> >> int main(int argc, char *argv[]) >> >> >>> >> >> { >> >> >>> >> >> vtkNew colorFunction; >> >> >>> >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); >> >> >>> >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); >> >> >>> >> >> >> >> >>> >> >> vtkNew opacityFunction; >> >> >>> >> >> opacityFunction->AddPoint(0.0, 0.0); >> >> >>> >> >> opacityFunction->AddPoint(1.0, 1.0); >> >> >>> >> >> >> >> >>> >> >> // A 200x200x2 volume >> >> >>> >> >> vtkNew imageData; >> >> >>> >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); >> >> >>> >> >> imageData->AllocateScalars(VTK_FLOAT, 1); >> >> >>> >> >> std::fill_n(static_cast> >> >>> >> >> *>(imageData->GetScalarPointer()), >> >> >>> >> >> 200 * 200 * 2, 0.01); >> >> >>> >> >> >> >> >>> >> >> vtkNew volumeMapper; >> >> >>> >> >> volumeMapper->SetInputData(imageData.Get()); >> >> >>> >> >> >> >> >>> >> >> vtkNew volumeProperty; >> >> >>> >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); >> >> >>> >> >> volumeProperty->SetColor(colorFunction.Get()); >> >> >>> >> >> volumeProperty->ShadeOff(); >> >> >>> >> >> >> >> >>> >> >> vtkNew volume; >> >> >>> >> >> volume->SetMapper(volumeMapper.Get()); >> >> >>> >> >> volume->SetProperty(volumeProperty.Get()); >> >> >>> >> >> volume->SetPosition(120, 0, 0); >> >> >>> >> >> >> >> >>> >> >> // A 200x200x3 volume >> >> >>> >> >> vtkNew imageData2; >> >> >>> >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); >> >> >>> >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); >> >> >>> >> >> std::fill_n(static_cast> >> >>> >> >> *>(imageData2->GetScalarPointer()), >> >> >>> >> >> 200 * 200 * 3, 0.01); >> >> >>> >> >> >> >> >>> >> >> vtkNew volumeMapper2; >> >> >>> >> >> volumeMapper2->SetInputData(imageData2.Get()); >> >> >>> >> >> >> >> >>> >> >> vtkNew volumeProperty2; >> >> >>> >> >> volumeProperty2->SetScalarOpacity( >> opacityFunction.Get()); >> >> >>> >> >> volumeProperty2->SetColor(colorFunction.Get()); >> >> >>> >> >> volumeProperty2->ShadeOff(); >> >> >>> >> >> >> >> >>> >> >> vtkNew volume2; >> >> >>> >> >> volume2->SetMapper(volumeMapper2.Get()); >> >> >>> >> >> volume2->SetProperty(volumeProperty2.Get()); >> >> >>> >> >> volume2->SetPosition(-120, 0, 0); >> >> >>> >> >> >> >> >>> >> >> vtkNew renderer; >> >> >>> >> >> renderer->AddVolume(volume.Get()); >> >> >>> >> >> renderer->AddVolume(volume2.Get()); >> >> >>> >> >> renderer->SetBackground(1.0, 1.0, 1.0); >> >> >>> >> >> >> >> >>> >> >> // Render with "plain" render window / interactor >> >> >>> >> >> vtkNew window; >> >> >>> >> >> window->SetMultiSamples(0); >> >> >>> >> >> window->AddRenderer(renderer.Get()); >> >> >>> >> >> >> >> >>> >> >> vtkNew interactor; >> >> >>> >> >> interactor->SetRenderWindow(window.Get()); >> >> >>> >> >> interactor->Start(); >> >> >>> >> >> >> >> >>> >> >> return 0; >> >> >>> >> >> } >> >> >>> >> >> >> >> >>> >> >> >> >> >>> >> >> CMakeLists.txt: >> >> >>> >> >> >> >> >>> >> >> cmake_minimum_required(VERSION 3.1) >> >> >>> >> >> >> >> >>> >> >> project(TestCase) >> >> >>> >> >> >> >> >>> >> >> find_package(VTK 8.0 COMPONENTS >> >> >>> >> >> vtkCommonCore >> >> >>> >> >> vtkCommonDataModel >> >> >>> >> >> vtkCommonExecutionModel >> >> >>> >> >> vtkCommonMath >> >> >>> >> >> vtkFiltersSources >> >> >>> >> >> vtkGUISupportQt >> >> >>> >> >> vtkInteractionStyle >> >> >>> >> >> vtkRenderingCore >> >> >>> >> >> vtkRenderingOpenGL2 >> >> >>> >> >> vtkRenderingVolume >> >> >>> >> >> vtkRenderingVolumeOpenGL2 >> >> >>> >> >> REQUIRED >> >> >>> >> >> ) >> >> >>> >> >> >> >> >>> >> >> add_executable(TestCase main.cpp) >> >> >>> >> >> >> >> >>> >> >> target_link_libraries(TestCase PUBLIC >> >> >>> >> >> vtkCommonCore >> >> >>> >> >> vtkCommonDataModel >> >> >>> >> >> vtkCommonExecutionModel >> >> >>> >> >> vtkCommonMath >> >> >>> >> >> vtkFiltersSources >> >> >>> >> >> vtkInteractionStyle >> >> >>> >> >> vtkRenderingCore >> >> >>> >> >> vtkRenderingOpenGL2 >> >> >>> >> >> vtkRenderingVolume >> >> >>> >> >> vtkRenderingVolumeOpenGL2 >> >> >>> >> >> ) >> >> >>> >> >> >> >> >>> >> >> target_include_directories(TestCase PUBLIC >> >> >>> >> >> ${VTK_INCLUDE_DIRS} >> >> >>> >> >> ) >> >> >>> >> >> >> >> >>> >> >> target_compile_definitions(TestCase PUBLIC >> >> >>> >> >> ${VTK_DEFINITIONS} >> >> >>> >> >> ) >> >> >>> >> >> >> >> >>> >> >> set_target_properties(TestCase PROPERTIES >> >> >>> >> >> CXX_STANDARD 14 >> >> >>> >> >> CXX_STANDARD_REQUIRED ON >> >> >>> >> >> ) >> >> >>> >> >> _______________________________________________ >> >> >>> >> >> Powered by www.kitware.com >> >> >>> >> >> >> >> >>> >> >> Visit other Kitware open-source projects at >> >> >>> >> >> http://www.kitware.com/opensource/opensource.html >> >> >>> >> >> >> >> >>> >> >> Please keep messages on-topic and check the VTK FAQ at: >> >> >>> >> >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >>> >> >> >> >> >>> >> >> Search the list archives at: >> >> >>> >> >> http://markmail.org/search/?q=vtkusers >> >> >>> >> >> >> >> >>> >> >> Follow this link to subscribe/unsubscribe: >> >> >>> >> >> http://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Oct 5 13:02:03 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 5 Oct 2017 13:02:03 -0400 Subject: [vtkusers] ANGLE for VTK In-Reply-To: References: Message-ID: Look at vtk_glew.h.in that is what gets included. For ANDROID builds it skips the inclusion of glew. So follow that same logic I think. On Thu, Oct 5, 2017 at 12:03 PM, Elhassan Abdou wrote: > Hi , > > I am trying to build VTK using ANGLE with openglES. I made some > modifications to the CMake. I set the OPENGL_HAS_EGL to on and set the > values of accompanyed EGL and opengl values correctly. > > While building the vtkRenderingOpenGL2 project, I ran in compilation error > that some gl functions are defined in both glew and gles files. > My question is shall I remove glew from the CMake file? > I read that glew can not be built with opengl es. > How can I remove this module?. > > Regards > Elhassan > > On Wed, Sep 27, 2017 at 9:26 AM, Elhassan Abdou > wrote: > >> Hi , >> >> I am wondering if there is a tutorial or a whitepaper that explains the >> CMake files of VTK. I understand CMake but I am afraid to lose my way in >> the CMake files in the VTK subprojects . >> >> Regards >> >> Elhassan >> >> >> >> On Tue, Sep 26, 2017 at 7:16 PM, Ken Martin >> wrote: >> >>> VTK supports gles 3.0 as part of its iOS/Android support. But you would >>> need to make some cmakelist and maybe header file changes to build the ES >>> code paths while on windows. I've never tried it but it seems reasonable. >>> >>> On Tue, Sep 26, 2017 at 12:21 PM, Elhassan Abdou < >>> elhassan.abdou at gmail.com> wrote: >>> >>>> Hi all, >>>> >>>> I want to force VTK to use ANGLE gles implementation instead of using >>>> opengl in windows environment without using QT. >>>> Any idea how can I do so? >>>> >>>> >>>> Regards >>>> Elhassan Abdou >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Ken Martin PhD >>> Distinguished Engineer >>> Kitware Inc. >>> 28 Corporate Drive >>> >>> Clifton Park NY 12065 >>> >>> >>> This communication, including all attachments, contains confidential and >>> legally privileged information, and it is intended only for the use of the >>> addressee. Access to this email by anyone else is unauthorized. If you are >>> not the intended recipient, any disclosure, copying, distribution or any >>> action taken in reliance on it is prohibited and may be unlawful. If you >>> received this communication in error please notify us immediately and >>> destroy the original message. Thank you. >>> >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcog.ghiani at gmail.com Thu Oct 5 13:06:12 2017 From: marcog.ghiani at gmail.com (Marco Ghiani) Date: Thu, 5 Oct 2017 18:06:12 +0100 Subject: [vtkusers] data plotting curvilinear grid Message-ID: <206dd3fc-9473-7bec-ed53-8ba468c112a3@gmail.com> Dear all , I find this very usefull (for my works) image of curvilinear grid , done in VTK format or other imports by paraview , here the image /http://sdav.sci.utah.edu/29-highlights/visualization/67-osuflow-vtk-integration.html/ i'm speaking about the pictures on the right side, how is obtained ?? -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Oct 5 13:50:55 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 5 Oct 2017 10:50:55 -0700 Subject: [vtkusers] How to just change the surface appearance of the transform object in paraview? In-Reply-To: References: Message-ID: Answered on Stackoverflow: https://stackoverflow.com/questions/46555206/how-to-just-change-the-surface-appearance-of-the-transform-object-in-paraview/46575806#46575806 On Tue, Oct 3, 2017 at 5:28 PM, weihuayi wrote: > Hi, There, > > Sorry first, I know this email should sent to the paraview user > email-list. But I can't joint it until now. > > I have a triangular sphere surface with two scalars on every point. In > paraview, I transform the surface and get two new triangular spheres, see > the attachment figure and data. > > I want to change the colormap of the third one, but paraview will also > change the first one. So is it possible to just change the colormap of the > every surface independently? > > Best > Huayi > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Oct 5 14:52:55 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 5 Oct 2017 11:52:55 -0700 Subject: [vtkusers] ANN: VTK Book Examples Message-ID: Folks, We've started an effort to convert all of the examples mentioned in the VTK Book. This is a works in progress. Since some of the API's have changed, the new implementations may differ from those in the book. Also, since Tcl used less frequently, the examples have been converted to C++. The examples are also enhanced by newer VTK features, like vtkNamedColors and VtkSmartPointer. Each Figure example 1) links to the source code of the new implementation, 2) links to the doxygen documentation for classes demonstrated, 3) shows the original figure caption and, 4) if the example produces an image, links to the full resolution image. 5) If the caption includes a source file reference, e.g. bluntStr.cxx or rotations.tcl, that reference links to the original source code. Go to: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ Figures that have been converted will show an image on the right: For example see: https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/LOx/ Please enjoy this new effort to revive the VTK Figure examples. Bill From aashish.chaudhary at kitware.com Thu Oct 5 15:17:44 2017 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 05 Oct 2017 19:17:44 +0000 Subject: [vtkusers] Strange rendering with 2-voxel thick volume In-Reply-To: References: Message-ID: Elvis, What you said makes sense. I think there might be other places (we have identified atleast one more) where we are off by one on one axis. If you can identify some more issues with our fix, ping us and we will sort them out. Thank you for providing us a edge case and culprit code. thanks, On Thu, Oct 5, 2017 at 12:36 PM Elvis Stansvik wrote: > Det 5 okt. 2017 6:01 em skrev "Aashish Chaudhary" < > aashish.chaudhary at kitware.com>: > > Here is the merge request we are testing: > https://gitlab.kitware.com/vtk/vtk/merge_requests/3413 > > It will require probably some more work to ensure correctness at other > places but this is a start that should fix your problem. > > > Thanks! That's one of the things me and my colleague tried out during our > session here. It will fix my specific problem, but I think we found that it > gave ill effects in other cases. > > I'll continue the discussion on the MR, I have a testcase I can share when > I'm home (on the bus atm). > > Elvis > > > -Aashish > > On Thu, Oct 5, 2017 at 11:48 AM Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> No worries...so we just checked the math the cell to point offset matrix >> seems to be right but the delta seems wrong. Can you change this >> >> > delta[0] = this->Extents[1] - this->Extents[0]; >> > delta[1] = this->Extents[3] - this->Extents[2]; >> > delta[2] = this->Extents[5] - this->Extents[4]; >> >> to this >> >> delta[0] = this->Extents[1] - this->Extents[0] + 1; >> delta[1] = this->Extents[3] - this->Extents[2] + 1; >> delta[2] = this->Extents[5] - this->Extents[4] + 1; >> >> Thanks, >> >> >> >> >> >> On Thu, Oct 5, 2017 at 10:48 AM Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >> >>> 2017-10-05 16:34 GMT+02:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> > Thanks we are looking into it, earlier we moved the math from the >>> shader to >>> > a matrix that now we are forming in C++ so at this point we are >>> looking at >>> > the equation carefully. But yes, I thought you may have found a bug. >>> >>> Thanks for having a look. I suspect my std::max(..) is just a >>> workaround and not a proper fix. >>> >>> Me and a colleague had another look, but I think we were both too >>> tired to figure out if something was fundamentally wrong with the >>> equations. Too late in the day :) >>> >>> Elvis >>> >>> > >>> > - aashish >>> > >>> > On Thu, Oct 5, 2017 at 8:39 AM Elvis Stansvik < >>> elvis.stansvik at orexplore.com> >>> > wrote: >>> >> >>> >> 2017-10-05 10:38 GMT+02:00 Elvis Stansvik < >>> elvis.stansvik at orexplore.com>: >>> >> > 2017-10-04 18:12 GMT+02:00 Aashish Chaudhary >>> >> > : >>> >> >> Got it, thanks! >>> >> > >>> >> > Although I'm not familiar at all with the code, I suspect this is >>> what >>> >> > happens with my 200x200x2 volume: >>> >> > >>> >> > In void >>> >> > >>> vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() >>> >> > { >>> >> > this->CellToPointMatrix->Identity(); >>> >> > this->AdjustedTexMin[0] = this->AdjustedTexMin[1] = >>> >> > this->AdjustedTexMin[2] = 0.0f; >>> >> > this->AdjustedTexMin[3] = 1.0f; >>> >> > this->AdjustedTexMax[0] = this->AdjustedTexMax[1] = >>> >> > this->AdjustedTexMax[2] = 1.0f; >>> >> > this->AdjustedTexMax[3] = 1.0f; >>> >> > >>> >> > if (!this->Parent->CellFlag) // point data >>> >> > { >>> >> > float delta[3]; >>> >> > delta[0] = this->Extents[1] - this->Extents[0]; >>> >> > delta[1] = this->Extents[3] - this->Extents[2]; >>> >> > delta[2] = this->Extents[5] - this->Extents[4]; >>> >> > >>> >> > float min[3]; >>> >> > min[0] = 0.5f / delta[0]; >>> >> > min[1] = 0.5f / delta[1]; >>> >> > min[2] = 0.5f / delta[2]; >>> >> > >>> >> > float range[3]; // max - min >>> >> > range[0] = (delta[0] - 0.5f) / delta[0] - min[0]; >>> >> > range[1] = (delta[1] - 0.5f) / delta[1] - min[1]; >>> >> > range[2] = (delta[2] - 0.5f) / delta[2] - min[2]; >>> >> > >>> >> > this->CellToPointMatrix->SetElement(0, 0, range[0]); // Scale >>> diag >>> >> > this->CellToPointMatrix->SetElement(1, 1, range[1]); >>> >> > this->CellToPointMatrix->SetElement(2, 2, range[2]); >>> >> > this->CellToPointMatrix->SetElement(0, 3, min[0]); // t vector >>> >> > this->CellToPointMatrix->SetElement(1, 3, min[1]); >>> >> > this->CellToPointMatrix->SetElement(2, 3, min[2]); >>> >> > >>> >> > // Adjust limit coordinates for texture access. >>> >> > float const zeros[4] = {0.0f, 0.0f, 0.0f, 1.0f}; // GL tex min >>> >> > float const ones[4] = {1.0f, 1.0f, 1.0f, 1.0f}; // GL tex max >>> >> > this->CellToPointMatrix->MultiplyPoint(zeros, >>> this->AdjustedTexMin); >>> >> > this->CellToPointMatrix->MultiplyPoint(ones, >>> this->AdjustedTexMax); >>> >> > } >>> >> > } >>> >> > >>> >> > delta[2] = 1 ==> min[2] = 0.5 ==> range[2] = 0 >>> >> > >>> >> > So the scale factor in the third dimension will be 0 in >>> >> > CellToPointMatrix, right? I guess this could be what accounts for >>> the >>> >> > strange rendering? >>> >> > >>> >> > Could/should this code be updated to take into account when the >>> extent >>> >> > delta is just 1, so that volumes 2 data points thick can be >>> rendered? >>> >> >>> >> I've only tested it briefly, but this seems to give the correct >>> >> rendering even with a 2 point thick input: >>> >> >>> >> diff --git >>> a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >>> >> b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >>> >> index 8767bd0..88bbcba 100644 >>> >> --- a/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >>> >> +++ b/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx >>> >> @@ -1495,9 +1495,9 @@ void >>> >> >>> vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ComputeCellToPointMatrix() >>> >> if (!this->Parent->CellFlag) // point data >>> >> { >>> >> float delta[3]; >>> >> - delta[0] = this->Extents[1] - this->Extents[0]; >>> >> - delta[1] = this->Extents[3] - this->Extents[2]; >>> >> - delta[2] = this->Extents[5] - this->Extents[4]; >>> >> + delta[0] = std::max(2, this->Extents[1] - this->Extents[0]); >>> >> + delta[1] = std::max(2, this->Extents[3] - this->Extents[2]); >>> >> + delta[2] = std::max(2, this->Extents[5] - this->Extents[4]); >>> >> >>> >> float min[3]; >>> >> min[0] = 0.5f / delta[0]; >>> >> >>> >> This ensures the texture does not collapse into 0 when the extent >>> >> delta is 1. Would you consider this a correct fix? >>> >> >>> >> Elvis >>> >> >>> >> > >>> >> > Elvis >>> >> > >>> >> >> >>> >> >> On Wed, Oct 4, 2017 at 12:07 PM Elvis Stansvik >>> >> >> wrote: >>> >> >>> >>> >> >>> 2017-10-04 17:43 GMT+02:00 Aashish Chaudhary >>> >> >>> : >>> >> >>> > thanks..I just wanted to make sure that we remove that as one >>> of the >>> >> >>> > culprit. I am wondering if it is something to do with the >>> geometry >>> >> >>> > (bbox) or >>> >> >>> > something to do with some edge case (calculation that is going >>> off >>> >> >>> > because >>> >> >>> > of very small delta). Although in the past we have tried very >>> think >>> >> >>> > volumes >>> >> >>> > >>> >> >>> > Is it possible for you to send a sample dataset to us? >>> >> >>> >>> >> >>> My test case includes the data used. It's simply a 200x200x2 >>> volume >>> >> >>> filled with all data points set to 0.01. >>> >> >>> >>> >> >>> Elvis >>> >> >>> >>> >> >>> > >>> >> >>> > On Wed, Oct 4, 2017 at 10:09 AM Elvis Stansvik >>> >> >>> > wrote: >>> >> >>> >> >>> >> >>> >> Hi Aashish, >>> >> >>> >> >>> >> >>> >> 2017-10-04 15:47 GMT+02:00 Aashish Chaudhary >>> >> >>> >> : >>> >> >>> >> > Please make sure that your sampling distance is less than < >>> 2. >>> >> >>> >> > You >>> >> >>> >> > can >>> >> >>> >> > set >>> >> >>> >> > the sampling distance manually in the API. >>> >> >>> >> >>> >> >>> >> Hm. I don't think it's related to sampling distance. In the >>> test >>> >> >>> >> case >>> >> >>> >> I'm not setting sampling distance at all, so I think it should >>> >> >>> >> default >>> >> >>> >> to 1, and then be automatically adjusted during interaction. >>> >> >>> >> >>> >> >>> >> In any case, even if I amend the test case with e.g.: >>> >> >>> >> >>> >> >>> >> volumeMapper->AutoAdjustSampleDistancesOff(); >>> >> >>> >> volumeMapper->SetSampleDistance(0.2); >>> >> >>> >> ... >>> >> >>> >> volumeMapper2->AutoAdjustSampleDistancesOff(); >>> >> >>> >> volumeMapper2->SetSampleDistance(0.2); >>> >> >>> >> >>> >> >>> >> The result is the same. >>> >> >>> >> >>> >> >>> >> Elvis >>> >> >>> >> >>> >> >>> >> > >>> >> >>> >> > On Wed, Oct 4, 2017 at 8:23 AM Elvis Stansvik >>> >> >>> >> > >>> >> >>> >> > wrote: >>> >> >>> >> >> >>> >> >>> >> >> Hi all, >>> >> >>> >> >> >>> >> >>> >> >> In the test case below, I render one 200x200x2 volume and >>> one >>> >> >>> >> >> 200x200x3 volume, both with the same settings. >>> >> >>> >> >> >>> >> >>> >> >> The 200x200x3 volume looks as expected (the light gray one >>> in >>> >> >>> >> >> the >>> >> >>> >> >> attached screenshot), while the 200x200x2 one looks strange >>> (too >>> >> >>> >> >> dark, >>> >> >>> >> >> and with some kind of gradient artifact). >>> >> >>> >> >> >>> >> >>> >> >> Is there some limitation on rendering a volume that is only >>> 2 >>> >> >>> >> >> thick >>> >> >>> >> >> in >>> >> >>> >> >> one of the dimensions? I can understand why a volume of >>> >> >>> >> >> thickness 1 >>> >> >>> >> >> can't be rendered properly, since VTK must have values to >>> >> >>> >> >> interpolate >>> >> >>> >> >> between, but 2 should be OK right? >>> >> >>> >> >> >>> >> >>> >> >> Thanks for any help. >>> >> >>> >> >> >>> >> >>> >> >> Elvis >>> >> >>> >> >> >>> >> >>> >> >> >>> >> >>> >> >> main.cpp: >>> >> >>> >> >> >>> >> >>> >> >> #include >>> >> >>> >> >> >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> #include >>> >> >>> >> >> >>> >> >>> >> >> int main(int argc, char *argv[]) >>> >> >>> >> >> { >>> >> >>> >> >> vtkNew colorFunction; >>> >> >>> >> >> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); >>> >> >>> >> >> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0); >>> >> >>> >> >> >>> >> >>> >> >> vtkNew opacityFunction; >>> >> >>> >> >> opacityFunction->AddPoint(0.0, 0.0); >>> >> >>> >> >> opacityFunction->AddPoint(1.0, 1.0); >>> >> >>> >> >> >>> >> >>> >> >> // A 200x200x2 volume >>> >> >>> >> >> vtkNew imageData; >>> >> >>> >> >> imageData->SetExtent(0, 199, 0, 199, 0, 1); >>> >> >>> >> >> imageData->AllocateScalars(VTK_FLOAT, 1); >>> >> >>> >> >> std::fill_n(static_cast>> >> >>> >> >> *>(imageData->GetScalarPointer()), >>> >> >>> >> >> 200 * 200 * 2, 0.01); >>> >> >>> >> >> >>> >> >>> >> >> vtkNew volumeMapper; >>> >> >>> >> >> volumeMapper->SetInputData(imageData.Get()); >>> >> >>> >> >> >>> >> >>> >> >> vtkNew volumeProperty; >>> >> >>> >> >> volumeProperty->SetScalarOpacity(opacityFunction.Get()); >>> >> >>> >> >> volumeProperty->SetColor(colorFunction.Get()); >>> >> >>> >> >> volumeProperty->ShadeOff(); >>> >> >>> >> >> >>> >> >>> >> >> vtkNew volume; >>> >> >>> >> >> volume->SetMapper(volumeMapper.Get()); >>> >> >>> >> >> volume->SetProperty(volumeProperty.Get()); >>> >> >>> >> >> volume->SetPosition(120, 0, 0); >>> >> >>> >> >> >>> >> >>> >> >> // A 200x200x3 volume >>> >> >>> >> >> vtkNew imageData2; >>> >> >>> >> >> imageData2->SetExtent(0, 199, 0, 199, 0, 2); >>> >> >>> >> >> imageData2->AllocateScalars(VTK_FLOAT, 1); >>> >> >>> >> >> std::fill_n(static_cast>> >> >>> >> >> *>(imageData2->GetScalarPointer()), >>> >> >>> >> >> 200 * 200 * 3, 0.01); >>> >> >>> >> >> >>> >> >>> >> >> vtkNew volumeMapper2; >>> >> >>> >> >> volumeMapper2->SetInputData(imageData2.Get()); >>> >> >>> >> >> >>> >> >>> >> >> vtkNew volumeProperty2; >>> >> >>> >> >> >>> volumeProperty2->SetScalarOpacity(opacityFunction.Get()); >>> >> >>> >> >> volumeProperty2->SetColor(colorFunction.Get()); >>> >> >>> >> >> volumeProperty2->ShadeOff(); >>> >> >>> >> >> >>> >> >>> >> >> vtkNew volume2; >>> >> >>> >> >> volume2->SetMapper(volumeMapper2.Get()); >>> >> >>> >> >> volume2->SetProperty(volumeProperty2.Get()); >>> >> >>> >> >> volume2->SetPosition(-120, 0, 0); >>> >> >>> >> >> >>> >> >>> >> >> vtkNew renderer; >>> >> >>> >> >> renderer->AddVolume(volume.Get()); >>> >> >>> >> >> renderer->AddVolume(volume2.Get()); >>> >> >>> >> >> renderer->SetBackground(1.0, 1.0, 1.0); >>> >> >>> >> >> >>> >> >>> >> >> // Render with "plain" render window / interactor >>> >> >>> >> >> vtkNew window; >>> >> >>> >> >> window->SetMultiSamples(0); >>> >> >>> >> >> window->AddRenderer(renderer.Get()); >>> >> >>> >> >> >>> >> >>> >> >> vtkNew interactor; >>> >> >>> >> >> interactor->SetRenderWindow(window.Get()); >>> >> >>> >> >> interactor->Start(); >>> >> >>> >> >> >>> >> >>> >> >> return 0; >>> >> >>> >> >> } >>> >> >>> >> >> >>> >> >>> >> >> >>> >> >>> >> >> CMakeLists.txt: >>> >> >>> >> >> >>> >> >>> >> >> cmake_minimum_required(VERSION 3.1) >>> >> >>> >> >> >>> >> >>> >> >> project(TestCase) >>> >> >>> >> >> >>> >> >>> >> >> find_package(VTK 8.0 COMPONENTS >>> >> >>> >> >> vtkCommonCore >>> >> >>> >> >> vtkCommonDataModel >>> >> >>> >> >> vtkCommonExecutionModel >>> >> >>> >> >> vtkCommonMath >>> >> >>> >> >> vtkFiltersSources >>> >> >>> >> >> vtkGUISupportQt >>> >> >>> >> >> vtkInteractionStyle >>> >> >>> >> >> vtkRenderingCore >>> >> >>> >> >> vtkRenderingOpenGL2 >>> >> >>> >> >> vtkRenderingVolume >>> >> >>> >> >> vtkRenderingVolumeOpenGL2 >>> >> >>> >> >> REQUIRED >>> >> >>> >> >> ) >>> >> >>> >> >> >>> >> >>> >> >> add_executable(TestCase main.cpp) >>> >> >>> >> >> >>> >> >>> >> >> target_link_libraries(TestCase PUBLIC >>> >> >>> >> >> vtkCommonCore >>> >> >>> >> >> vtkCommonDataModel >>> >> >>> >> >> vtkCommonExecutionModel >>> >> >>> >> >> vtkCommonMath >>> >> >>> >> >> vtkFiltersSources >>> >> >>> >> >> vtkInteractionStyle >>> >> >>> >> >> vtkRenderingCore >>> >> >>> >> >> vtkRenderingOpenGL2 >>> >> >>> >> >> vtkRenderingVolume >>> >> >>> >> >> vtkRenderingVolumeOpenGL2 >>> >> >>> >> >> ) >>> >> >>> >> >> >>> >> >>> >> >> target_include_directories(TestCase PUBLIC >>> >> >>> >> >> ${VTK_INCLUDE_DIRS} >>> >> >>> >> >> ) >>> >> >>> >> >> >>> >> >>> >> >> target_compile_definitions(TestCase PUBLIC >>> >> >>> >> >> ${VTK_DEFINITIONS} >>> >> >>> >> >> ) >>> >> >>> >> >> >>> >> >>> >> >> set_target_properties(TestCase PROPERTIES >>> >> >>> >> >> CXX_STANDARD 14 >>> >> >>> >> >> CXX_STANDARD_REQUIRED ON >>> >> >>> >> >> ) >>> >> >>> >> >> _______________________________________________ >>> >> >>> >> >> Powered by www.kitware.com >>> >> >>> >> >> >>> >> >>> >> >> Visit other Kitware open-source projects at >>> >> >>> >> >> http://www.kitware.com/opensource/opensource.html >>> >> >>> >> >> >>> >> >>> >> >> Please keep messages on-topic and check the VTK FAQ at: >>> >> >>> >> >> http://www.vtk.org/Wiki/VTK_FAQ >>> >> >>> >> >> >>> >> >>> >> >> Search the list archives at: >>> >> >>> >> >> http://markmail.org/search/?q=vtkusers >>> >> >>> >> >> >>> >> >>> >> >> Follow this link to subscribe/unsubscribe: >>> >> >>> >> >> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Thu Oct 5 17:30:02 2017 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Fri, 6 Oct 2017 08:30:02 +1100 Subject: [vtkusers] ANN: VTK Book Examples Message-ID: A long while ago, I converted most of the VTK Book examples from TCL to Python, (Sept 2014 to be precise). I still have the converted examples and notes as to where conversions failed. No one was interested at the time. If you want I can zip up the code and send it to you. Regards Andrew > > ---------- Forwarded message ---------- > From: Bill Lorensen > To: VTK Users , VTK Developers > Cc: > Bcc: > Date: Thu, 5 Oct 2017 11:52:55 -0700 > Subject: [vtkusers] ANN: VTK Book Examples > Folks, > > We've started an effort to convert all of the examples mentioned in > the VTK Book. This is a works in progress. > > Since some of the API's have changed, the new implementations may > differ from those in the book. Also, since Tcl used less frequently, > the examples have been converted to C++. The examples are also > enhanced by newer VTK features, like vtkNamedColors and > VtkSmartPointer. > > Each Figure example > > 1) links to the source code of the new implementation, > 2) links to the doxygen documentation for classes demonstrated, > 3) shows the original figure caption and, > 4) if the example produces an image, links to the full resolution image. > 5) If the caption includes a source file reference, e.g. bluntStr.cxx > or rotations.tcl, that reference links to the original source code. > > Go to: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ > > Figures that have been converted will show an image on the right: > > For example see: > https://lorensen.github.io/VTKExamples/site/Cxx/ > VisualizationAlgorithms/LOx/ > > Please enjoy this new effort to revive the VTK Figure examples. > > Bill > > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Thu Oct 5 19:03:02 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Thu, 5 Oct 2017 19:03:02 -0400 Subject: [vtkusers] ANN: VTK Book Examples In-Reply-To: References: Message-ID: Hi Andrew, I would be very interested in getting a copy of your port. Please zip and send! Thanks in advance, I'm working through the book as we speak... those examples will come in handy. Nick On Thu, Oct 5, 2017 at 5:30 PM, Andrew Maclean wrote: > A long while ago, I converted most of the VTK Book examples from TCL to > Python, (Sept 2014 to be precise). I still have the converted examples and > notes as to where conversions failed. > > No one was interested at the time. > > If you want I can zip up the code and send it to you. > > Regards > Andrew > > > >> >> ---------- Forwarded message ---------- >> From: Bill Lorensen >> To: VTK Users , VTK Developers >> Cc: >> Bcc: >> Date: Thu, 5 Oct 2017 11:52:55 -0700 >> Subject: [vtkusers] ANN: VTK Book Examples >> Folks, >> >> We've started an effort to convert all of the examples mentioned in >> the VTK Book. This is a works in progress. >> >> Since some of the API's have changed, the new implementations may >> differ from those in the book. Also, since Tcl used less frequently, >> the examples have been converted to C++. The examples are also >> enhanced by newer VTK features, like vtkNamedColors and >> VtkSmartPointer. >> >> Each Figure example >> >> 1) links to the source code of the new implementation, >> 2) links to the doxygen documentation for classes demonstrated, >> 3) shows the original figure caption and, >> 4) if the example produces an image, links to the full resolution image. >> 5) If the caption includes a source file reference, e.g. bluntStr.cxx >> or rotations.tcl, that reference links to the original source code. >> >> Go to: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ >> >> Figures that have been converted will show an image on the right: >> >> For example see: >> https://lorensen.github.io/VTKExamples/site/Cxx/Visualizatio >> nAlgorithms/LOx/ >> >> Please enjoy this new effort to revive the VTK Figure examples. >> >> Bill >> >> >> >> > > -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Thu Oct 5 21:05:19 2017 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Fri, 6 Oct 2017 12:05:19 +1100 Subject: [vtkusers] ANN: VTK Book Examples In-Reply-To: References: Message-ID: Here they are. I have left out all the data files to save space. Please note: 1) They were probably done in Python 2.6. 2) It was for VTK 6.0 As Bill noted it would be a good idea to use vtkNamedColors instead of colors.py in the Python folder. These conversions were done long before vtkNamedColors existed. Conversion Progress.txt should give you a good idea as to what was done. Regards Andrew On Fri, Oct 6, 2017 at 10:03 AM, Nick Torenvliet wrote: > Hi Andrew, I would be very interested in getting a copy of your port. > Please zip and send! > > Thanks in advance, I'm working through the book as we speak... those > examples will come in handy. > > Nick > > On Thu, Oct 5, 2017 at 5:30 PM, Andrew Maclean > wrote: > >> A long while ago, I converted most of the VTK Book examples from TCL to >> Python, (Sept 2014 to be precise). I still have the converted examples and >> notes as to where conversions failed. >> >> No one was interested at the time. >> >> If you want I can zip up the code and send it to you. >> >> Regards >> Andrew >> >> >> >>> >>> ---------- Forwarded message ---------- >>> From: Bill Lorensen >>> To: VTK Users , VTK Developers >> > >>> Cc: >>> Bcc: >>> Date: Thu, 5 Oct 2017 11:52:55 -0700 >>> Subject: [vtkusers] ANN: VTK Book Examples >>> Folks, >>> >>> We've started an effort to convert all of the examples mentioned in >>> the VTK Book. This is a works in progress. >>> >>> Since some of the API's have changed, the new implementations may >>> differ from those in the book. Also, since Tcl used less frequently, >>> the examples have been converted to C++. The examples are also >>> enhanced by newer VTK features, like vtkNamedColors and >>> VtkSmartPointer. >>> >>> Each Figure example >>> >>> 1) links to the source code of the new implementation, >>> 2) links to the doxygen documentation for classes demonstrated, >>> 3) shows the original figure caption and, >>> 4) if the example produces an image, links to the full resolution image. >>> 5) If the caption includes a source file reference, e.g. bluntStr.cxx >>> or rotations.tcl, that reference links to the original source code. >>> >>> Go to: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ >>> >>> Figures that have been converted will show an image on the right: >>> >>> For example see: >>> https://lorensen.github.io/VTKExamples/site/Cxx/Visualizatio >>> nAlgorithms/LOx/ >>> >>> Please enjoy this new effort to revive the VTK Figure examples. >>> >>> Bill >>> >>> >>> >>> >> >> -- >> ___________________________________________ >> Andrew J. P. Maclean >> >> ___________________________________________ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VTKTextbookExercises.zip Type: application/zip Size: 106602 bytes Desc: not available URL: From natorenvliet at gmail.com Thu Oct 5 21:39:54 2017 From: natorenvliet at gmail.com (natorenvliet at gmail.com) Date: Thu, 5 Oct 2017 21:39:54 -0400 Subject: [vtkusers] ANN: VTK Book Examples In-Reply-To: References: Message-ID: <71C3C4A4-5112-4DCC-8540-CE7BC528317A@gmail.com> This will put me at least thirty or forty minutes ahead :) Sent from my iPhone > On Oct 5, 2017, at 9:05 PM, Andrew Maclean wrote: > > Here they are. I have left out all the data files to save space. > Please note: > 1) They were probably done in Python 2.6. > 2) It was for VTK 6.0 > > As Bill noted it would be a good idea to use vtkNamedColors instead of colors.py in the Python folder. These conversions were done long before vtkNamedColors existed. > > Conversion Progress.txt should give you a good idea as to what was done. > > Regards > Andrew > > > >> On Fri, Oct 6, 2017 at 10:03 AM, Nick Torenvliet wrote: >> Hi Andrew, I would be very interested in getting a copy of your port. Please zip and send! >> >> Thanks in advance, I'm working through the book as we speak... those examples will come in handy. >> >> Nick >> >>> On Thu, Oct 5, 2017 at 5:30 PM, Andrew Maclean wrote: >>> A long while ago, I converted most of the VTK Book examples from TCL to Python, (Sept 2014 to be precise). I still have the converted examples and notes as to where conversions failed. >>> >>> No one was interested at the time. >>> >>> If you want I can zip up the code and send it to you. >>> >>> Regards >>> Andrew >>> >>> >>>> >>>> >>>> ---------- Forwarded message ---------- >>>> From: Bill Lorensen >>>> To: VTK Users , VTK Developers >>>> Cc: >>>> Bcc: >>>> Date: Thu, 5 Oct 2017 11:52:55 -0700 >>>> Subject: [vtkusers] ANN: VTK Book Examples >>>> Folks, >>>> >>>> We've started an effort to convert all of the examples mentioned in >>>> the VTK Book. This is a works in progress. >>>> >>>> Since some of the API's have changed, the new implementations may >>>> differ from those in the book. Also, since Tcl used less frequently, >>>> the examples have been converted to C++. The examples are also >>>> enhanced by newer VTK features, like vtkNamedColors and >>>> VtkSmartPointer. >>>> >>>> Each Figure example >>>> >>>> 1) links to the source code of the new implementation, >>>> 2) links to the doxygen documentation for classes demonstrated, >>>> 3) shows the original figure caption and, >>>> 4) if the example produces an image, links to the full resolution image. >>>> 5) If the caption includes a source file reference, e.g. bluntStr.cxx >>>> or rotations.tcl, that reference links to the original source code. >>>> >>>> Go to: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ >>>> >>>> Figures that have been converted will show an image on the right: >>>> >>>> For example see: >>>> https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/LOx/ >>>> >>>> Please enjoy this new effort to revive the VTK Figure examples. >>>> >>>> Bill >>>> >>>> >>>> >>> >>> >>> -- >>> ___________________________________________ >>> Andrew J. P. Maclean >>> >>> ___________________________________________ >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> > > > > -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcog.ghiani at gmail.com Fri Oct 6 03:33:06 2017 From: marcog.ghiani at gmail.com (Marco Ghiani) Date: Fri, 6 Oct 2017 08:33:06 +0100 Subject: [vtkusers] data plotting curvilinear grid In-Reply-To: <206dd3fc-9473-7bec-ed53-8ba468c112a3@gmail.com> References: <206dd3fc-9473-7bec-ed53-8ba468c112a3@gmail.com> Message-ID: Dear all , I find this very usefull (for my works) image of curvilinear grid , done in VTK format or other imports by paraview , here the image /http://sdav.sci.utah.edu/29-highlights/visualization/67-osuflow-vtk-integration.html/ i'm speaking about the pictures on the right side, how is obtained ?? -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.genet at polytechnique.edu Fri Oct 6 04:40:51 2017 From: martin.genet at polytechnique.edu (Martin Genet) Date: Fri, 6 Oct 2017 10:40:51 +0200 Subject: [vtkusers] non-conforming interface projections Message-ID: <15863c5a-1a5c-0b8a-016b-82658dc8a1dd@polytechnique.edu> Dear all, Is there a way to perform fast non-conforming interface projections (cf. https://www.unige.ch/~gander/demo.php) between two unstructured grids, or even between an unstructured grid and a rectilinear structured grid, currently within the vtk library? Cannot find any info on that? Thanks! Martin From bill.lorensen at gmail.com Sat Oct 7 12:11:38 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 7 Oct 2017 09:11:38 -0700 Subject: [vtkusers] ANN: VTK Book Examples In-Reply-To: References: Message-ID: Here are some rough instructions on how to convert examples: https://lorensen.github.io/VTKExamples/site/Instructions/ConvertingFiguresToExamples/ On Thu, Oct 5, 2017 at 2:30 PM, Andrew Maclean wrote: > A long while ago, I converted most of the VTK Book examples from TCL to > Python, (Sept 2014 to be precise). I still have the converted examples and > notes as to where conversions failed. > > No one was interested at the time. > > If you want I can zip up the code and send it to you. > > Regards > Andrew > > >> >> >> ---------- Forwarded message ---------- >> From: Bill Lorensen >> To: VTK Users , VTK Developers >> Cc: >> Bcc: >> Date: Thu, 5 Oct 2017 11:52:55 -0700 >> Subject: [vtkusers] ANN: VTK Book Examples >> Folks, >> >> We've started an effort to convert all of the examples mentioned in >> the VTK Book. This is a works in progress. >> >> Since some of the API's have changed, the new implementations may >> differ from those in the book. Also, since Tcl used less frequently, >> the examples have been converted to C++. The examples are also >> enhanced by newer VTK features, like vtkNamedColors and >> VtkSmartPointer. >> >> Each Figure example >> >> 1) links to the source code of the new implementation, >> 2) links to the doxygen documentation for classes demonstrated, >> 3) shows the original figure caption and, >> 4) if the example produces an image, links to the full resolution image. >> 5) If the caption includes a source file reference, e.g. bluntStr.cxx >> or rotations.tcl, that reference links to the original source code. >> >> Go to: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ >> >> Figures that have been converted will show an image on the right: >> >> For example see: >> >> https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/LOx/ >> >> Please enjoy this new effort to revive the VTK Figure examples. >> >> Bill >> >> >> > > > -- > ___________________________________________ > Andrew J. P. Maclean > > ___________________________________________ -- Unpaid intern in BillsBasement at noware dot com From simon.esneault at gmail.com Mon Oct 9 12:05:21 2017 From: simon.esneault at gmail.com (Simon Esneault) Date: Mon, 9 Oct 2017 18:05:21 +0200 Subject: [vtkusers] Dotted line int VTK > 7 Message-ID: Hello community Is there a way to draw dotted line with the new backend ? We used something like this before m_actor->GetProperty()->SetLineStipplePattern( 0xf0f0 ); m_actor->GetProperty()->SetLineStippleRepeatFactor( 1 ); But the doc says it works only for the old backend. Any other solution ? Thanks Simon -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Oct 9 13:04:40 2017 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 9 Oct 2017 13:04:40 -0400 Subject: [vtkusers] Dotted line int VTK > 7 In-Reply-To: References: Message-ID: https://gitlab.kitware.com/vtk/vtk/issues/15799 gives a couple options that might work for you. On Mon, Oct 9, 2017 at 12:05 PM, Simon Esneault wrote: > Hello community > > Is there a way to draw dotted line with the new backend ? > > We used something like this before > > m_actor->GetProperty()->SetLineStipplePattern( 0xf0f0 ); > m_actor->GetProperty()->SetLineStippleRepeatFactor( 1 ); > > But the doc says it works only for the old backend. > Any other solution ? > > Thanks > Simon > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Mon Oct 9 14:29:47 2017 From: simon.esneault at gmail.com (Simon Esneault) Date: Mon, 9 Oct 2017 20:29:47 +0200 Subject: [vtkusers] Dotted line int VTK > 7 In-Reply-To: References: Message-ID: The second trick using texture might just work ! Thanks Simon 2017-10-09 19:04 GMT+02:00 Ken Martin : > https://gitlab.kitware.com/vtk/vtk/issues/15799 gives a couple options > that might work for you. > > On Mon, Oct 9, 2017 at 12:05 PM, Simon Esneault > wrote: > >> Hello community >> >> Is there a way to draw dotted line with the new backend ? >> >> We used something like this before >> >> m_actor->GetProperty()->SetLineStipplePattern( 0xf0f0 ); >> m_actor->GetProperty()->SetLineStippleRepeatFactor( 1 ); >> >> But the doc says it works only for the old backend. >> Any other solution ? >> >> Thanks >> Simon >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > > Clifton Park NY 12065 > > > 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. > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From kayarre at gmail.com Mon Oct 9 16:04:43 2017 From: kayarre at gmail.com (Kurt Sansom) Date: Mon, 9 Oct 2017 13:04:43 -0700 Subject: [vtkusers] triangle subdivision from subset of triangles Message-ID: I would like to subdivide a selection of polyData triangle cells based on location, not metric information. I can see how this could be possible and found a similar unanswered question from a few years ago. given a large mesh, select a small group of cells and subdivide them while retaining the subdivided and un-subdivided mesh as one mesh in the output. Regards, ~Kurt Sansom -- Kurt Sansom Graduate Research Assistant Cardiovascular and Multi-Phase Flow Lab University of Washington -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangq1979 at outlook.com Tue Oct 10 08:16:16 2017 From: wangq1979 at outlook.com (Wang Q) Date: Tue, 10 Oct 2017 12:16:16 +0000 Subject: [vtkusers] CXX example with Qt Message-ID: Hello VTK guys, I have successfully built VTK8 with Qt5.9.1 using VS 2017. I am trying to follow an example about Qt by CXX, and download CXX and CMake file. By following everything instructed, I opened the generated project and built, but I am faced with some errors, which indicate the relevant header file (.h) is missing. I googled for a while and did not find a clue. It seems everybody does the same but without the errors. Could anyone shed a light upon what I have missed? Best wishes, Chiang -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinander at gmail.com Tue Oct 10 08:25:50 2017 From: chinander at gmail.com (Mike Chinander) Date: Tue, 10 Oct 2017 07:25:50 -0500 Subject: [vtkusers] CXX example with Qt In-Reply-To: References: Message-ID: You are going to have give us some more info. What was the example that you downloaded and tried to compile and run? What were the errors. On Tue, Oct 10, 2017 at 7:16 AM, Wang Q wrote: > Hello VTK guys, > > > I have successfully built VTK8 with Qt5.9.1 using VS 2017. I am trying to > follow an example about Qt by CXX, and download CXX and CMake file. By > following everything instructed, I opened the generated project and built, > but I am faced with some errors, which indicate the relevant header file > (.h) is missing. > > > I googled for a while and did not find a clue. It seems everybody does the > same but without the errors. Could anyone shed a light upon what I have > missed? > > > Best wishes, > > > Chiang > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 wangq1979 at outlook.com Tue Oct 10 08:53:48 2017 From: wangq1979 at outlook.com (Wang Q) Date: Tue, 10 Oct 2017 12:53:48 +0000 Subject: [vtkusers] =?gb2312?b?tPC4tDogIENYWCBleGFtcGxlIHdpdGggUXQ=?= In-Reply-To: References: , , Message-ID: Hi Mike, Thanks for the prompt reply. I tried the example of SideBySideRenderWindowsQt on https://lorensen.github.io/VTKExamples/site/Cxx/Qt/SideBySideRenderWindowsQt/. I got the error Error (active) E1696 cannot open source file "SideBySideRenderWindowsQt.h" SideBySideRenderWindowsQt d:\develop\C++\projects\QtVTKTest\SideBySideRenderWindowsQt.cxx 1 and some other errors relating to the above error. I am using vtk8.0.1, Qt5.9.1, and VS2017 on Win 7. Any further comments? Best wishes, Chiang ________________________________ ???: Wang Q ????: 2017?10?10? 13:49 ???: Mike Chinander; vtkusers at vtk.org ??: ??: [vtkusers] CXX example with Qt Hi Mike, Thanks for the prompt reply. I tried the example of SideBySideRenderWindowsQt on https://lorensen.github.io/VTKExamples/site/Cxx/Qt/SideBySideRenderWindowsQt/. I got the error Error (active) E1696 cannot open source file "SideBySideRenderWindowsQt.h" SideBySideRenderWindowsQt d:\develop\C++\projects\QtVTKTest\SideBySideRenderWindowsQt.cxx 1 and some other errors relating to the above error. I am using vtk8.0.1, Qt5.9.1, and VS2017 on Win 7. Any further comments? Best wishes, Chiang SideBySideRenderWindowsQt - GitHub Pages lorensen.github.io WINDOWS USERS PLEASE NOTE: Be sure to add the VTK bin directory to your path. This will resolve the VTK dll's at run time. ________________________________ ???: vtkusers ?? Mike Chinander ????: 2017?10?10? 13:25:50 ???: vtkusers at vtk.org ??: Re: [vtkusers] CXX example with Qt You are going to have give us some more info. What was the example that you downloaded and tried to compile and run? What were the errors. On Tue, Oct 10, 2017 at 7:16 AM, Wang Q > wrote: Hello VTK guys, I have successfully built VTK8 with Qt5.9.1 using VS 2017. I am trying to follow an example about Qt by CXX, and download CXX and CMake file. By following everything instructed, I opened the generated project and built, but I am faced with some errors, which indicate the relevant header file (.h) is missing. I googled for a while and did not find a clue. It seems everybody does the same but without the errors. Could anyone shed a light upon what I have missed? Best wishes, Chiang _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Oct 10 09:52:13 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 10 Oct 2017 06:52:13 -0700 Subject: [vtkusers] =?utf-8?b?562U5aSNOiBDWFggZXhhbXBsZSB3aXRoIFF0?= In-Reply-To: References: Message-ID: I have not converted the new VTKExamples to generate proper CMakelists.txt files for Qt examples. To build the Qt examples you will need to build all of the examples. The easiest way to do that is to enable the Wiki examples remote module in your vtk build. On Oct 10, 2017 5:54 AM, "Wang Q" wrote: > Hi Mike, > > Thanks for the prompt reply. > > I tried the example of SideBySideRenderWindowsQt on > https://lorensen.github.io/VTKExamples/site/Cxx/Qt/ > SideBySideRenderWindowsQt/. I got the error > > Error (active) E1696 cannot open source file "SideBySideRenderWindowsQt.h" > SideBySideRenderWindowsQt d:\develop\C++\projects\QtVTKTest\SideBySideRenderWindowsQt.cxx > 1 > > and some other errors relating to the above error. > > I am using vtk8.0.1, Qt5.9.1, and VS2017 on Win 7. > > Any further comments? > > Best wishes, > > Chiang > > > > ------------------------------ > *???:* Wang Q > *????:* 2017?10?10? 13:49 > *???:* Mike Chinander; vtkusers at vtk.org > *??:* ??: [vtkusers] CXX example with Qt > > > Hi Mike, > > > Thanks for the prompt reply. > > > I tried the example of SideBySideRenderWindowsQt on > https://lorensen.github.io/VTKExamples/site/Cxx/Qt/ > SideBySideRenderWindowsQt/. I got the error > > Error (active) E1696 cannot open source file "SideBySideRenderWindowsQt.h" > SideBySideRenderWindowsQt d:\develop\C++\projects\QtVTKTest\ > SideBySideRenderWindowsQt.cxx 1 > > and some other errors relating to the above error. > > I am using vtk8.0.1, Qt5.9.1, and VS2017 on Win 7. > > Any further comments? > > Best wishes, > > Chiang > SideBySideRenderWindowsQt - GitHub Pages > > lorensen.github.io > WINDOWS USERS PLEASE NOTE: Be sure to add the VTK bin directory to your > path. This will resolve the VTK dll's at run time. > > ------------------------------ > *???:* vtkusers ?? Mike Chinander < > chinander at gmail.com> > *????:* 2017?10?10? 13:25:50 > *???:* vtkusers at vtk.org > *??:* Re: [vtkusers] CXX example with Qt > > You are going to have give us some more info. What was the example that > you downloaded and tried to compile and run? What were the errors. > > On Tue, Oct 10, 2017 at 7:16 AM, Wang Q wrote: > >> Hello VTK guys, >> >> >> I have successfully built VTK8 with Qt5.9.1 using VS 2017. I am trying to >> follow an example about Qt by CXX, and download CXX and CMake file. By >> following everything instructed, I opened the generated project and built, >> but I am faced with some errors, which indicate the relevant header file >> (.h) is missing. >> >> >> I googled for a while and did not find a clue. It seems everybody does >> the same but without the errors. Could anyone shed a light upon what I have >> missed? >> >> >> Best wishes, >> >> >> Chiang >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 Zoltan.Kovacs at esi-group.com Tue Oct 10 10:10:18 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Tue, 10 Oct 2017 16:10:18 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> Message-ID: Dear all, In CMake I generated a solution project of VTK-8.0.1 with Qt5 support for MSVS2013. After having run the ALL_BUILD and INSTALL projects with the install prefix C:\VTK\8.0.1 in VM2013 I could installed the Win32 bit binaries of VTK 8.0.1 in that folder. The header files and the libraries are located in C:\VTK\8.0.1\include\vtk-8.0 and C:\VTK\8.0.1\lib. I copied the file QVTKWidgetPlugin.dll from the VTK binary folders to the plugin folder of QTCreator, which uses QT 5.8 msvs2013 32 bit version. Then I set the include and library paths and added all the VTK libary files from C:\VTK\8.0.1\lib for the linker setting in the project file of a QT application in QtCreator: INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 LIBS += -LC:\VTK\8.0.1\lib LIBS += -lvtkRenderingLabel-8.0 \ -lvtkRenderingLOD-8.0 \ -lvtkRenderingOpenGL2-8.0 \ -lvtkRenderingQt-8.0 \ -lvtkRenderingVolume-8.0 \ -lvtkRenderingVolumeOpenGL2-8.0 \ -lvtksqlite-8.0 \ -lvtksys-8.0 \ -lvtkTestingGenericBridge-8.0 \ -lvtkTestingIOSQL-8.0 \ -lvtkTestingRendering-8.0 \ -lvtktiff-8.0 \ -lvtkverdict-8.0 \ -lvtkViewsContext2D-8.0 \ -lvtkViewsCore-8.0 \ -lvtkViewsInfovis-8.0 \ -lvtkViewsQt-8.0 \ -lvtkzlib-8.0 \ -lvtkalglib-8.0 \ -lvtkChartsCore-8.0 \ -lvtkCommonColor-8.0 \ -lvtkCommonComputationalGeometry-8.0 \ -lvtkCommonCore-8.0 \ -lvtkCommonDataModel-8.0 \ -lvtkCommonExecutionModel-8.0 \ -lvtkCommonMath-8.0 \ -lvtkCommonMisc-8.0 \ -lvtkCommonSystem-8.0 \ -lvtkCommonTransforms-8.0 \ -lvtkDICOMParser-8.0 \ -lvtkDomainsChemistry-8.0 \ -lvtkDomainsChemistryOpenGL2-8.0 \ -lvtkexoIIc-8.0 \ -lvtkexpat-8.0 \ -lvtkFiltersAMR-8.0 \ -lvtkFiltersCore-8.0 \ -lvtkFiltersExtraction-8.0 \ -lvtkFiltersFlowPaths-8.0 \ -lvtkFiltersGeneral-8.0 \ -lvtkFiltersGeneric-8.0 \ -lvtkFiltersGeometry-8.0 \ -lvtkFiltersHybrid-8.0 \ -lvtkFiltersHyperTree-8.0 \ -lvtkFiltersImaging-8.0 \ -lvtkFiltersModeling-8.0 \ -lvtkFiltersParallel-8.0 \ -lvtkFiltersParallelImaging-8.0 \ -lvtkFiltersPoints-8.0 \ -lvtkFiltersProgrammable-8.0 \ -lvtkFiltersSelection-8.0 \ -lvtkFiltersSMP-8.0 \ -lvtkFiltersSources-8.0 \ -lvtkFiltersStatistics-8.0 \ -lvtkFiltersTexture-8.0 \ -lvtkFiltersTopology-8.0 \ -lvtkFiltersVerdict-8.0 \ -lvtkfreetype-8.0 \ -lvtkGeovisCore-8.0 \ -lvtkgl2ps-8.0 \ -lvtkglew-8.0 \ -lvtkGUISupportQt-8.0 \ -lvtkGUISupportQtSQL-8.0 \ -lvtkhdf5_hl-8.0 \ -lvtkhdf5-8.0 \ -lvtkImagingColor-8.0 \ -lvtkImagingCore-8.0 \ -lvtkImagingFourier-8.0 \ -lvtkImagingGeneral-8.0 \ -lvtkImagingHybrid-8.0 \ -lvtkImagingMath-8.0 \ -lvtkImagingMorphological-8.0 \ -lvtkImagingSources-8.0 \ -lvtkImagingStatistics-8.0 \ -lvtkImagingStencil-8.0 \ -lvtkInfovisCore-8.0 \ -lvtkInfovisLayout-8.0 \ -lvtkInteractionImage-8.0 \ -lvtkInteractionStyle-8.0 \ -lvtkInteractionWidgets-8.0 \ -lvtkIOAMR-8.0 \ -lvtkIOCore-8.0 \ -lvtkIOEnSight-8.0 \ -lvtkIOExodus-8.0 \ -lvtkIOExport-8.0 \ -lvtkIOExportOpenGL2-8.0 \ -lvtkIOGeometry-8.0 \ -lvtkIOImage-8.0 \ -lvtkIOImport-8.0 \ -lvtkIOInfovis-8.0 \ -lvtkIOLegacy-8.0 \ -lvtkIOLSDyna-8.0 \ -lvtkIOMINC-8.0 \ -lvtkIOMovie-8.0 \ -lvtkIONetCDF-8.0 \ -lvtkIOParallel-8.0 \ -lvtkIOParallelXML-8.0 \ -lvtkIOPLY-8.0 \ -lvtkIOSQL-8.0 \ -lvtkIOTecplotTable-8.0 \ -lvtkIOVideo-8.0 \ -lvtkIOXML-8.0 \ -lvtkIOXMLParser-8.0 \ -lvtkjpeg-8.0 \ -lvtkjsoncpp-8.0 \ -lvtklibharu-8.0 \ -lvtklibxml2-8.0 \ -lvtkLocalExample-8.0 \ -lvtklz4-8.0 \ -lvtkmetaio-8.0 \ -lvtknetcdf_c++ \ -lvtkNetCDF-8.0 \ -lvtkoggtheora-8.0 \ -lvtkParallelCore-8.0 \ -lvtkpng-8.0 \ -lvtkproj4-8.0 \ -lvtkRenderingAnnotation-8.0 \ -lvtkRenderingContext2D-8.0 \ -lvtkRenderingContextOpenGL2-8.0 \ -lvtkRenderingCore-8.0 \ -lvtkRenderingFreeType-8.0 \ -lvtkRenderingGL2PSOpenGL2-8.0 \ -lvtkRenderingImage-8.0 \ However, if I add a QVTKWidget on the UI file of the application, include the file QVTKWidget.h in the header file of the application and I try to link it in QtCreator with the 32-bit VTK and Qt libraries, MSVS2013 (in the toolchain of QtCreator) sends error messages for unresolved external symbols for all the functions/classes belonging to the QVTKWidget, such as distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QVTKWidget::QVTKWidget(class QWidget *,class QFlags)" (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) referenced in function "public: void __thiscall Ui_DistortionPage::setupUi(class QWidget *)" (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) It seems that the linker could not find the libary for the QVTKWidget plugin, which is loaded since I could chose QtWidget from the widget list in the UI form editor in QtCreator. I do not see any ABI issue here since I use the 32 bit mscv2103 version of Qt and I also compiled and linked the 32 bit version of VTK libaries and plugin files with MSVS2013. I am wondering if anybody could make VTK-8.1 working with Qt. Thanks a lot. Kind regars, Zoltan Regards, Zoltan Am 09.10.2017 um 07:34 schrieb support at qt.io: > Hi Zoltan, > > I don't know how the widget should be installed or set up in a project, but you could just search for the header file and point INCLUDEPATH to the folder that contains it. > > Regards, > Joni > > On 06 October 2017 at 18:26:00 EEST Zoltan.Kovacs at esi-group.com wrote: >> Hi Joni, >> >> I see. However I found MSCV2013 32 bit version for Qt 5.8. I install >> that version and I built the VTK binaries for win32 platform with >> MVS2013. After having copied the VTK plugin file into the plugin folder >> of QtCreator I could launch it successfully. The QVTKWidget is in the >> Widget list of QtCreator now. I could insert a QVTKWidget in the UI form >> as well. The only problem now is that QtCreator cannot find the header >> file for QVTKWidget. It is not cleat how to set the INCLUDEPATH in the >> project file since VS2103 did not create a separate include folder in >> the target folder C:/VTK/bin for the VTK binaries. Only the library >> files have a separate folder, C:/VTK/bin/lib/Release. >> >> Regards, >> Zoltan >> >> Am 06.10.2017 um 12:08 schrieb support at qt.io: >>> Hi Zoltan, >>> >>> On 06 October 2017 at 13:00:00 EEST Zoltan.Kovacs at esi-group.com wrote: >>>> Hi Joni, >>>> >>>> Thank you very much for your answer. Then I try to install everything >>>> from scratch. The only prolem is I have only MSVC 2103 and the only >>>> option in the selection list of the online installer for MSVC 2013 is >>>> the 64 bit version. Is there somewhere an installer on your website wich >>>> provides a relatively new Qt version with MSVC 2103 32 bit version? >>>> Thank you very much for your help. >>> >>> No, but you could compile it from source yourself. However, note that you cannot build plugins for new Qt Creator with MSVC 2013 as it uses different ABI. You could use MSVC 2015 or MSVC 2017. >>> >>> Or you could build 64bit version of Qt Creator from source with that Qt version you have installed. >>> >>> Regards, >>> Joni >>> -- >>> Joni Poikelin >>> Software Engineer, >>> The Qt Company >>> ? >>> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >>> > -- > Joni Poikelin > Software Engineer, > The Qt Company > ? > FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ > From wangq1979 at outlook.com Tue Oct 10 10:29:33 2017 From: wangq1979 at outlook.com (Wang Q) Date: Tue, 10 Oct 2017 14:29:33 +0000 Subject: [vtkusers] =?gb2312?b?tPC4tDogtPC4tDogILTwuLQ6IENYWCBleGFtcGxl?= =?gb2312?b?IHdpdGggUXQ=?= In-Reply-To: References: , Message-ID: That's great. Thanks for the help! I just wonder if there are any docs/tutorials regarding how to program VTK with Qt rather than the examples? Anything fundamental would be very welcome. Best wishes, Chiang ________________________________ ???: Bill Lorensen ????: 2017?10?10? 15:11 ???: Wang Q ??: Re: ??: [vtkusers] ??: CXX example with Qt Yes, for the time being. Or you could run the old wiki example https://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/SideBySideRenderWindowsQt The code for the Qt examples has not changed... On Tue, Oct 10, 2017 at 6:57 AM, Wang Q > wrote: Thanks Bill. Does this mean all examples have to be built during VTK building in order to run them properly? Is this only for vtk 8 or for all legacy versions? Best wishes, Chiang ________________________________ ???: Bill Lorensen > ????: 2017?10?10? 14:52 ???: Wang Q ??: VTK Users; Mike Chinander ??: Re: [vtkusers] ??: CXX example with Qt I have not converted the new VTKExamples to generate proper CMakelists.txt files for Qt examples. To build the Qt examples you will need to build all of the examples. The easiest way to do that is to enable the Wiki examples remote module in your vtk build. On Oct 10, 2017 5:54 AM, "Wang Q" > wrote: Hi Mike, Thanks for the prompt reply. I tried the example of SideBySideRenderWindowsQt on https://lorensen.github.io/VTKExamples/site/Cxx/Qt/SideBySideRenderWindowsQt/. I got the error Error (active) E1696 cannot open source file "SideBySideRenderWindowsQt.h" SideBySideRenderWindowsQt d:\develop\C++\projects\QtVTKTest\SideBySideRenderWindowsQt.cxx 1 and some other errors relating to the above error. I am using vtk8.0.1, Qt5.9.1, and VS2017 on Win 7. Any further comments? Best wishes, Chiang ________________________________ ???: Wang Q > ????: 2017?10?10? 13:49 ???: Mike Chinander; vtkusers at vtk.org ??: ??: [vtkusers] CXX example with Qt Hi Mike, Thanks for the prompt reply. I tried the example of SideBySideRenderWindowsQt on https://lorensen.github.io/VTKExamples/site/Cxx/Qt/SideBySideRenderWindowsQt/. I got the error Error (active) E1696 cannot open source file "SideBySideRenderWindowsQt.h" SideBySideRenderWindowsQt d:\develop\C++\projects\QtVTKTest\SideBySideRenderWindowsQt.cxx 1 and some other errors relating to the above error. I am using vtk8.0.1, Qt5.9.1, and VS2017 on Win 7. Any further comments? Best wishes, Chiang SideBySideRenderWindowsQt - GitHub Pages lorensen.github.io WINDOWS USERS PLEASE NOTE: Be sure to add the VTK bin directory to your path. This will resolve the VTK dll's at run time. ________________________________ ???: vtkusers > ?? Mike Chinander > ????: 2017?10?10? 13:25:50 ???: vtkusers at vtk.org ??: Re: [vtkusers] CXX example with Qt You are going to have give us some more info. What was the example that you downloaded and tried to compile and run? What were the errors. On Tue, Oct 10, 2017 at 7:16 AM, Wang Q > wrote: Hello VTK guys, I have successfully built VTK8 with Qt5.9.1 using VS 2017. I am trying to follow an example about Qt by CXX, and download CXX and CMake file. By following everything instructed, I opened the generated project and built, but I am faced with some errors, which indicate the relevant header file (.h) is missing. I googled for a while and did not find a clue. It seems everybody does the same but without the errors. Could anyone shed a light upon what I have missed? Best wishes, Chiang _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Tue Oct 10 10:33:08 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 10 Oct 2017 10:33:08 -0400 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> Message-ID: Zoltan, This is unrelated to the error you are seeing however: For Qt5 you'll need to use QVTKOpenGLWidget rather than QVTKWidget. See https://lorensen.github.io/VTKExamples/site/Cxx/ All examples are converted to Qt5. Also, VTK master has a number of examples that have been converted to Qt5: Examples/GUI/Qt Hope this helps, Dan On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs wrote: > Dear all, > > In CMake I generated a solution project of VTK-8.0.1 with Qt5 support for > MSVS2013. After having run the ALL_BUILD and INSTALL projects with the > install prefix C:\VTK\8.0.1 in VM2013 I could installed the Win32 bit > binaries of VTK 8.0.1 in that folder. The header files and the libraries > are located in > C:\VTK\8.0.1\include\vtk-8.0 and > C:\VTK\8.0.1\lib. > > I copied the file QVTKWidgetPlugin.dll from the VTK binary folders to the > plugin folder of QTCreator, which uses QT 5.8 msvs2013 32 bit version. > > Then I set the include and library paths and added all the VTK libary > files from C:\VTK\8.0.1\lib for the linker setting in the project file > of a QT application in QtCreator: > > INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 > LIBS += -LC:\VTK\8.0.1\lib > > LIBS += -lvtkRenderingLabel-8.0 \ > -lvtkRenderingLOD-8.0 \ > -lvtkRenderingOpenGL2-8.0 \ > -lvtkRenderingQt-8.0 \ > -lvtkRenderingVolume-8.0 \ > -lvtkRenderingVolumeOpenGL2-8.0 \ > -lvtksqlite-8.0 \ > -lvtksys-8.0 \ > -lvtkTestingGenericBridge-8.0 \ > -lvtkTestingIOSQL-8.0 \ > -lvtkTestingRendering-8.0 \ > -lvtktiff-8.0 \ > -lvtkverdict-8.0 \ > -lvtkViewsContext2D-8.0 \ > -lvtkViewsCore-8.0 \ > -lvtkViewsInfovis-8.0 \ > -lvtkViewsQt-8.0 \ > -lvtkzlib-8.0 \ > -lvtkalglib-8.0 \ > -lvtkChartsCore-8.0 \ > -lvtkCommonColor-8.0 \ > -lvtkCommonComputationalGeometry-8.0 \ > -lvtkCommonCore-8.0 \ > -lvtkCommonDataModel-8.0 \ > -lvtkCommonExecutionModel-8.0 \ > -lvtkCommonMath-8.0 \ > -lvtkCommonMisc-8.0 \ > -lvtkCommonSystem-8.0 \ > -lvtkCommonTransforms-8.0 \ > -lvtkDICOMParser-8.0 \ > -lvtkDomainsChemistry-8.0 \ > -lvtkDomainsChemistryOpenGL2-8.0 \ > -lvtkexoIIc-8.0 \ > -lvtkexpat-8.0 \ > -lvtkFiltersAMR-8.0 \ > -lvtkFiltersCore-8.0 \ > -lvtkFiltersExtraction-8.0 \ > -lvtkFiltersFlowPaths-8.0 \ > -lvtkFiltersGeneral-8.0 \ > -lvtkFiltersGeneric-8.0 \ > -lvtkFiltersGeometry-8.0 \ > -lvtkFiltersHybrid-8.0 \ > -lvtkFiltersHyperTree-8.0 \ > -lvtkFiltersImaging-8.0 \ > -lvtkFiltersModeling-8.0 \ > -lvtkFiltersParallel-8.0 \ > -lvtkFiltersParallelImaging-8.0 \ > -lvtkFiltersPoints-8.0 \ > -lvtkFiltersProgrammable-8.0 \ > -lvtkFiltersSelection-8.0 \ > -lvtkFiltersSMP-8.0 \ > -lvtkFiltersSources-8.0 \ > -lvtkFiltersStatistics-8.0 \ > -lvtkFiltersTexture-8.0 \ > -lvtkFiltersTopology-8.0 \ > -lvtkFiltersVerdict-8.0 \ > -lvtkfreetype-8.0 \ > -lvtkGeovisCore-8.0 \ > -lvtkgl2ps-8.0 \ > -lvtkglew-8.0 \ > -lvtkGUISupportQt-8.0 \ > -lvtkGUISupportQtSQL-8.0 \ > -lvtkhdf5_hl-8.0 \ > -lvtkhdf5-8.0 \ > -lvtkImagingColor-8.0 \ > -lvtkImagingCore-8.0 \ > -lvtkImagingFourier-8.0 \ > -lvtkImagingGeneral-8.0 \ > -lvtkImagingHybrid-8.0 \ > -lvtkImagingMath-8.0 \ > -lvtkImagingMorphological-8.0 \ > -lvtkImagingSources-8.0 \ > -lvtkImagingStatistics-8.0 \ > -lvtkImagingStencil-8.0 \ > -lvtkInfovisCore-8.0 \ > -lvtkInfovisLayout-8.0 \ > -lvtkInteractionImage-8.0 \ > -lvtkInteractionStyle-8.0 \ > -lvtkInteractionWidgets-8.0 \ > -lvtkIOAMR-8.0 \ > -lvtkIOCore-8.0 \ > -lvtkIOEnSight-8.0 \ > -lvtkIOExodus-8.0 \ > -lvtkIOExport-8.0 \ > -lvtkIOExportOpenGL2-8.0 \ > -lvtkIOGeometry-8.0 \ > -lvtkIOImage-8.0 \ > -lvtkIOImport-8.0 \ > -lvtkIOInfovis-8.0 \ > -lvtkIOLegacy-8.0 \ > -lvtkIOLSDyna-8.0 \ > -lvtkIOMINC-8.0 \ > -lvtkIOMovie-8.0 \ > -lvtkIONetCDF-8.0 \ > -lvtkIOParallel-8.0 \ > -lvtkIOParallelXML-8.0 \ > -lvtkIOPLY-8.0 \ > -lvtkIOSQL-8.0 \ > -lvtkIOTecplotTable-8.0 \ > -lvtkIOVideo-8.0 \ > -lvtkIOXML-8.0 \ > -lvtkIOXMLParser-8.0 \ > -lvtkjpeg-8.0 \ > -lvtkjsoncpp-8.0 \ > -lvtklibharu-8.0 \ > -lvtklibxml2-8.0 \ > -lvtkLocalExample-8.0 \ > -lvtklz4-8.0 \ > -lvtkmetaio-8.0 \ > -lvtknetcdf_c++ \ > -lvtkNetCDF-8.0 \ > -lvtkoggtheora-8.0 \ > -lvtkParallelCore-8.0 \ > -lvtkpng-8.0 \ > -lvtkproj4-8.0 \ > -lvtkRenderingAnnotation-8.0 \ > -lvtkRenderingContext2D-8.0 \ > -lvtkRenderingContextOpenGL2-8.0 \ > -lvtkRenderingCore-8.0 \ > -lvtkRenderingFreeType-8.0 \ > -lvtkRenderingGL2PSOpenGL2-8.0 \ > -lvtkRenderingImage-8.0 \ > > > However, if I add a QVTKWidget on the UI file of the application, include > the file QVTKWidget.h in the header file of the application and I try to > link it in QtCreator with the 32-bit VTK and Qt libraries, MSVS2013 (in the > toolchain of QtCreator) sends error messages for unresolved external > symbols for all the functions/classes belonging to the QVTKWidget, such as > > distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol > "__declspec(dllimport) public: __thiscall QVTKWidget::QVTKWidget(class > QWidget *,class QFlags)" (__imp_??0QVTKWidget@ > @QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) referenced in function > "public: void __thiscall Ui_DistortionPage::setupUi(class QWidget *)" > (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) > > > It seems that the linker could not find the libary for the QVTKWidget > plugin, which is loaded since I could chose QtWidget from the widget list > in the UI form editor in QtCreator. I do not see any ABI issue here since I > use the 32 bit mscv2103 version of Qt and I also compiled and linked the 32 > bit version of VTK libaries and plugin files with MSVS2013. I am wondering > if anybody could make VTK-8.1 working with Qt. Thanks a lot. > > Kind regars, > Zoltan > > Regards, > Zoltan > > Am 09.10.2017 um 07:34 schrieb support at qt.io: > >> Hi Zoltan, >> >> I don't know how the widget should be installed or set up in a project, >> but you could just search for the header file and point INCLUDEPATH to the >> folder that contains it. >> >> Regards, >> Joni >> >> On 06 October 2017 at 18:26:00 EEST Zoltan.Kovacs at esi-group.com wrote: >> >>> Hi Joni, >>> >>> I see. However I found MSCV2013 32 bit version for Qt 5.8. I install >>> that version and I built the VTK binaries for win32 platform with >>> MVS2013. After having copied the VTK plugin file into the plugin folder >>> of QtCreator I could launch it successfully. The QVTKWidget is in the >>> Widget list of QtCreator now. I could insert a QVTKWidget in the UI form >>> as well. The only problem now is that QtCreator cannot find the header >>> file for QVTKWidget. It is not cleat how to set the INCLUDEPATH in the >>> project file since VS2103 did not create a separate include folder in >>> the target folder C:/VTK/bin for the VTK binaries. Only the library >>> files have a separate folder, C:/VTK/bin/lib/Release. >>> >>> Regards, >>> Zoltan >>> >>> Am 06.10.2017 um 12:08 schrieb support at qt.io: >>> >>>> Hi Zoltan, >>>> >>>> On 06 October 2017 at 13:00:00 EEST Zoltan.Kovacs at esi-group.com wrote: >>>> >>>>> Hi Joni, >>>>> >>>>> Thank you very much for your answer. Then I try to install everything >>>>> from scratch. The only prolem is I have only MSVC 2103 and the only >>>>> option in the selection list of the online installer for MSVC 2013 is >>>>> the 64 bit version. Is there somewhere an installer on your website >>>>> wich >>>>> provides a relatively new Qt version with MSVC 2103 32 bit version? >>>>> Thank you very much for your help. >>>>> >>>> >>>> No, but you could compile it from source yourself. However, note that >>>> you cannot build plugins for new Qt Creator with MSVC 2013 as it uses >>>> different ABI. You could use MSVC 2015 or MSVC 2017. >>>> >>>> Or you could build 64bit version of Qt Creator from source with that Qt >>>> version you have installed. >>>> >>>> Regards, >>>> Joni >>>> -- >>>> Joni Poikelin >>>> Software Engineer, >>>> The Qt Company >>>> ? >>>> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>> >>>> -- >> Joni Poikelin >> Software Engineer, >> The Qt Company >> ? >> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >> >> _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinander at gmail.com Tue Oct 10 10:48:09 2017 From: chinander at gmail.com (Mike Chinander) Date: Tue, 10 Oct 2017 09:48:09 -0500 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> Message-ID: Also, when working with VTK, it will be a lot easier to switch to using CMake instead of Qt project files (QtCreator supports CMake). Look at the examples Dan linked to. You will have to update the CMakelists.txt file for Qt. You will probably have to add the following: FIND_PACKAGE(Qt5Core REQUIRED) FIND_PACKAGE(Qt5Widgets REQUIRED) and update the target_link_libraries line(add Qt5::Widget) , e.g.,: target_link_libraries(QtBarChart Qt5::Widgets ${VTK_LIBRARIES}) On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa wrote: > Zoltan, > This is unrelated to the error you are seeing however: > > For Qt5 you'll need to use QVTKOpenGLWidget rather than QVTKWidget. See > https://lorensen.github.io/VTKExamples/site/Cxx/ > All examples are converted to Qt5. Also, VTK master has a number of > examples that have been converted to Qt5: Examples/GUI/Qt > > Hope this helps, > Dan > > > On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs < > Zoltan.Kovacs at esi-group.com> wrote: > >> Dear all, >> >> In CMake I generated a solution project of VTK-8.0.1 with Qt5 support for >> MSVS2013. After having run the ALL_BUILD and INSTALL projects with the >> install prefix C:\VTK\8.0.1 in VM2013 I could installed the Win32 bit >> binaries of VTK 8.0.1 in that folder. The header files and the libraries >> are located in >> C:\VTK\8.0.1\include\vtk-8.0 and >> C:\VTK\8.0.1\lib. >> >> I copied the file QVTKWidgetPlugin.dll from the VTK binary folders to the >> plugin folder of QTCreator, which uses QT 5.8 msvs2013 32 bit version. >> >> Then I set the include and library paths and added all the VTK libary >> files from C:\VTK\8.0.1\lib for the linker setting in the project file >> of a QT application in QtCreator: >> >> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >> LIBS += -LC:\VTK\8.0.1\lib >> >> LIBS += -lvtkRenderingLabel-8.0 \ >> -lvtkRenderingLOD-8.0 \ >> -lvtkRenderingOpenGL2-8.0 \ >> -lvtkRenderingQt-8.0 \ >> -lvtkRenderingVolume-8.0 \ >> -lvtkRenderingVolumeOpenGL2-8.0 \ >> -lvtksqlite-8.0 \ >> -lvtksys-8.0 \ >> -lvtkTestingGenericBridge-8.0 \ >> -lvtkTestingIOSQL-8.0 \ >> -lvtkTestingRendering-8.0 \ >> -lvtktiff-8.0 \ >> -lvtkverdict-8.0 \ >> -lvtkViewsContext2D-8.0 \ >> -lvtkViewsCore-8.0 \ >> -lvtkViewsInfovis-8.0 \ >> -lvtkViewsQt-8.0 \ >> -lvtkzlib-8.0 \ >> -lvtkalglib-8.0 \ >> -lvtkChartsCore-8.0 \ >> -lvtkCommonColor-8.0 \ >> -lvtkCommonComputationalGeometry-8.0 \ >> -lvtkCommonCore-8.0 \ >> -lvtkCommonDataModel-8.0 \ >> -lvtkCommonExecutionModel-8.0 \ >> -lvtkCommonMath-8.0 \ >> -lvtkCommonMisc-8.0 \ >> -lvtkCommonSystem-8.0 \ >> -lvtkCommonTransforms-8.0 \ >> -lvtkDICOMParser-8.0 \ >> -lvtkDomainsChemistry-8.0 \ >> -lvtkDomainsChemistryOpenGL2-8.0 \ >> -lvtkexoIIc-8.0 \ >> -lvtkexpat-8.0 \ >> -lvtkFiltersAMR-8.0 \ >> -lvtkFiltersCore-8.0 \ >> -lvtkFiltersExtraction-8.0 \ >> -lvtkFiltersFlowPaths-8.0 \ >> -lvtkFiltersGeneral-8.0 \ >> -lvtkFiltersGeneric-8.0 \ >> -lvtkFiltersGeometry-8.0 \ >> -lvtkFiltersHybrid-8.0 \ >> -lvtkFiltersHyperTree-8.0 \ >> -lvtkFiltersImaging-8.0 \ >> -lvtkFiltersModeling-8.0 \ >> -lvtkFiltersParallel-8.0 \ >> -lvtkFiltersParallelImaging-8.0 \ >> -lvtkFiltersPoints-8.0 \ >> -lvtkFiltersProgrammable-8.0 \ >> -lvtkFiltersSelection-8.0 \ >> -lvtkFiltersSMP-8.0 \ >> -lvtkFiltersSources-8.0 \ >> -lvtkFiltersStatistics-8.0 \ >> -lvtkFiltersTexture-8.0 \ >> -lvtkFiltersTopology-8.0 \ >> -lvtkFiltersVerdict-8.0 \ >> -lvtkfreetype-8.0 \ >> -lvtkGeovisCore-8.0 \ >> -lvtkgl2ps-8.0 \ >> -lvtkglew-8.0 \ >> -lvtkGUISupportQt-8.0 \ >> -lvtkGUISupportQtSQL-8.0 \ >> -lvtkhdf5_hl-8.0 \ >> -lvtkhdf5-8.0 \ >> -lvtkImagingColor-8.0 \ >> -lvtkImagingCore-8.0 \ >> -lvtkImagingFourier-8.0 \ >> -lvtkImagingGeneral-8.0 \ >> -lvtkImagingHybrid-8.0 \ >> -lvtkImagingMath-8.0 \ >> -lvtkImagingMorphological-8.0 \ >> -lvtkImagingSources-8.0 \ >> -lvtkImagingStatistics-8.0 \ >> -lvtkImagingStencil-8.0 \ >> -lvtkInfovisCore-8.0 \ >> -lvtkInfovisLayout-8.0 \ >> -lvtkInteractionImage-8.0 \ >> -lvtkInteractionStyle-8.0 \ >> -lvtkInteractionWidgets-8.0 \ >> -lvtkIOAMR-8.0 \ >> -lvtkIOCore-8.0 \ >> -lvtkIOEnSight-8.0 \ >> -lvtkIOExodus-8.0 \ >> -lvtkIOExport-8.0 \ >> -lvtkIOExportOpenGL2-8.0 \ >> -lvtkIOGeometry-8.0 \ >> -lvtkIOImage-8.0 \ >> -lvtkIOImport-8.0 \ >> -lvtkIOInfovis-8.0 \ >> -lvtkIOLegacy-8.0 \ >> -lvtkIOLSDyna-8.0 \ >> -lvtkIOMINC-8.0 \ >> -lvtkIOMovie-8.0 \ >> -lvtkIONetCDF-8.0 \ >> -lvtkIOParallel-8.0 \ >> -lvtkIOParallelXML-8.0 \ >> -lvtkIOPLY-8.0 \ >> -lvtkIOSQL-8.0 \ >> -lvtkIOTecplotTable-8.0 \ >> -lvtkIOVideo-8.0 \ >> -lvtkIOXML-8.0 \ >> -lvtkIOXMLParser-8.0 \ >> -lvtkjpeg-8.0 \ >> -lvtkjsoncpp-8.0 \ >> -lvtklibharu-8.0 \ >> -lvtklibxml2-8.0 \ >> -lvtkLocalExample-8.0 \ >> -lvtklz4-8.0 \ >> -lvtkmetaio-8.0 \ >> -lvtknetcdf_c++ \ >> -lvtkNetCDF-8.0 \ >> -lvtkoggtheora-8.0 \ >> -lvtkParallelCore-8.0 \ >> -lvtkpng-8.0 \ >> -lvtkproj4-8.0 \ >> -lvtkRenderingAnnotation-8.0 \ >> -lvtkRenderingContext2D-8.0 \ >> -lvtkRenderingContextOpenGL2-8.0 \ >> -lvtkRenderingCore-8.0 \ >> -lvtkRenderingFreeType-8.0 \ >> -lvtkRenderingGL2PSOpenGL2-8.0 \ >> -lvtkRenderingImage-8.0 \ >> >> >> However, if I add a QVTKWidget on the UI file of the application, include >> the file QVTKWidget.h in the header file of the application and I try to >> link it in QtCreator with the 32-bit VTK and Qt libraries, MSVS2013 (in the >> toolchain of QtCreator) sends error messages for unresolved external >> symbols for all the functions/classes belonging to the QVTKWidget, such as >> >> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >> "__declspec(dllimport) public: __thiscall QVTKWidget::QVTKWidget(class >> QWidget *,class QFlags)" (__imp_??0QVTKWidget@ >> @QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) referenced in function >> "public: void __thiscall Ui_DistortionPage::setupUi(class QWidget *)" >> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >> >> >> It seems that the linker could not find the libary for the QVTKWidget >> plugin, which is loaded since I could chose QtWidget from the widget list >> in the UI form editor in QtCreator. I do not see any ABI issue here since I >> use the 32 bit mscv2103 version of Qt and I also compiled and linked the 32 >> bit version of VTK libaries and plugin files with MSVS2013. I am wondering >> if anybody could make VTK-8.1 working with Qt. Thanks a lot. >> >> Kind regars, >> Zoltan >> >> Regards, >> Zoltan >> >> Am 09.10.2017 um 07:34 schrieb support at qt.io: >> >>> Hi Zoltan, >>> >>> I don't know how the widget should be installed or set up in a project, >>> but you could just search for the header file and point INCLUDEPATH to the >>> folder that contains it. >>> >>> Regards, >>> Joni >>> >>> On 06 October 2017 at 18:26:00 EEST Zoltan.Kovacs at esi-group.com wrote: >>> >>>> Hi Joni, >>>> >>>> I see. However I found MSCV2013 32 bit version for Qt 5.8. I install >>>> that version and I built the VTK binaries for win32 platform with >>>> MVS2013. After having copied the VTK plugin file into the plugin folder >>>> of QtCreator I could launch it successfully. The QVTKWidget is in the >>>> Widget list of QtCreator now. I could insert a QVTKWidget in the UI form >>>> as well. The only problem now is that QtCreator cannot find the header >>>> file for QVTKWidget. It is not cleat how to set the INCLUDEPATH in the >>>> project file since VS2103 did not create a separate include folder in >>>> the target folder C:/VTK/bin for the VTK binaries. Only the library >>>> files have a separate folder, C:/VTK/bin/lib/Release. >>>> >>>> Regards, >>>> Zoltan >>>> >>>> Am 06.10.2017 um 12:08 schrieb support at qt.io: >>>> >>>>> Hi Zoltan, >>>>> >>>>> On 06 October 2017 at 13:00:00 EEST Zoltan.Kovacs at esi-group.com wrote: >>>>> >>>>>> Hi Joni, >>>>>> >>>>>> Thank you very much for your answer. Then I try to install everything >>>>>> from scratch. The only prolem is I have only MSVC 2103 and the only >>>>>> option in the selection list of the online installer for MSVC 2013 is >>>>>> the 64 bit version. Is there somewhere an installer on your website >>>>>> wich >>>>>> provides a relatively new Qt version with MSVC 2103 32 bit version? >>>>>> Thank you very much for your help. >>>>>> >>>>> >>>>> No, but you could compile it from source yourself. However, note that >>>>> you cannot build plugins for new Qt Creator with MSVC 2013 as it uses >>>>> different ABI. You could use MSVC 2015 or MSVC 2017. >>>>> >>>>> Or you could build 64bit version of Qt Creator from source with that >>>>> Qt version you have installed. >>>>> >>>>> Regards, >>>>> Joni >>>>> -- >>>>> Joni Poikelin >>>>> Software Engineer, >>>>> The Qt Company >>>>> ? >>>>> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>> >>>>> -- >>> Joni Poikelin >>> Software Engineer, >>> The Qt Company >>> ? >>> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >>> >>> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 Zoltan.Kovacs at esi-group.com Tue Oct 10 10:49:02 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Tue, 10 Oct 2017 16:49:02 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> Message-ID: Dear Dan, Thank you for your prompt answer! The problem is that our application development is bound to QtCreator and it seems that the Qt5 support of VTK provides a plugin file for QVTKWidget and not for QVTKOpenGLWidget. Inspecting the example RenderWindowNoUiFile.cxx, I cannot see how QVTKOpenGLWidget can be placed in an UI form file even if its class can be defined in the C source. In the widget list of QtCreator I have only QVTKWidget because of the plugin and no QVTKOpenGLWidget is available in it. Thanks four your help. Kind regards, Zoltan Am 10.10.2017 um 16:33 schrieb Dan Lipsa: > Zoltan, > This is unrelated to the error you are seeing however: > > For Qt5 you'll need to use QVTKOpenGLWidget rather than QVTKWidget.? See > https://lorensen.github.io/VTKExamples/site/Cxx/ > All examples are converted to Qt5. Also, VTK master has a number of > examples that have been converted to Qt5:?Examples/GUI/Qt > > Hope this helps, > Dan > > > On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs > > wrote: > > Dear all, > > In CMake I generated a solution project of VTK-8.0.1 with Qt5 > support for MSVS2013. After having run the ALL_BUILD and INSTALL > projects with the install prefix C:\VTK\8.0.1 in VM2013 I could > installed the Win32 bit binaries of VTK 8.0.1 in that folder. The > header files and the libraries are located in > C:\VTK\8.0.1\include\vtk-8.0? ?and > C:\VTK\8.0.1\lib. > > I copied the file QVTKWidgetPlugin.dll from the VTK binary folders > to the plugin folder of QTCreator, which uses QT 5.8 msvs2013 32 bit > version. > > Then I set the include and library paths and added all the VTK > libary files from C:\VTK\8.0.1\lib for the linker setting in the > project file > of a QT application in QtCreator: > > INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 > LIBS += -LC:\VTK\8.0.1\lib > > LIBS += -lvtkRenderingLabel-8.0 \ > -lvtkRenderingLOD-8.0 \ > -lvtkRenderingOpenGL2-8.0 \ > -lvtkRenderingQt-8.0 \ > -lvtkRenderingVolume-8.0 \ > -lvtkRenderingVolumeOpenGL2-8.0 \ > -lvtksqlite-8.0 \ > -lvtksys-8.0 \ > -lvtkTestingGenericBridge-8.0 \ > -lvtkTestingIOSQL-8.0 \ > -lvtkTestingRendering-8.0 \ > -lvtktiff-8.0 \ > -lvtkverdict-8.0 \ > -lvtkViewsContext2D-8.0 \ > -lvtkViewsCore-8.0 \ > -lvtkViewsInfovis-8.0 \ > -lvtkViewsQt-8.0 \ > -lvtkzlib-8.0 \ > -lvtkalglib-8.0 \ > -lvtkChartsCore-8.0 \ > -lvtkCommonColor-8.0 \ > -lvtkCommonComputationalGeometry-8.0 \ > -lvtkCommonCore-8.0 \ > -lvtkCommonDataModel-8.0 \ > -lvtkCommonExecutionModel-8.0 \ > -lvtkCommonMath-8.0 \ > -lvtkCommonMisc-8.0 \ > -lvtkCommonSystem-8.0 \ > -lvtkCommonTransforms-8.0 \ > -lvtkDICOMParser-8.0 \ > -lvtkDomainsChemistry-8.0 \ > -lvtkDomainsChemistryOpenGL2-8.0 \ > -lvtkexoIIc-8.0 \ > -lvtkexpat-8.0 \ > -lvtkFiltersAMR-8.0 \ > -lvtkFiltersCore-8.0 \ > -lvtkFiltersExtraction-8.0 \ > -lvtkFiltersFlowPaths-8.0 \ > -lvtkFiltersGeneral-8.0 \ > -lvtkFiltersGeneric-8.0 \ > -lvtkFiltersGeometry-8.0 \ > -lvtkFiltersHybrid-8.0 \ > -lvtkFiltersHyperTree-8.0 \ > -lvtkFiltersImaging-8.0 \ > -lvtkFiltersModeling-8.0 \ > -lvtkFiltersParallel-8.0 \ > -lvtkFiltersParallelImaging-8.0 \ > -lvtkFiltersPoints-8.0 \ > -lvtkFiltersProgrammable-8.0 \ > -lvtkFiltersSelection-8.0 \ > -lvtkFiltersSMP-8.0 \ > -lvtkFiltersSources-8.0 \ > -lvtkFiltersStatistics-8.0 \ > -lvtkFiltersTexture-8.0 \ > -lvtkFiltersTopology-8.0 \ > -lvtkFiltersVerdict-8.0 \ > -lvtkfreetype-8.0 \ > -lvtkGeovisCore-8.0 \ > -lvtkgl2ps-8.0 \ > -lvtkglew-8.0 \ > -lvtkGUISupportQt-8.0 \ > -lvtkGUISupportQtSQL-8.0 \ > -lvtkhdf5_hl-8.0 \ > -lvtkhdf5-8.0 \ > -lvtkImagingColor-8.0 \ > -lvtkImagingCore-8.0 \ > -lvtkImagingFourier-8.0 \ > -lvtkImagingGeneral-8.0 \ > -lvtkImagingHybrid-8.0 \ > -lvtkImagingMath-8.0 \ > -lvtkImagingMorphological-8.0 \ > -lvtkImagingSources-8.0 \ > -lvtkImagingStatistics-8.0 \ > -lvtkImagingStencil-8.0 \ > -lvtkInfovisCore-8.0 \ > -lvtkInfovisLayout-8.0 \ > -lvtkInteractionImage-8.0 \ > -lvtkInteractionStyle-8.0 \ > -lvtkInteractionWidgets-8.0 \ > -lvtkIOAMR-8.0 \ > -lvtkIOCore-8.0 \ > -lvtkIOEnSight-8.0 \ > -lvtkIOExodus-8.0 \ > -lvtkIOExport-8.0 \ > -lvtkIOExportOpenGL2-8.0 \ > -lvtkIOGeometry-8.0 \ > -lvtkIOImage-8.0 \ > -lvtkIOImport-8.0 \ > -lvtkIOInfovis-8.0 \ > -lvtkIOLegacy-8.0 \ > -lvtkIOLSDyna-8.0 \ > -lvtkIOMINC-8.0 \ > -lvtkIOMovie-8.0 \ > -lvtkIONetCDF-8.0 \ > -lvtkIOParallel-8.0 \ > -lvtkIOParallelXML-8.0 \ > -lvtkIOPLY-8.0 \ > -lvtkIOSQL-8.0 \ > -lvtkIOTecplotTable-8.0 \ > -lvtkIOVideo-8.0 \ > -lvtkIOXML-8.0 \ > -lvtkIOXMLParser-8.0 \ > -lvtkjpeg-8.0 \ > -lvtkjsoncpp-8.0 \ > -lvtklibharu-8.0 \ > -lvtklibxml2-8.0 \ > -lvtkLocalExample-8.0 \ > -lvtklz4-8.0 \ > -lvtkmetaio-8.0 \ > -lvtknetcdf_c++ \ > -lvtkNetCDF-8.0 \ > -lvtkoggtheora-8.0 \ > -lvtkParallelCore-8.0 \ > -lvtkpng-8.0 \ > -lvtkproj4-8.0 \ > -lvtkRenderingAnnotation-8.0 \ > -lvtkRenderingContext2D-8.0 \ > -lvtkRenderingContextOpenGL2-8.0 \ > -lvtkRenderingCore-8.0 \ > -lvtkRenderingFreeType-8.0 \ > -lvtkRenderingGL2PSOpenGL2-8.0 \ > -lvtkRenderingImage-8.0 \ > > > However, if I add a QVTKWidget on the UI file of the application, > include the file QVTKWidget.h in the header file of the application > and I try to link it in QtCreator with the 32-bit VTK and Qt > libraries, MSVS2013 (in the toolchain of QtCreator) sends error > messages for unresolved external symbols for all the > functions/classes belonging to the QVTKWidget, such as > > distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol > "__declspec(dllimport) public: __thiscall > QVTKWidget::QVTKWidget(class QWidget *,class QFlags Qt::WindowType>)" > (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) > referenced in function "public: void __thiscall > Ui_DistortionPage::setupUi(class QWidget *)" > (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) > > > It seems that the linker could not find the libary for the > QVTKWidget plugin, which is loaded since I could chose QtWidget from > the widget list in the UI form editor in QtCreator. I do not see any > ABI issue here since I use the 32 bit mscv2103 version of Qt and I > also compiled and linked the 32 bit version of VTK libaries and > plugin files with MSVS2013. I am wondering if anybody could make > VTK-8.1 working with Qt. Thanks a lot. > > Kind regars, > Zoltan > > Regards, > Zoltan > > Am 09.10.2017 um 07:34 schrieb support at qt.io : > > Hi Zoltan, > > I don't know how the widget should be installed or set up in a > project, but you could just search for the header file and point > INCLUDEPATH to the folder that contains it. > > Regards, > Joni > > On 06 October 2017 at 18:26:00 EEST Zoltan.Kovacs at esi-group.com > wrote: > > Hi Joni, > > I see. However I found MSCV2013 32 bit version for Qt 5.8. I > install > that version and I built the VTK binaries for win32 platform > with > MVS2013. After having copied the VTK plugin file into the > plugin folder > of QtCreator I could launch it successfully. The QVTKWidget > is in the > Widget list of QtCreator now. I could insert a QVTKWidget in > the UI form > as well. The only problem now is that QtCreator cannot find > the header > file for QVTKWidget. It is not cleat how to set the > INCLUDEPATH in the > project file since VS2103 did not create a separate include > folder in > the target folder C:/VTK/bin for the VTK binaries. Only the > library > files have a separate folder, C:/VTK/bin/lib/Release. > > Regards, > Zoltan > > Am 06.10.2017 um 12:08 schrieb support at qt.io > : > > Hi Zoltan, > > On 06 October 2017 at 13:00:00 EEST > Zoltan.Kovacs at esi-group.com > wrote: > > Hi Joni, > > Thank you very much for your answer. Then I try to > install everything > from scratch. The only prolem is I have only MSVC > 2103 and the only > option in the selection list of the online installer > for MSVC 2013 is > the 64 bit version. Is there somewhere an installer > on your website wich > provides a relatively new Qt version with MSVC 2103 > 32 bit version? > Thank you very much for your help. > > > No, but you could compile it from source yourself. > However, note that you cannot build plugins for new Qt > Creator with MSVC 2013 as it uses different ABI. You > could use MSVC 2015 or MSVC 2017. > > Or you could build 64bit version of Qt Creator from > source with that Qt version you have installed. > > Regards, > Joni > -- > Joni Poikelin > Software Engineer, > The Qt Company > ? > FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ > > > -- > Joni Poikelin > Software Engineer, > The Qt Company > ? > FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Zoltan.Kovacs at esi-group.com Tue Oct 10 10:59:04 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Tue, 10 Oct 2017 16:59:04 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> Message-ID: <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> Dear Mike, Thank you very much for your prompt answer. As I wrote to Dan, we have to use QtCreator for the development here. Then I have access only for qmake and I can edit project files for it. If QVTKOpenGLWidget is the only VTK widget class supported for Qt5 then I ave to find out how to insert such an object into the UI form file of QT. Kind regards, Zoltan Am 10.10.2017 um 16:48 schrieb Mike Chinander: > Also, when working with VTK, it will be a lot easier to switch to using > CMake instead of Qt project files (QtCreator supports CMake). Look at > the examples Dan linked to. You will have to update the CMakelists.txt > file for Qt. You will probably have to add the following: > > FIND_PACKAGE(Qt5Core REQUIRED) > FIND_PACKAGE(Qt5Widgets REQUIRED) > > and update the target_link_libraries line(add Qt5::Widget) , e.g.,: > > target_link_libraries(QtBarChart Qt5::Widgets ${VTK_LIBRARIES}) > > On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa > wrote: > > Zoltan, > This is unrelated to the error you are seeing however: > > For Qt5 you'll need to use QVTKOpenGLWidget rather than QVTKWidget.? See > https://lorensen.github.io/VTKExamples/site/Cxx/ > > All examples are converted to Qt5. Also, VTK master has a number of > examples that have been converted to Qt5:?Examples/GUI/Qt > > Hope this helps, > Dan > > > On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs > > > wrote: > > Dear all, > > In CMake I generated a solution project of VTK-8.0.1 with Qt5 > support for MSVS2013. After having run the ALL_BUILD and INSTALL > projects with the install prefix C:\VTK\8.0.1 in VM2013 I could > installed the Win32 bit binaries of VTK 8.0.1 in that folder. > The header files and the libraries are located in > C:\VTK\8.0.1\include\vtk-8.0? ?and > C:\VTK\8.0.1\lib. > > I copied the file QVTKWidgetPlugin.dll from the VTK binary > folders to the plugin folder of QTCreator, which uses QT 5.8 > msvs2013 32 bit version. > > Then I set the include and library paths and added all the VTK > libary files from C:\VTK\8.0.1\lib for the linker setting in the > project file > of a QT application in QtCreator: > > INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 > LIBS += -LC:\VTK\8.0.1\lib > > LIBS += -lvtkRenderingLabel-8.0 \ > -lvtkRenderingLOD-8.0 \ > -lvtkRenderingOpenGL2-8.0 \ > -lvtkRenderingQt-8.0 \ > -lvtkRenderingVolume-8.0 \ > -lvtkRenderingVolumeOpenGL2-8.0 \ > -lvtksqlite-8.0 \ > -lvtksys-8.0 \ > -lvtkTestingGenericBridge-8.0 \ > -lvtkTestingIOSQL-8.0 \ > -lvtkTestingRendering-8.0 \ > -lvtktiff-8.0 \ > -lvtkverdict-8.0 \ > -lvtkViewsContext2D-8.0 \ > -lvtkViewsCore-8.0 \ > -lvtkViewsInfovis-8.0 \ > -lvtkViewsQt-8.0 \ > -lvtkzlib-8.0 \ > -lvtkalglib-8.0 \ > -lvtkChartsCore-8.0 \ > -lvtkCommonColor-8.0 \ > -lvtkCommonComputationalGeometry-8.0 \ > -lvtkCommonCore-8.0 \ > -lvtkCommonDataModel-8.0 \ > -lvtkCommonExecutionModel-8.0 \ > -lvtkCommonMath-8.0 \ > -lvtkCommonMisc-8.0 \ > -lvtkCommonSystem-8.0 \ > -lvtkCommonTransforms-8.0 \ > -lvtkDICOMParser-8.0 \ > -lvtkDomainsChemistry-8.0 \ > -lvtkDomainsChemistryOpenGL2-8.0 \ > -lvtkexoIIc-8.0 \ > -lvtkexpat-8.0 \ > -lvtkFiltersAMR-8.0 \ > -lvtkFiltersCore-8.0 \ > -lvtkFiltersExtraction-8.0 \ > -lvtkFiltersFlowPaths-8.0 \ > -lvtkFiltersGeneral-8.0 \ > -lvtkFiltersGeneric-8.0 \ > -lvtkFiltersGeometry-8.0 \ > -lvtkFiltersHybrid-8.0 \ > -lvtkFiltersHyperTree-8.0 \ > -lvtkFiltersImaging-8.0 \ > -lvtkFiltersModeling-8.0 \ > -lvtkFiltersParallel-8.0 \ > -lvtkFiltersParallelImaging-8.0 \ > -lvtkFiltersPoints-8.0 \ > -lvtkFiltersProgrammable-8.0 \ > -lvtkFiltersSelection-8.0 \ > -lvtkFiltersSMP-8.0 \ > -lvtkFiltersSources-8.0 \ > -lvtkFiltersStatistics-8.0 \ > -lvtkFiltersTexture-8.0 \ > -lvtkFiltersTopology-8.0 \ > -lvtkFiltersVerdict-8.0 \ > -lvtkfreetype-8.0 \ > -lvtkGeovisCore-8.0 \ > -lvtkgl2ps-8.0 \ > -lvtkglew-8.0 \ > -lvtkGUISupportQt-8.0 \ > -lvtkGUISupportQtSQL-8.0 \ > -lvtkhdf5_hl-8.0 \ > -lvtkhdf5-8.0 \ > -lvtkImagingColor-8.0 \ > -lvtkImagingCore-8.0 \ > -lvtkImagingFourier-8.0 \ > -lvtkImagingGeneral-8.0 \ > -lvtkImagingHybrid-8.0 \ > -lvtkImagingMath-8.0 \ > -lvtkImagingMorphological-8.0 \ > -lvtkImagingSources-8.0 \ > -lvtkImagingStatistics-8.0 \ > -lvtkImagingStencil-8.0 \ > -lvtkInfovisCore-8.0 \ > -lvtkInfovisLayout-8.0 \ > -lvtkInteractionImage-8.0 \ > -lvtkInteractionStyle-8.0 \ > -lvtkInteractionWidgets-8.0 \ > -lvtkIOAMR-8.0 \ > -lvtkIOCore-8.0 \ > -lvtkIOEnSight-8.0 \ > -lvtkIOExodus-8.0 \ > -lvtkIOExport-8.0 \ > -lvtkIOExportOpenGL2-8.0 \ > -lvtkIOGeometry-8.0 \ > -lvtkIOImage-8.0 \ > -lvtkIOImport-8.0 \ > -lvtkIOInfovis-8.0 \ > -lvtkIOLegacy-8.0 \ > -lvtkIOLSDyna-8.0 \ > -lvtkIOMINC-8.0 \ > -lvtkIOMovie-8.0 \ > -lvtkIONetCDF-8.0 \ > -lvtkIOParallel-8.0 \ > -lvtkIOParallelXML-8.0 \ > -lvtkIOPLY-8.0 \ > -lvtkIOSQL-8.0 \ > -lvtkIOTecplotTable-8.0 \ > -lvtkIOVideo-8.0 \ > -lvtkIOXML-8.0 \ > -lvtkIOXMLParser-8.0 \ > -lvtkjpeg-8.0 \ > -lvtkjsoncpp-8.0 \ > -lvtklibharu-8.0 \ > -lvtklibxml2-8.0 \ > -lvtkLocalExample-8.0 \ > -lvtklz4-8.0 \ > -lvtkmetaio-8.0 \ > -lvtknetcdf_c++ \ > -lvtkNetCDF-8.0 \ > -lvtkoggtheora-8.0 \ > -lvtkParallelCore-8.0 \ > -lvtkpng-8.0 \ > -lvtkproj4-8.0 \ > -lvtkRenderingAnnotation-8.0 \ > -lvtkRenderingContext2D-8.0 \ > -lvtkRenderingContextOpenGL2-8.0 \ > -lvtkRenderingCore-8.0 \ > -lvtkRenderingFreeType-8.0 \ > -lvtkRenderingGL2PSOpenGL2-8.0 \ > -lvtkRenderingImage-8.0 \ > > > However, if I add a QVTKWidget on the UI file of the > application, include the file QVTKWidget.h in the header file of > the application and I try to link it in QtCreator with the > 32-bit VTK and Qt libraries, MSVS2013 (in the toolchain of > QtCreator) sends error messages for unresolved external symbols > for all the functions/classes belonging to the QVTKWidget, such as > > distortionpage.obj:-1: Fehler: LNK2019: unresolved external > symbol "__declspec(dllimport) public: __thiscall > QVTKWidget::QVTKWidget(class QWidget *,class QFlags Qt::WindowType>)" > (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) > referenced in function "public: void __thiscall > Ui_DistortionPage::setupUi(class QWidget *)" > (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) > > > It seems that the linker could not find the libary for the > QVTKWidget plugin, which is loaded since I could chose QtWidget > from the widget list in the UI form editor in QtCreator. I do > not see any ABI issue here since I use the 32 bit mscv2103 > version of Qt and I also compiled and linked the 32 bit version > of VTK libaries and plugin files with MSVS2013. I am wondering > if anybody could make VTK-8.1 working with Qt. Thanks a lot. > > Kind regars, > Zoltan > > Regards, > Zoltan > > Am 09.10.2017 um 07:34 schrieb support at qt.io : > > Hi Zoltan, > > I don't know how the widget should be installed or set up in > a project, but you could just search for the header file and > point INCLUDEPATH to the folder that contains it. > > Regards, > Joni > > On 06 October 2017 at 18:26:00 EEST > Zoltan.Kovacs at esi-group.com > wrote: > > Hi Joni, > > I see. However I found MSCV2013 32 bit version for Qt > 5.8. I install > that version and I built the VTK binaries for win32 > platform with > MVS2013. After having copied the VTK plugin file into > the plugin folder > of QtCreator I could launch it successfully. The > QVTKWidget is in the > Widget list of QtCreator now. I could insert a > QVTKWidget in the UI form > as well. The only problem now is that QtCreator cannot > find the header > file for QVTKWidget. It is not cleat how to set the > INCLUDEPATH in the > project file since VS2103 did not create a separate > include folder in > the target folder C:/VTK/bin for the VTK binaries. Only > the library > files have a separate folder, C:/VTK/bin/lib/Release. > > Regards, > Zoltan > > Am 06.10.2017 um 12:08 schrieb support at qt.io > : > > Hi Zoltan, > > On 06 October 2017 at 13:00:00 EEST > Zoltan.Kovacs at esi-group.com > wrote: > > Hi Joni, > > Thank you very much for your answer. Then I try > to install everything > from scratch. The only prolem is I have only > MSVC 2103 and the only > option in the selection list of the online > installer for MSVC 2013 is > the 64 bit version. Is there somewhere an > installer on your website wich > provides a relatively new Qt version with MSVC > 2103 32 bit version? > Thank you very much for your help. > > > No, but you could compile it from source yourself. > However, note that you cannot build plugins for new > Qt Creator with MSVC 2013 as it uses different ABI. > You could use MSVC 2015 or MSVC 2017. > > Or you could build 64bit version of Qt Creator from > source with that Qt version you have installed. > > Regards, > Joni > -- > Joni Poikelin > Software Engineer, > The Qt Company > ? > FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ > > > -- > Joni Poikelin > Software Engineer, > The Qt Company > ? > FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: > http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From bill.lorensen at gmail.com Tue Oct 10 13:24:45 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 10 Oct 2017 10:24:45 -0700 Subject: [vtkusers] Dotted line int VTK > 7 In-Reply-To: References: Message-ID: I just added a new example that draws stippled lines. Take a look to see if it helps... https://lorensen.github.io/VTKExamples/site/Cxx/Rendering/StippledLine/ On Mon, Oct 9, 2017 at 11:29 AM, Simon Esneault wrote: > The second trick using texture might just work ! > Thanks > Simon > > > 2017-10-09 19:04 GMT+02:00 Ken Martin : >> >> https://gitlab.kitware.com/vtk/vtk/issues/15799 gives a couple options >> that might work for you. >> >> On Mon, Oct 9, 2017 at 12:05 PM, Simon Esneault >> wrote: >>> >>> Hello community >>> >>> Is there a way to draw dotted line with the new backend ? >>> >>> We used something like this before >>> >>> m_actor->GetProperty()->SetLineStipplePattern( 0xf0f0 ); >>> m_actor->GetProperty()->SetLineStippleRepeatFactor( 1 ); >>> >>> But the doc says it works only for the old backend. >>> Any other solution ? >>> >>> Thanks >>> Simon >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Ken Martin PhD >> Distinguished Engineer >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> >> 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. > > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From dan.lipsa at kitware.com Tue Oct 10 13:23:35 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 10 Oct 2017 13:23:35 -0400 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> Message-ID: In Qt Designer you should be able to use QVTKOpenGLWidget by adding first a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you can build the UI of your Qt application this way. I am not sure what is needed for QtCreator. I don't use that. Hope this helps, Dan On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs wrote: > Dear Mike, > > Thank you very much for your prompt answer. As I wrote to Dan, we have to > use QtCreator for the development here. Then I have access only for qmake > and I can edit project files for it. If QVTKOpenGLWidget is the only VTK > widget class supported for Qt5 then I ave to find out how to insert such an > object into the UI form file of QT. > > Kind regards, > Zoltan > > Am 10.10.2017 um 16:48 schrieb Mike Chinander: > >> Also, when working with VTK, it will be a lot easier to switch to using >> CMake instead of Qt project files (QtCreator supports CMake). Look at the >> examples Dan linked to. You will have to update the CMakelists.txt file for >> Qt. You will probably have to add the following: >> >> FIND_PACKAGE(Qt5Core REQUIRED) >> FIND_PACKAGE(Qt5Widgets REQUIRED) >> >> and update the target_link_libraries line(add Qt5::Widget) , e.g.,: >> >> target_link_libraries(QtBarChart Qt5::Widgets ${VTK_LIBRARIES}) >> >> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa > > wrote: >> >> Zoltan, >> This is unrelated to the error you are seeing however: >> >> For Qt5 you'll need to use QVTKOpenGLWidget rather than QVTKWidget. >> See >> https://lorensen.github.io/VTKExamples/site/Cxx/ >> >> All examples are converted to Qt5. Also, VTK master has a number of >> examples that have been converted to Qt5: Examples/GUI/Qt >> >> Hope this helps, >> Dan >> >> >> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >> > >> >> wrote: >> >> Dear all, >> >> In CMake I generated a solution project of VTK-8.0.1 with Qt5 >> support for MSVS2013. After having run the ALL_BUILD and INSTALL >> projects with the install prefix C:\VTK\8.0.1 in VM2013 I could >> installed the Win32 bit binaries of VTK 8.0.1 in that folder. >> The header files and the libraries are located in >> C:\VTK\8.0.1\include\vtk-8.0 and >> C:\VTK\8.0.1\lib. >> >> I copied the file QVTKWidgetPlugin.dll from the VTK binary >> folders to the plugin folder of QTCreator, which uses QT 5.8 >> msvs2013 32 bit version. >> >> Then I set the include and library paths and added all the VTK >> libary files from C:\VTK\8.0.1\lib for the linker setting in the >> project file >> of a QT application in QtCreator: >> >> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >> LIBS += -LC:\VTK\8.0.1\lib >> >> LIBS += -lvtkRenderingLabel-8.0 \ >> -lvtkRenderingLOD-8.0 \ >> -lvtkRenderingOpenGL2-8.0 \ >> -lvtkRenderingQt-8.0 \ >> -lvtkRenderingVolume-8.0 \ >> -lvtkRenderingVolumeOpenGL2-8.0 \ >> -lvtksqlite-8.0 \ >> -lvtksys-8.0 \ >> -lvtkTestingGenericBridge-8.0 \ >> -lvtkTestingIOSQL-8.0 \ >> -lvtkTestingRendering-8.0 \ >> -lvtktiff-8.0 \ >> -lvtkverdict-8.0 \ >> -lvtkViewsContext2D-8.0 \ >> -lvtkViewsCore-8.0 \ >> -lvtkViewsInfovis-8.0 \ >> -lvtkViewsQt-8.0 \ >> -lvtkzlib-8.0 \ >> -lvtkalglib-8.0 \ >> -lvtkChartsCore-8.0 \ >> -lvtkCommonColor-8.0 \ >> -lvtkCommonComputationalGeometry-8.0 \ >> -lvtkCommonCore-8.0 \ >> -lvtkCommonDataModel-8.0 \ >> -lvtkCommonExecutionModel-8.0 \ >> -lvtkCommonMath-8.0 \ >> -lvtkCommonMisc-8.0 \ >> -lvtkCommonSystem-8.0 \ >> -lvtkCommonTransforms-8.0 \ >> -lvtkDICOMParser-8.0 \ >> -lvtkDomainsChemistry-8.0 \ >> -lvtkDomainsChemistryOpenGL2-8.0 \ >> -lvtkexoIIc-8.0 \ >> -lvtkexpat-8.0 \ >> -lvtkFiltersAMR-8.0 \ >> -lvtkFiltersCore-8.0 \ >> -lvtkFiltersExtraction-8.0 \ >> -lvtkFiltersFlowPaths-8.0 \ >> -lvtkFiltersGeneral-8.0 \ >> -lvtkFiltersGeneric-8.0 \ >> -lvtkFiltersGeometry-8.0 \ >> -lvtkFiltersHybrid-8.0 \ >> -lvtkFiltersHyperTree-8.0 \ >> -lvtkFiltersImaging-8.0 \ >> -lvtkFiltersModeling-8.0 \ >> -lvtkFiltersParallel-8.0 \ >> -lvtkFiltersParallelImaging-8.0 \ >> -lvtkFiltersPoints-8.0 \ >> -lvtkFiltersProgrammable-8.0 \ >> -lvtkFiltersSelection-8.0 \ >> -lvtkFiltersSMP-8.0 \ >> -lvtkFiltersSources-8.0 \ >> -lvtkFiltersStatistics-8.0 \ >> -lvtkFiltersTexture-8.0 \ >> -lvtkFiltersTopology-8.0 \ >> -lvtkFiltersVerdict-8.0 \ >> -lvtkfreetype-8.0 \ >> -lvtkGeovisCore-8.0 \ >> -lvtkgl2ps-8.0 \ >> -lvtkglew-8.0 \ >> -lvtkGUISupportQt-8.0 \ >> -lvtkGUISupportQtSQL-8.0 \ >> -lvtkhdf5_hl-8.0 \ >> -lvtkhdf5-8.0 \ >> -lvtkImagingColor-8.0 \ >> -lvtkImagingCore-8.0 \ >> -lvtkImagingFourier-8.0 \ >> -lvtkImagingGeneral-8.0 \ >> -lvtkImagingHybrid-8.0 \ >> -lvtkImagingMath-8.0 \ >> -lvtkImagingMorphological-8.0 \ >> -lvtkImagingSources-8.0 \ >> -lvtkImagingStatistics-8.0 \ >> -lvtkImagingStencil-8.0 \ >> -lvtkInfovisCore-8.0 \ >> -lvtkInfovisLayout-8.0 \ >> -lvtkInteractionImage-8.0 \ >> -lvtkInteractionStyle-8.0 \ >> -lvtkInteractionWidgets-8.0 \ >> -lvtkIOAMR-8.0 \ >> -lvtkIOCore-8.0 \ >> -lvtkIOEnSight-8.0 \ >> -lvtkIOExodus-8.0 \ >> -lvtkIOExport-8.0 \ >> -lvtkIOExportOpenGL2-8.0 \ >> -lvtkIOGeometry-8.0 \ >> -lvtkIOImage-8.0 \ >> -lvtkIOImport-8.0 \ >> -lvtkIOInfovis-8.0 \ >> -lvtkIOLegacy-8.0 \ >> -lvtkIOLSDyna-8.0 \ >> -lvtkIOMINC-8.0 \ >> -lvtkIOMovie-8.0 \ >> -lvtkIONetCDF-8.0 \ >> -lvtkIOParallel-8.0 \ >> -lvtkIOParallelXML-8.0 \ >> -lvtkIOPLY-8.0 \ >> -lvtkIOSQL-8.0 \ >> -lvtkIOTecplotTable-8.0 \ >> -lvtkIOVideo-8.0 \ >> -lvtkIOXML-8.0 \ >> -lvtkIOXMLParser-8.0 \ >> -lvtkjpeg-8.0 \ >> -lvtkjsoncpp-8.0 \ >> -lvtklibharu-8.0 \ >> -lvtklibxml2-8.0 \ >> -lvtkLocalExample-8.0 \ >> -lvtklz4-8.0 \ >> -lvtkmetaio-8.0 \ >> -lvtknetcdf_c++ \ >> -lvtkNetCDF-8.0 \ >> -lvtkoggtheora-8.0 \ >> -lvtkParallelCore-8.0 \ >> -lvtkpng-8.0 \ >> -lvtkproj4-8.0 \ >> -lvtkRenderingAnnotation-8.0 \ >> -lvtkRenderingContext2D-8.0 \ >> -lvtkRenderingContextOpenGL2-8.0 \ >> -lvtkRenderingCore-8.0 \ >> -lvtkRenderingFreeType-8.0 \ >> -lvtkRenderingGL2PSOpenGL2-8.0 \ >> -lvtkRenderingImage-8.0 \ >> >> >> However, if I add a QVTKWidget on the UI file of the >> application, include the file QVTKWidget.h in the header file of >> the application and I try to link it in QtCreator with the >> 32-bit VTK and Qt libraries, MSVS2013 (in the toolchain of >> QtCreator) sends error messages for unresolved external symbols >> for all the functions/classes belonging to the QVTKWidget, such as >> >> distortionpage.obj:-1: Fehler: LNK2019: unresolved external >> symbol "__declspec(dllimport) public: __thiscall >> QVTKWidget::QVTKWidget(class QWidget *,class QFlags> Qt::WindowType>)" >> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@ >> @@@@Z) >> referenced in function "public: void __thiscall >> Ui_DistortionPage::setupUi(class QWidget *)" >> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >> >> >> It seems that the linker could not find the libary for the >> QVTKWidget plugin, which is loaded since I could chose QtWidget >> from the widget list in the UI form editor in QtCreator. I do >> not see any ABI issue here since I use the 32 bit mscv2103 >> version of Qt and I also compiled and linked the 32 bit version >> of VTK libaries and plugin files with MSVS2013. I am wondering >> if anybody could make VTK-8.1 working with Qt. Thanks a lot. >> >> Kind regars, >> Zoltan >> >> Regards, >> Zoltan >> >> Am 09.10.2017 um 07:34 schrieb support at qt.io > support at qt.io>: >> >> Hi Zoltan, >> >> I don't know how the widget should be installed or set up in >> a project, but you could just search for the header file and >> point INCLUDEPATH to the folder that contains it. >> >> Regards, >> Joni >> >> On 06 October 2017 at 18:26:00 EEST >> Zoltan.Kovacs at esi-group.com >> wrote: >> >> Hi Joni, >> >> I see. However I found MSCV2013 32 bit version for Qt >> 5.8. I install >> that version and I built the VTK binaries for win32 >> platform with >> MVS2013. After having copied the VTK plugin file into >> the plugin folder >> of QtCreator I could launch it successfully. The >> QVTKWidget is in the >> Widget list of QtCreator now. I could insert a >> QVTKWidget in the UI form >> as well. The only problem now is that QtCreator cannot >> find the header >> file for QVTKWidget. It is not cleat how to set the >> INCLUDEPATH in the >> project file since VS2103 did not create a separate >> include folder in >> the target folder C:/VTK/bin for the VTK binaries. Only >> the library >> files have a separate folder, C:/VTK/bin/lib/Release. >> >> Regards, >> Zoltan >> >> Am 06.10.2017 um 12:08 schrieb support at qt.io >> : >> >> Hi Zoltan, >> >> On 06 October 2017 at 13:00:00 EEST >> Zoltan.Kovacs at esi-group.com >> wrote: >> >> Hi Joni, >> >> Thank you very much for your answer. Then I try >> to install everything >> from scratch. The only prolem is I have only >> MSVC 2103 and the only >> option in the selection list of the online >> installer for MSVC 2013 is >> the 64 bit version. Is there somewhere an >> installer on your website wich >> provides a relatively new Qt version with MSVC >> 2103 32 bit version? >> Thank you very much for your help. >> >> >> No, but you could compile it from source yourself. >> However, note that you cannot build plugins for new >> Qt Creator with MSVC 2013 as it uses different ABI. >> You could use MSVC 2015 or MSVC 2017. >> >> Or you could build 64bit version of Qt Creator from >> source with that Qt version you have installed. >> >> Regards, >> Joni >> -- >> Joni Poikelin >> Software Engineer, >> The Qt Company >> ? >> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >> >> >> -- >> Joni Poikelin >> Software Engineer, >> The Qt Company >> ? >> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: >> http://markmail.org/search/?q=vtkusers >> >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Oct 10 13:58:14 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 10 Oct 2017 13:58:14 -0400 Subject: [vtkusers] Show us what you can do with VTK and ParaView! Message-ID: Have you made cool visualizations with VTK or ParaView? Please submit them to be featured on our websites! Leading up to SC17, we will select visualizations to add to the homepage of kitware.com. As a thank you, each person who submits a selected visualization will receive a Kitware polo shirt. In addition to the visualizations featured on kitware.com, we will add various submissions to the galleries on vtk.org and paraview.org. Ready to submit? Here are some guidelines: - Please email submissions to comm at kitware.com, and indicate whether they were made with VTK or ParaView. Alternatively, share them with us on Twitter by tagging @Kitware and adding #RenderedInVTK or #RenderedInParaView. - Visualizations should be high resolution (at least 2000x2000 pixels and 72 dpi). - Please include the acknowledgement that you would like to accompany each visualization online. - Please also include descriptive information for each visualization (e.g., the science behind the pretty picture, dataset specifications, the application of the visualization to HPC, etc.). We look forward to your visualizations! For inspiration, check out these results from a few years back: https://blog.kitware.com/videos-contributed-by-collaborators-for-sc14/. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From seun at rogue-research.com Tue Oct 10 14:02:33 2017 From: seun at rogue-research.com (Seun Odutola) Date: Tue, 10 Oct 2017 14:02:33 -0400 Subject: [vtkusers] Changes in diffuse properties of material. In-Reply-To: References: Message-ID: <714CA2F0-BF81-4882-8264-677AA9A1399A@rogue-research.com> Hi Ken, I had to take a closer look at how I was rendering my mesh, it seems everything is fine; I was a bit thrown off by the scalar colouring at first and couldn?t really understand the need for the change but on further scrutiny I figured I had to readjust how I was setting my ambient values. Thanks. Regards, Seun > On Oct 3, 2017, at 1:42 PM, Ken Martin wrote: > > You would need to give me a more specific example for me to help. That change mostly impacted meshes that use scalar coloring. But in general the color on screen is driven by diffuse ambient and specular colors and properties make sure those are set to reasonable values. > > Maybe find a mesh where you see an issue and let me know what the ambient/diffuse/specular colors and intensities are for the mesh. No texturing. No backface properties. No scalar coloring. Maybe go from there... > > > On Tue, Oct 3, 2017 at 1:34 PM, Seun Odutola > wrote: > Hi everyone, > > I recently discovered whilst working with VTK master that some meshes are completely rendered dark in colour compared to others; meshes that rely on their material (actor?s properties) are mostly affected. I tracked the occurrence of this change down to the following commit below and was wondering the essence of the change, also if need be how can one replicate the previous rendering behaviour. > > - commit 7bc7e58334bcd1eac12adb6db22d6c45cf8fca74 > Author: Ken Martin > > Date: Thu Aug 31 13:08:58 2017 -0400 > > update handling of scalar material mode > > Previously scalar material mode when used > with scalars would ignore the ambient and diffuse > material intensities and when mapping one of them > set that one to 1.0 while leaving th eother alone. > This caused lots of odd situations where objects would be > over illuminated etc or where changing the diffuse or > ambient seemed to have o impact. > > With this change the diffuse and ambient intensities > are always used. The sclaar simply controls the color > not the intensity. > > > Thanks. > > Regards, > Seun. > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Tue Oct 10 14:21:05 2017 From: simon.esneault at gmail.com (Simon Esneault) Date: Tue, 10 Oct 2017 20:21:05 +0200 Subject: [vtkusers] Dotted line int VTK > 7 In-Reply-To: References: Message-ID: Thanks Bill, I was able to create a dashed line with this texture trick, thanks. However, it is difficult to reproduce the same effect than with the opengl1 version. In the the previous version, each created dash had a constant "lenght" on the screen when you zoom in or out on the actor. With the new version, the number of dash is the same on the line, no matter how long or how "zoomed" in it appears on the screen. In your example, the number of "dash" is controlled by the resolution of the source, is that correct? So to achieve the same result, the only solution is to connect a callback on the camera, and adapt the linesource resolution to the current zoom, no ? Or maybe there is an easier solution ? Thanks anyway, Simon 2017-10-10 19:24 GMT+02:00 Bill Lorensen : > I just added a new example that draws stippled lines. Take a look to > see if it helps... > > https://lorensen.github.io/VTKExamples/site/Cxx/Rendering/StippledLine/ > > > > On Mon, Oct 9, 2017 at 11:29 AM, Simon Esneault > wrote: > > The second trick using texture might just work ! > > Thanks > > Simon > > > > > > 2017-10-09 19:04 GMT+02:00 Ken Martin : > >> > >> https://gitlab.kitware.com/vtk/vtk/issues/15799 gives a couple options > >> that might work for you. > >> > >> On Mon, Oct 9, 2017 at 12:05 PM, Simon Esneault < > simon.esneault at gmail.com> > >> wrote: > >>> > >>> Hello community > >>> > >>> Is there a way to draw dotted line with the new backend ? > >>> > >>> We used something like this before > >>> > >>> m_actor->GetProperty()->SetLineStipplePattern( 0xf0f0 ); > >>> m_actor->GetProperty()->SetLineStippleRepeatFactor( 1 ); > >>> > >>> But the doc says it works only for the old backend. > >>> Any other solution ? > >>> > >>> Thanks > >>> Simon > >>> -- > >>> ------------------------------------------------------------------ > >>> Simon Esneault > >>> Rennes, France > >>> ------------------------------------------------------------------ > >>> > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>> http://www.kitware.com/opensource/opensource.html > >>> > >>> Please keep messages on-topic and check the VTK FAQ at: > >>> http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Search the list archives at: http://markmail.org/search/?q=vtkusers > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://public.kitware.com/mailman/listinfo/vtkusers > >>> > >> > >> > >> > >> -- > >> Ken Martin PhD > >> Distinguished Engineer > >> Kitware Inc. > >> 28 Corporate Drive > >> Clifton Park NY 12065 > >> > >> 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. > > > > > > > > > > -- > > ------------------------------------------------------------------ > > Simon Esneault > > Rennes, France > > ------------------------------------------------------------------ > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Oct 10 14:30:13 2017 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 10 Oct 2017 14:30:13 -0400 Subject: [vtkusers] Changes in diffuse properties of material. In-Reply-To: <714CA2F0-BF81-4882-8264-677AA9A1399A@rogue-research.com> References: <714CA2F0-BF81-4882-8264-677AA9A1399A@rogue-research.com> Message-ID: Cool! Glad it worked out. - Ken On Tue, Oct 10, 2017 at 2:02 PM, Seun Odutola wrote: > Hi Ken, > > I had to take a closer look at how I was rendering my mesh, it seems > everything is fine; I was a bit thrown off by the scalar colouring at first > and couldn?t really understand the need for the change but on further > scrutiny I figured I had to readjust how I was setting my ambient values. > Thanks. > > Regards, > Seun > > > On Oct 3, 2017, at 1:42 PM, Ken Martin wrote: > > You would need to give me a more specific example for me to help. That > change mostly impacted meshes that use scalar coloring. But in general the > color on screen is driven by diffuse ambient and specular colors and > properties make sure those are set to reasonable values. > > Maybe find a mesh where you see an issue and let me know what the > ambient/diffuse/specular colors and intensities are for the mesh. No > texturing. No backface properties. No scalar coloring. Maybe go from > there... > > > On Tue, Oct 3, 2017 at 1:34 PM, Seun Odutola > wrote: > >> Hi everyone, >> >> I recently discovered whilst working with VTK master that some >> meshes are completely rendered dark in colour compared to others; meshes >> that rely on their material (actor?s properties) are mostly affected. I >> tracked the occurrence of this change down to the following commit below >> and was wondering the essence of the change, also if need be how can one >> replicate the previous rendering behaviour. >> >> - commit 7bc7e58334bcd1eac12adb6db22d6c45cf8fca74 >> Author: Ken Martin >> Date: Thu Aug 31 13:08:58 2017 -0400 >> >> update handling of scalar material mode >> >> Previously scalar material mode when used >> with scalars would ignore the ambient and diffuse >> material intensities and when mapping one of them >> set that one to 1.0 while leaving th eother alone. >> This caused lots of odd situations where objects would be >> over illuminated etc or where changing the diffuse or >> ambient seemed to have o impact. >> >> With this change the diffuse and ambient intensities >> are always used. The sclaar simply controls the color >> not the intensity. >> >> >> Thanks. >> >> Regards, >> Seun. >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > > Clifton Park NY 12065 > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elhassan.abdou at gmail.com Wed Oct 11 07:53:17 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Wed, 11 Oct 2017 13:53:17 +0200 Subject: [vtkusers] VTK UWP Message-ID: Hi all, Can anyone help me to configure VTK dll to be built for Universal Windows Platform? Regards Elhassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From briend at cyceron.fr Wed Oct 11 13:12:32 2017 From: briend at cyceron.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCUklFTkQ=?=) Date: Wed, 11 Oct 2017 19:12:32 +0200 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: References: Message-ID: Hi, Sorry for the double post. Since the old post of Karthik , is there a way with "vtkDijkstraGraphGeodesicPath" to have the distance by GetGeodesicLength() ? How to do otherwise? Thanks in advance! My python script: cylinder= vtk.vtkSphereSource() cylinder.SetCenter(0.0, 0.0, 0.0) cylinder.SetRadius(0.5) dijkstra = vtk.vtkDijkstraGraphGeodesicPath() dijkstra.SetInputConnection(cylinder.GetOutputPort()) dijkstra.SetStartVertex(4) dijkstra.SetEndVertex(28) dijkstra.Update() weights = vtk.vtkDoubleArray() size=dijkstra.GetCumulativeWeights(weights) print size I obtain for size: none -- FredericBriend PhD Candidate Universit? de Caen Normandie Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, EA 7466) GIP CYCERON, Caen 14000, France Tel +33 2 31 47 01 56 Email : briend at cyceron.fr http://www.ists.cyceron.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Wed Oct 11 22:52:05 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Thu, 12 Oct 2017 11:52:05 +0900 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: References: Message-ID: Hi, The vtkDijkstraGraphGeodesicPath filter seems to output a sorted point set along the geodesic path. Hence, a straightforward way of getting the distance is summing the lengths of each segment that makes up it. --- pts = dijkstra.GetOutput().GetPoints() p0 = [0,0,0] p1 = [0,0,0] dist = 0.0 for ptId in range(pts.GetNumberOfPoints()-1): pts.GetPoint(ptId, p0) pts.GetPoint(ptId+1, p1) dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) print(dist) --- Regards 2017-10-12 2:12 GMT+09:00 Fr?d?ric BRIEND : > Hi, > > Sorry for the double post. > Since the old post of Karthik, is there a way with > "vtkDijkstraGraphGeodesicPath" to have the distance by GetGeodesicLength() ? > How to do otherwise? > > Thanks in advance! > > My python script: > > cylinder= vtk.vtkSphereSource() > cylinder.SetCenter(0.0, 0.0, 0.0) > cylinder.SetRadius(0.5) > > dijkstra = vtk.vtkDijkstraGraphGeodesicPath() > dijkstra.SetInputConnection(cylinder.GetOutputPort()) > dijkstra.SetStartVertex(4) > dijkstra.SetEndVertex(28) > dijkstra.Update() > > weights = vtk.vtkDoubleArray() > size=dijkstra.GetCumulativeWeights(weights) > > print size > > I obtain for size: none > > -- > > Frederic Briend > > PhD Candidate > > Universit? de Caen Normandie > > Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, > EA 7466) > > GIP CYCERON, Caen 14000, France > > Tel +33 2 31 47 01 56 > > Email : briend at cyceron.fr > > http://www.ists.cyceron.fr/ > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 andrewkeeling at hotmail.com Thu Oct 12 03:22:31 2017 From: andrewkeeling at hotmail.com (andyjk) Date: Thu, 12 Oct 2017 00:22:31 -0700 (MST) Subject: [vtkusers] Merge polydata surface with cube Message-ID: <1507792951789-0.post@n5.nabble.com> I have a relatively flat polydata (like an undulating landscape). I want to clip asquare section out of it and add a 'base to it so it becomes a cube where the top side represents the clipped surface. The new polydata should be watertight. I have tried adding points for the cube underneath, clipping the surface and running a Poisson resurface but the edges get rounded, and I would rather not have to resurface the original data. Any ideas how I can mount my surface patch in a cube? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From briend at cyceron.fr Thu Oct 12 07:39:24 2017 From: briend at cyceron.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCUklFTkQ=?=) Date: Thu, 12 Oct 2017 13:39:24 +0200 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: References: Message-ID: It seems to work! Thanks a lot Yoshimi. Best, Frederic Le 12/10/2017 ? 04:52, kenichiro yoshimi a ?crit?: > Hi, > > The vtkDijkstraGraphGeodesicPath filter seems to output a sorted point > set along the geodesic path. Hence, a straightforward way of getting > the distance is summing the lengths of each segment that makes up it. > --- > pts = dijkstra.GetOutput().GetPoints() > > p0 = [0,0,0] > p1 = [0,0,0] > dist = 0.0 > for ptId in range(pts.GetNumberOfPoints()-1): > pts.GetPoint(ptId, p0) > pts.GetPoint(ptId+1, p1) > dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) > > print(dist) > --- > > Regards > > 2017-10-12 2:12 GMT+09:00 Fr?d?ric BRIEND : >> Hi, >> >> Sorry for the double post. >> Since the old post of Karthik, is there a way with >> "vtkDijkstraGraphGeodesicPath" to have the distance by GetGeodesicLength() ? >> How to do otherwise? >> >> Thanks in advance! >> >> My python script: >> >> cylinder= vtk.vtkSphereSource() >> cylinder.SetCenter(0.0, 0.0, 0.0) >> cylinder.SetRadius(0.5) >> >> dijkstra = vtk.vtkDijkstraGraphGeodesicPath() >> dijkstra.SetInputConnection(cylinder.GetOutputPort()) >> dijkstra.SetStartVertex(4) >> dijkstra.SetEndVertex(28) >> dijkstra.Update() >> >> weights = vtk.vtkDoubleArray() >> size=dijkstra.GetCumulativeWeights(weights) >> >> print size >> >> I obtain for size: none >> >> -- >> >> Frederic Briend >> >> PhD Candidate >> >> Universit? de Caen Normandie >> >> Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, >> EA 7466) >> >> GIP CYCERON, Caen 14000, France >> >> Tel +33 2 31 47 01 56 >> >> Email : briend at cyceron.fr >> >> http://www.ists.cyceron.fr/ >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> -- FredericBriend PhD Candidate Universit? de Caen Normandie Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, EA 7466) GIP CYCERON, Caen 14000, France Tel +33 2 31 47 01 56 Email : briend at cyceron.fr http://www.ists.cyceron.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.nellmeldin at open-engineering.com Thu Oct 12 09:33:05 2017 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Thu, 12 Oct 2017 15:33:05 +0200 Subject: [vtkusers] Size of labels in vtkScalarBarActor Message-ID: Hello. I know that this issue was discussed many times before in this list, but I can't find a way to do what I want. I'm using VTK 7.1.1 (under Windows). So maybe there were some improvements. In fact, I'm using vtkPVScalarBarActor which includes some very well welcomed improvements, but the discussion should apply also to the normal vtkScalarBarActor. https://www.paraview.org/ParaView/Doc/Nightly/www/cxx-doc/classvtkPVScalarBarActor.html The issue is that the size of the labels for values depends on the viewport. So when the viewport changes the size, the labels also change their size. Is it possible to avoid this? I would like to set the size of the labels as constant or at least to define a maximum/minimum size, because sometimes it gets veeeeery small/big and it is not very pleaseant. Thank you! PS: Here's my code to configure the vtkPVScalarBarActor, in case it's useful... (I guess there are some calls that are useless): vtkSmartPointer scalarBarActor = vtkSmartPointer::New(); scalarBarActor->GetPositionCoordinate()->SetCoordinateSystemToDisplay(); scalarBarActor->GetPositionCoordinate()->SetValue(20, 20, 0.0); scalarBarActor->SetAddRangeAnnotations(0); scalarBarActor->DrawTickMarksOff(); scalarBarActor->UnconstrainedFontSizeOff(); scalarBarActor->AnnotationTextScalingOn(); scalarBarActor->SetFixedAnnotationLeaderLineColor(true); scalarBarActor->SetOrientationToVertical(); //scalarBarActor->SetWidth(0.1); // width in viewport coordinates scalarBarActor->SetMaximumWidthInPixels(80); scalarBarActor->GetLabelTextProperty()->BoldOff(); scalarBarActor->GetLabelTextProperty()->ItalicOff(); scalarBarActor->GetLabelTextProperty()->ShadowOn(); scalarBarActor->AutomaticLabelFormatOff(); scalarBarActor->SetLabelFormat("%.2f"); scalarBarActor->SetRangeLabelFormat(scalarBarActor->GetLabelFormat()); scalarBarActor->SetMaximumNumberOfColors(100); scalarBarActor->SetNumberOfLabels(5); scalarBarActor->SetLookupTable(tempLUT); // defined elsewhere, doesn't matter scalarBarActor->SetTitle("Displacements"); scalarBarActor->SetTitleJustification(VTK_TEXT_RIGHT); scalarBarActor->GetTitleTextProperty()->SetFontSize(8); -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Oct 12 09:37:27 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 12 Oct 2017 09:37:27 -0400 Subject: [vtkusers] Size of labels in vtkScalarBarActor In-Reply-To: References: Message-ID: Fernando, Because you are using a scalar bar actor from ParaView, I suggest using the vtkContext2DScalarBarActor. Font sizes are fixed in this scalar bar actor implementation. HTH, Cory On Thu, Oct 12, 2017 at 9:33 AM, Fernando Nellmeldin < f.nellmeldin at open-engineering.com> wrote: > Hello. > > I know that this issue was discussed many times before in this list, but I > can't find a way to do what I want. I'm using VTK 7.1.1 (under Windows). So > maybe there were some improvements. > > In fact, I'm using vtkPVScalarBarActor which includes some very well > welcomed improvements, but the discussion should apply also to the normal > vtkScalarBarActor. > https://www.paraview.org/ParaView/Doc/Nightly/www/cxx- > doc/classvtkPVScalarBarActor.html > > The issue is that the size of the labels for values depends on the > viewport. So when the viewport changes the size, the labels also change > their size. Is it possible to avoid this? I would like to set the size of > the labels as constant or at least to define a maximum/minimum size, > because sometimes it gets veeeeery small/big and it is not very pleaseant. > > Thank you! > > PS: > Here's my code to configure the vtkPVScalarBarActor, in case it's > useful... (I guess there are some calls that are useless): > > vtkSmartPointer scalarBarActor = vtkSmartPointer< > vtkPVScalarBarActor>::New(); > scalarBarActor->GetPositionCoordinate()->SetCoordinateSystemToDisplay(); > scalarBarActor->GetPositionCoordinate()->SetValue(20, 20, 0.0); > > scalarBarActor->SetAddRangeAnnotations(0); > scalarBarActor->DrawTickMarksOff(); > scalarBarActor->UnconstrainedFontSizeOff(); > scalarBarActor->AnnotationTextScalingOn(); > scalarBarActor->SetFixedAnnotationLeaderLineColor(true); > > scalarBarActor->SetOrientationToVertical(); > //scalarBarActor->SetWidth(0.1); // width in viewport coordinates > scalarBarActor->SetMaximumWidthInPixels(80); > scalarBarActor->GetLabelTextProperty()->BoldOff(); > scalarBarActor->GetLabelTextProperty()->ItalicOff(); > scalarBarActor->GetLabelTextProperty()->ShadowOn(); > scalarBarActor->AutomaticLabelFormatOff(); > scalarBarActor->SetLabelFormat("%.2f"); > scalarBarActor->SetRangeLabelFormat(scalarBarActor->GetLabelFormat()); > scalarBarActor->SetMaximumNumberOfColors(100); > scalarBarActor->SetNumberOfLabels(5); > > scalarBarActor->SetLookupTable(tempLUT); // defined elsewhere, doesn't > matter > > scalarBarActor->SetTitle("Displacements"); > scalarBarActor->SetTitleJustification(VTK_TEXT_RIGHT); > scalarBarActor->GetTitleTextProperty()->SetFontSize(8); > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Thu Oct 12 09:38:52 2017 From: juch at zhaw.ch (normanius) Date: Thu, 12 Oct 2017 06:38:52 -0700 (MST) Subject: [vtkusers] DICOM reader and setting bit depth Message-ID: <1507815532359-0.post@n5.nabble.com> Hi I have a problem when reading a DICOM image using vtkDICOMImageReader. Looking at the result, I get the impression that the depth information is not applied properly. I'm pretty sure that problem lies on my side. But could you help me what I do wrong? Judging from the DICOM header, my DICOM has a signed short depth. A slices looks like this in OsiriX: However, if I open the DICOM image with vtkDICOMImageReader, my result looks different. Indeed, values lower than 0 and larger than 255 are shown either black or white, which indicates that the bit depth is cropped beyond the 8bit range. Here the code I used for reading: It of course could be that the rendering could be set up wrong as well. I used the ReadDICOMSeries example without further modifications. Help would be appreciated. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From briend at cyceron.fr Thu Oct 12 12:26:53 2017 From: briend at cyceron.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCUklFTkQ=?=) Date: Thu, 12 Oct 2017 18:26:53 +0200 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: References: Message-ID: <1294093b-b1d2-12f7-c38a-56b55db8e021@cyceron.fr> Hi, Always with vtkDijkstraGraphGeodesicPath function, is-it possible to constrained the geodesic shortest paths (example )? and thus to add points beetween the "dijkstra.SetStartVertex(X)" and the "dijkstra.SetEndVertex(Y)"? Thanks in advance! Frederic Le 12/10/2017 ? 04:52, kenichiro yoshimi a ?crit?: > Hi, > > The vtkDijkstraGraphGeodesicPath filter seems to output a sorted point > set along the geodesic path. Hence, a straightforward way of getting > the distance is summing the lengths of each segment that makes up it. > --- > pts = dijkstra.GetOutput().GetPoints() > > p0 = [0,0,0] > p1 = [0,0,0] > dist = 0.0 > for ptId in range(pts.GetNumberOfPoints()-1): > pts.GetPoint(ptId, p0) > pts.GetPoint(ptId+1, p1) > dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) > > print(dist) > --- > > Regards > > 2017-10-12 2:12 GMT+09:00 Fr?d?ric BRIEND : >> Hi, >> >> Sorry for the double post. >> Since the old post of Karthik, is there a way with >> "vtkDijkstraGraphGeodesicPath" to have the distance by GetGeodesicLength() ? >> How to do otherwise? >> >> Thanks in advance! >> >> My python script: >> >> cylinder= vtk.vtkSphereSource() >> cylinder.SetCenter(0.0, 0.0, 0.0) >> cylinder.SetRadius(0.5) >> >> dijkstra = vtk.vtkDijkstraGraphGeodesicPath() >> dijkstra.SetInputConnection(cylinder.GetOutputPort()) >> dijkstra.SetStartVertex(4) >> dijkstra.SetEndVertex(28) >> dijkstra.Update() >> >> weights = vtk.vtkDoubleArray() >> size=dijkstra.GetCumulativeWeights(weights) >> >> print size >> >> I obtain for size: none >> >> -- >> >> Frederic Briend >> >> PhD Candidate >> >> Universit? de Caen Normandie >> >> Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, >> EA 7466) >> >> GIP CYCERON, Caen 14000, France >> >> Tel +33 2 31 47 01 56 >> >> Email : briend at cyceron.fr >> >> http://www.ists.cyceron.fr/ >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> -- FredericBriend PhD Candidate Universit? de Caen Normandie Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, EA 7466) GIP CYCERON, Caen 14000, France Tel +33 2 31 47 01 56 Email : briend at cyceron.fr http://www.ists.cyceron.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.langer at nist.gov Thu Oct 12 15:01:08 2017 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Thu, 12 Oct 2017 19:01:08 +0000 Subject: [vtkusers] help with modules and opengl Message-ID: <213331D6-FF74-4476-9C66-F6794CAE898B@contoso.com> Hello -- I am belatedly updating my program to use vtk 7 or 8 instead of 5.10. There are some things that I clearly don't understand about the new architecture. Following https://www.vtk.org/Wiki/VTK/Build_System_Migration, I have added VTK_MODULE_INIT(vtkRenderingOpenGL2); VTK_MODULE_INIT(vtkRenderingVolumeOpenGL2); before any other vtk operations. (I'm not using cmake, for unrelated reasons.) When my program opens a graphics window, I get errors ERROR: In /Users/langer/UTIL/VTK/VTK-7.1.1/Rendering/Core/vtkTextActor.cxx, line 113 vtkTextActor (0x7fb87c83c2b0): Failed getting the TextRenderer instance! which I can make go away by including VTK_MODULE_INIT(vtkRenderingFreeType); but then I get the message VTK is designed to work with OpenGL version 3.2 but it appears it has been given a context that does not support 3.2. VTK will run in a compatibility mode designed to work with earlier versions of OpenGL but some features may not work. (After that my program crashes, but it may be for unrelated reasons.) https://www.vtk.org/Wiki/VTK/Build_System_Migration implies that I should use vtkRenderingFreeTypeOpenGL instead of vtkRenderingFreeType, but that doesn't exist. I get the error dyld: lazy symbol binding failed: Symbol not found: __Z45vtkRenderingFreeTypeOpenGL_AutoInit_Constructv Is there a libvtkRenderingFreeTypeOpenGL.dylib that should be part of vtk? How do I get it to build that? It doesn't exist in the directory with the rest of the vtk libraries. The page https://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines looks like it should be helpful, but the links to the helpful mailing list threads are broken. Does someone know the correct links? How do I know what modules I should be initializing? Have I missed something when building vtk? I'm on MacOS Sierra, using macports to install everything except vtk itself (although macport's version of vtk is not too terribly ancient, it's built without VTK_USE_X, which I need). When building vtk, if I leave OPENGL_INCLUDE_DIR, OPENGL_gl_LIBRARY, and OPENGL_glu_LIBRARY set to the default (/System/Library/Frameworks/OpenGL.framework) , the vtk build fails with undefined symbol errors (_glXChooseFBConfig, etc). So I point them at macports' files (/opt/local/include, /opt/local/lib/libGLl.dylib, and /opt/local/lib/libGLU.dylib). Then vtk builds but doesn't find OpenGL 3.2. The Mac does support later versions of OpenGL-- how can I get vtk to use it? Many thanks, Steve From rccm.kyoshimi at gmail.com Thu Oct 12 21:26:16 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 13 Oct 2017 10:26:16 +0900 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: <1294093b-b1d2-12f7-c38a-56b55db8e021@cyceron.fr> References: <1294093b-b1d2-12f7-c38a-56b55db8e021@cyceron.fr> Message-ID: Hello Frederic, The options about constrained shortest path can not be found in the vtkDijkstraGraphGeodesicPath. I don't know it is helpful or not but it is possible to add points to pass through as some of the constraints. It works in the following way due to applying vtkAppendFilter successively to some outputs of vtkDijkstraGraphGeodesicPath. --- import vtk import math cylinder= vtk.vtkSphereSource() cylinder.SetCenter(0.0, 0.0, 0.0) cylinder.SetRadius(0.5) appendFilter = vtk.vtkAppendFilter() appendFilter.MergePointsOn() vIds = [4, 12, 23, 28] p0 = [0,0,0] p1 = [0,0,0] dist = 0.0 for n in range(len(vIds)-1): v0 = vIds[n] v1 = vIds[n+1] dijkstra = vtk.vtkDijkstraGraphGeodesicPath() dijkstra.SetInputConnection(cylinder.GetOutputPort()) dijkstra.SetStartVertex(v0) dijkstra.SetEndVertex(v1) dijkstra.Update() pts = dijkstra.GetOutput().GetPoints() for ptId in range(pts.GetNumberOfPoints()-1): pts.GetPoint(ptId, p0) pts.GetPoint(ptId+1, p1) print(math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1))) dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) appendFilter.AddInputData(dijkstra.GetOutput()) print(dist) appendFilter.Update() --- Thanks 2017-10-13 1:26 GMT+09:00 Fr?d?ric BRIEND : > Hi, > > Always with vtkDijkstraGraphGeodesicPath function, is-it possible to > constrained the geodesic shortest paths (example)? > and thus to add points beetween the "dijkstra.SetStartVertex(X)" and the > "dijkstra.SetEndVertex(Y)"? > > Thanks in advance! > > Frederic > > > > Le 12/10/2017 ? 04:52, kenichiro yoshimi a ?crit : > > Hi, > > The vtkDijkstraGraphGeodesicPath filter seems to output a sorted point > set along the geodesic path. Hence, a straightforward way of getting > the distance is summing the lengths of each segment that makes up it. > --- > pts = dijkstra.GetOutput().GetPoints() > > p0 = [0,0,0] > p1 = [0,0,0] > dist = 0.0 > for ptId in range(pts.GetNumberOfPoints()-1): > pts.GetPoint(ptId, p0) > pts.GetPoint(ptId+1, p1) > dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) > > print(dist) > --- > > Regards > > 2017-10-12 2:12 GMT+09:00 Fr?d?ric BRIEND : > > Hi, > > Sorry for the double post. > Since the old post of Karthik, is there a way with > "vtkDijkstraGraphGeodesicPath" to have the distance by GetGeodesicLength() ? > How to do otherwise? > > Thanks in advance! > > My python script: > > cylinder= vtk.vtkSphereSource() > cylinder.SetCenter(0.0, 0.0, 0.0) > cylinder.SetRadius(0.5) > > dijkstra = vtk.vtkDijkstraGraphGeodesicPath() > dijkstra.SetInputConnection(cylinder.GetOutputPort()) > dijkstra.SetStartVertex(4) > dijkstra.SetEndVertex(28) > dijkstra.Update() > > weights = vtk.vtkDoubleArray() > size=dijkstra.GetCumulativeWeights(weights) > > print size > > I obtain for size: none > > -- > > Frederic Briend > > PhD Candidate > > Universit? de Caen Normandie > > Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, > EA 7466) > > GIP CYCERON, Caen 14000, France > > Tel +33 2 31 47 01 56 > > Email : briend at cyceron.fr > > http://www.ists.cyceron.fr/ > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > -- > > Frederic Briend > > PhD Candidate > > Universit? de Caen Normandie > > Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, > EA 7466) > > GIP CYCERON, Caen 14000, France > > Tel +33 2 31 47 01 56 > > Email : briend at cyceron.fr > > http://www.ists.cyceron.fr/ From f.nellmeldin at open-engineering.com Fri Oct 13 04:21:20 2017 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Fri, 13 Oct 2017 10:21:20 +0200 Subject: [vtkusers] Size of labels in vtkScalarBarActor In-Reply-To: References: Message-ID: Hello, thank you for your answer. I tried what you said but I'm having difficulties implementing it. I'm setting the values of the actor using vtkLookupTable but the scalar bar is not displayed. I followed the code and it fails in vtkContext2DScalarBarActor::PaintColorBar because it fails the casting of the LookupTable from vtkLookupTable to vtkDiscretizableColorTransferFunction (and it is normal, as they are in different parts of the inheritance tree). Then, I tried to define the LookupTable as vtkDiscretizableColorTransferFunction, but I can't find the way to make it work. First of all, I would like to define the first and last value, and map between them using a given number of values (see call SetNumberOfTableValues). In vtkLookupTable I do this by setting the HSV range. I guess I could do the same calling vtkDiscretizableColorTransferFunction::AddHSVPoint(). But the colors in between are not correct. Second thing is that the range is wrong and the method vtkScalarsToColors::SetTableRange is not available in vtkDiscretizableColorTransferFunction. See in the screenshot how the values go from 0 to 1 instead of from 293 to 630... Here's the code of how I do it with vtkLookupTable: vtkSmartPointer tempLUT = vtkSmartPointer::New(); tempLUT->SetRampToLinear(); tempLUT->SetTableRange (rangeForTable); tempLUT->SetNumberOfTableValues(m_configuration.numOfColors); tempLUT->SetHueRange (m_configuration.rangeHue[0], m_configuration.rangeHue[1]); tempLUT->SetSaturationRange (m_configuration.rangeSaturation[0], m_configuration.rangeSaturation[1]); tempLUT->SetValueRange (m_configuration.rangeValue[0], m_configuration.rangeValue[1]); tempLUT->Build(); Here's my code with vtkDiscretizableColorTransferFunction, which doesn't work (see screenshot): vtkSmartPointer tempLUT = vtkSmartPointer::New(); tempLUT->AddHSVPoint(0, m_configuration.rangeHue[0], m_configuration.rangeSaturation[0], m_configuration.rangeValue[0]); tempLUT->AddHSVPoint(1, m_configuration.rangeHue[1], m_configuration.rangeSaturation[1], m_configuration.rangeValue[1]); tempLUT->SetNumberOfValues(m_configuration.numOfColors); tempLUT->SetIndexedLookup(0); tempLUT->Build(); I attach a screenshot of the difference I get. Thank you! On 12 October 2017 at 15:37, Cory Quammen wrote: > Fernando, > > Because you are using a scalar bar actor from ParaView, I suggest using > the vtkContext2DScalarBarActor. Font sizes are fixed in this scalar bar > actor implementation. > > HTH, > Cory > > On Thu, Oct 12, 2017 at 9:33 AM, Fernando Nellmeldin engineering.com> wrote: > >> Hello. >> >> I know that this issue was discussed many times before in this list, but >> I can't find a way to do what I want. I'm using VTK 7.1.1 (under Windows). >> So maybe there were some improvements. >> >> In fact, I'm using vtkPVScalarBarActor which includes some very well >> welcomed improvements, but the discussion should apply also to the normal >> vtkScalarBarActor. >> https://www.paraview.org/ParaView/Doc/Nightly/www/cxx-doc/ >> classvtkPVScalarBarActor.html >> >> The issue is that the size of the labels for values depends on the >> viewport. So when the viewport changes the size, the labels also change >> their size. Is it possible to avoid this? I would like to set the size of >> the labels as constant or at least to define a maximum/minimum size, >> because sometimes it gets veeeeery small/big and it is not very pleaseant. >> >> Thank you! >> >> PS: >> Here's my code to configure the vtkPVScalarBarActor, in case it's >> useful... (I guess there are some calls that are useless): >> >> vtkSmartPointer scalarBarActor = >> vtkSmartPointer::New(); >> scalarBarActor->GetPositionCoordinate()->SetCoordinateSystemToDisplay(); >> scalarBarActor->GetPositionCoordinate()->SetValue(20, 20, 0.0); >> >> scalarBarActor->SetAddRangeAnnotations(0); >> scalarBarActor->DrawTickMarksOff(); >> scalarBarActor->UnconstrainedFontSizeOff(); >> scalarBarActor->AnnotationTextScalingOn(); >> scalarBarActor->SetFixedAnnotationLeaderLineColor(true); >> >> scalarBarActor->SetOrientationToVertical(); >> //scalarBarActor->SetWidth(0.1); // width in viewport coordinates >> scalarBarActor->SetMaximumWidthInPixels(80); >> scalarBarActor->GetLabelTextProperty()->BoldOff(); >> scalarBarActor->GetLabelTextProperty()->ItalicOff(); >> scalarBarActor->GetLabelTextProperty()->ShadowOn(); >> scalarBarActor->AutomaticLabelFormatOff(); >> scalarBarActor->SetLabelFormat("%.2f"); >> scalarBarActor->SetRangeLabelFormat(scalarBarActor->GetLabelFormat()); >> scalarBarActor->SetMaximumNumberOfColors(100); >> scalarBarActor->SetNumberOfLabels(5); >> >> scalarBarActor->SetLookupTable(tempLUT); // defined elsewhere, doesn't >> matter >> >> scalarBarActor->SetTitle("Displacements"); >> scalarBarActor->SetTitleJustification(VTK_TEXT_RIGHT); >> scalarBarActor->GetTitleTextProperty()->SetFontSize(8); >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -- *Fernando NELLMELDIN* Software Engineer *_______________________________________________________________* *Open Engineering s.a.* Rue Bois Saint-Jean 15/1 B-4102 Seraing (Belgium) Tel: +32.4.353.30.34 http://www.open-engineering.com https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym *_________________________________________________________________________* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: differences_scalarbars.png Type: image/png Size: 17987 bytes Desc: not available URL: From sibis at cdac.in Fri Oct 13 05:12:44 2017 From: sibis at cdac.in (apsdat) Date: Fri, 13 Oct 2017 02:12:44 -0700 (MST) Subject: [vtkusers] Support for scout lines on DICOM images Message-ID: <1507885964528-0.post@n5.nabble.com> Hi, I am new to VTK.I have some doubts regarding localizer planning or Drawing scout lines on Dicom image. Does VTK provide any support for drawing scout lines on DICOM image? or what are the functions VTK provides to synchronize lines(draw corresponding lines on other planes) on localizer images? Note: Localizer images are low resolution images comprising 3 orthogonal planes (axial, coronal, and sagittal) that cover most of the anatomical area. Thanks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bartolomei-luca at virgilio.it Fri Oct 13 06:00:15 2017 From: bartolomei-luca at virgilio.it (bartolomei-luca at virgilio.it) Date: Fri, 13 Oct 2017 12:00:15 +0200 (CEST) Subject: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets Message-ID: <1853915668.12432281507888815273.JavaMail.httpd@fep-webmail-05> Hello everyone! I have a problem with the QT GUI I am creating. Basically, I have an interactive QWidget, a QVTKWidget and a "Quit" button. When I launch my app, I can interact with the QWidget without any problem (I have a 3D interactive scene, where I can zoom and rotate). However, as soon as the QVTKWidget becomes "active" (i.e. some function in my code start using it or if I click on it), both the QWidget and the QVTKWidget freeze. The app keeps on working, since the "Quit" button works as it should. If I have a GUI with either the QWidget or the QVTKWidget (only one of them) everything works fine. The problem is if I try to include both of them at the same time. Do you have any idea why this happens? Thanks a lot for you help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Oct 13 09:05:23 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 13 Oct 2017 09:05:23 -0400 Subject: [vtkusers] Size of labels in vtkScalarBarActor In-Reply-To: References: Message-ID: [snip] > Then, I tried to define the LookupTable as vtkDiscretizableColorTransferFunction, > but I can't find the way to make it work. > First of all, I would like to define the first and last value, and map > between them using a given number of values (see call > SetNumberOfTableValues). In vtkLookupTable I do this by setting the HSV > range. I guess I could do the same calling vtkDiscretizableColorTransferFunction::AddHSVPoint(). > But the colors in between are not correct. > By default the vtkDiscretizableColorTransferFunction interpolates colors through the RGB color space. To replicate what the vtkLookupTable does, you will need to call tempLUT->SetColorSpaceToHSV(); > Second thing is that the range is wrong and the method vtkScalarsToColors::SetTableRange > is not available in vtkDiscretizableColorTransferFunction. > tempLUT->SetRange(min, max); should do the trick. HTH, Cory > See in the screenshot how the values go from 0 to 1 instead of from 293 to > 630... > > Here's the code of how I do it with vtkLookupTable: > vtkSmartPointer tempLUT = vtkSmartPointer< > vtkLookupTable>::New(); > tempLUT->SetRampToLinear(); > tempLUT->SetTableRange (rangeForTable); > tempLUT->SetNumberOfTableValues(m_configuration.numOfColors); > tempLUT->SetHueRange (m_configuration.rangeHue[0], > m_configuration.rangeHue[1]); > tempLUT->SetSaturationRange (m_configuration.rangeSaturation[0], > m_configuration.rangeSaturation[1]); > tempLUT->SetValueRange (m_configuration.rangeValue[0], > m_configuration.rangeValue[1]); > tempLUT->Build(); > > Here's my code with vtkDiscretizableColorTransferFunction, which doesn't > work (see screenshot): > vtkSmartPointer tempLUT = > vtkSmartPointer::New(); > tempLUT->AddHSVPoint(0, m_configuration.rangeHue[0], m_configuration.rangeSaturation[0], > m_configuration.rangeValue[0]); > tempLUT->AddHSVPoint(1, m_configuration.rangeHue[1], m_configuration.rangeSaturation[1], > m_configuration.rangeValue[1]); > tempLUT->SetNumberOfValues(m_configuration.numOfColors); > tempLUT->SetIndexedLookup(0); > tempLUT->Build(); > > I attach a screenshot of the difference I get. > > Thank you! > > On 12 October 2017 at 15:37, Cory Quammen > wrote: > >> Fernando, >> >> Because you are using a scalar bar actor from ParaView, I suggest using >> the vtkContext2DScalarBarActor. Font sizes are fixed in this scalar bar >> actor implementation. >> >> HTH, >> Cory >> >> On Thu, Oct 12, 2017 at 9:33 AM, Fernando Nellmeldin < >> f.nellmeldin at open-engineering.com> wrote: >> >>> Hello. >>> >>> I know that this issue was discussed many times before in this list, but >>> I can't find a way to do what I want. I'm using VTK 7.1.1 (under Windows). >>> So maybe there were some improvements. >>> >>> In fact, I'm using vtkPVScalarBarActor which includes some very well >>> welcomed improvements, but the discussion should apply also to the normal >>> vtkScalarBarActor. >>> https://www.paraview.org/ParaView/Doc/Nightly/www/cxx-doc/cl >>> assvtkPVScalarBarActor.html >>> >>> The issue is that the size of the labels for values depends on the >>> viewport. So when the viewport changes the size, the labels also change >>> their size. Is it possible to avoid this? I would like to set the size of >>> the labels as constant or at least to define a maximum/minimum size, >>> because sometimes it gets veeeeery small/big and it is not very pleaseant. >>> >>> Thank you! >>> >>> PS: >>> Here's my code to configure the vtkPVScalarBarActor, in case it's >>> useful... (I guess there are some calls that are useless): >>> >>> vtkSmartPointer scalarBarActor = >>> vtkSmartPointer::New(); >>> scalarBarActor->GetPositionCoordinate()->SetCoordinateSystemToDisplay(); >>> scalarBarActor->GetPositionCoordinate()->SetValue(20, 20, 0.0); >>> >>> scalarBarActor->SetAddRangeAnnotations(0); >>> scalarBarActor->DrawTickMarksOff(); >>> scalarBarActor->UnconstrainedFontSizeOff(); >>> scalarBarActor->AnnotationTextScalingOn(); >>> scalarBarActor->SetFixedAnnotationLeaderLineColor(true); >>> >>> scalarBarActor->SetOrientationToVertical(); >>> //scalarBarActor->SetWidth(0.1); // width in viewport coordinates >>> scalarBarActor->SetMaximumWidthInPixels(80); >>> scalarBarActor->GetLabelTextProperty()->BoldOff(); >>> scalarBarActor->GetLabelTextProperty()->ItalicOff(); >>> scalarBarActor->GetLabelTextProperty()->ShadowOn(); >>> scalarBarActor->AutomaticLabelFormatOff(); >>> scalarBarActor->SetLabelFormat("%.2f"); >>> scalarBarActor->SetRangeLabelFormat(scalarBarActor->GetLabelFormat()); >>> scalarBarActor->SetMaximumNumberOfColors(100); >>> scalarBarActor->SetNumberOfLabels(5); >>> >>> scalarBarActor->SetLookupTable(tempLUT); // defined elsewhere, doesn't >>> matter >>> >>> scalarBarActor->SetTitle("Displacements"); >>> scalarBarActor->SetTitleJustification(VTK_TEXT_RIGHT); >>> scalarBarActor->GetTitleTextProperty()->SetFontSize(8); >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> > > > > -- > *Fernando NELLMELDIN* > Software Engineer > *_______________________________________________________________* > > *Open Engineering s.a.* > > Rue Bois Saint-Jean 15 > /1 > B-4102 Seraing (Belgium) > Tel: +32.4.353.30.34 <+32%204%20353%2030%2034> > > http://www.open-engineering.com > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym > > *_________________________________________________________________________* > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adityadua24 at gmail.com Sat Oct 14 02:08:47 2017 From: adityadua24 at gmail.com (Aditya Dua) Date: Sat, 14 Oct 2017 16:08:47 +1000 Subject: [vtkusers] VTK openVR Controller Settings Message-ID: <59e1a9ef.5037630a.e5ec5.a283@mx.google.com> Hi Everyone, Can someone please show me how to turn on ray for htc vive controllers ? I know I need to use ShowRay function of vtkOpenVRInteractorStyle:- https://www.vtk.org/doc/nightly/html/classvtkOpenVRInteractorStyle.html But I am unable to pass the proper argument and I get an exception What I have tried doing:- vtkEventDataDevice controller = vtkEventDataDevice::RightController; style->ShowRay(controller); But it doesn?t work ? Can someone please help! Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simakov.w at gmail.com Sat Oct 14 11:00:23 2017 From: simakov.w at gmail.com (Met@ll) Date: Sat, 14 Oct 2017 08:00:23 -0700 (MST) Subject: [vtkusers] move object Message-ID: <1507993223080-0.post@n5.nabble.com> Hello. By default, the vtk object is drawn in the center of the screen. It is necessary to shift the coordinates (0,0,0) to the lower left corner of the screen, so that the figure is located there. Thank you! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From simakov.w at gmail.com Sun Oct 15 11:16:23 2017 From: simakov.w at gmail.com (Met@ll) Date: Sun, 15 Oct 2017 08:16:23 -0700 (MST) Subject: [vtkusers] flight path Message-ID: <1508080583049-0.post@n5.nabble.com> Hello. Can I somehow build something like this? The movement of the object and the line of its movement. As in the video below: https://www.youtube.com/watch?v=78U0_XcFP_I Thank you! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Zoltan.Kovacs at esi-group.com Mon Oct 16 05:39:51 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 16 Oct 2017 11:39:51 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> Message-ID: <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Dear Dan, In QtCreator I added a QWidget to the UI form and used "Promote to ..." QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in the header file of the application. However, when linking the source I get the error message distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags)" (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) referenced in function "public: void __thiscall Ui_DistortionPage::setupUi(class QWidget *)" (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) It seems that the MSVC2013 linker cannot find the library of QVTKOpenGLWidget. I searched a library file with a similar name in the folder where CMake generated the VTK libraries with Qt support but I could not find it. I am just wondering if it is missing or some other library file with a completely different name contains this symbol. Regards, Zoltan Am 10.10.2017 um 19:23 schrieb Dan Lipsa: > In Qt Designer you should be able to use QVTKOpenGLWidget by adding > first a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So > you can build the UI of your Qt application this way. > > I am not sure what is needed for QtCreator. I don't use that. > > Hope this helps, > Dan > > > On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs > > wrote: > > Dear Mike, > > Thank you very much for your prompt answer. As I wrote to Dan, we > have to use QtCreator for the development here. Then I have access > only for qmake and I can edit project files for it. If > QVTKOpenGLWidget is the only VTK widget class supported for Qt5 then > I ave to find out how to insert such an object into the UI form file > of QT. > > Kind regards, > Zoltan > > Am 10.10.2017 um 16:48 schrieb Mike Chinander: > > Also, when working with VTK, it will be a lot easier to switch > to using CMake instead of Qt project files (QtCreator supports > CMake). Look at the examples Dan linked to. You will have to > update the CMakelists.txt file for Qt. You will probably have to > add the following: > > FIND_PACKAGE(Qt5Core REQUIRED) > FIND_PACKAGE(Qt5Widgets REQUIRED) > > and update the target_link_libraries line(add Qt5::Widget) , e.g.,: > > target_link_libraries(QtBarChart Qt5::Widgets ${VTK_LIBRARIES}) > > On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa > > >> > wrote: > > ? ? Zoltan, > ? ? This is unrelated to the error you are seeing however: > > ? ? For Qt5 you'll need to use QVTKOpenGLWidget rather than > QVTKWidget.? See > https://lorensen.github.io/VTKExamples/site/Cxx/ > > ? ? > > ? ? All examples are converted to Qt5. Also, VTK master has a > number of > ? ? examples that have been converted to Qt5:?Examples/GUI/Qt > > ? ? Hope this helps, > ? ? Dan > > > ? ? On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs > ? ? > >> > > ? ? wrote: > > ? ? ? ? Dear all, > > ? ? ? ? In CMake I generated a solution project of VTK-8.0.1 > with Qt5 > ? ? ? ? support for MSVS2013. After having run the ALL_BUILD > and INSTALL > ? ? ? ? projects with the install prefix C:\VTK\8.0.1 in VM2013 > I could > ? ? ? ? installed the Win32 bit binaries of VTK 8.0.1 in that > folder. > ? ? ? ? The header files and the libraries are located in > ? ? ? ? C:\VTK\8.0.1\include\vtk-8.0? ?and > ? ? ? ? C:\VTK\8.0.1\lib. > > ? ? ? ? I copied the file QVTKWidgetPlugin.dll from the VTK binary > ? ? ? ? folders to the plugin folder of QTCreator, which uses > QT 5.8 > ? ? ? ? msvs2013 32 bit version. > > ? ? ? ? Then I set the include and library paths and added all > the VTK > ? ? ? ? libary files from C:\VTK\8.0.1\lib for the linker > setting in the > ? ? ? ? project file > ? ? ? ? of a QT application in QtCreator: > > ? ? ? ? INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 > ? ? ? ? LIBS += -LC:\VTK\8.0.1\lib > > ? ? ? ? LIBS += -lvtkRenderingLabel-8.0 \ > ? ? ? ? -lvtkRenderingLOD-8.0 \ > ? ? ? ? -lvtkRenderingOpenGL2-8.0 \ > ? ? ? ? -lvtkRenderingQt-8.0 \ > ? ? ? ? -lvtkRenderingVolume-8.0 \ > ? ? ? ? -lvtkRenderingVolumeOpenGL2-8.0 \ > ? ? ? ? -lvtksqlite-8.0 \ > ? ? ? ? -lvtksys-8.0 \ > ? ? ? ? -lvtkTestingGenericBridge-8.0 \ > ? ? ? ? -lvtkTestingIOSQL-8.0 \ > ? ? ? ? -lvtkTestingRendering-8.0 \ > ? ? ? ? -lvtktiff-8.0 \ > ? ? ? ? -lvtkverdict-8.0 \ > ? ? ? ? -lvtkViewsContext2D-8.0 \ > ? ? ? ? -lvtkViewsCore-8.0 \ > ? ? ? ? -lvtkViewsInfovis-8.0 \ > ? ? ? ? -lvtkViewsQt-8.0 \ > ? ? ? ? -lvtkzlib-8.0 \ > ? ? ? ? -lvtkalglib-8.0 \ > ? ? ? ? -lvtkChartsCore-8.0 \ > ? ? ? ? -lvtkCommonColor-8.0 \ > ? ? ? ? -lvtkCommonComputationalGeometry-8.0 \ > ? ? ? ? -lvtkCommonCore-8.0 \ > ? ? ? ? -lvtkCommonDataModel-8.0 \ > ? ? ? ? -lvtkCommonExecutionModel-8.0 \ > ? ? ? ? -lvtkCommonMath-8.0 \ > ? ? ? ? -lvtkCommonMisc-8.0 \ > ? ? ? ? -lvtkCommonSystem-8.0 \ > ? ? ? ? -lvtkCommonTransforms-8.0 \ > ? ? ? ? -lvtkDICOMParser-8.0 \ > ? ? ? ? -lvtkDomainsChemistry-8.0 \ > ? ? ? ? -lvtkDomainsChemistryOpenGL2-8.0 \ > ? ? ? ? -lvtkexoIIc-8.0 \ > ? ? ? ? -lvtkexpat-8.0 \ > ? ? ? ? -lvtkFiltersAMR-8.0 \ > ? ? ? ? -lvtkFiltersCore-8.0 \ > ? ? ? ? -lvtkFiltersExtraction-8.0 \ > ? ? ? ? -lvtkFiltersFlowPaths-8.0 \ > ? ? ? ? -lvtkFiltersGeneral-8.0 \ > ? ? ? ? -lvtkFiltersGeneric-8.0 \ > ? ? ? ? -lvtkFiltersGeometry-8.0 \ > ? ? ? ? -lvtkFiltersHybrid-8.0 \ > ? ? ? ? -lvtkFiltersHyperTree-8.0 \ > ? ? ? ? -lvtkFiltersImaging-8.0 \ > ? ? ? ? -lvtkFiltersModeling-8.0 \ > ? ? ? ? -lvtkFiltersParallel-8.0 \ > ? ? ? ? -lvtkFiltersParallelImaging-8.0 \ > ? ? ? ? -lvtkFiltersPoints-8.0 \ > ? ? ? ? -lvtkFiltersProgrammable-8.0 \ > ? ? ? ? -lvtkFiltersSelection-8.0 \ > ? ? ? ? -lvtkFiltersSMP-8.0 \ > ? ? ? ? -lvtkFiltersSources-8.0 \ > ? ? ? ? -lvtkFiltersStatistics-8.0 \ > ? ? ? ? -lvtkFiltersTexture-8.0 \ > ? ? ? ? -lvtkFiltersTopology-8.0 \ > ? ? ? ? -lvtkFiltersVerdict-8.0 \ > ? ? ? ? -lvtkfreetype-8.0 \ > ? ? ? ? -lvtkGeovisCore-8.0 \ > ? ? ? ? -lvtkgl2ps-8.0 \ > ? ? ? ? -lvtkglew-8.0 \ > ? ? ? ? -lvtkGUISupportQt-8.0 \ > ? ? ? ? -lvtkGUISupportQtSQL-8.0 \ > ? ? ? ? -lvtkhdf5_hl-8.0 \ > ? ? ? ? -lvtkhdf5-8.0 \ > ? ? ? ? -lvtkImagingColor-8.0 \ > ? ? ? ? -lvtkImagingCore-8.0 \ > ? ? ? ? -lvtkImagingFourier-8.0 \ > ? ? ? ? -lvtkImagingGeneral-8.0 \ > ? ? ? ? -lvtkImagingHybrid-8.0 \ > ? ? ? ? -lvtkImagingMath-8.0 \ > ? ? ? ? -lvtkImagingMorphological-8.0 \ > ? ? ? ? -lvtkImagingSources-8.0 \ > ? ? ? ? -lvtkImagingStatistics-8.0 \ > ? ? ? ? -lvtkImagingStencil-8.0 \ > ? ? ? ? -lvtkInfovisCore-8.0 \ > ? ? ? ? -lvtkInfovisLayout-8.0 \ > ? ? ? ? -lvtkInteractionImage-8.0 \ > ? ? ? ? -lvtkInteractionStyle-8.0 \ > ? ? ? ? -lvtkInteractionWidgets-8.0 \ > ? ? ? ? -lvtkIOAMR-8.0 \ > ? ? ? ? -lvtkIOCore-8.0 \ > ? ? ? ? -lvtkIOEnSight-8.0 \ > ? ? ? ? -lvtkIOExodus-8.0 \ > ? ? ? ? -lvtkIOExport-8.0 \ > ? ? ? ? -lvtkIOExportOpenGL2-8.0 \ > ? ? ? ? -lvtkIOGeometry-8.0 \ > ? ? ? ? -lvtkIOImage-8.0 \ > ? ? ? ? -lvtkIOImport-8.0 \ > ? ? ? ? -lvtkIOInfovis-8.0 \ > ? ? ? ? -lvtkIOLegacy-8.0 \ > ? ? ? ? -lvtkIOLSDyna-8.0 \ > ? ? ? ? -lvtkIOMINC-8.0 \ > ? ? ? ? -lvtkIOMovie-8.0 \ > ? ? ? ? -lvtkIONetCDF-8.0 \ > ? ? ? ? -lvtkIOParallel-8.0 \ > ? ? ? ? -lvtkIOParallelXML-8.0 \ > ? ? ? ? -lvtkIOPLY-8.0 \ > ? ? ? ? -lvtkIOSQL-8.0 \ > ? ? ? ? -lvtkIOTecplotTable-8.0 \ > ? ? ? ? -lvtkIOVideo-8.0 \ > ? ? ? ? -lvtkIOXML-8.0 \ > ? ? ? ? -lvtkIOXMLParser-8.0 \ > ? ? ? ? -lvtkjpeg-8.0 \ > ? ? ? ? -lvtkjsoncpp-8.0 \ > ? ? ? ? -lvtklibharu-8.0 \ > ? ? ? ? -lvtklibxml2-8.0 \ > ? ? ? ? -lvtkLocalExample-8.0 \ > ? ? ? ? -lvtklz4-8.0 \ > ? ? ? ? -lvtkmetaio-8.0 \ > ? ? ? ? -lvtknetcdf_c++ \ > ? ? ? ? -lvtkNetCDF-8.0 \ > ? ? ? ? -lvtkoggtheora-8.0 \ > ? ? ? ? -lvtkParallelCore-8.0 \ > ? ? ? ? -lvtkpng-8.0 \ > ? ? ? ? -lvtkproj4-8.0 \ > ? ? ? ? -lvtkRenderingAnnotation-8.0 \ > ? ? ? ? -lvtkRenderingContext2D-8.0 \ > ? ? ? ? -lvtkRenderingContextOpenGL2-8.0 \ > ? ? ? ? -lvtkRenderingCore-8.0 \ > ? ? ? ? -lvtkRenderingFreeType-8.0 \ > ? ? ? ? -lvtkRenderingGL2PSOpenGL2-8.0 \ > ? ? ? ? -lvtkRenderingImage-8.0 \ > > > ? ? ? ? However, if I add a QVTKWidget on the UI file of the > ? ? ? ? application, include the file QVTKWidget.h in the > header file of > ? ? ? ? the application and I try to link it in QtCreator with the > ? ? ? ? 32-bit VTK and Qt libraries, MSVS2013 (in the toolchain of > ? ? ? ? QtCreator) sends error messages for unresolved external > symbols > ? ? ? ? for all the functions/classes belonging to the > QVTKWidget, such as > > ? ? ? ? distortionpage.obj:-1: Fehler: LNK2019: unresolved external > ? ? ? ? symbol "__declspec(dllimport) public: __thiscall > ? ? ? ? QVTKWidget::QVTKWidget(class QWidget *,class QFlags ? ? ? ? Qt::WindowType>)" > > (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) > ? ? ? ? referenced in function "public: void __thiscall > ? ? ? ? Ui_DistortionPage::setupUi(class QWidget *)" > ? ? ? ? (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) > > > ? ? ? ? It seems that the linker could not find the libary for the > ? ? ? ? QVTKWidget plugin, which is loaded since I could chose > QtWidget > ? ? ? ? from the widget list in the UI form editor in > QtCreator. I do > ? ? ? ? not see any ABI issue here since I use the 32 bit mscv2103 > ? ? ? ? version of Qt and I also compiled and linked the 32 bit > version > ? ? ? ? of VTK libaries and plugin files with MSVS2013. I am > wondering > ? ? ? ? if anybody could make VTK-8.1 working with Qt. Thanks a > lot. > > ? ? ? ? Kind regars, > ? ? ? ? Zoltan > > ? ? ? ? Regards, > ? ? ? ? Zoltan > > ? ? ? ? Am 09.10.2017 um 07:34 schrieb support at qt.io > >: > > ? ? ? ? ? ? Hi Zoltan, > > ? ? ? ? ? ? I don't know how the widget should be installed or > set up in > ? ? ? ? ? ? a project, but you could just search for the header > file and > ? ? ? ? ? ? point INCLUDEPATH to the folder that contains it. > > ? ? ? ? ? ? Regards, > ? ? ? ? ? ? Joni > > ? ? ? ? ? ? On 06 October 2017 at 18:26:00 EEST > Zoltan.Kovacs at esi-group.com > ? ? ? ? ? ? > wrote: > > ? ? ? ? ? ? ? ? Hi Joni, > > ? ? ? ? ? ? ? ? I see. However I found MSCV2013 32 bit version > for Qt > ? ? ? ? ? ? ? ? 5.8. I install > ? ? ? ? ? ? ? ? that version and I built the VTK binaries for win32 > ? ? ? ? ? ? ? ? platform with > ? ? ? ? ? ? ? ? MVS2013. After having copied the VTK plugin > file into > ? ? ? ? ? ? ? ? the plugin folder > ? ? ? ? ? ? ? ? of QtCreator I could launch it successfully. The > ? ? ? ? ? ? ? ? QVTKWidget is in the > ? ? ? ? ? ? ? ? Widget list of QtCreator now. I could insert a > ? ? ? ? ? ? ? ? QVTKWidget in the UI form > ? ? ? ? ? ? ? ? as well. The only problem now is that QtCreator > cannot > ? ? ? ? ? ? ? ? find the header > ? ? ? ? ? ? ? ? file for QVTKWidget. It is not cleat how to set the > ? ? ? ? ? ? ? ? INCLUDEPATH in the > ? ? ? ? ? ? ? ? project file since VS2103 did not create a separate > ? ? ? ? ? ? ? ? include folder in > ? ? ? ? ? ? ? ? the target folder C:/VTK/bin for the VTK > binaries. Only > ? ? ? ? ? ? ? ? the library > ? ? ? ? ? ? ? ? files have a separate folder, > C:/VTK/bin/lib/Release. > > ? ? ? ? ? ? ? ? Regards, > ? ? ? ? ? ? ? ? Zoltan > > ? ? ? ? ? ? ? ? Am 06.10.2017 um 12:08 schrieb support at qt.io > > ? ? ? ? ? ? ? ? >: > > ? ? ? ? ? ? ? ? ? ? Hi Zoltan, > > ? ? ? ? ? ? ? ? ? ? On 06 October 2017 at 13:00:00 EEST > Zoltan.Kovacs at esi-group.com > ? ? ? ? ? ? ? ? ? ? > wrote: > > ? ? ? ? ? ? ? ? ? ? ? ? Hi Joni, > > ? ? ? ? ? ? ? ? ? ? ? ? Thank you very much for your answer. > Then I try > ? ? ? ? ? ? ? ? ? ? ? ? to install everything > ? ? ? ? ? ? ? ? ? ? ? ? from scratch. The only prolem is I have > only > ? ? ? ? ? ? ? ? ? ? ? ? MSVC 2103 and the only > ? ? ? ? ? ? ? ? ? ? ? ? option in the selection list of the online > ? ? ? ? ? ? ? ? ? ? ? ? installer for MSVC 2013 is > ? ? ? ? ? ? ? ? ? ? ? ? the 64 bit version. Is there somewhere an > ? ? ? ? ? ? ? ? ? ? ? ? installer on your website wich > ? ? ? ? ? ? ? ? ? ? ? ? provides a relatively new Qt version > with MSVC > ? ? ? ? ? ? ? ? ? ? ? ? 2103 32 bit version? > ? ? ? ? ? ? ? ? ? ? ? ? Thank you very much for your help. > > > ? ? ? ? ? ? ? ? ? ? No, but you could compile it from source > yourself. > ? ? ? ? ? ? ? ? ? ? However, note that you cannot build plugins > for new > ? ? ? ? ? ? ? ? ? ? Qt Creator with MSVC 2013 as it uses > different ABI. > ? ? ? ? ? ? ? ? ? ? You could use MSVC 2015 or MSVC 2017. > > ? ? ? ? ? ? ? ? ? ? Or you could build 64bit version of Qt > Creator from > ? ? ? ? ? ? ? ? ? ? source with that Qt version you have installed. > > ? ? ? ? ? ? ? ? ? ? Regards, > ? ? ? ? ? ? ? ? ? ? Joni > ? ? ? ? ? ? ? ? ? ? -- > ? ? ? ? ? ? ? ? ? ? Joni Poikelin > ? ? ? ? ? ? ? ? ? ? Software Engineer, > ? ? ? ? ? ? ? ? ? ? The Qt Company > ? ? ? ? ? ? ? ? ? ? ? > ? ? ? ? ? ? ? ? ? ? FAQs - > https://wiki.qt.io/KnowledgeBase:SupportFAQ > > > > > > ? ? ? ? ? ? -- > ? ? ? ? ? ? Joni Poikelin > ? ? ? ? ? ? Software Engineer, > ? ? ? ? ? ? The Qt Company > ? ? ? ? ? ? ? > ? ? ? ? ? ? FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ > > ? ? ? ? ? ? > > > ? ? ? ? _______________________________________________ > ? ? ? ? Powered by www.kitware.com > > > ? ? ? ? Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > ? ? ? ? > > > ? ? ? ? Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > > ? ? ? ? Search the list archives at: > http://markmail.org/search/?q=vtkusers > > ? ? ? ? > > > ? ? ? ? Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > ? ? ? ? > > > > > ? ? _______________________________________________ > ? ? Powered by www.kitware.com > > > ? ? Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > ? ? > > > ? ? Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > > ? ? Search the list archives at: > http://markmail.org/search/?q=vtkusers > > ? ? > > > ? ? Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > ? ? > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: > http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > From elvis.stansvik at orexplore.com Mon Oct 16 05:59:54 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 16 Oct 2017 11:59:54 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs : > Dear Dan, > > In QtCreator I added a QWidget to the UI form and used "Promote to ..." > QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in the > header file of the application. However, when linking the source I get the > error message > > distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol > "__declspec(dllimport) public: __thiscall > QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags Qt::WindowType>)" > (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) > referenced in function "public: void __thiscall > Ui_DistortionPage::setupUi(class QWidget *)" > (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) > > > It seems that the MSVC2013 linker cannot find the library of > QVTKOpenGLWidget. I searched a library file with a similar name in the > folder where CMake generated the VTK libraries with Qt support but I could > not find it. I am just wondering if it is missing or some other library file > with a completely different name contains this symbol. The class is part of the vtkGUISupportQt library (on Windows the files would be vtkGUISupportQt-8.0.lib/dll). We're using the "promote" functionality in Qt Creator's Design mode to promote a widget to our custom QVTKOpenGLWidget subclass. It should work fine to promote to it directly. Elvis > > Regards, > Zoltan > > > > Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >> >> In Qt Designer you should be able to use QVTKOpenGLWidget by adding first >> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you can >> build the UI of your Qt application this way. >> >> I am not sure what is needed for QtCreator. I don't use that. >> >> Hope this helps, >> Dan >> >> >> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >> > wrote: >> >> Dear Mike, >> >> Thank you very much for your prompt answer. As I wrote to Dan, we >> have to use QtCreator for the development here. Then I have access >> only for qmake and I can edit project files for it. If >> QVTKOpenGLWidget is the only VTK widget class supported for Qt5 then >> I ave to find out how to insert such an object into the UI form file >> of QT. >> >> Kind regards, >> Zoltan >> >> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >> >> Also, when working with VTK, it will be a lot easier to switch >> to using CMake instead of Qt project files (QtCreator supports >> CMake). Look at the examples Dan linked to. You will have to >> update the CMakelists.txt file for Qt. You will probably have to >> add the following: >> >> FIND_PACKAGE(Qt5Core REQUIRED) >> FIND_PACKAGE(Qt5Widgets REQUIRED) >> >> and update the target_link_libraries line(add Qt5::Widget) , >> e.g.,: >> >> target_link_libraries(QtBarChart Qt5::Widgets ${VTK_LIBRARIES}) >> >> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >> >> >> >> wrote: >> >> Zoltan, >> This is unrelated to the error you are seeing however: >> >> For Qt5 you'll need to use QVTKOpenGLWidget rather than >> QVTKWidget. See >> https://lorensen.github.io/VTKExamples/site/Cxx/ >> >> > > >> All examples are converted to Qt5. Also, VTK master has a >> number of >> examples that have been converted to Qt5: Examples/GUI/Qt >> >> Hope this helps, >> Dan >> >> >> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >> > >> > >> >> >> >> wrote: >> >> Dear all, >> >> In CMake I generated a solution project of VTK-8.0.1 >> with Qt5 >> support for MSVS2013. After having run the ALL_BUILD >> and INSTALL >> projects with the install prefix C:\VTK\8.0.1 in VM2013 >> I could >> installed the Win32 bit binaries of VTK 8.0.1 in that >> folder. >> The header files and the libraries are located in >> C:\VTK\8.0.1\include\vtk-8.0 and >> C:\VTK\8.0.1\lib. >> >> I copied the file QVTKWidgetPlugin.dll from the VTK >> binary >> folders to the plugin folder of QTCreator, which uses >> QT 5.8 >> msvs2013 32 bit version. >> >> Then I set the include and library paths and added all >> the VTK >> libary files from C:\VTK\8.0.1\lib for the linker >> setting in the >> project file >> of a QT application in QtCreator: >> >> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >> LIBS += -LC:\VTK\8.0.1\lib >> >> LIBS += -lvtkRenderingLabel-8.0 \ >> -lvtkRenderingLOD-8.0 \ >> -lvtkRenderingOpenGL2-8.0 \ >> -lvtkRenderingQt-8.0 \ >> -lvtkRenderingVolume-8.0 \ >> -lvtkRenderingVolumeOpenGL2-8.0 \ >> -lvtksqlite-8.0 \ >> -lvtksys-8.0 \ >> -lvtkTestingGenericBridge-8.0 \ >> -lvtkTestingIOSQL-8.0 \ >> -lvtkTestingRendering-8.0 \ >> -lvtktiff-8.0 \ >> -lvtkverdict-8.0 \ >> -lvtkViewsContext2D-8.0 \ >> -lvtkViewsCore-8.0 \ >> -lvtkViewsInfovis-8.0 \ >> -lvtkViewsQt-8.0 \ >> -lvtkzlib-8.0 \ >> -lvtkalglib-8.0 \ >> -lvtkChartsCore-8.0 \ >> -lvtkCommonColor-8.0 \ >> -lvtkCommonComputationalGeometry-8.0 \ >> -lvtkCommonCore-8.0 \ >> -lvtkCommonDataModel-8.0 \ >> -lvtkCommonExecutionModel-8.0 \ >> -lvtkCommonMath-8.0 \ >> -lvtkCommonMisc-8.0 \ >> -lvtkCommonSystem-8.0 \ >> -lvtkCommonTransforms-8.0 \ >> -lvtkDICOMParser-8.0 \ >> -lvtkDomainsChemistry-8.0 \ >> -lvtkDomainsChemistryOpenGL2-8.0 \ >> -lvtkexoIIc-8.0 \ >> -lvtkexpat-8.0 \ >> -lvtkFiltersAMR-8.0 \ >> -lvtkFiltersCore-8.0 \ >> -lvtkFiltersExtraction-8.0 \ >> -lvtkFiltersFlowPaths-8.0 \ >> -lvtkFiltersGeneral-8.0 \ >> -lvtkFiltersGeneric-8.0 \ >> -lvtkFiltersGeometry-8.0 \ >> -lvtkFiltersHybrid-8.0 \ >> -lvtkFiltersHyperTree-8.0 \ >> -lvtkFiltersImaging-8.0 \ >> -lvtkFiltersModeling-8.0 \ >> -lvtkFiltersParallel-8.0 \ >> -lvtkFiltersParallelImaging-8.0 \ >> -lvtkFiltersPoints-8.0 \ >> -lvtkFiltersProgrammable-8.0 \ >> -lvtkFiltersSelection-8.0 \ >> -lvtkFiltersSMP-8.0 \ >> -lvtkFiltersSources-8.0 \ >> -lvtkFiltersStatistics-8.0 \ >> -lvtkFiltersTexture-8.0 \ >> -lvtkFiltersTopology-8.0 \ >> -lvtkFiltersVerdict-8.0 \ >> -lvtkfreetype-8.0 \ >> -lvtkGeovisCore-8.0 \ >> -lvtkgl2ps-8.0 \ >> -lvtkglew-8.0 \ >> -lvtkGUISupportQt-8.0 \ >> -lvtkGUISupportQtSQL-8.0 \ >> -lvtkhdf5_hl-8.0 \ >> -lvtkhdf5-8.0 \ >> -lvtkImagingColor-8.0 \ >> -lvtkImagingCore-8.0 \ >> -lvtkImagingFourier-8.0 \ >> -lvtkImagingGeneral-8.0 \ >> -lvtkImagingHybrid-8.0 \ >> -lvtkImagingMath-8.0 \ >> -lvtkImagingMorphological-8.0 \ >> -lvtkImagingSources-8.0 \ >> -lvtkImagingStatistics-8.0 \ >> -lvtkImagingStencil-8.0 \ >> -lvtkInfovisCore-8.0 \ >> -lvtkInfovisLayout-8.0 \ >> -lvtkInteractionImage-8.0 \ >> -lvtkInteractionStyle-8.0 \ >> -lvtkInteractionWidgets-8.0 \ >> -lvtkIOAMR-8.0 \ >> -lvtkIOCore-8.0 \ >> -lvtkIOEnSight-8.0 \ >> -lvtkIOExodus-8.0 \ >> -lvtkIOExport-8.0 \ >> -lvtkIOExportOpenGL2-8.0 \ >> -lvtkIOGeometry-8.0 \ >> -lvtkIOImage-8.0 \ >> -lvtkIOImport-8.0 \ >> -lvtkIOInfovis-8.0 \ >> -lvtkIOLegacy-8.0 \ >> -lvtkIOLSDyna-8.0 \ >> -lvtkIOMINC-8.0 \ >> -lvtkIOMovie-8.0 \ >> -lvtkIONetCDF-8.0 \ >> -lvtkIOParallel-8.0 \ >> -lvtkIOParallelXML-8.0 \ >> -lvtkIOPLY-8.0 \ >> -lvtkIOSQL-8.0 \ >> -lvtkIOTecplotTable-8.0 \ >> -lvtkIOVideo-8.0 \ >> -lvtkIOXML-8.0 \ >> -lvtkIOXMLParser-8.0 \ >> -lvtkjpeg-8.0 \ >> -lvtkjsoncpp-8.0 \ >> -lvtklibharu-8.0 \ >> -lvtklibxml2-8.0 \ >> -lvtkLocalExample-8.0 \ >> -lvtklz4-8.0 \ >> -lvtkmetaio-8.0 \ >> -lvtknetcdf_c++ \ >> -lvtkNetCDF-8.0 \ >> -lvtkoggtheora-8.0 \ >> -lvtkParallelCore-8.0 \ >> -lvtkpng-8.0 \ >> -lvtkproj4-8.0 \ >> -lvtkRenderingAnnotation-8.0 \ >> -lvtkRenderingContext2D-8.0 \ >> -lvtkRenderingContextOpenGL2-8.0 \ >> -lvtkRenderingCore-8.0 \ >> -lvtkRenderingFreeType-8.0 \ >> -lvtkRenderingGL2PSOpenGL2-8.0 \ >> -lvtkRenderingImage-8.0 \ >> >> >> However, if I add a QVTKWidget on the UI file of the >> application, include the file QVTKWidget.h in the >> header file of >> the application and I try to link it in QtCreator with >> the >> 32-bit VTK and Qt libraries, MSVS2013 (in the toolchain >> of >> QtCreator) sends error messages for unresolved external >> symbols >> for all the functions/classes belonging to the >> QVTKWidget, such as >> >> distortionpage.obj:-1: Fehler: LNK2019: unresolved >> external >> symbol "__declspec(dllimport) public: __thiscall >> QVTKWidget::QVTKWidget(class QWidget *,class QFlags> Qt::WindowType>)" >> >> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >> referenced in function "public: void __thiscall >> Ui_DistortionPage::setupUi(class QWidget *)" >> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >> >> >> It seems that the linker could not find the libary for >> the >> QVTKWidget plugin, which is loaded since I could chose >> QtWidget >> from the widget list in the UI form editor in >> QtCreator. I do >> not see any ABI issue here since I use the 32 bit >> mscv2103 >> version of Qt and I also compiled and linked the 32 bit >> version >> of VTK libaries and plugin files with MSVS2013. I am >> wondering >> if anybody could make VTK-8.1 working with Qt. Thanks a >> lot. >> >> Kind regars, >> Zoltan >> >> Regards, >> Zoltan >> >> Am 09.10.2017 um 07:34 schrieb support at qt.io >> > >: >> >> Hi Zoltan, >> >> I don't know how the widget should be installed or >> set up in >> a project, but you could just search for the header >> file and >> point INCLUDEPATH to the folder that contains it. >> >> Regards, >> Joni >> >> On 06 October 2017 at 18:26:00 EEST >> Zoltan.Kovacs at esi-group.com >> > >> > wrote: >> >> Hi Joni, >> >> I see. However I found MSCV2013 32 bit version >> for Qt >> 5.8. I install >> that version and I built the VTK binaries for >> win32 >> platform with >> MVS2013. After having copied the VTK plugin >> file into >> the plugin folder >> of QtCreator I could launch it successfully. The >> QVTKWidget is in the >> Widget list of QtCreator now. I could insert a >> QVTKWidget in the UI form >> as well. The only problem now is that QtCreator >> cannot >> find the header >> file for QVTKWidget. It is not cleat how to set >> the >> INCLUDEPATH in the >> project file since VS2103 did not create a >> separate >> include folder in >> the target folder C:/VTK/bin for the VTK >> binaries. Only >> the library >> files have a separate folder, >> C:/VTK/bin/lib/Release. >> >> Regards, >> Zoltan >> >> Am 06.10.2017 um 12:08 schrieb support at qt.io >> >> >: >> >> Hi Zoltan, >> >> On 06 October 2017 at 13:00:00 EEST >> Zoltan.Kovacs at esi-group.com >> > >> > wrote: >> >> Hi Joni, >> >> Thank you very much for your answer. >> Then I try >> to install everything >> from scratch. The only prolem is I have >> only >> MSVC 2103 and the only >> option in the selection list of the >> online >> installer for MSVC 2013 is >> the 64 bit version. Is there somewhere an >> installer on your website wich >> provides a relatively new Qt version >> with MSVC >> 2103 32 bit version? >> Thank you very much for your help. >> >> >> No, but you could compile it from source >> yourself. >> However, note that you cannot build plugins >> for new >> Qt Creator with MSVC 2013 as it uses >> different ABI. >> You could use MSVC 2015 or MSVC 2017. >> >> Or you could build 64bit version of Qt >> Creator from >> source with that Qt version you have >> installed. >> >> Regards, >> Joni >> -- >> Joni Poikelin >> Software Engineer, >> The Qt Company >> ? >> FAQs - >> https://wiki.qt.io/KnowledgeBase:SupportFAQ >> >> >> > > >> >> -- >> Joni Poikelin >> Software Engineer, >> The Qt Company >> ? >> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >> >> > > >> >> _______________________________________________ >> Powered by www.kitware.com >> >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> > > >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> > > >> >> Search the list archives at: >> http://markmail.org/search/?q=vtkusers >> >> > > >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> > > >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> > > >> >> Search the list archives at: >> http://markmail.org/search/?q=vtkusers >> >> > > >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: >> http://markmail.org/search/?q=vtkusers >> >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From Zoltan.Kovacs at esi-group.com Mon Oct 16 07:00:38 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 16 Oct 2017 13:00:38 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: Dear Elvis, Thanks for the information. I have the files -lvtkGUISupportQt-8.0 \ -lvtkGUISupportQtSQL-8.0 \ in the library list and the libary path is also given in the project file loaded in QtCreator but the compiler cannot resolve the symbol QVTKOpenGLWidget: Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 -IC:\Qt\5.8\msvc2013\include -IC:\Qt\5.8\msvc2013\include\QtPrintSupport -IC:\Qt\5.8\msvc2013\include\QtWidgets -IC:\Qt\5.8\msvc2013\include\QtGui -IC:\Qt\5.8\msvc2013\include\QtANGLE -IC:\Qt\5.8\msvc2013\include\QtCore -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom distortionpage.cpp link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom distortionpage.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags)" (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) referenced in function "public: void __thiscall Ui_DistortionPage::setupUi(class QWidget *)" (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) It seems that the compiler switches contain the include path for VTK but the library path and the libraries for VTK are missing from the linker options. I guess it must be a qmake issue. Thanks anyway. Regards, Zoltan Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: > 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs : >> Dear Dan, >> >> In QtCreator I added a QWidget to the UI form and used "Promote to ..." >> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in the >> header file of the application. However, when linking the source I get the >> error message >> >> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >> "__declspec(dllimport) public: __thiscall >> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags> Qt::WindowType>)" >> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >> referenced in function "public: void __thiscall >> Ui_DistortionPage::setupUi(class QWidget *)" >> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >> >> >> It seems that the MSVC2013 linker cannot find the library of >> QVTKOpenGLWidget. I searched a library file with a similar name in the >> folder where CMake generated the VTK libraries with Qt support but I could >> not find it. I am just wondering if it is missing or some other library file >> with a completely different name contains this symbol. > > The class is part of the vtkGUISupportQt library (on Windows the files > would be vtkGUISupportQt-8.0.lib/dll). > > We're using the "promote" functionality in Qt Creator's Design mode to > promote a widget to our custom QVTKOpenGLWidget subclass. It should > work fine to promote to it directly. > > Elvis > >> >> Regards, >> Zoltan >> >> >> >> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>> >>> In Qt Designer you should be able to use QVTKOpenGLWidget by adding first >>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you can >>> build the UI of your Qt application this way. >>> >>> I am not sure what is needed for QtCreator. I don't use that. >>> >>> Hope this helps, >>> Dan >>> >>> >>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>> > wrote: >>> >>> Dear Mike, >>> >>> Thank you very much for your prompt answer. As I wrote to Dan, we >>> have to use QtCreator for the development here. Then I have access >>> only for qmake and I can edit project files for it. If >>> QVTKOpenGLWidget is the only VTK widget class supported for Qt5 then >>> I ave to find out how to insert such an object into the UI form file >>> of QT. >>> >>> Kind regards, >>> Zoltan >>> >>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>> >>> Also, when working with VTK, it will be a lot easier to switch >>> to using CMake instead of Qt project files (QtCreator supports >>> CMake). Look at the examples Dan linked to. You will have to >>> update the CMakelists.txt file for Qt. You will probably have to >>> add the following: >>> >>> FIND_PACKAGE(Qt5Core REQUIRED) >>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>> >>> and update the target_link_libraries line(add Qt5::Widget) , >>> e.g.,: >>> >>> target_link_libraries(QtBarChart Qt5::Widgets ${VTK_LIBRARIES}) >>> >>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>> >>> >> >>> wrote: >>> >>> Zoltan, >>> This is unrelated to the error you are seeing however: >>> >>> For Qt5 you'll need to use QVTKOpenGLWidget rather than >>> QVTKWidget. See >>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>> >>> >> > >>> All examples are converted to Qt5. Also, VTK master has a >>> number of >>> examples that have been converted to Qt5: Examples/GUI/Qt >>> >>> Hope this helps, >>> Dan >>> >>> >>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>> >> >>> >> >>> >> >>> >>> wrote: >>> >>> Dear all, >>> >>> In CMake I generated a solution project of VTK-8.0.1 >>> with Qt5 >>> support for MSVS2013. After having run the ALL_BUILD >>> and INSTALL >>> projects with the install prefix C:\VTK\8.0.1 in VM2013 >>> I could >>> installed the Win32 bit binaries of VTK 8.0.1 in that >>> folder. >>> The header files and the libraries are located in >>> C:\VTK\8.0.1\include\vtk-8.0 and >>> C:\VTK\8.0.1\lib. >>> >>> I copied the file QVTKWidgetPlugin.dll from the VTK >>> binary >>> folders to the plugin folder of QTCreator, which uses >>> QT 5.8 >>> msvs2013 32 bit version. >>> >>> Then I set the include and library paths and added all >>> the VTK >>> libary files from C:\VTK\8.0.1\lib for the linker >>> setting in the >>> project file >>> of a QT application in QtCreator: >>> >>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>> LIBS += -LC:\VTK\8.0.1\lib >>> >>> LIBS += -lvtkRenderingLabel-8.0 \ >>> -lvtkRenderingLOD-8.0 \ >>> -lvtkRenderingOpenGL2-8.0 \ >>> -lvtkRenderingQt-8.0 \ >>> -lvtkRenderingVolume-8.0 \ >>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>> -lvtksqlite-8.0 \ >>> -lvtksys-8.0 \ >>> -lvtkTestingGenericBridge-8.0 \ >>> -lvtkTestingIOSQL-8.0 \ >>> -lvtkTestingRendering-8.0 \ >>> -lvtktiff-8.0 \ >>> -lvtkverdict-8.0 \ >>> -lvtkViewsContext2D-8.0 \ >>> -lvtkViewsCore-8.0 \ >>> -lvtkViewsInfovis-8.0 \ >>> -lvtkViewsQt-8.0 \ >>> -lvtkzlib-8.0 \ >>> -lvtkalglib-8.0 \ >>> -lvtkChartsCore-8.0 \ >>> -lvtkCommonColor-8.0 \ >>> -lvtkCommonComputationalGeometry-8.0 \ >>> -lvtkCommonCore-8.0 \ >>> -lvtkCommonDataModel-8.0 \ >>> -lvtkCommonExecutionModel-8.0 \ >>> -lvtkCommonMath-8.0 \ >>> -lvtkCommonMisc-8.0 \ >>> -lvtkCommonSystem-8.0 \ >>> -lvtkCommonTransforms-8.0 \ >>> -lvtkDICOMParser-8.0 \ >>> -lvtkDomainsChemistry-8.0 \ >>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>> -lvtkexoIIc-8.0 \ >>> -lvtkexpat-8.0 \ >>> -lvtkFiltersAMR-8.0 \ >>> -lvtkFiltersCore-8.0 \ >>> -lvtkFiltersExtraction-8.0 \ >>> -lvtkFiltersFlowPaths-8.0 \ >>> -lvtkFiltersGeneral-8.0 \ >>> -lvtkFiltersGeneric-8.0 \ >>> -lvtkFiltersGeometry-8.0 \ >>> -lvtkFiltersHybrid-8.0 \ >>> -lvtkFiltersHyperTree-8.0 \ >>> -lvtkFiltersImaging-8.0 \ >>> -lvtkFiltersModeling-8.0 \ >>> -lvtkFiltersParallel-8.0 \ >>> -lvtkFiltersParallelImaging-8.0 \ >>> -lvtkFiltersPoints-8.0 \ >>> -lvtkFiltersProgrammable-8.0 \ >>> -lvtkFiltersSelection-8.0 \ >>> -lvtkFiltersSMP-8.0 \ >>> -lvtkFiltersSources-8.0 \ >>> -lvtkFiltersStatistics-8.0 \ >>> -lvtkFiltersTexture-8.0 \ >>> -lvtkFiltersTopology-8.0 \ >>> -lvtkFiltersVerdict-8.0 \ >>> -lvtkfreetype-8.0 \ >>> -lvtkGeovisCore-8.0 \ >>> -lvtkgl2ps-8.0 \ >>> -lvtkglew-8.0 \ >>> -lvtkGUISupportQt-8.0 \ >>> -lvtkGUISupportQtSQL-8.0 \ >>> -lvtkhdf5_hl-8.0 \ >>> -lvtkhdf5-8.0 \ >>> -lvtkImagingColor-8.0 \ >>> -lvtkImagingCore-8.0 \ >>> -lvtkImagingFourier-8.0 \ >>> -lvtkImagingGeneral-8.0 \ >>> -lvtkImagingHybrid-8.0 \ >>> -lvtkImagingMath-8.0 \ >>> -lvtkImagingMorphological-8.0 \ >>> -lvtkImagingSources-8.0 \ >>> -lvtkImagingStatistics-8.0 \ >>> -lvtkImagingStencil-8.0 \ >>> -lvtkInfovisCore-8.0 \ >>> -lvtkInfovisLayout-8.0 \ >>> -lvtkInteractionImage-8.0 \ >>> -lvtkInteractionStyle-8.0 \ >>> -lvtkInteractionWidgets-8.0 \ >>> -lvtkIOAMR-8.0 \ >>> -lvtkIOCore-8.0 \ >>> -lvtkIOEnSight-8.0 \ >>> -lvtkIOExodus-8.0 \ >>> -lvtkIOExport-8.0 \ >>> -lvtkIOExportOpenGL2-8.0 \ >>> -lvtkIOGeometry-8.0 \ >>> -lvtkIOImage-8.0 \ >>> -lvtkIOImport-8.0 \ >>> -lvtkIOInfovis-8.0 \ >>> -lvtkIOLegacy-8.0 \ >>> -lvtkIOLSDyna-8.0 \ >>> -lvtkIOMINC-8.0 \ >>> -lvtkIOMovie-8.0 \ >>> -lvtkIONetCDF-8.0 \ >>> -lvtkIOParallel-8.0 \ >>> -lvtkIOParallelXML-8.0 \ >>> -lvtkIOPLY-8.0 \ >>> -lvtkIOSQL-8.0 \ >>> -lvtkIOTecplotTable-8.0 \ >>> -lvtkIOVideo-8.0 \ >>> -lvtkIOXML-8.0 \ >>> -lvtkIOXMLParser-8.0 \ >>> -lvtkjpeg-8.0 \ >>> -lvtkjsoncpp-8.0 \ >>> -lvtklibharu-8.0 \ >>> -lvtklibxml2-8.0 \ >>> -lvtkLocalExample-8.0 \ >>> -lvtklz4-8.0 \ >>> -lvtkmetaio-8.0 \ >>> -lvtknetcdf_c++ \ >>> -lvtkNetCDF-8.0 \ >>> -lvtkoggtheora-8.0 \ >>> -lvtkParallelCore-8.0 \ >>> -lvtkpng-8.0 \ >>> -lvtkproj4-8.0 \ >>> -lvtkRenderingAnnotation-8.0 \ >>> -lvtkRenderingContext2D-8.0 \ >>> -lvtkRenderingContextOpenGL2-8.0 \ >>> -lvtkRenderingCore-8.0 \ >>> -lvtkRenderingFreeType-8.0 \ >>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>> -lvtkRenderingImage-8.0 \ >>> >>> >>> However, if I add a QVTKWidget on the UI file of the >>> application, include the file QVTKWidget.h in the >>> header file of >>> the application and I try to link it in QtCreator with >>> the >>> 32-bit VTK and Qt libraries, MSVS2013 (in the toolchain >>> of >>> QtCreator) sends error messages for unresolved external >>> symbols >>> for all the functions/classes belonging to the >>> QVTKWidget, such as >>> >>> distortionpage.obj:-1: Fehler: LNK2019: unresolved >>> external >>> symbol "__declspec(dllimport) public: __thiscall >>> QVTKWidget::QVTKWidget(class QWidget *,class QFlags>> Qt::WindowType>)" >>> >>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>> referenced in function "public: void __thiscall >>> Ui_DistortionPage::setupUi(class QWidget *)" >>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>> >>> >>> It seems that the linker could not find the libary for >>> the >>> QVTKWidget plugin, which is loaded since I could chose >>> QtWidget >>> from the widget list in the UI form editor in >>> QtCreator. I do >>> not see any ABI issue here since I use the 32 bit >>> mscv2103 >>> version of Qt and I also compiled and linked the 32 bit >>> version >>> of VTK libaries and plugin files with MSVS2013. I am >>> wondering >>> if anybody could make VTK-8.1 working with Qt. Thanks a >>> lot. >>> >>> Kind regars, >>> Zoltan >>> >>> Regards, >>> Zoltan >>> >>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>> >> >: >>> >>> Hi Zoltan, >>> >>> I don't know how the widget should be installed or >>> set up in >>> a project, but you could just search for the header >>> file and >>> point INCLUDEPATH to the folder that contains it. >>> >>> Regards, >>> Joni >>> >>> On 06 October 2017 at 18:26:00 EEST >>> Zoltan.Kovacs at esi-group.com >>> >> >>> > wrote: >>> >>> Hi Joni, >>> >>> I see. However I found MSCV2013 32 bit version >>> for Qt >>> 5.8. I install >>> that version and I built the VTK binaries for >>> win32 >>> platform with >>> MVS2013. After having copied the VTK plugin >>> file into >>> the plugin folder >>> of QtCreator I could launch it successfully. The >>> QVTKWidget is in the >>> Widget list of QtCreator now. I could insert a >>> QVTKWidget in the UI form >>> as well. The only problem now is that QtCreator >>> cannot >>> find the header >>> file for QVTKWidget. It is not cleat how to set >>> the >>> INCLUDEPATH in the >>> project file since VS2103 did not create a >>> separate >>> include folder in >>> the target folder C:/VTK/bin for the VTK >>> binaries. Only >>> the library >>> files have a separate folder, >>> C:/VTK/bin/lib/Release. >>> >>> Regards, >>> Zoltan >>> >>> Am 06.10.2017 um 12:08 schrieb support at qt.io >>> >>> >: >>> >>> Hi Zoltan, >>> >>> On 06 October 2017 at 13:00:00 EEST >>> Zoltan.Kovacs at esi-group.com >>> >> >>> > wrote: >>> >>> Hi Joni, >>> >>> Thank you very much for your answer. >>> Then I try >>> to install everything >>> from scratch. The only prolem is I have >>> only >>> MSVC 2103 and the only >>> option in the selection list of the >>> online >>> installer for MSVC 2013 is >>> the 64 bit version. Is there somewhere an >>> installer on your website wich >>> provides a relatively new Qt version >>> with MSVC >>> 2103 32 bit version? >>> Thank you very much for your help. >>> >>> >>> No, but you could compile it from source >>> yourself. >>> However, note that you cannot build plugins >>> for new >>> Qt Creator with MSVC 2013 as it uses >>> different ABI. >>> You could use MSVC 2015 or MSVC 2017. >>> >>> Or you could build 64bit version of Qt >>> Creator from >>> source with that Qt version you have >>> installed. >>> >>> Regards, >>> Joni >>> -- >>> Joni Poikelin >>> Software Engineer, >>> The Qt Company >>> ? >>> FAQs - >>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>> >>> >>> >> > >>> >>> -- >>> Joni Poikelin >>> Software Engineer, >>> The Qt Company >>> ? >>> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >>> >>> >> > >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> >> > >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> >> > >>> >>> Search the list archives at: >>> http://markmail.org/search/?q=vtkusers >>> >>> >> > >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> >> > >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> >> > >>> >>> Search the list archives at: >>> http://markmail.org/search/?q=vtkusers >>> >>> >> > >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > >>> >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: >>> http://markmail.org/search/?q=vtkusers >>> >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers From elvis.stansvik at orexplore.com Mon Oct 16 07:12:11 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 16 Oct 2017 13:12:11 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs : > Dear Elvis, > > Thanks for the information. I have the files > -lvtkGUISupportQt-8.0 \ > -lvtkGUISupportQtSQL-8.0 \ > in the library list and the libary path is also given in the project file > loaded in QtCreator but the compiler cannot resolve the symbol > QVTKOpenGLWidget: > > Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" > C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug > cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 > -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX > -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB > -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 > -IC:\Qt\5.8\msvc2013\include -IC:\Qt\5.8\msvc2013\include\QtPrintSupport > -IC:\Qt\5.8\msvc2013\include\QtWidgets -IC:\Qt\5.8\msvc2013\include\QtGui > -IC:\Qt\5.8\msvc2013\include\QtANGLE -IC:\Qt\5.8\msvc2013\include\QtCore > -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ > @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom > > distortionpage.cpp > link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS > "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' > version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' > processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe > @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom I think in order to shorten the linker command line and not exceed command line length limits, qmake is using a "Linker Response File" (using @), so I think you have to look into C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom to see the full list of linker arguments. Would be interesting to see the contents of that file. Elvis > > distortionpage.obj : error LNK2019: unresolved external symbol > "__declspec(dllimport) public: __thiscall > QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags Qt::WindowType>)" > (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) > referenced in function "public: void __thiscall > Ui_DistortionPage::setupUi(class QWidget *)" > (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) > > > It seems that the compiler switches contain the include path for VTK but the > library path and the libraries for VTK are missing from the linker options. > I guess it must be a qmake issue. Thanks anyway. > > Regards, > Zoltan > > > > > Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >> >> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs : >>> >>> Dear Dan, >>> >>> In QtCreator I added a QWidget to the UI form and used "Promote to ..." >>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in the >>> header file of the application. However, when linking the source I get >>> the >>> error message >>> >>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>> "__declspec(dllimport) public: __thiscall >>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>> Qt::WindowType>)" >>> >>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>> referenced in function "public: void __thiscall >>> Ui_DistortionPage::setupUi(class QWidget *)" >>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>> >>> >>> It seems that the MSVC2013 linker cannot find the library of >>> QVTKOpenGLWidget. I searched a library file with a similar name in the >>> folder where CMake generated the VTK libraries with Qt support but I >>> could >>> not find it. I am just wondering if it is missing or some other library >>> file >>> with a completely different name contains this symbol. >> >> >> The class is part of the vtkGUISupportQt library (on Windows the files >> would be vtkGUISupportQt-8.0.lib/dll). >> >> We're using the "promote" functionality in Qt Creator's Design mode to >> promote a widget to our custom QVTKOpenGLWidget subclass. It should >> work fine to promote to it directly. >> >> Elvis >> >>> >>> Regards, >>> Zoltan >>> >>> >>> >>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>> >>>> >>>> In Qt Designer you should be able to use QVTKOpenGLWidget by adding >>>> first >>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you can >>>> build the UI of your Qt application this way. >>>> >>>> I am not sure what is needed for QtCreator. I don't use that. >>>> >>>> Hope this helps, >>>> Dan >>>> >>>> >>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>> > >>>> wrote: >>>> >>>> Dear Mike, >>>> >>>> Thank you very much for your prompt answer. As I wrote to Dan, we >>>> have to use QtCreator for the development here. Then I have access >>>> only for qmake and I can edit project files for it. If >>>> QVTKOpenGLWidget is the only VTK widget class supported for Qt5 >>>> then >>>> I ave to find out how to insert such an object into the UI form >>>> file >>>> of QT. >>>> >>>> Kind regards, >>>> Zoltan >>>> >>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>> >>>> Also, when working with VTK, it will be a lot easier to switch >>>> to using CMake instead of Qt project files (QtCreator supports >>>> CMake). Look at the examples Dan linked to. You will have to >>>> update the CMakelists.txt file for Qt. You will probably have >>>> to >>>> add the following: >>>> >>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>> >>>> and update the target_link_libraries line(add Qt5::Widget) , >>>> e.g.,: >>>> >>>> target_link_libraries(QtBarChart Qt5::Widgets ${VTK_LIBRARIES}) >>>> >>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>> >>>> >> >>>> wrote: >>>> >>>> Zoltan, >>>> This is unrelated to the error you are seeing however: >>>> >>>> For Qt5 you'll need to use QVTKOpenGLWidget rather than >>>> QVTKWidget. See >>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>> >>>> >>> > >>>> All examples are converted to Qt5. Also, VTK master has a >>>> number of >>>> examples that have been converted to Qt5: Examples/GUI/Qt >>>> >>>> Hope this helps, >>>> Dan >>>> >>>> >>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>> >>> >>>> >>> >>>> >> >>>> >>>> wrote: >>>> >>>> Dear all, >>>> >>>> In CMake I generated a solution project of VTK-8.0.1 >>>> with Qt5 >>>> support for MSVS2013. After having run the ALL_BUILD >>>> and INSTALL >>>> projects with the install prefix C:\VTK\8.0.1 in >>>> VM2013 >>>> I could >>>> installed the Win32 bit binaries of VTK 8.0.1 in that >>>> folder. >>>> The header files and the libraries are located in >>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>> C:\VTK\8.0.1\lib. >>>> >>>> I copied the file QVTKWidgetPlugin.dll from the VTK >>>> binary >>>> folders to the plugin folder of QTCreator, which uses >>>> QT 5.8 >>>> msvs2013 32 bit version. >>>> >>>> Then I set the include and library paths and added all >>>> the VTK >>>> libary files from C:\VTK\8.0.1\lib for the linker >>>> setting in the >>>> project file >>>> of a QT application in QtCreator: >>>> >>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>> LIBS += -LC:\VTK\8.0.1\lib >>>> >>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>> -lvtkRenderingLOD-8.0 \ >>>> -lvtkRenderingOpenGL2-8.0 \ >>>> -lvtkRenderingQt-8.0 \ >>>> -lvtkRenderingVolume-8.0 \ >>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>> -lvtksqlite-8.0 \ >>>> -lvtksys-8.0 \ >>>> -lvtkTestingGenericBridge-8.0 \ >>>> -lvtkTestingIOSQL-8.0 \ >>>> -lvtkTestingRendering-8.0 \ >>>> -lvtktiff-8.0 \ >>>> -lvtkverdict-8.0 \ >>>> -lvtkViewsContext2D-8.0 \ >>>> -lvtkViewsCore-8.0 \ >>>> -lvtkViewsInfovis-8.0 \ >>>> -lvtkViewsQt-8.0 \ >>>> -lvtkzlib-8.0 \ >>>> -lvtkalglib-8.0 \ >>>> -lvtkChartsCore-8.0 \ >>>> -lvtkCommonColor-8.0 \ >>>> -lvtkCommonComputationalGeometry-8.0 \ >>>> -lvtkCommonCore-8.0 \ >>>> -lvtkCommonDataModel-8.0 \ >>>> -lvtkCommonExecutionModel-8.0 \ >>>> -lvtkCommonMath-8.0 \ >>>> -lvtkCommonMisc-8.0 \ >>>> -lvtkCommonSystem-8.0 \ >>>> -lvtkCommonTransforms-8.0 \ >>>> -lvtkDICOMParser-8.0 \ >>>> -lvtkDomainsChemistry-8.0 \ >>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>> -lvtkexoIIc-8.0 \ >>>> -lvtkexpat-8.0 \ >>>> -lvtkFiltersAMR-8.0 \ >>>> -lvtkFiltersCore-8.0 \ >>>> -lvtkFiltersExtraction-8.0 \ >>>> -lvtkFiltersFlowPaths-8.0 \ >>>> -lvtkFiltersGeneral-8.0 \ >>>> -lvtkFiltersGeneric-8.0 \ >>>> -lvtkFiltersGeometry-8.0 \ >>>> -lvtkFiltersHybrid-8.0 \ >>>> -lvtkFiltersHyperTree-8.0 \ >>>> -lvtkFiltersImaging-8.0 \ >>>> -lvtkFiltersModeling-8.0 \ >>>> -lvtkFiltersParallel-8.0 \ >>>> -lvtkFiltersParallelImaging-8.0 \ >>>> -lvtkFiltersPoints-8.0 \ >>>> -lvtkFiltersProgrammable-8.0 \ >>>> -lvtkFiltersSelection-8.0 \ >>>> -lvtkFiltersSMP-8.0 \ >>>> -lvtkFiltersSources-8.0 \ >>>> -lvtkFiltersStatistics-8.0 \ >>>> -lvtkFiltersTexture-8.0 \ >>>> -lvtkFiltersTopology-8.0 \ >>>> -lvtkFiltersVerdict-8.0 \ >>>> -lvtkfreetype-8.0 \ >>>> -lvtkGeovisCore-8.0 \ >>>> -lvtkgl2ps-8.0 \ >>>> -lvtkglew-8.0 \ >>>> -lvtkGUISupportQt-8.0 \ >>>> -lvtkGUISupportQtSQL-8.0 \ >>>> -lvtkhdf5_hl-8.0 \ >>>> -lvtkhdf5-8.0 \ >>>> -lvtkImagingColor-8.0 \ >>>> -lvtkImagingCore-8.0 \ >>>> -lvtkImagingFourier-8.0 \ >>>> -lvtkImagingGeneral-8.0 \ >>>> -lvtkImagingHybrid-8.0 \ >>>> -lvtkImagingMath-8.0 \ >>>> -lvtkImagingMorphological-8.0 \ >>>> -lvtkImagingSources-8.0 \ >>>> -lvtkImagingStatistics-8.0 \ >>>> -lvtkImagingStencil-8.0 \ >>>> -lvtkInfovisCore-8.0 \ >>>> -lvtkInfovisLayout-8.0 \ >>>> -lvtkInteractionImage-8.0 \ >>>> -lvtkInteractionStyle-8.0 \ >>>> -lvtkInteractionWidgets-8.0 \ >>>> -lvtkIOAMR-8.0 \ >>>> -lvtkIOCore-8.0 \ >>>> -lvtkIOEnSight-8.0 \ >>>> -lvtkIOExodus-8.0 \ >>>> -lvtkIOExport-8.0 \ >>>> -lvtkIOExportOpenGL2-8.0 \ >>>> -lvtkIOGeometry-8.0 \ >>>> -lvtkIOImage-8.0 \ >>>> -lvtkIOImport-8.0 \ >>>> -lvtkIOInfovis-8.0 \ >>>> -lvtkIOLegacy-8.0 \ >>>> -lvtkIOLSDyna-8.0 \ >>>> -lvtkIOMINC-8.0 \ >>>> -lvtkIOMovie-8.0 \ >>>> -lvtkIONetCDF-8.0 \ >>>> -lvtkIOParallel-8.0 \ >>>> -lvtkIOParallelXML-8.0 \ >>>> -lvtkIOPLY-8.0 \ >>>> -lvtkIOSQL-8.0 \ >>>> -lvtkIOTecplotTable-8.0 \ >>>> -lvtkIOVideo-8.0 \ >>>> -lvtkIOXML-8.0 \ >>>> -lvtkIOXMLParser-8.0 \ >>>> -lvtkjpeg-8.0 \ >>>> -lvtkjsoncpp-8.0 \ >>>> -lvtklibharu-8.0 \ >>>> -lvtklibxml2-8.0 \ >>>> -lvtkLocalExample-8.0 \ >>>> -lvtklz4-8.0 \ >>>> -lvtkmetaio-8.0 \ >>>> -lvtknetcdf_c++ \ >>>> -lvtkNetCDF-8.0 \ >>>> -lvtkoggtheora-8.0 \ >>>> -lvtkParallelCore-8.0 \ >>>> -lvtkpng-8.0 \ >>>> -lvtkproj4-8.0 \ >>>> -lvtkRenderingAnnotation-8.0 \ >>>> -lvtkRenderingContext2D-8.0 \ >>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>> -lvtkRenderingCore-8.0 \ >>>> -lvtkRenderingFreeType-8.0 \ >>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>> -lvtkRenderingImage-8.0 \ >>>> >>>> >>>> However, if I add a QVTKWidget on the UI file of the >>>> application, include the file QVTKWidget.h in the >>>> header file of >>>> the application and I try to link it in QtCreator with >>>> the >>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>> toolchain >>>> of >>>> QtCreator) sends error messages for unresolved >>>> external >>>> symbols >>>> for all the functions/classes belonging to the >>>> QVTKWidget, such as >>>> >>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved >>>> external >>>> symbol "__declspec(dllimport) public: __thiscall >>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>> QFlags>>> Qt::WindowType>)" >>>> >>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>> referenced in function "public: void __thiscall >>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>> >>>> >>>> It seems that the linker could not find the libary for >>>> the >>>> QVTKWidget plugin, which is loaded since I could chose >>>> QtWidget >>>> from the widget list in the UI form editor in >>>> QtCreator. I do >>>> not see any ABI issue here since I use the 32 bit >>>> mscv2103 >>>> version of Qt and I also compiled and linked the 32 >>>> bit >>>> version >>>> of VTK libaries and plugin files with MSVS2013. I am >>>> wondering >>>> if anybody could make VTK-8.1 working with Qt. Thanks >>>> a >>>> lot. >>>> >>>> Kind regars, >>>> Zoltan >>>> >>>> Regards, >>>> Zoltan >>>> >>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>> >>> >: >>>> >>>> Hi Zoltan, >>>> >>>> I don't know how the widget should be installed or >>>> set up in >>>> a project, but you could just search for the >>>> header >>>> file and >>>> point INCLUDEPATH to the folder that contains it. >>>> >>>> Regards, >>>> Joni >>>> >>>> On 06 October 2017 at 18:26:00 EEST >>>> Zoltan.Kovacs at esi-group.com >>>> >>>> >>> >>>> > wrote: >>>> >>>> Hi Joni, >>>> >>>> I see. However I found MSCV2013 32 bit version >>>> for Qt >>>> 5.8. I install >>>> that version and I built the VTK binaries for >>>> win32 >>>> platform with >>>> MVS2013. After having copied the VTK plugin >>>> file into >>>> the plugin folder >>>> of QtCreator I could launch it successfully. >>>> The >>>> QVTKWidget is in the >>>> Widget list of QtCreator now. I could insert a >>>> QVTKWidget in the UI form >>>> as well. The only problem now is that >>>> QtCreator >>>> cannot >>>> find the header >>>> file for QVTKWidget. It is not cleat how to >>>> set >>>> the >>>> INCLUDEPATH in the >>>> project file since VS2103 did not create a >>>> separate >>>> include folder in >>>> the target folder C:/VTK/bin for the VTK >>>> binaries. Only >>>> the library >>>> files have a separate folder, >>>> C:/VTK/bin/lib/Release. >>>> >>>> Regards, >>>> Zoltan >>>> >>>> Am 06.10.2017 um 12:08 schrieb support at qt.io >>>> >>>> >: >>>> >>>> Hi Zoltan, >>>> >>>> On 06 October 2017 at 13:00:00 EEST >>>> Zoltan.Kovacs at esi-group.com >>>> >>>> >>> >>>> > wrote: >>>> >>>> Hi Joni, >>>> >>>> Thank you very much for your answer. >>>> Then I try >>>> to install everything >>>> from scratch. The only prolem is I >>>> have >>>> only >>>> MSVC 2103 and the only >>>> option in the selection list of the >>>> online >>>> installer for MSVC 2013 is >>>> the 64 bit version. Is there somewhere >>>> an >>>> installer on your website wich >>>> provides a relatively new Qt version >>>> with MSVC >>>> 2103 32 bit version? >>>> Thank you very much for your help. >>>> >>>> >>>> No, but you could compile it from source >>>> yourself. >>>> However, note that you cannot build >>>> plugins >>>> for new >>>> Qt Creator with MSVC 2013 as it uses >>>> different ABI. >>>> You could use MSVC 2015 or MSVC 2017. >>>> >>>> Or you could build 64bit version of Qt >>>> Creator from >>>> source with that Qt version you have >>>> installed. >>>> >>>> Regards, >>>> Joni >>>> -- >>>> Joni Poikelin >>>> Software Engineer, >>>> The Qt Company >>>> ? >>>> FAQs - >>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>> >>>> >>>> >>> > >>>> >>>> -- >>>> Joni Poikelin >>>> Software Engineer, >>>> The Qt Company >>>> ? >>>> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>> >>>> >>> > >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> >>> > >>>> >>>> Please keep messages on-topic and check the VTK FAQ >>>> at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> >>> > >>>> >>>> Search the list archives at: >>>> http://markmail.org/search/?q=vtkusers >>>> >>>> >>> > >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> > >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> >>> > >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> >>> > >>>> >>>> Search the list archives at: >>>> http://markmail.org/search/?q=vtkusers >>>> >>>> >>> > >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> > >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> >>>> Search the list archives at: >>>> http://markmail.org/search/?q=vtkusers >>>> >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers From elvis.stansvik at orexplore.com Mon Oct 16 09:10:48 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 16 Oct 2017 15:10:48 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: 2017-10-16 13:12 GMT+02:00 Elvis Stansvik : > 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs : >> Dear Elvis, >> >> Thanks for the information. I have the files >> -lvtkGUISupportQt-8.0 \ >> -lvtkGUISupportQtSQL-8.0 \ >> in the library list and the libary path is also given in the project file >> loaded in QtCreator but the compiler cannot resolve the symbol >> QVTKOpenGLWidget: >> >> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 >> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >> -IC:\Qt\5.8\msvc2013\include -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >> -IC:\Qt\5.8\msvc2013\include\QtWidgets -IC:\Qt\5.8\msvc2013\include\QtGui >> -IC:\Qt\5.8\msvc2013\include\QtANGLE -IC:\Qt\5.8\msvc2013\include\QtCore >> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >> >> distortionpage.cpp >> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS >> "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' >> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom > > I think in order to shorten the linker command line and not exceed > command line length limits, qmake is using a "Linker Response File" > (using @), so I think you have to look into > > C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom > > to see the full list of linker arguments. > > Would be interesting to see the contents of that file. I just realized that it's probably temporary and removed by the time the command finishes. But you can add /U to the jom options to have the contents printed when the linker runs. E.g. in Qt Creator, under Projects -> Build & Run -> Build -> Build Steps, add /U to the jom options in the make step. Then you should get the contents of the linker response file printed while building. Elvis > > Elvis > >> >> distortionpage.obj : error LNK2019: unresolved external symbol >> "__declspec(dllimport) public: __thiscall >> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags> Qt::WindowType>)" >> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >> referenced in function "public: void __thiscall >> Ui_DistortionPage::setupUi(class QWidget *)" >> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >> >> >> It seems that the compiler switches contain the include path for VTK but the >> library path and the libraries for VTK are missing from the linker options. >> I guess it must be a qmake issue. Thanks anyway. >> >> Regards, >> Zoltan >> >> >> >> >> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>> >>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs : >>>> >>>> Dear Dan, >>>> >>>> In QtCreator I added a QWidget to the UI form and used "Promote to ..." >>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in the >>>> header file of the application. However, when linking the source I get >>>> the >>>> error message >>>> >>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>>> "__declspec(dllimport) public: __thiscall >>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>> Qt::WindowType>)" >>>> >>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>> referenced in function "public: void __thiscall >>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>> >>>> >>>> It seems that the MSVC2013 linker cannot find the library of >>>> QVTKOpenGLWidget. I searched a library file with a similar name in the >>>> folder where CMake generated the VTK libraries with Qt support but I >>>> could >>>> not find it. I am just wondering if it is missing or some other library >>>> file >>>> with a completely different name contains this symbol. >>> >>> >>> The class is part of the vtkGUISupportQt library (on Windows the files >>> would be vtkGUISupportQt-8.0.lib/dll). >>> >>> We're using the "promote" functionality in Qt Creator's Design mode to >>> promote a widget to our custom QVTKOpenGLWidget subclass. It should >>> work fine to promote to it directly. >>> >>> Elvis >>> >>>> >>>> Regards, >>>> Zoltan >>>> >>>> >>>> >>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>> >>>>> >>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by adding >>>>> first >>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you can >>>>> build the UI of your Qt application this way. >>>>> >>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>> >>>>> Hope this helps, >>>>> Dan >>>>> >>>>> >>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>> > >>>>> wrote: >>>>> >>>>> Dear Mike, >>>>> >>>>> Thank you very much for your prompt answer. As I wrote to Dan, we >>>>> have to use QtCreator for the development here. Then I have access >>>>> only for qmake and I can edit project files for it. If >>>>> QVTKOpenGLWidget is the only VTK widget class supported for Qt5 >>>>> then >>>>> I ave to find out how to insert such an object into the UI form >>>>> file >>>>> of QT. >>>>> >>>>> Kind regards, >>>>> Zoltan >>>>> >>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>> >>>>> Also, when working with VTK, it will be a lot easier to switch >>>>> to using CMake instead of Qt project files (QtCreator supports >>>>> CMake). Look at the examples Dan linked to. You will have to >>>>> update the CMakelists.txt file for Qt. You will probably have >>>>> to >>>>> add the following: >>>>> >>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>> >>>>> and update the target_link_libraries line(add Qt5::Widget) , >>>>> e.g.,: >>>>> >>>>> target_link_libraries(QtBarChart Qt5::Widgets ${VTK_LIBRARIES}) >>>>> >>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>> >>>>> >> >>>>> wrote: >>>>> >>>>> Zoltan, >>>>> This is unrelated to the error you are seeing however: >>>>> >>>>> For Qt5 you'll need to use QVTKOpenGLWidget rather than >>>>> QVTKWidget. See >>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>> >>>>> >>>> > >>>>> All examples are converted to Qt5. Also, VTK master has a >>>>> number of >>>>> examples that have been converted to Qt5: Examples/GUI/Qt >>>>> >>>>> Hope this helps, >>>>> Dan >>>>> >>>>> >>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>>> >>>> >>>>> >>>> >>>>> >> >>>>> >>>>> wrote: >>>>> >>>>> Dear all, >>>>> >>>>> In CMake I generated a solution project of VTK-8.0.1 >>>>> with Qt5 >>>>> support for MSVS2013. After having run the ALL_BUILD >>>>> and INSTALL >>>>> projects with the install prefix C:\VTK\8.0.1 in >>>>> VM2013 >>>>> I could >>>>> installed the Win32 bit binaries of VTK 8.0.1 in that >>>>> folder. >>>>> The header files and the libraries are located in >>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>> C:\VTK\8.0.1\lib. >>>>> >>>>> I copied the file QVTKWidgetPlugin.dll from the VTK >>>>> binary >>>>> folders to the plugin folder of QTCreator, which uses >>>>> QT 5.8 >>>>> msvs2013 32 bit version. >>>>> >>>>> Then I set the include and library paths and added all >>>>> the VTK >>>>> libary files from C:\VTK\8.0.1\lib for the linker >>>>> setting in the >>>>> project file >>>>> of a QT application in QtCreator: >>>>> >>>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>> >>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>> -lvtkRenderingLOD-8.0 \ >>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>> -lvtkRenderingQt-8.0 \ >>>>> -lvtkRenderingVolume-8.0 \ >>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>> -lvtksqlite-8.0 \ >>>>> -lvtksys-8.0 \ >>>>> -lvtkTestingGenericBridge-8.0 \ >>>>> -lvtkTestingIOSQL-8.0 \ >>>>> -lvtkTestingRendering-8.0 \ >>>>> -lvtktiff-8.0 \ >>>>> -lvtkverdict-8.0 \ >>>>> -lvtkViewsContext2D-8.0 \ >>>>> -lvtkViewsCore-8.0 \ >>>>> -lvtkViewsInfovis-8.0 \ >>>>> -lvtkViewsQt-8.0 \ >>>>> -lvtkzlib-8.0 \ >>>>> -lvtkalglib-8.0 \ >>>>> -lvtkChartsCore-8.0 \ >>>>> -lvtkCommonColor-8.0 \ >>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>> -lvtkCommonCore-8.0 \ >>>>> -lvtkCommonDataModel-8.0 \ >>>>> -lvtkCommonExecutionModel-8.0 \ >>>>> -lvtkCommonMath-8.0 \ >>>>> -lvtkCommonMisc-8.0 \ >>>>> -lvtkCommonSystem-8.0 \ >>>>> -lvtkCommonTransforms-8.0 \ >>>>> -lvtkDICOMParser-8.0 \ >>>>> -lvtkDomainsChemistry-8.0 \ >>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>> -lvtkexoIIc-8.0 \ >>>>> -lvtkexpat-8.0 \ >>>>> -lvtkFiltersAMR-8.0 \ >>>>> -lvtkFiltersCore-8.0 \ >>>>> -lvtkFiltersExtraction-8.0 \ >>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>> -lvtkFiltersGeneral-8.0 \ >>>>> -lvtkFiltersGeneric-8.0 \ >>>>> -lvtkFiltersGeometry-8.0 \ >>>>> -lvtkFiltersHybrid-8.0 \ >>>>> -lvtkFiltersHyperTree-8.0 \ >>>>> -lvtkFiltersImaging-8.0 \ >>>>> -lvtkFiltersModeling-8.0 \ >>>>> -lvtkFiltersParallel-8.0 \ >>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>> -lvtkFiltersPoints-8.0 \ >>>>> -lvtkFiltersProgrammable-8.0 \ >>>>> -lvtkFiltersSelection-8.0 \ >>>>> -lvtkFiltersSMP-8.0 \ >>>>> -lvtkFiltersSources-8.0 \ >>>>> -lvtkFiltersStatistics-8.0 \ >>>>> -lvtkFiltersTexture-8.0 \ >>>>> -lvtkFiltersTopology-8.0 \ >>>>> -lvtkFiltersVerdict-8.0 \ >>>>> -lvtkfreetype-8.0 \ >>>>> -lvtkGeovisCore-8.0 \ >>>>> -lvtkgl2ps-8.0 \ >>>>> -lvtkglew-8.0 \ >>>>> -lvtkGUISupportQt-8.0 \ >>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>> -lvtkhdf5_hl-8.0 \ >>>>> -lvtkhdf5-8.0 \ >>>>> -lvtkImagingColor-8.0 \ >>>>> -lvtkImagingCore-8.0 \ >>>>> -lvtkImagingFourier-8.0 \ >>>>> -lvtkImagingGeneral-8.0 \ >>>>> -lvtkImagingHybrid-8.0 \ >>>>> -lvtkImagingMath-8.0 \ >>>>> -lvtkImagingMorphological-8.0 \ >>>>> -lvtkImagingSources-8.0 \ >>>>> -lvtkImagingStatistics-8.0 \ >>>>> -lvtkImagingStencil-8.0 \ >>>>> -lvtkInfovisCore-8.0 \ >>>>> -lvtkInfovisLayout-8.0 \ >>>>> -lvtkInteractionImage-8.0 \ >>>>> -lvtkInteractionStyle-8.0 \ >>>>> -lvtkInteractionWidgets-8.0 \ >>>>> -lvtkIOAMR-8.0 \ >>>>> -lvtkIOCore-8.0 \ >>>>> -lvtkIOEnSight-8.0 \ >>>>> -lvtkIOExodus-8.0 \ >>>>> -lvtkIOExport-8.0 \ >>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>> -lvtkIOGeometry-8.0 \ >>>>> -lvtkIOImage-8.0 \ >>>>> -lvtkIOImport-8.0 \ >>>>> -lvtkIOInfovis-8.0 \ >>>>> -lvtkIOLegacy-8.0 \ >>>>> -lvtkIOLSDyna-8.0 \ >>>>> -lvtkIOMINC-8.0 \ >>>>> -lvtkIOMovie-8.0 \ >>>>> -lvtkIONetCDF-8.0 \ >>>>> -lvtkIOParallel-8.0 \ >>>>> -lvtkIOParallelXML-8.0 \ >>>>> -lvtkIOPLY-8.0 \ >>>>> -lvtkIOSQL-8.0 \ >>>>> -lvtkIOTecplotTable-8.0 \ >>>>> -lvtkIOVideo-8.0 \ >>>>> -lvtkIOXML-8.0 \ >>>>> -lvtkIOXMLParser-8.0 \ >>>>> -lvtkjpeg-8.0 \ >>>>> -lvtkjsoncpp-8.0 \ >>>>> -lvtklibharu-8.0 \ >>>>> -lvtklibxml2-8.0 \ >>>>> -lvtkLocalExample-8.0 \ >>>>> -lvtklz4-8.0 \ >>>>> -lvtkmetaio-8.0 \ >>>>> -lvtknetcdf_c++ \ >>>>> -lvtkNetCDF-8.0 \ >>>>> -lvtkoggtheora-8.0 \ >>>>> -lvtkParallelCore-8.0 \ >>>>> -lvtkpng-8.0 \ >>>>> -lvtkproj4-8.0 \ >>>>> -lvtkRenderingAnnotation-8.0 \ >>>>> -lvtkRenderingContext2D-8.0 \ >>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>> -lvtkRenderingCore-8.0 \ >>>>> -lvtkRenderingFreeType-8.0 \ >>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>> -lvtkRenderingImage-8.0 \ >>>>> >>>>> >>>>> However, if I add a QVTKWidget on the UI file of the >>>>> application, include the file QVTKWidget.h in the >>>>> header file of >>>>> the application and I try to link it in QtCreator with >>>>> the >>>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>>> toolchain >>>>> of >>>>> QtCreator) sends error messages for unresolved >>>>> external >>>>> symbols >>>>> for all the functions/classes belonging to the >>>>> QVTKWidget, such as >>>>> >>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved >>>>> external >>>>> symbol "__declspec(dllimport) public: __thiscall >>>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>>> QFlags>>>> Qt::WindowType>)" >>>>> >>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>> referenced in function "public: void __thiscall >>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>> >>>>> >>>>> It seems that the linker could not find the libary for >>>>> the >>>>> QVTKWidget plugin, which is loaded since I could chose >>>>> QtWidget >>>>> from the widget list in the UI form editor in >>>>> QtCreator. I do >>>>> not see any ABI issue here since I use the 32 bit >>>>> mscv2103 >>>>> version of Qt and I also compiled and linked the 32 >>>>> bit >>>>> version >>>>> of VTK libaries and plugin files with MSVS2013. I am >>>>> wondering >>>>> if anybody could make VTK-8.1 working with Qt. Thanks >>>>> a >>>>> lot. >>>>> >>>>> Kind regars, >>>>> Zoltan >>>>> >>>>> Regards, >>>>> Zoltan >>>>> >>>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>>> >>>> >: >>>>> >>>>> Hi Zoltan, >>>>> >>>>> I don't know how the widget should be installed or >>>>> set up in >>>>> a project, but you could just search for the >>>>> header >>>>> file and >>>>> point INCLUDEPATH to the folder that contains it. >>>>> >>>>> Regards, >>>>> Joni >>>>> >>>>> On 06 October 2017 at 18:26:00 EEST >>>>> Zoltan.Kovacs at esi-group.com >>>>> >>>>> >>>> >>>>> > wrote: >>>>> >>>>> Hi Joni, >>>>> >>>>> I see. However I found MSCV2013 32 bit version >>>>> for Qt >>>>> 5.8. I install >>>>> that version and I built the VTK binaries for >>>>> win32 >>>>> platform with >>>>> MVS2013. After having copied the VTK plugin >>>>> file into >>>>> the plugin folder >>>>> of QtCreator I could launch it successfully. >>>>> The >>>>> QVTKWidget is in the >>>>> Widget list of QtCreator now. I could insert a >>>>> QVTKWidget in the UI form >>>>> as well. The only problem now is that >>>>> QtCreator >>>>> cannot >>>>> find the header >>>>> file for QVTKWidget. It is not cleat how to >>>>> set >>>>> the >>>>> INCLUDEPATH in the >>>>> project file since VS2103 did not create a >>>>> separate >>>>> include folder in >>>>> the target folder C:/VTK/bin for the VTK >>>>> binaries. Only >>>>> the library >>>>> files have a separate folder, >>>>> C:/VTK/bin/lib/Release. >>>>> >>>>> Regards, >>>>> Zoltan >>>>> >>>>> Am 06.10.2017 um 12:08 schrieb support at qt.io >>>>> >>>>> >: >>>>> >>>>> Hi Zoltan, >>>>> >>>>> On 06 October 2017 at 13:00:00 EEST >>>>> Zoltan.Kovacs at esi-group.com >>>>> >>>>> >>>> >>>>> > wrote: >>>>> >>>>> Hi Joni, >>>>> >>>>> Thank you very much for your answer. >>>>> Then I try >>>>> to install everything >>>>> from scratch. The only prolem is I >>>>> have >>>>> only >>>>> MSVC 2103 and the only >>>>> option in the selection list of the >>>>> online >>>>> installer for MSVC 2013 is >>>>> the 64 bit version. Is there somewhere >>>>> an >>>>> installer on your website wich >>>>> provides a relatively new Qt version >>>>> with MSVC >>>>> 2103 32 bit version? >>>>> Thank you very much for your help. >>>>> >>>>> >>>>> No, but you could compile it from source >>>>> yourself. >>>>> However, note that you cannot build >>>>> plugins >>>>> for new >>>>> Qt Creator with MSVC 2013 as it uses >>>>> different ABI. >>>>> You could use MSVC 2015 or MSVC 2017. >>>>> >>>>> Or you could build 64bit version of Qt >>>>> Creator from >>>>> source with that Qt version you have >>>>> installed. >>>>> >>>>> Regards, >>>>> Joni >>>>> -- >>>>> Joni Poikelin >>>>> Software Engineer, >>>>> The Qt Company >>>>> ? >>>>> FAQs - >>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>> >>>>> >>>>> >>>> > >>>>> >>>>> -- >>>>> Joni Poikelin >>>>> Software Engineer, >>>>> The Qt Company >>>>> ? >>>>> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>> >>>>> >>>> > >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> >>>> > >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ >>>>> at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> >>>> > >>>>> >>>>> Search the list archives at: >>>>> http://markmail.org/search/?q=vtkusers >>>>> >>>>> >>>> > >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> > >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> >>>> > >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> >>>> > >>>>> >>>>> Search the list archives at: >>>>> http://markmail.org/search/?q=vtkusers >>>>> >>>>> >>>> > >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> > >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> >>>>> Search the list archives at: >>>>> http://markmail.org/search/?q=vtkusers >>>>> >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers From Zoltan.Kovacs at esi-group.com Mon Oct 16 09:12:43 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 16 Oct 2017 15:12:43 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: Unfortunately I cannot find such a file in that folder. I also searched any *.jom file there but the linker might have deleted them. Zoltan Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: > 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs : >> Dear Elvis, >> >> Thanks for the information. I have the files >> -lvtkGUISupportQt-8.0 \ >> -lvtkGUISupportQtSQL-8.0 \ >> in the library list and the libary path is also given in the project file >> loaded in QtCreator but the compiler cannot resolve the symbol >> QVTKOpenGLWidget: >> >> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 >> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >> -IC:\Qt\5.8\msvc2013\include -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >> -IC:\Qt\5.8\msvc2013\include\QtWidgets -IC:\Qt\5.8\msvc2013\include\QtGui >> -IC:\Qt\5.8\msvc2013\include\QtANGLE -IC:\Qt\5.8\msvc2013\include\QtCore >> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >> >> distortionpage.cpp >> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS >> "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' >> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom > > I think in order to shorten the linker command line and not exceed > command line length limits, qmake is using a "Linker Response File" > (using @), so I think you have to look into > > C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom > > to see the full list of linker arguments. > > Would be interesting to see the contents of that file. > > Elvis > >> >> distortionpage.obj : error LNK2019: unresolved external symbol >> "__declspec(dllimport) public: __thiscall >> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags> Qt::WindowType>)" >> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >> referenced in function "public: void __thiscall >> Ui_DistortionPage::setupUi(class QWidget *)" >> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >> >> >> It seems that the compiler switches contain the include path for VTK but the >> library path and the libraries for VTK are missing from the linker options. >> I guess it must be a qmake issue. Thanks anyway. >> >> Regards, >> Zoltan >> >> >> >> >> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>> >>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs : >>>> >>>> Dear Dan, >>>> >>>> In QtCreator I added a QWidget to the UI form and used "Promote to ..." >>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in the >>>> header file of the application. However, when linking the source I get >>>> the >>>> error message >>>> >>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>>> "__declspec(dllimport) public: __thiscall >>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>> Qt::WindowType>)" >>>> >>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>> referenced in function "public: void __thiscall >>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>> >>>> >>>> It seems that the MSVC2013 linker cannot find the library of >>>> QVTKOpenGLWidget. I searched a library file with a similar name in the >>>> folder where CMake generated the VTK libraries with Qt support but I >>>> could >>>> not find it. I am just wondering if it is missing or some other library >>>> file >>>> with a completely different name contains this symbol. >>> >>> >>> The class is part of the vtkGUISupportQt library (on Windows the files >>> would be vtkGUISupportQt-8.0.lib/dll). >>> >>> We're using the "promote" functionality in Qt Creator's Design mode to >>> promote a widget to our custom QVTKOpenGLWidget subclass. It should >>> work fine to promote to it directly. >>> >>> Elvis >>> >>>> >>>> Regards, >>>> Zoltan >>>> >>>> >>>> >>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>> >>>>> >>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by adding >>>>> first >>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you can >>>>> build the UI of your Qt application this way. >>>>> >>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>> >>>>> Hope this helps, >>>>> Dan >>>>> >>>>> >>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>> > >>>>> wrote: >>>>> >>>>> Dear Mike, >>>>> >>>>> Thank you very much for your prompt answer. As I wrote to Dan, we >>>>> have to use QtCreator for the development here. Then I have access >>>>> only for qmake and I can edit project files for it. If >>>>> QVTKOpenGLWidget is the only VTK widget class supported for Qt5 >>>>> then >>>>> I ave to find out how to insert such an object into the UI form >>>>> file >>>>> of QT. >>>>> >>>>> Kind regards, >>>>> Zoltan >>>>> >>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>> >>>>> Also, when working with VTK, it will be a lot easier to switch >>>>> to using CMake instead of Qt project files (QtCreator supports >>>>> CMake). Look at the examples Dan linked to. You will have to >>>>> update the CMakelists.txt file for Qt. You will probably have >>>>> to >>>>> add the following: >>>>> >>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>> >>>>> and update the target_link_libraries line(add Qt5::Widget) , >>>>> e.g.,: >>>>> >>>>> target_link_libraries(QtBarChart Qt5::Widgets ${VTK_LIBRARIES}) >>>>> >>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>> >>>>> >> >>>>> wrote: >>>>> >>>>> Zoltan, >>>>> This is unrelated to the error you are seeing however: >>>>> >>>>> For Qt5 you'll need to use QVTKOpenGLWidget rather than >>>>> QVTKWidget. See >>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>> >>>>> >>>> > >>>>> All examples are converted to Qt5. Also, VTK master has a >>>>> number of >>>>> examples that have been converted to Qt5: Examples/GUI/Qt >>>>> >>>>> Hope this helps, >>>>> Dan >>>>> >>>>> >>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>>> >>>> >>>>> >>>> >>>>> >> >>>>> >>>>> wrote: >>>>> >>>>> Dear all, >>>>> >>>>> In CMake I generated a solution project of VTK-8.0.1 >>>>> with Qt5 >>>>> support for MSVS2013. After having run the ALL_BUILD >>>>> and INSTALL >>>>> projects with the install prefix C:\VTK\8.0.1 in >>>>> VM2013 >>>>> I could >>>>> installed the Win32 bit binaries of VTK 8.0.1 in that >>>>> folder. >>>>> The header files and the libraries are located in >>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>> C:\VTK\8.0.1\lib. >>>>> >>>>> I copied the file QVTKWidgetPlugin.dll from the VTK >>>>> binary >>>>> folders to the plugin folder of QTCreator, which uses >>>>> QT 5.8 >>>>> msvs2013 32 bit version. >>>>> >>>>> Then I set the include and library paths and added all >>>>> the VTK >>>>> libary files from C:\VTK\8.0.1\lib for the linker >>>>> setting in the >>>>> project file >>>>> of a QT application in QtCreator: >>>>> >>>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>> >>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>> -lvtkRenderingLOD-8.0 \ >>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>> -lvtkRenderingQt-8.0 \ >>>>> -lvtkRenderingVolume-8.0 \ >>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>> -lvtksqlite-8.0 \ >>>>> -lvtksys-8.0 \ >>>>> -lvtkTestingGenericBridge-8.0 \ >>>>> -lvtkTestingIOSQL-8.0 \ >>>>> -lvtkTestingRendering-8.0 \ >>>>> -lvtktiff-8.0 \ >>>>> -lvtkverdict-8.0 \ >>>>> -lvtkViewsContext2D-8.0 \ >>>>> -lvtkViewsCore-8.0 \ >>>>> -lvtkViewsInfovis-8.0 \ >>>>> -lvtkViewsQt-8.0 \ >>>>> -lvtkzlib-8.0 \ >>>>> -lvtkalglib-8.0 \ >>>>> -lvtkChartsCore-8.0 \ >>>>> -lvtkCommonColor-8.0 \ >>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>> -lvtkCommonCore-8.0 \ >>>>> -lvtkCommonDataModel-8.0 \ >>>>> -lvtkCommonExecutionModel-8.0 \ >>>>> -lvtkCommonMath-8.0 \ >>>>> -lvtkCommonMisc-8.0 \ >>>>> -lvtkCommonSystem-8.0 \ >>>>> -lvtkCommonTransforms-8.0 \ >>>>> -lvtkDICOMParser-8.0 \ >>>>> -lvtkDomainsChemistry-8.0 \ >>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>> -lvtkexoIIc-8.0 \ >>>>> -lvtkexpat-8.0 \ >>>>> -lvtkFiltersAMR-8.0 \ >>>>> -lvtkFiltersCore-8.0 \ >>>>> -lvtkFiltersExtraction-8.0 \ >>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>> -lvtkFiltersGeneral-8.0 \ >>>>> -lvtkFiltersGeneric-8.0 \ >>>>> -lvtkFiltersGeometry-8.0 \ >>>>> -lvtkFiltersHybrid-8.0 \ >>>>> -lvtkFiltersHyperTree-8.0 \ >>>>> -lvtkFiltersImaging-8.0 \ >>>>> -lvtkFiltersModeling-8.0 \ >>>>> -lvtkFiltersParallel-8.0 \ >>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>> -lvtkFiltersPoints-8.0 \ >>>>> -lvtkFiltersProgrammable-8.0 \ >>>>> -lvtkFiltersSelection-8.0 \ >>>>> -lvtkFiltersSMP-8.0 \ >>>>> -lvtkFiltersSources-8.0 \ >>>>> -lvtkFiltersStatistics-8.0 \ >>>>> -lvtkFiltersTexture-8.0 \ >>>>> -lvtkFiltersTopology-8.0 \ >>>>> -lvtkFiltersVerdict-8.0 \ >>>>> -lvtkfreetype-8.0 \ >>>>> -lvtkGeovisCore-8.0 \ >>>>> -lvtkgl2ps-8.0 \ >>>>> -lvtkglew-8.0 \ >>>>> -lvtkGUISupportQt-8.0 \ >>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>> -lvtkhdf5_hl-8.0 \ >>>>> -lvtkhdf5-8.0 \ >>>>> -lvtkImagingColor-8.0 \ >>>>> -lvtkImagingCore-8.0 \ >>>>> -lvtkImagingFourier-8.0 \ >>>>> -lvtkImagingGeneral-8.0 \ >>>>> -lvtkImagingHybrid-8.0 \ >>>>> -lvtkImagingMath-8.0 \ >>>>> -lvtkImagingMorphological-8.0 \ >>>>> -lvtkImagingSources-8.0 \ >>>>> -lvtkImagingStatistics-8.0 \ >>>>> -lvtkImagingStencil-8.0 \ >>>>> -lvtkInfovisCore-8.0 \ >>>>> -lvtkInfovisLayout-8.0 \ >>>>> -lvtkInteractionImage-8.0 \ >>>>> -lvtkInteractionStyle-8.0 \ >>>>> -lvtkInteractionWidgets-8.0 \ >>>>> -lvtkIOAMR-8.0 \ >>>>> -lvtkIOCore-8.0 \ >>>>> -lvtkIOEnSight-8.0 \ >>>>> -lvtkIOExodus-8.0 \ >>>>> -lvtkIOExport-8.0 \ >>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>> -lvtkIOGeometry-8.0 \ >>>>> -lvtkIOImage-8.0 \ >>>>> -lvtkIOImport-8.0 \ >>>>> -lvtkIOInfovis-8.0 \ >>>>> -lvtkIOLegacy-8.0 \ >>>>> -lvtkIOLSDyna-8.0 \ >>>>> -lvtkIOMINC-8.0 \ >>>>> -lvtkIOMovie-8.0 \ >>>>> -lvtkIONetCDF-8.0 \ >>>>> -lvtkIOParallel-8.0 \ >>>>> -lvtkIOParallelXML-8.0 \ >>>>> -lvtkIOPLY-8.0 \ >>>>> -lvtkIOSQL-8.0 \ >>>>> -lvtkIOTecplotTable-8.0 \ >>>>> -lvtkIOVideo-8.0 \ >>>>> -lvtkIOXML-8.0 \ >>>>> -lvtkIOXMLParser-8.0 \ >>>>> -lvtkjpeg-8.0 \ >>>>> -lvtkjsoncpp-8.0 \ >>>>> -lvtklibharu-8.0 \ >>>>> -lvtklibxml2-8.0 \ >>>>> -lvtkLocalExample-8.0 \ >>>>> -lvtklz4-8.0 \ >>>>> -lvtkmetaio-8.0 \ >>>>> -lvtknetcdf_c++ \ >>>>> -lvtkNetCDF-8.0 \ >>>>> -lvtkoggtheora-8.0 \ >>>>> -lvtkParallelCore-8.0 \ >>>>> -lvtkpng-8.0 \ >>>>> -lvtkproj4-8.0 \ >>>>> -lvtkRenderingAnnotation-8.0 \ >>>>> -lvtkRenderingContext2D-8.0 \ >>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>> -lvtkRenderingCore-8.0 \ >>>>> -lvtkRenderingFreeType-8.0 \ >>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>> -lvtkRenderingImage-8.0 \ >>>>> >>>>> >>>>> However, if I add a QVTKWidget on the UI file of the >>>>> application, include the file QVTKWidget.h in the >>>>> header file of >>>>> the application and I try to link it in QtCreator with >>>>> the >>>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>>> toolchain >>>>> of >>>>> QtCreator) sends error messages for unresolved >>>>> external >>>>> symbols >>>>> for all the functions/classes belonging to the >>>>> QVTKWidget, such as >>>>> >>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved >>>>> external >>>>> symbol "__declspec(dllimport) public: __thiscall >>>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>>> QFlags>>>> Qt::WindowType>)" >>>>> >>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>> referenced in function "public: void __thiscall >>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>> >>>>> >>>>> It seems that the linker could not find the libary for >>>>> the >>>>> QVTKWidget plugin, which is loaded since I could chose >>>>> QtWidget >>>>> from the widget list in the UI form editor in >>>>> QtCreator. I do >>>>> not see any ABI issue here since I use the 32 bit >>>>> mscv2103 >>>>> version of Qt and I also compiled and linked the 32 >>>>> bit >>>>> version >>>>> of VTK libaries and plugin files with MSVS2013. I am >>>>> wondering >>>>> if anybody could make VTK-8.1 working with Qt. Thanks >>>>> a >>>>> lot. >>>>> >>>>> Kind regars, >>>>> Zoltan >>>>> >>>>> Regards, >>>>> Zoltan >>>>> >>>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>>> >>>> >: >>>>> >>>>> Hi Zoltan, >>>>> >>>>> I don't know how the widget should be installed or >>>>> set up in >>>>> a project, but you could just search for the >>>>> header >>>>> file and >>>>> point INCLUDEPATH to the folder that contains it. >>>>> >>>>> Regards, >>>>> Joni >>>>> >>>>> On 06 October 2017 at 18:26:00 EEST >>>>> Zoltan.Kovacs at esi-group.com >>>>> >>>>> >>>> >>>>> > wrote: >>>>> >>>>> Hi Joni, >>>>> >>>>> I see. However I found MSCV2013 32 bit version >>>>> for Qt >>>>> 5.8. I install >>>>> that version and I built the VTK binaries for >>>>> win32 >>>>> platform with >>>>> MVS2013. After having copied the VTK plugin >>>>> file into >>>>> the plugin folder >>>>> of QtCreator I could launch it successfully. >>>>> The >>>>> QVTKWidget is in the >>>>> Widget list of QtCreator now. I could insert a >>>>> QVTKWidget in the UI form >>>>> as well. The only problem now is that >>>>> QtCreator >>>>> cannot >>>>> find the header >>>>> file for QVTKWidget. It is not cleat how to >>>>> set >>>>> the >>>>> INCLUDEPATH in the >>>>> project file since VS2103 did not create a >>>>> separate >>>>> include folder in >>>>> the target folder C:/VTK/bin for the VTK >>>>> binaries. Only >>>>> the library >>>>> files have a separate folder, >>>>> C:/VTK/bin/lib/Release. >>>>> >>>>> Regards, >>>>> Zoltan >>>>> >>>>> Am 06.10.2017 um 12:08 schrieb support at qt.io >>>>> >>>>> >: >>>>> >>>>> Hi Zoltan, >>>>> >>>>> On 06 October 2017 at 13:00:00 EEST >>>>> Zoltan.Kovacs at esi-group.com >>>>> >>>>> >>>> >>>>> > wrote: >>>>> >>>>> Hi Joni, >>>>> >>>>> Thank you very much for your answer. >>>>> Then I try >>>>> to install everything >>>>> from scratch. The only prolem is I >>>>> have >>>>> only >>>>> MSVC 2103 and the only >>>>> option in the selection list of the >>>>> online >>>>> installer for MSVC 2013 is >>>>> the 64 bit version. Is there somewhere >>>>> an >>>>> installer on your website wich >>>>> provides a relatively new Qt version >>>>> with MSVC >>>>> 2103 32 bit version? >>>>> Thank you very much for your help. >>>>> >>>>> >>>>> No, but you could compile it from source >>>>> yourself. >>>>> However, note that you cannot build >>>>> plugins >>>>> for new >>>>> Qt Creator with MSVC 2013 as it uses >>>>> different ABI. >>>>> You could use MSVC 2015 or MSVC 2017. >>>>> >>>>> Or you could build 64bit version of Qt >>>>> Creator from >>>>> source with that Qt version you have >>>>> installed. >>>>> >>>>> Regards, >>>>> Joni >>>>> -- >>>>> Joni Poikelin >>>>> Software Engineer, >>>>> The Qt Company >>>>> ? >>>>> FAQs - >>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>> >>>>> >>>>> >>>> > >>>>> >>>>> -- >>>>> Joni Poikelin >>>>> Software Engineer, >>>>> The Qt Company >>>>> ? >>>>> FAQs - https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>> >>>>> >>>> > >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> >>>> > >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ >>>>> at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> >>>> > >>>>> >>>>> Search the list archives at: >>>>> http://markmail.org/search/?q=vtkusers >>>>> >>>>> >>>> > >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> > >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> >>>> > >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> >>>> > >>>>> >>>>> Search the list archives at: >>>>> http://markmail.org/search/?q=vtkusers >>>>> >>>>> >>>> > >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> > >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> >>>>> Search the list archives at: >>>>> http://markmail.org/search/?q=vtkusers >>>>> >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers > From elvis.stansvik at orexplore.com Mon Oct 16 09:14:12 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 16 Oct 2017 15:14:12 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs : > Unfortunately I cannot find such a file in that folder. I also searched any > *.jom file there but the linker might have deleted them. Yes sorry, I just realized that. See my earlier mail about the /U jom flag. Elvis > > Zoltan > > > Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >> >> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs : >>> >>> Dear Elvis, >>> >>> Thanks for the information. I have the files >>> -lvtkGUISupportQt-8.0 \ >>> -lvtkGUISupportQtSQL-8.0 \ >>> in the library list and the libary path is also given in the project file >>> loaded in QtCreator but the compiler cannot resolve the symbol >>> QVTKOpenGLWidget: >>> >>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 >>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>> -IC:\Qt\5.8\msvc2013\include -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>> -IC:\Qt\5.8\msvc2013\include\QtWidgets -IC:\Qt\5.8\msvc2013\include\QtGui >>> -IC:\Qt\5.8\msvc2013\include\QtANGLE -IC:\Qt\5.8\msvc2013\include\QtCore >>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>> >>> distortionpage.cpp >>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS >>> "/MANIFESTDEPENDENCY:type='win32' >>> name='Microsoft.Windows.Common-Controls' >>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >> >> >> I think in order to shorten the linker command line and not exceed >> command line length limits, qmake is using a "Linker Response File" >> (using @), so I think you have to look into >> >> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >> >> to see the full list of linker arguments. >> >> Would be interesting to see the contents of that file. >> >> Elvis >> >>> >>> distortionpage.obj : error LNK2019: unresolved external symbol >>> "__declspec(dllimport) public: __thiscall >>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>> Qt::WindowType>)" >>> >>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>> referenced in function "public: void __thiscall >>> Ui_DistortionPage::setupUi(class QWidget *)" >>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>> >>> >>> It seems that the compiler switches contain the include path for VTK but >>> the >>> library path and the libraries for VTK are missing from the linker >>> options. >>> I guess it must be a qmake issue. Thanks anyway. >>> >>> Regards, >>> Zoltan >>> >>> >>> >>> >>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>> >>>> >>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs : >>>>> >>>>> >>>>> Dear Dan, >>>>> >>>>> In QtCreator I added a QWidget to the UI form and used "Promote to ..." >>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in >>>>> the >>>>> header file of the application. However, when linking the source I get >>>>> the >>>>> error message >>>>> >>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>>>> "__declspec(dllimport) public: __thiscall >>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>> Qt::WindowType>)" >>>>> >>>>> >>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>> referenced in function "public: void __thiscall >>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>> >>>>> >>>>> It seems that the MSVC2013 linker cannot find the library of >>>>> QVTKOpenGLWidget. I searched a library file with a similar name in the >>>>> folder where CMake generated the VTK libraries with Qt support but I >>>>> could >>>>> not find it. I am just wondering if it is missing or some other library >>>>> file >>>>> with a completely different name contains this symbol. >>>> >>>> >>>> >>>> The class is part of the vtkGUISupportQt library (on Windows the files >>>> would be vtkGUISupportQt-8.0.lib/dll). >>>> >>>> We're using the "promote" functionality in Qt Creator's Design mode to >>>> promote a widget to our custom QVTKOpenGLWidget subclass. It should >>>> work fine to promote to it directly. >>>> >>>> Elvis >>>> >>>>> >>>>> Regards, >>>>> Zoltan >>>>> >>>>> >>>>> >>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>> >>>>>> >>>>>> >>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by adding >>>>>> first >>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you >>>>>> can >>>>>> build the UI of your Qt application this way. >>>>>> >>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>> >>>>>> Hope this helps, >>>>>> Dan >>>>>> >>>>>> >>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>> > >>>>>> wrote: >>>>>> >>>>>> Dear Mike, >>>>>> >>>>>> Thank you very much for your prompt answer. As I wrote to Dan, >>>>>> we >>>>>> have to use QtCreator for the development here. Then I have >>>>>> access >>>>>> only for qmake and I can edit project files for it. If >>>>>> QVTKOpenGLWidget is the only VTK widget class supported for Qt5 >>>>>> then >>>>>> I ave to find out how to insert such an object into the UI form >>>>>> file >>>>>> of QT. >>>>>> >>>>>> Kind regards, >>>>>> Zoltan >>>>>> >>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>> >>>>>> Also, when working with VTK, it will be a lot easier to >>>>>> switch >>>>>> to using CMake instead of Qt project files (QtCreator >>>>>> supports >>>>>> CMake). Look at the examples Dan linked to. You will have to >>>>>> update the CMakelists.txt file for Qt. You will probably >>>>>> have >>>>>> to >>>>>> add the following: >>>>>> >>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>> >>>>>> and update the target_link_libraries line(add Qt5::Widget) , >>>>>> e.g.,: >>>>>> >>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>> ${VTK_LIBRARIES}) >>>>>> >>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>> >>>>>> >>>>> >> >>>>>> wrote: >>>>>> >>>>>> Zoltan, >>>>>> This is unrelated to the error you are seeing however: >>>>>> >>>>>> For Qt5 you'll need to use QVTKOpenGLWidget rather than >>>>>> QVTKWidget. See >>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>> >>>>>> >>>>> > >>>>>> All examples are converted to Qt5. Also, VTK master has >>>>>> a >>>>>> number of >>>>>> examples that have been converted to Qt5: >>>>>> Examples/GUI/Qt >>>>>> >>>>>> Hope this helps, >>>>>> Dan >>>>>> >>>>>> >>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>>>> >>>>> >>>>>> >>>>> >>>>>> >> >>>>>> >>>>>> wrote: >>>>>> >>>>>> Dear all, >>>>>> >>>>>> In CMake I generated a solution project of >>>>>> VTK-8.0.1 >>>>>> with Qt5 >>>>>> support for MSVS2013. After having run the >>>>>> ALL_BUILD >>>>>> and INSTALL >>>>>> projects with the install prefix C:\VTK\8.0.1 in >>>>>> VM2013 >>>>>> I could >>>>>> installed the Win32 bit binaries of VTK 8.0.1 in >>>>>> that >>>>>> folder. >>>>>> The header files and the libraries are located in >>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>> C:\VTK\8.0.1\lib. >>>>>> >>>>>> I copied the file QVTKWidgetPlugin.dll from the VTK >>>>>> binary >>>>>> folders to the plugin folder of QTCreator, which >>>>>> uses >>>>>> QT 5.8 >>>>>> msvs2013 32 bit version. >>>>>> >>>>>> Then I set the include and library paths and added >>>>>> all >>>>>> the VTK >>>>>> libary files from C:\VTK\8.0.1\lib for the linker >>>>>> setting in the >>>>>> project file >>>>>> of a QT application in QtCreator: >>>>>> >>>>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>> >>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>> -lvtkRenderingLOD-8.0 \ >>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>> -lvtkRenderingQt-8.0 \ >>>>>> -lvtkRenderingVolume-8.0 \ >>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>> -lvtksqlite-8.0 \ >>>>>> -lvtksys-8.0 \ >>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>> -lvtkTestingRendering-8.0 \ >>>>>> -lvtktiff-8.0 \ >>>>>> -lvtkverdict-8.0 \ >>>>>> -lvtkViewsContext2D-8.0 \ >>>>>> -lvtkViewsCore-8.0 \ >>>>>> -lvtkViewsInfovis-8.0 \ >>>>>> -lvtkViewsQt-8.0 \ >>>>>> -lvtkzlib-8.0 \ >>>>>> -lvtkalglib-8.0 \ >>>>>> -lvtkChartsCore-8.0 \ >>>>>> -lvtkCommonColor-8.0 \ >>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>> -lvtkCommonCore-8.0 \ >>>>>> -lvtkCommonDataModel-8.0 \ >>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>> -lvtkCommonMath-8.0 \ >>>>>> -lvtkCommonMisc-8.0 \ >>>>>> -lvtkCommonSystem-8.0 \ >>>>>> -lvtkCommonTransforms-8.0 \ >>>>>> -lvtkDICOMParser-8.0 \ >>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>> -lvtkexoIIc-8.0 \ >>>>>> -lvtkexpat-8.0 \ >>>>>> -lvtkFiltersAMR-8.0 \ >>>>>> -lvtkFiltersCore-8.0 \ >>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>> -lvtkFiltersImaging-8.0 \ >>>>>> -lvtkFiltersModeling-8.0 \ >>>>>> -lvtkFiltersParallel-8.0 \ >>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>> -lvtkFiltersPoints-8.0 \ >>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>> -lvtkFiltersSelection-8.0 \ >>>>>> -lvtkFiltersSMP-8.0 \ >>>>>> -lvtkFiltersSources-8.0 \ >>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>> -lvtkFiltersTexture-8.0 \ >>>>>> -lvtkFiltersTopology-8.0 \ >>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>> -lvtkfreetype-8.0 \ >>>>>> -lvtkGeovisCore-8.0 \ >>>>>> -lvtkgl2ps-8.0 \ >>>>>> -lvtkglew-8.0 \ >>>>>> -lvtkGUISupportQt-8.0 \ >>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>> -lvtkhdf5_hl-8.0 \ >>>>>> -lvtkhdf5-8.0 \ >>>>>> -lvtkImagingColor-8.0 \ >>>>>> -lvtkImagingCore-8.0 \ >>>>>> -lvtkImagingFourier-8.0 \ >>>>>> -lvtkImagingGeneral-8.0 \ >>>>>> -lvtkImagingHybrid-8.0 \ >>>>>> -lvtkImagingMath-8.0 \ >>>>>> -lvtkImagingMorphological-8.0 \ >>>>>> -lvtkImagingSources-8.0 \ >>>>>> -lvtkImagingStatistics-8.0 \ >>>>>> -lvtkImagingStencil-8.0 \ >>>>>> -lvtkInfovisCore-8.0 \ >>>>>> -lvtkInfovisLayout-8.0 \ >>>>>> -lvtkInteractionImage-8.0 \ >>>>>> -lvtkInteractionStyle-8.0 \ >>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>> -lvtkIOAMR-8.0 \ >>>>>> -lvtkIOCore-8.0 \ >>>>>> -lvtkIOEnSight-8.0 \ >>>>>> -lvtkIOExodus-8.0 \ >>>>>> -lvtkIOExport-8.0 \ >>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>> -lvtkIOGeometry-8.0 \ >>>>>> -lvtkIOImage-8.0 \ >>>>>> -lvtkIOImport-8.0 \ >>>>>> -lvtkIOInfovis-8.0 \ >>>>>> -lvtkIOLegacy-8.0 \ >>>>>> -lvtkIOLSDyna-8.0 \ >>>>>> -lvtkIOMINC-8.0 \ >>>>>> -lvtkIOMovie-8.0 \ >>>>>> -lvtkIONetCDF-8.0 \ >>>>>> -lvtkIOParallel-8.0 \ >>>>>> -lvtkIOParallelXML-8.0 \ >>>>>> -lvtkIOPLY-8.0 \ >>>>>> -lvtkIOSQL-8.0 \ >>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>> -lvtkIOVideo-8.0 \ >>>>>> -lvtkIOXML-8.0 \ >>>>>> -lvtkIOXMLParser-8.0 \ >>>>>> -lvtkjpeg-8.0 \ >>>>>> -lvtkjsoncpp-8.0 \ >>>>>> -lvtklibharu-8.0 \ >>>>>> -lvtklibxml2-8.0 \ >>>>>> -lvtkLocalExample-8.0 \ >>>>>> -lvtklz4-8.0 \ >>>>>> -lvtkmetaio-8.0 \ >>>>>> -lvtknetcdf_c++ \ >>>>>> -lvtkNetCDF-8.0 \ >>>>>> -lvtkoggtheora-8.0 \ >>>>>> -lvtkParallelCore-8.0 \ >>>>>> -lvtkpng-8.0 \ >>>>>> -lvtkproj4-8.0 \ >>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>> -lvtkRenderingCore-8.0 \ >>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>> -lvtkRenderingImage-8.0 \ >>>>>> >>>>>> >>>>>> However, if I add a QVTKWidget on the UI file of >>>>>> the >>>>>> application, include the file QVTKWidget.h in the >>>>>> header file of >>>>>> the application and I try to link it in QtCreator >>>>>> with >>>>>> the >>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>>>> toolchain >>>>>> of >>>>>> QtCreator) sends error messages for unresolved >>>>>> external >>>>>> symbols >>>>>> for all the functions/classes belonging to the >>>>>> QVTKWidget, such as >>>>>> >>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved >>>>>> external >>>>>> symbol "__declspec(dllimport) public: __thiscall >>>>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>>>> QFlags>>>>> Qt::WindowType>)" >>>>>> >>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>> referenced in function "public: void __thiscall >>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>> >>>>>> >>>>>> It seems that the linker could not find the libary >>>>>> for >>>>>> the >>>>>> QVTKWidget plugin, which is loaded since I could >>>>>> chose >>>>>> QtWidget >>>>>> from the widget list in the UI form editor in >>>>>> QtCreator. I do >>>>>> not see any ABI issue here since I use the 32 bit >>>>>> mscv2103 >>>>>> version of Qt and I also compiled and linked the 32 >>>>>> bit >>>>>> version >>>>>> of VTK libaries and plugin files with MSVS2013. I >>>>>> am >>>>>> wondering >>>>>> if anybody could make VTK-8.1 working with Qt. >>>>>> Thanks >>>>>> a >>>>>> lot. >>>>>> >>>>>> Kind regars, >>>>>> Zoltan >>>>>> >>>>>> Regards, >>>>>> Zoltan >>>>>> >>>>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>>>> >>>>> >: >>>>>> >>>>>> Hi Zoltan, >>>>>> >>>>>> I don't know how the widget should be installed >>>>>> or >>>>>> set up in >>>>>> a project, but you could just search for the >>>>>> header >>>>>> file and >>>>>> point INCLUDEPATH to the folder that contains >>>>>> it. >>>>>> >>>>>> Regards, >>>>>> Joni >>>>>> >>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>> Zoltan.Kovacs at esi-group.com >>>>>> >>>>>> >>>>> >>>>>> > wrote: >>>>>> >>>>>> Hi Joni, >>>>>> >>>>>> I see. However I found MSCV2013 32 bit >>>>>> version >>>>>> for Qt >>>>>> 5.8. I install >>>>>> that version and I built the VTK binaries >>>>>> for >>>>>> win32 >>>>>> platform with >>>>>> MVS2013. After having copied the VTK plugin >>>>>> file into >>>>>> the plugin folder >>>>>> of QtCreator I could launch it >>>>>> successfully. >>>>>> The >>>>>> QVTKWidget is in the >>>>>> Widget list of QtCreator now. I could >>>>>> insert a >>>>>> QVTKWidget in the UI form >>>>>> as well. The only problem now is that >>>>>> QtCreator >>>>>> cannot >>>>>> find the header >>>>>> file for QVTKWidget. It is not cleat how to >>>>>> set >>>>>> the >>>>>> INCLUDEPATH in the >>>>>> project file since VS2103 did not create a >>>>>> separate >>>>>> include folder in >>>>>> the target folder C:/VTK/bin for the VTK >>>>>> binaries. Only >>>>>> the library >>>>>> files have a separate folder, >>>>>> C:/VTK/bin/lib/Release. >>>>>> >>>>>> Regards, >>>>>> Zoltan >>>>>> >>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>> support at qt.io >>>>>> >>>>>> >>>>> >: >>>>>> >>>>>> Hi Zoltan, >>>>>> >>>>>> On 06 October 2017 at 13:00:00 EEST >>>>>> Zoltan.Kovacs at esi-group.com >>>>>> >>>>>> >>>>> >>>>>> > wrote: >>>>>> >>>>>> Hi Joni, >>>>>> >>>>>> Thank you very much for your >>>>>> answer. >>>>>> Then I try >>>>>> to install everything >>>>>> from scratch. The only prolem is I >>>>>> have >>>>>> only >>>>>> MSVC 2103 and the only >>>>>> option in the selection list of the >>>>>> online >>>>>> installer for MSVC 2013 is >>>>>> the 64 bit version. Is there >>>>>> somewhere >>>>>> an >>>>>> installer on your website wich >>>>>> provides a relatively new Qt >>>>>> version >>>>>> with MSVC >>>>>> 2103 32 bit version? >>>>>> Thank you very much for your help. >>>>>> >>>>>> >>>>>> No, but you could compile it from >>>>>> source >>>>>> yourself. >>>>>> However, note that you cannot build >>>>>> plugins >>>>>> for new >>>>>> Qt Creator with MSVC 2013 as it uses >>>>>> different ABI. >>>>>> You could use MSVC 2015 or MSVC 2017. >>>>>> >>>>>> Or you could build 64bit version of Qt >>>>>> Creator from >>>>>> source with that Qt version you have >>>>>> installed. >>>>>> >>>>>> Regards, >>>>>> Joni >>>>>> -- >>>>>> Joni Poikelin >>>>>> Software Engineer, >>>>>> The Qt Company >>>>>> ? >>>>>> FAQs - >>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>> >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> -- >>>>>> Joni Poikelin >>>>>> Software Engineer, >>>>>> The Qt Company >>>>>> ? >>>>>> FAQs - >>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>> at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> Search the list archives at: >>>>>> http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> Search the list archives at: >>>>>> http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>> > >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> >>>>>> Search the list archives at: >>>>>> http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> >>>>>> Search the list archives at: >>>>>> http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > From Zoltan.Kovacs at esi-group.com Mon Oct 16 09:47:29 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 16 Oct 2017 15:47:29 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: In the project settings I set from Debug version to Release version and I can link the porject now. It seems that the VTK Relase libaries cannot be used with Debug version of the QtCreator project. I was not careful enough when I tried to buil the debug version of the Qt app. Thanks a lot for the linker output info! Zoltan Am 16.10.2017 um 15:14 schrieb Elvis Stansvik: > 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs : >> Unfortunately I cannot find such a file in that folder. I also searched any >> *.jom file there but the linker might have deleted them. > > Yes sorry, I just realized that. See my earlier mail about the /U jom flag. > > Elvis > >> >> Zoltan >> >> >> Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >>> >>> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs : >>>> >>>> Dear Elvis, >>>> >>>> Thanks for the information. I have the files >>>> -lvtkGUISupportQt-8.0 \ >>>> -lvtkGUISupportQtSQL-8.0 \ >>>> in the library list and the libary path is also given in the project file >>>> loaded in QtCreator but the compiler cannot resolve the symbol >>>> QVTKOpenGLWidget: >>>> >>>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 >>>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>>> -IC:\Qt\5.8\msvc2013\include -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>>> -IC:\Qt\5.8\msvc2013\include\QtWidgets -IC:\Qt\5.8\msvc2013\include\QtGui >>>> -IC:\Qt\5.8\msvc2013\include\QtANGLE -IC:\Qt\5.8\msvc2013\include\QtCore >>>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>>> >>>> distortionpage.cpp >>>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS >>>> "/MANIFESTDEPENDENCY:type='win32' >>>> name='Microsoft.Windows.Common-Controls' >>>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>> >>> >>> I think in order to shorten the linker command line and not exceed >>> command line length limits, qmake is using a "Linker Response File" >>> (using @), so I think you have to look into >>> >>> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>> >>> to see the full list of linker arguments. >>> >>> Would be interesting to see the contents of that file. >>> >>> Elvis >>> >>>> >>>> distortionpage.obj : error LNK2019: unresolved external symbol >>>> "__declspec(dllimport) public: __thiscall >>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>> Qt::WindowType>)" >>>> >>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>> referenced in function "public: void __thiscall >>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>> >>>> >>>> It seems that the compiler switches contain the include path for VTK but >>>> the >>>> library path and the libraries for VTK are missing from the linker >>>> options. >>>> I guess it must be a qmake issue. Thanks anyway. >>>> >>>> Regards, >>>> Zoltan >>>> >>>> >>>> >>>> >>>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>>> >>>>> >>>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs : >>>>>> >>>>>> >>>>>> Dear Dan, >>>>>> >>>>>> In QtCreator I added a QWidget to the UI form and used "Promote to ..." >>>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in >>>>>> the >>>>>> header file of the application. However, when linking the source I get >>>>>> the >>>>>> error message >>>>>> >>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>>>>> "__declspec(dllimport) public: __thiscall >>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>>> Qt::WindowType>)" >>>>>> >>>>>> >>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>> referenced in function "public: void __thiscall >>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>> >>>>>> >>>>>> It seems that the MSVC2013 linker cannot find the library of >>>>>> QVTKOpenGLWidget. I searched a library file with a similar name in the >>>>>> folder where CMake generated the VTK libraries with Qt support but I >>>>>> could >>>>>> not find it. I am just wondering if it is missing or some other library >>>>>> file >>>>>> with a completely different name contains this symbol. >>>>> >>>>> >>>>> >>>>> The class is part of the vtkGUISupportQt library (on Windows the files >>>>> would be vtkGUISupportQt-8.0.lib/dll). >>>>> >>>>> We're using the "promote" functionality in Qt Creator's Design mode to >>>>> promote a widget to our custom QVTKOpenGLWidget subclass. It should >>>>> work fine to promote to it directly. >>>>> >>>>> Elvis >>>>> >>>>>> >>>>>> Regards, >>>>>> Zoltan >>>>>> >>>>>> >>>>>> >>>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>>> >>>>>>> >>>>>>> >>>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by adding >>>>>>> first >>>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you >>>>>>> can >>>>>>> build the UI of your Qt application this way. >>>>>>> >>>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>>> >>>>>>> Hope this helps, >>>>>>> Dan >>>>>>> >>>>>>> >>>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>>> > >>>>>>> wrote: >>>>>>> >>>>>>> Dear Mike, >>>>>>> >>>>>>> Thank you very much for your prompt answer. As I wrote to Dan, >>>>>>> we >>>>>>> have to use QtCreator for the development here. Then I have >>>>>>> access >>>>>>> only for qmake and I can edit project files for it. If >>>>>>> QVTKOpenGLWidget is the only VTK widget class supported for Qt5 >>>>>>> then >>>>>>> I ave to find out how to insert such an object into the UI form >>>>>>> file >>>>>>> of QT. >>>>>>> >>>>>>> Kind regards, >>>>>>> Zoltan >>>>>>> >>>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>>> >>>>>>> Also, when working with VTK, it will be a lot easier to >>>>>>> switch >>>>>>> to using CMake instead of Qt project files (QtCreator >>>>>>> supports >>>>>>> CMake). Look at the examples Dan linked to. You will have to >>>>>>> update the CMakelists.txt file for Qt. You will probably >>>>>>> have >>>>>>> to >>>>>>> add the following: >>>>>>> >>>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>>> >>>>>>> and update the target_link_libraries line(add Qt5::Widget) , >>>>>>> e.g.,: >>>>>>> >>>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>>> ${VTK_LIBRARIES}) >>>>>>> >>>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>>> >>>>>>> >>>>>> >> >>>>>>> wrote: >>>>>>> >>>>>>> Zoltan, >>>>>>> This is unrelated to the error you are seeing however: >>>>>>> >>>>>>> For Qt5 you'll need to use QVTKOpenGLWidget rather than >>>>>>> QVTKWidget. See >>>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>>> >>>>>>> >>>>>> > >>>>>>> All examples are converted to Qt5. Also, VTK master has >>>>>>> a >>>>>>> number of >>>>>>> examples that have been converted to Qt5: >>>>>>> Examples/GUI/Qt >>>>>>> >>>>>>> Hope this helps, >>>>>>> Dan >>>>>>> >>>>>>> >>>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>>>>> >>>>>> >>>>>>> >>>>>> >>>>>>> >> >>>>>>> >>>>>>> wrote: >>>>>>> >>>>>>> Dear all, >>>>>>> >>>>>>> In CMake I generated a solution project of >>>>>>> VTK-8.0.1 >>>>>>> with Qt5 >>>>>>> support for MSVS2013. After having run the >>>>>>> ALL_BUILD >>>>>>> and INSTALL >>>>>>> projects with the install prefix C:\VTK\8.0.1 in >>>>>>> VM2013 >>>>>>> I could >>>>>>> installed the Win32 bit binaries of VTK 8.0.1 in >>>>>>> that >>>>>>> folder. >>>>>>> The header files and the libraries are located in >>>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>>> C:\VTK\8.0.1\lib. >>>>>>> >>>>>>> I copied the file QVTKWidgetPlugin.dll from the VTK >>>>>>> binary >>>>>>> folders to the plugin folder of QTCreator, which >>>>>>> uses >>>>>>> QT 5.8 >>>>>>> msvs2013 32 bit version. >>>>>>> >>>>>>> Then I set the include and library paths and added >>>>>>> all >>>>>>> the VTK >>>>>>> libary files from C:\VTK\8.0.1\lib for the linker >>>>>>> setting in the >>>>>>> project file >>>>>>> of a QT application in QtCreator: >>>>>>> >>>>>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>>> >>>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>>> -lvtkRenderingLOD-8.0 \ >>>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>>> -lvtkRenderingQt-8.0 \ >>>>>>> -lvtkRenderingVolume-8.0 \ >>>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>>> -lvtksqlite-8.0 \ >>>>>>> -lvtksys-8.0 \ >>>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>>> -lvtkTestingRendering-8.0 \ >>>>>>> -lvtktiff-8.0 \ >>>>>>> -lvtkverdict-8.0 \ >>>>>>> -lvtkViewsContext2D-8.0 \ >>>>>>> -lvtkViewsCore-8.0 \ >>>>>>> -lvtkViewsInfovis-8.0 \ >>>>>>> -lvtkViewsQt-8.0 \ >>>>>>> -lvtkzlib-8.0 \ >>>>>>> -lvtkalglib-8.0 \ >>>>>>> -lvtkChartsCore-8.0 \ >>>>>>> -lvtkCommonColor-8.0 \ >>>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>>> -lvtkCommonCore-8.0 \ >>>>>>> -lvtkCommonDataModel-8.0 \ >>>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>>> -lvtkCommonMath-8.0 \ >>>>>>> -lvtkCommonMisc-8.0 \ >>>>>>> -lvtkCommonSystem-8.0 \ >>>>>>> -lvtkCommonTransforms-8.0 \ >>>>>>> -lvtkDICOMParser-8.0 \ >>>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>>> -lvtkexoIIc-8.0 \ >>>>>>> -lvtkexpat-8.0 \ >>>>>>> -lvtkFiltersAMR-8.0 \ >>>>>>> -lvtkFiltersCore-8.0 \ >>>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>>> -lvtkFiltersImaging-8.0 \ >>>>>>> -lvtkFiltersModeling-8.0 \ >>>>>>> -lvtkFiltersParallel-8.0 \ >>>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>>> -lvtkFiltersPoints-8.0 \ >>>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>>> -lvtkFiltersSelection-8.0 \ >>>>>>> -lvtkFiltersSMP-8.0 \ >>>>>>> -lvtkFiltersSources-8.0 \ >>>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>>> -lvtkFiltersTexture-8.0 \ >>>>>>> -lvtkFiltersTopology-8.0 \ >>>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>>> -lvtkfreetype-8.0 \ >>>>>>> -lvtkGeovisCore-8.0 \ >>>>>>> -lvtkgl2ps-8.0 \ >>>>>>> -lvtkglew-8.0 \ >>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>> -lvtkhdf5_hl-8.0 \ >>>>>>> -lvtkhdf5-8.0 \ >>>>>>> -lvtkImagingColor-8.0 \ >>>>>>> -lvtkImagingCore-8.0 \ >>>>>>> -lvtkImagingFourier-8.0 \ >>>>>>> -lvtkImagingGeneral-8.0 \ >>>>>>> -lvtkImagingHybrid-8.0 \ >>>>>>> -lvtkImagingMath-8.0 \ >>>>>>> -lvtkImagingMorphological-8.0 \ >>>>>>> -lvtkImagingSources-8.0 \ >>>>>>> -lvtkImagingStatistics-8.0 \ >>>>>>> -lvtkImagingStencil-8.0 \ >>>>>>> -lvtkInfovisCore-8.0 \ >>>>>>> -lvtkInfovisLayout-8.0 \ >>>>>>> -lvtkInteractionImage-8.0 \ >>>>>>> -lvtkInteractionStyle-8.0 \ >>>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>>> -lvtkIOAMR-8.0 \ >>>>>>> -lvtkIOCore-8.0 \ >>>>>>> -lvtkIOEnSight-8.0 \ >>>>>>> -lvtkIOExodus-8.0 \ >>>>>>> -lvtkIOExport-8.0 \ >>>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>>> -lvtkIOGeometry-8.0 \ >>>>>>> -lvtkIOImage-8.0 \ >>>>>>> -lvtkIOImport-8.0 \ >>>>>>> -lvtkIOInfovis-8.0 \ >>>>>>> -lvtkIOLegacy-8.0 \ >>>>>>> -lvtkIOLSDyna-8.0 \ >>>>>>> -lvtkIOMINC-8.0 \ >>>>>>> -lvtkIOMovie-8.0 \ >>>>>>> -lvtkIONetCDF-8.0 \ >>>>>>> -lvtkIOParallel-8.0 \ >>>>>>> -lvtkIOParallelXML-8.0 \ >>>>>>> -lvtkIOPLY-8.0 \ >>>>>>> -lvtkIOSQL-8.0 \ >>>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>>> -lvtkIOVideo-8.0 \ >>>>>>> -lvtkIOXML-8.0 \ >>>>>>> -lvtkIOXMLParser-8.0 \ >>>>>>> -lvtkjpeg-8.0 \ >>>>>>> -lvtkjsoncpp-8.0 \ >>>>>>> -lvtklibharu-8.0 \ >>>>>>> -lvtklibxml2-8.0 \ >>>>>>> -lvtkLocalExample-8.0 \ >>>>>>> -lvtklz4-8.0 \ >>>>>>> -lvtkmetaio-8.0 \ >>>>>>> -lvtknetcdf_c++ \ >>>>>>> -lvtkNetCDF-8.0 \ >>>>>>> -lvtkoggtheora-8.0 \ >>>>>>> -lvtkParallelCore-8.0 \ >>>>>>> -lvtkpng-8.0 \ >>>>>>> -lvtkproj4-8.0 \ >>>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>>> -lvtkRenderingCore-8.0 \ >>>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>>> -lvtkRenderingImage-8.0 \ >>>>>>> >>>>>>> >>>>>>> However, if I add a QVTKWidget on the UI file of >>>>>>> the >>>>>>> application, include the file QVTKWidget.h in the >>>>>>> header file of >>>>>>> the application and I try to link it in QtCreator >>>>>>> with >>>>>>> the >>>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>>>>> toolchain >>>>>>> of >>>>>>> QtCreator) sends error messages for unresolved >>>>>>> external >>>>>>> symbols >>>>>>> for all the functions/classes belonging to the >>>>>>> QVTKWidget, such as >>>>>>> >>>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved >>>>>>> external >>>>>>> symbol "__declspec(dllimport) public: __thiscall >>>>>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>>>>> QFlags>>>>>> Qt::WindowType>)" >>>>>>> >>>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>> referenced in function "public: void __thiscall >>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>> >>>>>>> >>>>>>> It seems that the linker could not find the libary >>>>>>> for >>>>>>> the >>>>>>> QVTKWidget plugin, which is loaded since I could >>>>>>> chose >>>>>>> QtWidget >>>>>>> from the widget list in the UI form editor in >>>>>>> QtCreator. I do >>>>>>> not see any ABI issue here since I use the 32 bit >>>>>>> mscv2103 >>>>>>> version of Qt and I also compiled and linked the 32 >>>>>>> bit >>>>>>> version >>>>>>> of VTK libaries and plugin files with MSVS2013. I >>>>>>> am >>>>>>> wondering >>>>>>> if anybody could make VTK-8.1 working with Qt. >>>>>>> Thanks >>>>>>> a >>>>>>> lot. >>>>>>> >>>>>>> Kind regars, >>>>>>> Zoltan >>>>>>> >>>>>>> Regards, >>>>>>> Zoltan >>>>>>> >>>>>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>>>>> >>>>>> >: >>>>>>> >>>>>>> Hi Zoltan, >>>>>>> >>>>>>> I don't know how the widget should be installed >>>>>>> or >>>>>>> set up in >>>>>>> a project, but you could just search for the >>>>>>> header >>>>>>> file and >>>>>>> point INCLUDEPATH to the folder that contains >>>>>>> it. >>>>>>> >>>>>>> Regards, >>>>>>> Joni >>>>>>> >>>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>> >>>>>>> >>>>>> >>>>>>> > wrote: >>>>>>> >>>>>>> Hi Joni, >>>>>>> >>>>>>> I see. However I found MSCV2013 32 bit >>>>>>> version >>>>>>> for Qt >>>>>>> 5.8. I install >>>>>>> that version and I built the VTK binaries >>>>>>> for >>>>>>> win32 >>>>>>> platform with >>>>>>> MVS2013. After having copied the VTK plugin >>>>>>> file into >>>>>>> the plugin folder >>>>>>> of QtCreator I could launch it >>>>>>> successfully. >>>>>>> The >>>>>>> QVTKWidget is in the >>>>>>> Widget list of QtCreator now. I could >>>>>>> insert a >>>>>>> QVTKWidget in the UI form >>>>>>> as well. The only problem now is that >>>>>>> QtCreator >>>>>>> cannot >>>>>>> find the header >>>>>>> file for QVTKWidget. It is not cleat how to >>>>>>> set >>>>>>> the >>>>>>> INCLUDEPATH in the >>>>>>> project file since VS2103 did not create a >>>>>>> separate >>>>>>> include folder in >>>>>>> the target folder C:/VTK/bin for the VTK >>>>>>> binaries. Only >>>>>>> the library >>>>>>> files have a separate folder, >>>>>>> C:/VTK/bin/lib/Release. >>>>>>> >>>>>>> Regards, >>>>>>> Zoltan >>>>>>> >>>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>>> support at qt.io >>>>>>> >>>>>>> >>>>>> >: >>>>>>> >>>>>>> Hi Zoltan, >>>>>>> >>>>>>> On 06 October 2017 at 13:00:00 EEST >>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>> >>>>>>> >>>>>> >>>>>>> > wrote: >>>>>>> >>>>>>> Hi Joni, >>>>>>> >>>>>>> Thank you very much for your >>>>>>> answer. >>>>>>> Then I try >>>>>>> to install everything >>>>>>> from scratch. The only prolem is I >>>>>>> have >>>>>>> only >>>>>>> MSVC 2103 and the only >>>>>>> option in the selection list of the >>>>>>> online >>>>>>> installer for MSVC 2013 is >>>>>>> the 64 bit version. Is there >>>>>>> somewhere >>>>>>> an >>>>>>> installer on your website wich >>>>>>> provides a relatively new Qt >>>>>>> version >>>>>>> with MSVC >>>>>>> 2103 32 bit version? >>>>>>> Thank you very much for your help. >>>>>>> >>>>>>> >>>>>>> No, but you could compile it from >>>>>>> source >>>>>>> yourself. >>>>>>> However, note that you cannot build >>>>>>> plugins >>>>>>> for new >>>>>>> Qt Creator with MSVC 2013 as it uses >>>>>>> different ABI. >>>>>>> You could use MSVC 2015 or MSVC 2017. >>>>>>> >>>>>>> Or you could build 64bit version of Qt >>>>>>> Creator from >>>>>>> source with that Qt version you have >>>>>>> installed. >>>>>>> >>>>>>> Regards, >>>>>>> Joni >>>>>>> -- >>>>>>> Joni Poikelin >>>>>>> Software Engineer, >>>>>>> The Qt Company >>>>>>> ? >>>>>>> FAQs - >>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>> >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> -- >>>>>>> Joni Poikelin >>>>>>> Software Engineer, >>>>>>> The Qt Company >>>>>>> ? >>>>>>> FAQs - >>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>>> at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> Search the list archives at: >>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> Search the list archives at: >>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>> > >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> >>>>>>> Search the list archives at: >>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> >>>>>>> Search the list archives at: >>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > From elvis.stansvik at orexplore.com Mon Oct 16 10:10:47 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 16 Oct 2017 16:10:47 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: 2017-10-16 15:47 GMT+02:00 Zoltan Kovacs : > In the project settings I set from Debug version to Release version and I > can link the porject now. It seems that the VTK Relase libaries cannot be > used with Debug version of the QtCreator project. I was not careful enough > when I tried to buil the debug version of the Qt app. Thanks a lot for the > linker output info! Ah, glad to hear it. I started experimenting myself in a Windows VM, and came up with this .pro file for my minimal test (the cone example adapted to use a QVTKOpenGLWidget promoted from QWidget in the Design mode): CONFIG += c++11 QT += core gui widgets TARGET = VTKQtQMakeTest TEMPLATE = app SOURCES += main.cpp mainwindow.cpp HEADERS += mainwindow.h FORMS += mainwindow.ui INCLUDEPATH += C:/Users/Elvis/Dev/VTK-8.0.1-inst/include/vtk-8.0 DEFINES += vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) LIBS += -L"C:/Users/Elvis/Dev/VTK-8.0.1-inst/lib" LIBS += -lvtkCommonCore-8.0 \ -lvtkCommonDataModel-8.0 \ -lvtkCommonExecutionModel-8.0 \ -lvtkCommonMath-8.0 \ -lvtkCommonMisc-8.0 \ -lvtkCommonTransforms-8.0 \ -lvtkFiltersCore-8.0 \ -lvtkFiltersSources-8.0 \ -lvtkGUISupportQt-8.0 \ -lvtkInteractionStyle-8.0 \ -lvtkRenderingCore-8.0 \ -lvtkRenderingOpenGL2-8.0 I think when using QMake, you will have to mess about with the initialization of implementation modules [1] in order for the program to run, either by using DEFINES like I did above, or using VTK_MODULE_INIT. This is something you can get "for free" when using CMake. I could never run my test app, since the VM (VirtualBox) doesn't have a sufficient OpenGL implementation. But it compiled and linked at least. Elvis [1] https://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized > > Zoltan > > > > Am 16.10.2017 um 15:14 schrieb Elvis Stansvik: >> >> 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs : >>> >>> Unfortunately I cannot find such a file in that folder. I also searched >>> any >>> *.jom file there but the linker might have deleted them. >> >> >> Yes sorry, I just realized that. See my earlier mail about the /U jom >> flag. >> >> Elvis >> >>> >>> Zoltan >>> >>> >>> Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >>>> >>>> >>>> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs : >>>>> >>>>> >>>>> Dear Elvis, >>>>> >>>>> Thanks for the information. I have the files >>>>> -lvtkGUISupportQt-8.0 \ >>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>> in the library list and the libary path is also given in the project >>>>> file >>>>> loaded in QtCreator but the compiler cannot resolve the symbol >>>>> QVTKOpenGLWidget: >>>>> >>>>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>>>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>>>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 >>>>> -w34189 >>>>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>>>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>>>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>>>> -IC:\Qt\5.8\msvc2013\include >>>>> -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>>>> -IC:\Qt\5.8\msvc2013\include\QtWidgets >>>>> -IC:\Qt\5.8\msvc2013\include\QtGui >>>>> -IC:\Qt\5.8\msvc2013\include\QtANGLE >>>>> -IC:\Qt\5.8\msvc2013\include\QtCore >>>>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>>>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>>>> >>>>> distortionpage.cpp >>>>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS >>>>> "/MANIFESTDEPENDENCY:type='win32' >>>>> name='Microsoft.Windows.Common-Controls' >>>>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>>>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>>>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>> >>>> >>>> >>>> I think in order to shorten the linker command line and not exceed >>>> command line length limits, qmake is using a "Linker Response File" >>>> (using @), so I think you have to look into >>>> >>>> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>> >>>> to see the full list of linker arguments. >>>> >>>> Would be interesting to see the contents of that file. >>>> >>>> Elvis >>>> >>>>> >>>>> distortionpage.obj : error LNK2019: unresolved external symbol >>>>> "__declspec(dllimport) public: __thiscall >>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>> Qt::WindowType>)" >>>>> >>>>> >>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>> referenced in function "public: void __thiscall >>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>> >>>>> >>>>> It seems that the compiler switches contain the include path for VTK >>>>> but >>>>> the >>>>> library path and the libraries for VTK are missing from the linker >>>>> options. >>>>> I guess it must be a qmake issue. Thanks anyway. >>>>> >>>>> Regards, >>>>> Zoltan >>>>> >>>>> >>>>> >>>>> >>>>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>>>> >>>>>> >>>>>> >>>>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs >>>>>> : >>>>>>> >>>>>>> >>>>>>> >>>>>>> Dear Dan, >>>>>>> >>>>>>> In QtCreator I added a QWidget to the UI form and used "Promote to >>>>>>> ..." >>>>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in >>>>>>> the >>>>>>> header file of the application. However, when linking the source I >>>>>>> get >>>>>>> the >>>>>>> error message >>>>>>> >>>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>>>> Qt::WindowType>)" >>>>>>> >>>>>>> >>>>>>> >>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>> referenced in function "public: void __thiscall >>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>> >>>>>>> >>>>>>> It seems that the MSVC2013 linker cannot find the library of >>>>>>> QVTKOpenGLWidget. I searched a library file with a similar name in >>>>>>> the >>>>>>> folder where CMake generated the VTK libraries with Qt support but I >>>>>>> could >>>>>>> not find it. I am just wondering if it is missing or some other >>>>>>> library >>>>>>> file >>>>>>> with a completely different name contains this symbol. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> The class is part of the vtkGUISupportQt library (on Windows the files >>>>>> would be vtkGUISupportQt-8.0.lib/dll). >>>>>> >>>>>> We're using the "promote" functionality in Qt Creator's Design mode to >>>>>> promote a widget to our custom QVTKOpenGLWidget subclass. It should >>>>>> work fine to promote to it directly. >>>>>> >>>>>> Elvis >>>>>> >>>>>>> >>>>>>> Regards, >>>>>>> Zoltan >>>>>>> >>>>>>> >>>>>>> >>>>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by adding >>>>>>>> first >>>>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you >>>>>>>> can >>>>>>>> build the UI of your Qt application this way. >>>>>>>> >>>>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>>>> >>>>>>>> Hope this helps, >>>>>>>> Dan >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>>>> > >>>>>>>> wrote: >>>>>>>> >>>>>>>> Dear Mike, >>>>>>>> >>>>>>>> Thank you very much for your prompt answer. As I wrote to >>>>>>>> Dan, >>>>>>>> we >>>>>>>> have to use QtCreator for the development here. Then I have >>>>>>>> access >>>>>>>> only for qmake and I can edit project files for it. If >>>>>>>> QVTKOpenGLWidget is the only VTK widget class supported for >>>>>>>> Qt5 >>>>>>>> then >>>>>>>> I ave to find out how to insert such an object into the UI >>>>>>>> form >>>>>>>> file >>>>>>>> of QT. >>>>>>>> >>>>>>>> Kind regards, >>>>>>>> Zoltan >>>>>>>> >>>>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>>>> >>>>>>>> Also, when working with VTK, it will be a lot easier to >>>>>>>> switch >>>>>>>> to using CMake instead of Qt project files (QtCreator >>>>>>>> supports >>>>>>>> CMake). Look at the examples Dan linked to. You will have >>>>>>>> to >>>>>>>> update the CMakelists.txt file for Qt. You will probably >>>>>>>> have >>>>>>>> to >>>>>>>> add the following: >>>>>>>> >>>>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>>>> >>>>>>>> and update the target_link_libraries line(add >>>>>>>> Qt5::Widget) , >>>>>>>> e.g.,: >>>>>>>> >>>>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>>>> ${VTK_LIBRARIES}) >>>>>>>> >>>>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>>>> >>>>>>>> >>>>>>> >> >>>>>>>> wrote: >>>>>>>> >>>>>>>> Zoltan, >>>>>>>> This is unrelated to the error you are seeing >>>>>>>> however: >>>>>>>> >>>>>>>> For Qt5 you'll need to use QVTKOpenGLWidget rather >>>>>>>> than >>>>>>>> QVTKWidget. See >>>>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> All examples are converted to Qt5. Also, VTK master >>>>>>>> has >>>>>>>> a >>>>>>>> number of >>>>>>>> examples that have been converted to Qt5: >>>>>>>> Examples/GUI/Qt >>>>>>>> >>>>>>>> Hope this helps, >>>>>>>> Dan >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>>>>>> >>>>>>> >>>>>>>> >>>>>>> >>>>>>>> >> >>>>>>>> >>>>>>>> wrote: >>>>>>>> >>>>>>>> Dear all, >>>>>>>> >>>>>>>> In CMake I generated a solution project of >>>>>>>> VTK-8.0.1 >>>>>>>> with Qt5 >>>>>>>> support for MSVS2013. After having run the >>>>>>>> ALL_BUILD >>>>>>>> and INSTALL >>>>>>>> projects with the install prefix C:\VTK\8.0.1 in >>>>>>>> VM2013 >>>>>>>> I could >>>>>>>> installed the Win32 bit binaries of VTK 8.0.1 in >>>>>>>> that >>>>>>>> folder. >>>>>>>> The header files and the libraries are located >>>>>>>> in >>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>>>> C:\VTK\8.0.1\lib. >>>>>>>> >>>>>>>> I copied the file QVTKWidgetPlugin.dll from the >>>>>>>> VTK >>>>>>>> binary >>>>>>>> folders to the plugin folder of QTCreator, which >>>>>>>> uses >>>>>>>> QT 5.8 >>>>>>>> msvs2013 32 bit version. >>>>>>>> >>>>>>>> Then I set the include and library paths and >>>>>>>> added >>>>>>>> all >>>>>>>> the VTK >>>>>>>> libary files from C:\VTK\8.0.1\lib for the >>>>>>>> linker >>>>>>>> setting in the >>>>>>>> project file >>>>>>>> of a QT application in QtCreator: >>>>>>>> >>>>>>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>>>> >>>>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>>>> -lvtkRenderingLOD-8.0 \ >>>>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>>>> -lvtkRenderingQt-8.0 \ >>>>>>>> -lvtkRenderingVolume-8.0 \ >>>>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>>>> -lvtksqlite-8.0 \ >>>>>>>> -lvtksys-8.0 \ >>>>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>>>> -lvtkTestingRendering-8.0 \ >>>>>>>> -lvtktiff-8.0 \ >>>>>>>> -lvtkverdict-8.0 \ >>>>>>>> -lvtkViewsContext2D-8.0 \ >>>>>>>> -lvtkViewsCore-8.0 \ >>>>>>>> -lvtkViewsInfovis-8.0 \ >>>>>>>> -lvtkViewsQt-8.0 \ >>>>>>>> -lvtkzlib-8.0 \ >>>>>>>> -lvtkalglib-8.0 \ >>>>>>>> -lvtkChartsCore-8.0 \ >>>>>>>> -lvtkCommonColor-8.0 \ >>>>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>>>> -lvtkCommonCore-8.0 \ >>>>>>>> -lvtkCommonDataModel-8.0 \ >>>>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>>>> -lvtkCommonMath-8.0 \ >>>>>>>> -lvtkCommonMisc-8.0 \ >>>>>>>> -lvtkCommonSystem-8.0 \ >>>>>>>> -lvtkCommonTransforms-8.0 \ >>>>>>>> -lvtkDICOMParser-8.0 \ >>>>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>>>> -lvtkexoIIc-8.0 \ >>>>>>>> -lvtkexpat-8.0 \ >>>>>>>> -lvtkFiltersAMR-8.0 \ >>>>>>>> -lvtkFiltersCore-8.0 \ >>>>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>>>> -lvtkFiltersImaging-8.0 \ >>>>>>>> -lvtkFiltersModeling-8.0 \ >>>>>>>> -lvtkFiltersParallel-8.0 \ >>>>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>>>> -lvtkFiltersPoints-8.0 \ >>>>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>>>> -lvtkFiltersSelection-8.0 \ >>>>>>>> -lvtkFiltersSMP-8.0 \ >>>>>>>> -lvtkFiltersSources-8.0 \ >>>>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>>>> -lvtkFiltersTexture-8.0 \ >>>>>>>> -lvtkFiltersTopology-8.0 \ >>>>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>>>> -lvtkfreetype-8.0 \ >>>>>>>> -lvtkGeovisCore-8.0 \ >>>>>>>> -lvtkgl2ps-8.0 \ >>>>>>>> -lvtkglew-8.0 \ >>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>> -lvtkhdf5_hl-8.0 \ >>>>>>>> -lvtkhdf5-8.0 \ >>>>>>>> -lvtkImagingColor-8.0 \ >>>>>>>> -lvtkImagingCore-8.0 \ >>>>>>>> -lvtkImagingFourier-8.0 \ >>>>>>>> -lvtkImagingGeneral-8.0 \ >>>>>>>> -lvtkImagingHybrid-8.0 \ >>>>>>>> -lvtkImagingMath-8.0 \ >>>>>>>> -lvtkImagingMorphological-8.0 \ >>>>>>>> -lvtkImagingSources-8.0 \ >>>>>>>> -lvtkImagingStatistics-8.0 \ >>>>>>>> -lvtkImagingStencil-8.0 \ >>>>>>>> -lvtkInfovisCore-8.0 \ >>>>>>>> -lvtkInfovisLayout-8.0 \ >>>>>>>> -lvtkInteractionImage-8.0 \ >>>>>>>> -lvtkInteractionStyle-8.0 \ >>>>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>>>> -lvtkIOAMR-8.0 \ >>>>>>>> -lvtkIOCore-8.0 \ >>>>>>>> -lvtkIOEnSight-8.0 \ >>>>>>>> -lvtkIOExodus-8.0 \ >>>>>>>> -lvtkIOExport-8.0 \ >>>>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>>>> -lvtkIOGeometry-8.0 \ >>>>>>>> -lvtkIOImage-8.0 \ >>>>>>>> -lvtkIOImport-8.0 \ >>>>>>>> -lvtkIOInfovis-8.0 \ >>>>>>>> -lvtkIOLegacy-8.0 \ >>>>>>>> -lvtkIOLSDyna-8.0 \ >>>>>>>> -lvtkIOMINC-8.0 \ >>>>>>>> -lvtkIOMovie-8.0 \ >>>>>>>> -lvtkIONetCDF-8.0 \ >>>>>>>> -lvtkIOParallel-8.0 \ >>>>>>>> -lvtkIOParallelXML-8.0 \ >>>>>>>> -lvtkIOPLY-8.0 \ >>>>>>>> -lvtkIOSQL-8.0 \ >>>>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>>>> -lvtkIOVideo-8.0 \ >>>>>>>> -lvtkIOXML-8.0 \ >>>>>>>> -lvtkIOXMLParser-8.0 \ >>>>>>>> -lvtkjpeg-8.0 \ >>>>>>>> -lvtkjsoncpp-8.0 \ >>>>>>>> -lvtklibharu-8.0 \ >>>>>>>> -lvtklibxml2-8.0 \ >>>>>>>> -lvtkLocalExample-8.0 \ >>>>>>>> -lvtklz4-8.0 \ >>>>>>>> -lvtkmetaio-8.0 \ >>>>>>>> -lvtknetcdf_c++ \ >>>>>>>> -lvtkNetCDF-8.0 \ >>>>>>>> -lvtkoggtheora-8.0 \ >>>>>>>> -lvtkParallelCore-8.0 \ >>>>>>>> -lvtkpng-8.0 \ >>>>>>>> -lvtkproj4-8.0 \ >>>>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>>>> -lvtkRenderingCore-8.0 \ >>>>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>>>> -lvtkRenderingImage-8.0 \ >>>>>>>> >>>>>>>> >>>>>>>> However, if I add a QVTKWidget on the UI file of >>>>>>>> the >>>>>>>> application, include the file QVTKWidget.h in >>>>>>>> the >>>>>>>> header file of >>>>>>>> the application and I try to link it in >>>>>>>> QtCreator >>>>>>>> with >>>>>>>> the >>>>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>>>>>> toolchain >>>>>>>> of >>>>>>>> QtCreator) sends error messages for unresolved >>>>>>>> external >>>>>>>> symbols >>>>>>>> for all the functions/classes belonging to the >>>>>>>> QVTKWidget, such as >>>>>>>> >>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: >>>>>>>> unresolved >>>>>>>> external >>>>>>>> symbol "__declspec(dllimport) public: __thiscall >>>>>>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>>>>>> QFlags>>>>>>> Qt::WindowType>)" >>>>>>>> >>>>>>>> >>>>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>> referenced in function "public: void __thiscall >>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>> >>>>>>>> >>>>>>>> It seems that the linker could not find the >>>>>>>> libary >>>>>>>> for >>>>>>>> the >>>>>>>> QVTKWidget plugin, which is loaded since I could >>>>>>>> chose >>>>>>>> QtWidget >>>>>>>> from the widget list in the UI form editor in >>>>>>>> QtCreator. I do >>>>>>>> not see any ABI issue here since I use the 32 >>>>>>>> bit >>>>>>>> mscv2103 >>>>>>>> version of Qt and I also compiled and linked the >>>>>>>> 32 >>>>>>>> bit >>>>>>>> version >>>>>>>> of VTK libaries and plugin files with MSVS2013. >>>>>>>> I >>>>>>>> am >>>>>>>> wondering >>>>>>>> if anybody could make VTK-8.1 working with Qt. >>>>>>>> Thanks >>>>>>>> a >>>>>>>> lot. >>>>>>>> >>>>>>>> Kind regars, >>>>>>>> Zoltan >>>>>>>> >>>>>>>> Regards, >>>>>>>> Zoltan >>>>>>>> >>>>>>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>>>>>> >>>>>>> >: >>>>>>>> >>>>>>>> Hi Zoltan, >>>>>>>> >>>>>>>> I don't know how the widget should be >>>>>>>> installed >>>>>>>> or >>>>>>>> set up in >>>>>>>> a project, but you could just search for the >>>>>>>> header >>>>>>>> file and >>>>>>>> point INCLUDEPATH to the folder that >>>>>>>> contains >>>>>>>> it. >>>>>>>> >>>>>>>> Regards, >>>>>>>> Joni >>>>>>>> >>>>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>> >>>>>>>> >>>>>>> >>>>>>>> > wrote: >>>>>>>> >>>>>>>> Hi Joni, >>>>>>>> >>>>>>>> I see. However I found MSCV2013 32 bit >>>>>>>> version >>>>>>>> for Qt >>>>>>>> 5.8. I install >>>>>>>> that version and I built the VTK >>>>>>>> binaries >>>>>>>> for >>>>>>>> win32 >>>>>>>> platform with >>>>>>>> MVS2013. After having copied the VTK >>>>>>>> plugin >>>>>>>> file into >>>>>>>> the plugin folder >>>>>>>> of QtCreator I could launch it >>>>>>>> successfully. >>>>>>>> The >>>>>>>> QVTKWidget is in the >>>>>>>> Widget list of QtCreator now. I could >>>>>>>> insert a >>>>>>>> QVTKWidget in the UI form >>>>>>>> as well. The only problem now is that >>>>>>>> QtCreator >>>>>>>> cannot >>>>>>>> find the header >>>>>>>> file for QVTKWidget. It is not cleat how >>>>>>>> to >>>>>>>> set >>>>>>>> the >>>>>>>> INCLUDEPATH in the >>>>>>>> project file since VS2103 did not create >>>>>>>> a >>>>>>>> separate >>>>>>>> include folder in >>>>>>>> the target folder C:/VTK/bin for the VTK >>>>>>>> binaries. Only >>>>>>>> the library >>>>>>>> files have a separate folder, >>>>>>>> C:/VTK/bin/lib/Release. >>>>>>>> >>>>>>>> Regards, >>>>>>>> Zoltan >>>>>>>> >>>>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>>>> support at qt.io >>>>>>>> >>>>>>>> >>>>>>> >: >>>>>>>> >>>>>>>> Hi Zoltan, >>>>>>>> >>>>>>>> On 06 October 2017 at 13:00:00 EEST >>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>> >>>>>>>> >>>>>>> >>>>>>>> > wrote: >>>>>>>> >>>>>>>> Hi Joni, >>>>>>>> >>>>>>>> Thank you very much for your >>>>>>>> answer. >>>>>>>> Then I try >>>>>>>> to install everything >>>>>>>> from scratch. The only prolem is >>>>>>>> I >>>>>>>> have >>>>>>>> only >>>>>>>> MSVC 2103 and the only >>>>>>>> option in the selection list of >>>>>>>> the >>>>>>>> online >>>>>>>> installer for MSVC 2013 is >>>>>>>> the 64 bit version. Is there >>>>>>>> somewhere >>>>>>>> an >>>>>>>> installer on your website wich >>>>>>>> provides a relatively new Qt >>>>>>>> version >>>>>>>> with MSVC >>>>>>>> 2103 32 bit version? >>>>>>>> Thank you very much for your >>>>>>>> help. >>>>>>>> >>>>>>>> >>>>>>>> No, but you could compile it from >>>>>>>> source >>>>>>>> yourself. >>>>>>>> However, note that you cannot build >>>>>>>> plugins >>>>>>>> for new >>>>>>>> Qt Creator with MSVC 2013 as it uses >>>>>>>> different ABI. >>>>>>>> You could use MSVC 2015 or MSVC >>>>>>>> 2017. >>>>>>>> >>>>>>>> Or you could build 64bit version of >>>>>>>> Qt >>>>>>>> Creator from >>>>>>>> source with that Qt version you have >>>>>>>> installed. >>>>>>>> >>>>>>>> Regards, >>>>>>>> Joni >>>>>>>> -- >>>>>>>> Joni Poikelin >>>>>>>> Software Engineer, >>>>>>>> The Qt Company >>>>>>>> ? >>>>>>>> FAQs - >>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> -- >>>>>>>> Joni Poikelin >>>>>>>> Software Engineer, >>>>>>>> The Qt Company >>>>>>>> ? >>>>>>>> FAQs - >>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK >>>>>>>> FAQ >>>>>>>> at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> Search the list archives at: >>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>>>> at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> Search the list archives at: >>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>> > >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> >>>>>>>> Search the list archives at: >>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> >>>>>>>> Search the list archives at: >>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>>> >>> >> > From elvis.stansvik at orexplore.com Mon Oct 16 10:14:33 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 16 Oct 2017 16:14:33 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: Another tip if you're going to stick to using QMake is the Utilities/Maintenance/WhatModulesVTK.py Python script in VTK sources, which you can run on your source to find out which VTK modules (and thus libraries) you're using. Example (on Linux): [estan at newton orexplore]$ VTK/Utilities/Maintenance/WhatModulesVTK.py VTK ~/VTKQtQMakeTest Modules and their dependencies: find_package(VTK COMPONENTS vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonMisc vtkCommonTransforms vtkFiltersCore vtkFiltersSources vtkGUISupportQt vtkRenderingCore vtkRenderingOpenGL2 vtkkwiml ) Your application code includes 12 of 204 vtk modules. All modules referenced in the files: find_package(VTK COMPONENTS vtkCommonCore vtkFiltersSources vtkGUISupportQt vtkRenderingCore vtkRenderingOpenGL2 ) Your application code includes 5 of 204 vtk modules. Minimal set of modules: find_package(VTK COMPONENTS vtkFiltersSources vtkGUISupportQt ) Your application code includes 2 of 204 vtk modules. [estan at newton orexplore]$ The first list ("Modules and their dependencies") is what you'd need to use when using QMake. The script is not perfect (but helps a lot), and you'll have to modify the script slightly like this to tell it you're using the OpenGL2 backend: diff --git a/Utilities/Maintenance/WhatModulesVTK.py b/Utilities/Maintenance/WhatModulesVTK.py index 9e667f0..8d8ec87 100755 --- a/Utilities/Maintenance/WhatModulesVTK.py +++ b/Utilities/Maintenance/WhatModulesVTK.py @@ -226,7 +226,7 @@ def MakeFindPackage(modules): from pprint import pprint as pp -def main(vtkSourceDir, sourceFiles, renderingBackend='OpenGL'): +def main(vtkSourceDir, sourceFiles, renderingBackend='OpenGL2'): ''' Start the program ''' Regards, Elvis 2017-10-16 16:10 GMT+02:00 Elvis Stansvik : > 2017-10-16 15:47 GMT+02:00 Zoltan Kovacs : >> In the project settings I set from Debug version to Release version and I >> can link the porject now. It seems that the VTK Relase libaries cannot be >> used with Debug version of the QtCreator project. I was not careful enough >> when I tried to buil the debug version of the Qt app. Thanks a lot for the >> linker output info! > > Ah, glad to hear it. I started experimenting myself in a Windows VM, > and came up with this .pro file for my minimal test (the cone example > adapted to use a QVTKOpenGLWidget promoted from QWidget in the Design > mode): > > CONFIG += c++11 > QT += core gui widgets > TARGET = VTKQtQMakeTest > TEMPLATE = app > SOURCES += main.cpp mainwindow.cpp > HEADERS += mainwindow.h > FORMS += mainwindow.ui > > INCLUDEPATH += C:/Users/Elvis/Dev/VTK-8.0.1-inst/include/vtk-8.0 > DEFINES += vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) > LIBS += -L"C:/Users/Elvis/Dev/VTK-8.0.1-inst/lib" > LIBS += -lvtkCommonCore-8.0 \ > -lvtkCommonDataModel-8.0 \ > -lvtkCommonExecutionModel-8.0 \ > -lvtkCommonMath-8.0 \ > -lvtkCommonMisc-8.0 \ > -lvtkCommonTransforms-8.0 \ > -lvtkFiltersCore-8.0 \ > -lvtkFiltersSources-8.0 \ > -lvtkGUISupportQt-8.0 \ > -lvtkInteractionStyle-8.0 \ > -lvtkRenderingCore-8.0 \ > -lvtkRenderingOpenGL2-8.0 > > I think when using QMake, you will have to mess about with the > initialization of implementation modules [1] in order for the program > to run, either by using DEFINES like I did above, or using > VTK_MODULE_INIT. This is something you can get "for free" when using > CMake. > > I could never run my test app, since the VM (VirtualBox) doesn't have > a sufficient OpenGL implementation. But it compiled and linked at > least. > > Elvis > > [1] https://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized > >> >> Zoltan >> >> >> >> Am 16.10.2017 um 15:14 schrieb Elvis Stansvik: >>> >>> 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs : >>>> >>>> Unfortunately I cannot find such a file in that folder. I also searched >>>> any >>>> *.jom file there but the linker might have deleted them. >>> >>> >>> Yes sorry, I just realized that. See my earlier mail about the /U jom >>> flag. >>> >>> Elvis >>> >>>> >>>> Zoltan >>>> >>>> >>>> Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >>>>> >>>>> >>>>> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs : >>>>>> >>>>>> >>>>>> Dear Elvis, >>>>>> >>>>>> Thanks for the information. I have the files >>>>>> -lvtkGUISupportQt-8.0 \ >>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>> in the library list and the libary path is also given in the project >>>>>> file >>>>>> loaded in QtCreator but the compiler cannot resolve the symbol >>>>>> QVTKOpenGLWidget: >>>>>> >>>>>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>>>>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>>>>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 >>>>>> -w34189 >>>>>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>>>>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>>>>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>>>>> -IC:\Qt\5.8\msvc2013\include >>>>>> -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>>>>> -IC:\Qt\5.8\msvc2013\include\QtWidgets >>>>>> -IC:\Qt\5.8\msvc2013\include\QtGui >>>>>> -IC:\Qt\5.8\msvc2013\include\QtANGLE >>>>>> -IC:\Qt\5.8\msvc2013\include\QtCore >>>>>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>>>>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>>>>> >>>>>> distortionpage.cpp >>>>>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS >>>>>> "/MANIFESTDEPENDENCY:type='win32' >>>>>> name='Microsoft.Windows.Common-Controls' >>>>>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>>>>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>>>>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>> >>>>> >>>>> >>>>> I think in order to shorten the linker command line and not exceed >>>>> command line length limits, qmake is using a "Linker Response File" >>>>> (using @), so I think you have to look into >>>>> >>>>> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>> >>>>> to see the full list of linker arguments. >>>>> >>>>> Would be interesting to see the contents of that file. >>>>> >>>>> Elvis >>>>> >>>>>> >>>>>> distortionpage.obj : error LNK2019: unresolved external symbol >>>>>> "__declspec(dllimport) public: __thiscall >>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>>> Qt::WindowType>)" >>>>>> >>>>>> >>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>> referenced in function "public: void __thiscall >>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>> >>>>>> >>>>>> It seems that the compiler switches contain the include path for VTK >>>>>> but >>>>>> the >>>>>> library path and the libraries for VTK are missing from the linker >>>>>> options. >>>>>> I guess it must be a qmake issue. Thanks anyway. >>>>>> >>>>>> Regards, >>>>>> Zoltan >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>>>>> >>>>>>> >>>>>>> >>>>>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs >>>>>>> : >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Dear Dan, >>>>>>>> >>>>>>>> In QtCreator I added a QWidget to the UI form and used "Promote to >>>>>>>> ..." >>>>>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in >>>>>>>> the >>>>>>>> header file of the application. However, when linking the source I >>>>>>>> get >>>>>>>> the >>>>>>>> error message >>>>>>>> >>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>>>>> Qt::WindowType>)" >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>> referenced in function "public: void __thiscall >>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>> >>>>>>>> >>>>>>>> It seems that the MSVC2013 linker cannot find the library of >>>>>>>> QVTKOpenGLWidget. I searched a library file with a similar name in >>>>>>>> the >>>>>>>> folder where CMake generated the VTK libraries with Qt support but I >>>>>>>> could >>>>>>>> not find it. I am just wondering if it is missing or some other >>>>>>>> library >>>>>>>> file >>>>>>>> with a completely different name contains this symbol. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> The class is part of the vtkGUISupportQt library (on Windows the files >>>>>>> would be vtkGUISupportQt-8.0.lib/dll). >>>>>>> >>>>>>> We're using the "promote" functionality in Qt Creator's Design mode to >>>>>>> promote a widget to our custom QVTKOpenGLWidget subclass. It should >>>>>>> work fine to promote to it directly. >>>>>>> >>>>>>> Elvis >>>>>>> >>>>>>>> >>>>>>>> Regards, >>>>>>>> Zoltan >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by adding >>>>>>>>> first >>>>>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you >>>>>>>>> can >>>>>>>>> build the UI of your Qt application this way. >>>>>>>>> >>>>>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>>>>> >>>>>>>>> Hope this helps, >>>>>>>>> Dan >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>>>>> > >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Dear Mike, >>>>>>>>> >>>>>>>>> Thank you very much for your prompt answer. As I wrote to >>>>>>>>> Dan, >>>>>>>>> we >>>>>>>>> have to use QtCreator for the development here. Then I have >>>>>>>>> access >>>>>>>>> only for qmake and I can edit project files for it. If >>>>>>>>> QVTKOpenGLWidget is the only VTK widget class supported for >>>>>>>>> Qt5 >>>>>>>>> then >>>>>>>>> I ave to find out how to insert such an object into the UI >>>>>>>>> form >>>>>>>>> file >>>>>>>>> of QT. >>>>>>>>> >>>>>>>>> Kind regards, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>>>>> >>>>>>>>> Also, when working with VTK, it will be a lot easier to >>>>>>>>> switch >>>>>>>>> to using CMake instead of Qt project files (QtCreator >>>>>>>>> supports >>>>>>>>> CMake). Look at the examples Dan linked to. You will have >>>>>>>>> to >>>>>>>>> update the CMakelists.txt file for Qt. You will probably >>>>>>>>> have >>>>>>>>> to >>>>>>>>> add the following: >>>>>>>>> >>>>>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>>>>> >>>>>>>>> and update the target_link_libraries line(add >>>>>>>>> Qt5::Widget) , >>>>>>>>> e.g.,: >>>>>>>>> >>>>>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>>>>> ${VTK_LIBRARIES}) >>>>>>>>> >>>>>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>>>>> >>>>>>>>> >>>>>>>> >> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Zoltan, >>>>>>>>> This is unrelated to the error you are seeing >>>>>>>>> however: >>>>>>>>> >>>>>>>>> For Qt5 you'll need to use QVTKOpenGLWidget rather >>>>>>>>> than >>>>>>>>> QVTKWidget. See >>>>>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> All examples are converted to Qt5. Also, VTK master >>>>>>>>> has >>>>>>>>> a >>>>>>>>> number of >>>>>>>>> examples that have been converted to Qt5: >>>>>>>>> Examples/GUI/Qt >>>>>>>>> >>>>>>>>> Hope this helps, >>>>>>>>> Dan >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>>> >> >>>>>>>>> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Dear all, >>>>>>>>> >>>>>>>>> In CMake I generated a solution project of >>>>>>>>> VTK-8.0.1 >>>>>>>>> with Qt5 >>>>>>>>> support for MSVS2013. After having run the >>>>>>>>> ALL_BUILD >>>>>>>>> and INSTALL >>>>>>>>> projects with the install prefix C:\VTK\8.0.1 in >>>>>>>>> VM2013 >>>>>>>>> I could >>>>>>>>> installed the Win32 bit binaries of VTK 8.0.1 in >>>>>>>>> that >>>>>>>>> folder. >>>>>>>>> The header files and the libraries are located >>>>>>>>> in >>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>>>>> C:\VTK\8.0.1\lib. >>>>>>>>> >>>>>>>>> I copied the file QVTKWidgetPlugin.dll from the >>>>>>>>> VTK >>>>>>>>> binary >>>>>>>>> folders to the plugin folder of QTCreator, which >>>>>>>>> uses >>>>>>>>> QT 5.8 >>>>>>>>> msvs2013 32 bit version. >>>>>>>>> >>>>>>>>> Then I set the include and library paths and >>>>>>>>> added >>>>>>>>> all >>>>>>>>> the VTK >>>>>>>>> libary files from C:\VTK\8.0.1\lib for the >>>>>>>>> linker >>>>>>>>> setting in the >>>>>>>>> project file >>>>>>>>> of a QT application in QtCreator: >>>>>>>>> >>>>>>>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>>>>> >>>>>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>>>>> -lvtkRenderingLOD-8.0 \ >>>>>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>>>>> -lvtkRenderingQt-8.0 \ >>>>>>>>> -lvtkRenderingVolume-8.0 \ >>>>>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>>>>> -lvtksqlite-8.0 \ >>>>>>>>> -lvtksys-8.0 \ >>>>>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>>>>> -lvtkTestingRendering-8.0 \ >>>>>>>>> -lvtktiff-8.0 \ >>>>>>>>> -lvtkverdict-8.0 \ >>>>>>>>> -lvtkViewsContext2D-8.0 \ >>>>>>>>> -lvtkViewsCore-8.0 \ >>>>>>>>> -lvtkViewsInfovis-8.0 \ >>>>>>>>> -lvtkViewsQt-8.0 \ >>>>>>>>> -lvtkzlib-8.0 \ >>>>>>>>> -lvtkalglib-8.0 \ >>>>>>>>> -lvtkChartsCore-8.0 \ >>>>>>>>> -lvtkCommonColor-8.0 \ >>>>>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>>>>> -lvtkCommonCore-8.0 \ >>>>>>>>> -lvtkCommonDataModel-8.0 \ >>>>>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>>>>> -lvtkCommonMath-8.0 \ >>>>>>>>> -lvtkCommonMisc-8.0 \ >>>>>>>>> -lvtkCommonSystem-8.0 \ >>>>>>>>> -lvtkCommonTransforms-8.0 \ >>>>>>>>> -lvtkDICOMParser-8.0 \ >>>>>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>>>>> -lvtkexoIIc-8.0 \ >>>>>>>>> -lvtkexpat-8.0 \ >>>>>>>>> -lvtkFiltersAMR-8.0 \ >>>>>>>>> -lvtkFiltersCore-8.0 \ >>>>>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>>>>> -lvtkFiltersImaging-8.0 \ >>>>>>>>> -lvtkFiltersModeling-8.0 \ >>>>>>>>> -lvtkFiltersParallel-8.0 \ >>>>>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>>>>> -lvtkFiltersPoints-8.0 \ >>>>>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>>>>> -lvtkFiltersSelection-8.0 \ >>>>>>>>> -lvtkFiltersSMP-8.0 \ >>>>>>>>> -lvtkFiltersSources-8.0 \ >>>>>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>>>>> -lvtkFiltersTexture-8.0 \ >>>>>>>>> -lvtkFiltersTopology-8.0 \ >>>>>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>>>>> -lvtkfreetype-8.0 \ >>>>>>>>> -lvtkGeovisCore-8.0 \ >>>>>>>>> -lvtkgl2ps-8.0 \ >>>>>>>>> -lvtkglew-8.0 \ >>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>> -lvtkhdf5_hl-8.0 \ >>>>>>>>> -lvtkhdf5-8.0 \ >>>>>>>>> -lvtkImagingColor-8.0 \ >>>>>>>>> -lvtkImagingCore-8.0 \ >>>>>>>>> -lvtkImagingFourier-8.0 \ >>>>>>>>> -lvtkImagingGeneral-8.0 \ >>>>>>>>> -lvtkImagingHybrid-8.0 \ >>>>>>>>> -lvtkImagingMath-8.0 \ >>>>>>>>> -lvtkImagingMorphological-8.0 \ >>>>>>>>> -lvtkImagingSources-8.0 \ >>>>>>>>> -lvtkImagingStatistics-8.0 \ >>>>>>>>> -lvtkImagingStencil-8.0 \ >>>>>>>>> -lvtkInfovisCore-8.0 \ >>>>>>>>> -lvtkInfovisLayout-8.0 \ >>>>>>>>> -lvtkInteractionImage-8.0 \ >>>>>>>>> -lvtkInteractionStyle-8.0 \ >>>>>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>>>>> -lvtkIOAMR-8.0 \ >>>>>>>>> -lvtkIOCore-8.0 \ >>>>>>>>> -lvtkIOEnSight-8.0 \ >>>>>>>>> -lvtkIOExodus-8.0 \ >>>>>>>>> -lvtkIOExport-8.0 \ >>>>>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>>>>> -lvtkIOGeometry-8.0 \ >>>>>>>>> -lvtkIOImage-8.0 \ >>>>>>>>> -lvtkIOImport-8.0 \ >>>>>>>>> -lvtkIOInfovis-8.0 \ >>>>>>>>> -lvtkIOLegacy-8.0 \ >>>>>>>>> -lvtkIOLSDyna-8.0 \ >>>>>>>>> -lvtkIOMINC-8.0 \ >>>>>>>>> -lvtkIOMovie-8.0 \ >>>>>>>>> -lvtkIONetCDF-8.0 \ >>>>>>>>> -lvtkIOParallel-8.0 \ >>>>>>>>> -lvtkIOParallelXML-8.0 \ >>>>>>>>> -lvtkIOPLY-8.0 \ >>>>>>>>> -lvtkIOSQL-8.0 \ >>>>>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>>>>> -lvtkIOVideo-8.0 \ >>>>>>>>> -lvtkIOXML-8.0 \ >>>>>>>>> -lvtkIOXMLParser-8.0 \ >>>>>>>>> -lvtkjpeg-8.0 \ >>>>>>>>> -lvtkjsoncpp-8.0 \ >>>>>>>>> -lvtklibharu-8.0 \ >>>>>>>>> -lvtklibxml2-8.0 \ >>>>>>>>> -lvtkLocalExample-8.0 \ >>>>>>>>> -lvtklz4-8.0 \ >>>>>>>>> -lvtkmetaio-8.0 \ >>>>>>>>> -lvtknetcdf_c++ \ >>>>>>>>> -lvtkNetCDF-8.0 \ >>>>>>>>> -lvtkoggtheora-8.0 \ >>>>>>>>> -lvtkParallelCore-8.0 \ >>>>>>>>> -lvtkpng-8.0 \ >>>>>>>>> -lvtkproj4-8.0 \ >>>>>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>>>>> -lvtkRenderingCore-8.0 \ >>>>>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>>>>> -lvtkRenderingImage-8.0 \ >>>>>>>>> >>>>>>>>> >>>>>>>>> However, if I add a QVTKWidget on the UI file of >>>>>>>>> the >>>>>>>>> application, include the file QVTKWidget.h in >>>>>>>>> the >>>>>>>>> header file of >>>>>>>>> the application and I try to link it in >>>>>>>>> QtCreator >>>>>>>>> with >>>>>>>>> the >>>>>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>>>>>>> toolchain >>>>>>>>> of >>>>>>>>> QtCreator) sends error messages for unresolved >>>>>>>>> external >>>>>>>>> symbols >>>>>>>>> for all the functions/classes belonging to the >>>>>>>>> QVTKWidget, such as >>>>>>>>> >>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: >>>>>>>>> unresolved >>>>>>>>> external >>>>>>>>> symbol "__declspec(dllimport) public: __thiscall >>>>>>>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>>>>>>> QFlags>>>>>>>> Qt::WindowType>)" >>>>>>>>> >>>>>>>>> >>>>>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>> >>>>>>>>> >>>>>>>>> It seems that the linker could not find the >>>>>>>>> libary >>>>>>>>> for >>>>>>>>> the >>>>>>>>> QVTKWidget plugin, which is loaded since I could >>>>>>>>> chose >>>>>>>>> QtWidget >>>>>>>>> from the widget list in the UI form editor in >>>>>>>>> QtCreator. I do >>>>>>>>> not see any ABI issue here since I use the 32 >>>>>>>>> bit >>>>>>>>> mscv2103 >>>>>>>>> version of Qt and I also compiled and linked the >>>>>>>>> 32 >>>>>>>>> bit >>>>>>>>> version >>>>>>>>> of VTK libaries and plugin files with MSVS2013. >>>>>>>>> I >>>>>>>>> am >>>>>>>>> wondering >>>>>>>>> if anybody could make VTK-8.1 working with Qt. >>>>>>>>> Thanks >>>>>>>>> a >>>>>>>>> lot. >>>>>>>>> >>>>>>>>> Kind regars, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>>>>>>> >>>>>>>> >: >>>>>>>>> >>>>>>>>> Hi Zoltan, >>>>>>>>> >>>>>>>>> I don't know how the widget should be >>>>>>>>> installed >>>>>>>>> or >>>>>>>>> set up in >>>>>>>>> a project, but you could just search for the >>>>>>>>> header >>>>>>>>> file and >>>>>>>>> point INCLUDEPATH to the folder that >>>>>>>>> contains >>>>>>>>> it. >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Joni >>>>>>>>> >>>>>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>>> > wrote: >>>>>>>>> >>>>>>>>> Hi Joni, >>>>>>>>> >>>>>>>>> I see. However I found MSCV2013 32 bit >>>>>>>>> version >>>>>>>>> for Qt >>>>>>>>> 5.8. I install >>>>>>>>> that version and I built the VTK >>>>>>>>> binaries >>>>>>>>> for >>>>>>>>> win32 >>>>>>>>> platform with >>>>>>>>> MVS2013. After having copied the VTK >>>>>>>>> plugin >>>>>>>>> file into >>>>>>>>> the plugin folder >>>>>>>>> of QtCreator I could launch it >>>>>>>>> successfully. >>>>>>>>> The >>>>>>>>> QVTKWidget is in the >>>>>>>>> Widget list of QtCreator now. I could >>>>>>>>> insert a >>>>>>>>> QVTKWidget in the UI form >>>>>>>>> as well. The only problem now is that >>>>>>>>> QtCreator >>>>>>>>> cannot >>>>>>>>> find the header >>>>>>>>> file for QVTKWidget. It is not cleat how >>>>>>>>> to >>>>>>>>> set >>>>>>>>> the >>>>>>>>> INCLUDEPATH in the >>>>>>>>> project file since VS2103 did not create >>>>>>>>> a >>>>>>>>> separate >>>>>>>>> include folder in >>>>>>>>> the target folder C:/VTK/bin for the VTK >>>>>>>>> binaries. Only >>>>>>>>> the library >>>>>>>>> files have a separate folder, >>>>>>>>> C:/VTK/bin/lib/Release. >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>>>>> support at qt.io >>>>>>>>> >>>>>>>>> >>>>>>>> >: >>>>>>>>> >>>>>>>>> Hi Zoltan, >>>>>>>>> >>>>>>>>> On 06 October 2017 at 13:00:00 EEST >>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>>> > wrote: >>>>>>>>> >>>>>>>>> Hi Joni, >>>>>>>>> >>>>>>>>> Thank you very much for your >>>>>>>>> answer. >>>>>>>>> Then I try >>>>>>>>> to install everything >>>>>>>>> from scratch. The only prolem is >>>>>>>>> I >>>>>>>>> have >>>>>>>>> only >>>>>>>>> MSVC 2103 and the only >>>>>>>>> option in the selection list of >>>>>>>>> the >>>>>>>>> online >>>>>>>>> installer for MSVC 2013 is >>>>>>>>> the 64 bit version. Is there >>>>>>>>> somewhere >>>>>>>>> an >>>>>>>>> installer on your website wich >>>>>>>>> provides a relatively new Qt >>>>>>>>> version >>>>>>>>> with MSVC >>>>>>>>> 2103 32 bit version? >>>>>>>>> Thank you very much for your >>>>>>>>> help. >>>>>>>>> >>>>>>>>> >>>>>>>>> No, but you could compile it from >>>>>>>>> source >>>>>>>>> yourself. >>>>>>>>> However, note that you cannot build >>>>>>>>> plugins >>>>>>>>> for new >>>>>>>>> Qt Creator with MSVC 2013 as it uses >>>>>>>>> different ABI. >>>>>>>>> You could use MSVC 2015 or MSVC >>>>>>>>> 2017. >>>>>>>>> >>>>>>>>> Or you could build 64bit version of >>>>>>>>> Qt >>>>>>>>> Creator from >>>>>>>>> source with that Qt version you have >>>>>>>>> installed. >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Joni >>>>>>>>> -- >>>>>>>>> Joni Poikelin >>>>>>>>> Software Engineer, >>>>>>>>> The Qt Company >>>>>>>>> ? >>>>>>>>> FAQs - >>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Joni Poikelin >>>>>>>>> Software Engineer, >>>>>>>>> The Qt Company >>>>>>>>> ? >>>>>>>>> FAQs - >>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK >>>>>>>>> FAQ >>>>>>>>> at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>>>>> at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>>> >>>> >>> >> From Zoltan.Kovacs at esi-group.com Mon Oct 16 10:50:54 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 16 Oct 2017 16:50:54 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> Message-ID: <059632bb-2ac0-b507-dc96-a1573eb4f483@esi-group.com> Thanks for the detailed information! It is very useful, especially the line DEFINES += vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) I inserted it into my project file but I get the error "no override found for 'vtkPolyDataMapper'". I guess I must include other switches in the shell_quote argument too, such as vtkRenderingVolumeOpenGL or something else. Zoltan Am 16.10.2017 um 16:10 schrieb Elvis Stansvik: > 2017-10-16 15:47 GMT+02:00 Zoltan Kovacs : >> In the project settings I set from Debug version to Release version and I >> can link the porject now. It seems that the VTK Relase libaries cannot be >> used with Debug version of the QtCreator project. I was not careful enough >> when I tried to buil the debug version of the Qt app. Thanks a lot for the >> linker output info! > > Ah, glad to hear it. I started experimenting myself in a Windows VM, > and came up with this .pro file for my minimal test (the cone example > adapted to use a QVTKOpenGLWidget promoted from QWidget in the Design > mode): > > CONFIG += c++11 > QT += core gui widgets > TARGET = VTKQtQMakeTest > TEMPLATE = app > SOURCES += main.cpp mainwindow.cpp > HEADERS += mainwindow.h > FORMS += mainwindow.ui > > INCLUDEPATH += C:/Users/Elvis/Dev/VTK-8.0.1-inst/include/vtk-8.0 > DEFINES += vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) > LIBS += -L"C:/Users/Elvis/Dev/VTK-8.0.1-inst/lib" > LIBS += -lvtkCommonCore-8.0 \ > -lvtkCommonDataModel-8.0 \ > -lvtkCommonExecutionModel-8.0 \ > -lvtkCommonMath-8.0 \ > -lvtkCommonMisc-8.0 \ > -lvtkCommonTransforms-8.0 \ > -lvtkFiltersCore-8.0 \ > -lvtkFiltersSources-8.0 \ > -lvtkGUISupportQt-8.0 \ > -lvtkInteractionStyle-8.0 \ > -lvtkRenderingCore-8.0 \ > -lvtkRenderingOpenGL2-8.0 > > I think when using QMake, you will have to mess about with the > initialization of implementation modules [1] in order for the program > to run, either by using DEFINES like I did above, or using > VTK_MODULE_INIT. This is something you can get "for free" when using > CMake. > > I could never run my test app, since the VM (VirtualBox) doesn't have > a sufficient OpenGL implementation. But it compiled and linked at > least. > > Elvis > > [1] https://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized > >> >> Zoltan >> >> >> >> Am 16.10.2017 um 15:14 schrieb Elvis Stansvik: >>> >>> 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs : >>>> >>>> Unfortunately I cannot find such a file in that folder. I also searched >>>> any >>>> *.jom file there but the linker might have deleted them. >>> >>> >>> Yes sorry, I just realized that. See my earlier mail about the /U jom >>> flag. >>> >>> Elvis >>> >>>> >>>> Zoltan >>>> >>>> >>>> Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >>>>> >>>>> >>>>> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs : >>>>>> >>>>>> >>>>>> Dear Elvis, >>>>>> >>>>>> Thanks for the information. I have the files >>>>>> -lvtkGUISupportQt-8.0 \ >>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>> in the library list and the libary path is also given in the project >>>>>> file >>>>>> loaded in QtCreator but the compiler cannot resolve the symbol >>>>>> QVTKOpenGLWidget: >>>>>> >>>>>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>>>>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>>>>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 >>>>>> -w34189 >>>>>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>>>>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>>>>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>>>>> -IC:\Qt\5.8\msvc2013\include >>>>>> -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>>>>> -IC:\Qt\5.8\msvc2013\include\QtWidgets >>>>>> -IC:\Qt\5.8\msvc2013\include\QtGui >>>>>> -IC:\Qt\5.8\msvc2013\include\QtANGLE >>>>>> -IC:\Qt\5.8\msvc2013\include\QtCore >>>>>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>>>>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>>>>> >>>>>> distortionpage.cpp >>>>>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS >>>>>> "/MANIFESTDEPENDENCY:type='win32' >>>>>> name='Microsoft.Windows.Common-Controls' >>>>>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>>>>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>>>>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>> >>>>> >>>>> >>>>> I think in order to shorten the linker command line and not exceed >>>>> command line length limits, qmake is using a "Linker Response File" >>>>> (using @), so I think you have to look into >>>>> >>>>> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>> >>>>> to see the full list of linker arguments. >>>>> >>>>> Would be interesting to see the contents of that file. >>>>> >>>>> Elvis >>>>> >>>>>> >>>>>> distortionpage.obj : error LNK2019: unresolved external symbol >>>>>> "__declspec(dllimport) public: __thiscall >>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>>> Qt::WindowType>)" >>>>>> >>>>>> >>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>> referenced in function "public: void __thiscall >>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>> >>>>>> >>>>>> It seems that the compiler switches contain the include path for VTK >>>>>> but >>>>>> the >>>>>> library path and the libraries for VTK are missing from the linker >>>>>> options. >>>>>> I guess it must be a qmake issue. Thanks anyway. >>>>>> >>>>>> Regards, >>>>>> Zoltan >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>>>>> >>>>>>> >>>>>>> >>>>>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs >>>>>>> : >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Dear Dan, >>>>>>>> >>>>>>>> In QtCreator I added a QWidget to the UI form and used "Promote to >>>>>>>> ..." >>>>>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h in >>>>>>>> the >>>>>>>> header file of the application. However, when linking the source I >>>>>>>> get >>>>>>>> the >>>>>>>> error message >>>>>>>> >>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>>>>> Qt::WindowType>)" >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>> referenced in function "public: void __thiscall >>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>> >>>>>>>> >>>>>>>> It seems that the MSVC2013 linker cannot find the library of >>>>>>>> QVTKOpenGLWidget. I searched a library file with a similar name in >>>>>>>> the >>>>>>>> folder where CMake generated the VTK libraries with Qt support but I >>>>>>>> could >>>>>>>> not find it. I am just wondering if it is missing or some other >>>>>>>> library >>>>>>>> file >>>>>>>> with a completely different name contains this symbol. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> The class is part of the vtkGUISupportQt library (on Windows the files >>>>>>> would be vtkGUISupportQt-8.0.lib/dll). >>>>>>> >>>>>>> We're using the "promote" functionality in Qt Creator's Design mode to >>>>>>> promote a widget to our custom QVTKOpenGLWidget subclass. It should >>>>>>> work fine to promote to it directly. >>>>>>> >>>>>>> Elvis >>>>>>> >>>>>>>> >>>>>>>> Regards, >>>>>>>> Zoltan >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by adding >>>>>>>>> first >>>>>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So you >>>>>>>>> can >>>>>>>>> build the UI of your Qt application this way. >>>>>>>>> >>>>>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>>>>> >>>>>>>>> Hope this helps, >>>>>>>>> Dan >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>>>>> > >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Dear Mike, >>>>>>>>> >>>>>>>>> Thank you very much for your prompt answer. As I wrote to >>>>>>>>> Dan, >>>>>>>>> we >>>>>>>>> have to use QtCreator for the development here. Then I have >>>>>>>>> access >>>>>>>>> only for qmake and I can edit project files for it. If >>>>>>>>> QVTKOpenGLWidget is the only VTK widget class supported for >>>>>>>>> Qt5 >>>>>>>>> then >>>>>>>>> I ave to find out how to insert such an object into the UI >>>>>>>>> form >>>>>>>>> file >>>>>>>>> of QT. >>>>>>>>> >>>>>>>>> Kind regards, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>>>>> >>>>>>>>> Also, when working with VTK, it will be a lot easier to >>>>>>>>> switch >>>>>>>>> to using CMake instead of Qt project files (QtCreator >>>>>>>>> supports >>>>>>>>> CMake). Look at the examples Dan linked to. You will have >>>>>>>>> to >>>>>>>>> update the CMakelists.txt file for Qt. You will probably >>>>>>>>> have >>>>>>>>> to >>>>>>>>> add the following: >>>>>>>>> >>>>>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>>>>> >>>>>>>>> and update the target_link_libraries line(add >>>>>>>>> Qt5::Widget) , >>>>>>>>> e.g.,: >>>>>>>>> >>>>>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>>>>> ${VTK_LIBRARIES}) >>>>>>>>> >>>>>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>>>>> >>>>>>>>> >>>>>>>> >> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Zoltan, >>>>>>>>> This is unrelated to the error you are seeing >>>>>>>>> however: >>>>>>>>> >>>>>>>>> For Qt5 you'll need to use QVTKOpenGLWidget rather >>>>>>>>> than >>>>>>>>> QVTKWidget. See >>>>>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> All examples are converted to Qt5. Also, VTK master >>>>>>>>> has >>>>>>>>> a >>>>>>>>> number of >>>>>>>>> examples that have been converted to Qt5: >>>>>>>>> Examples/GUI/Qt >>>>>>>>> >>>>>>>>> Hope this helps, >>>>>>>>> Dan >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>>> >> >>>>>>>>> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Dear all, >>>>>>>>> >>>>>>>>> In CMake I generated a solution project of >>>>>>>>> VTK-8.0.1 >>>>>>>>> with Qt5 >>>>>>>>> support for MSVS2013. After having run the >>>>>>>>> ALL_BUILD >>>>>>>>> and INSTALL >>>>>>>>> projects with the install prefix C:\VTK\8.0.1 in >>>>>>>>> VM2013 >>>>>>>>> I could >>>>>>>>> installed the Win32 bit binaries of VTK 8.0.1 in >>>>>>>>> that >>>>>>>>> folder. >>>>>>>>> The header files and the libraries are located >>>>>>>>> in >>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>>>>> C:\VTK\8.0.1\lib. >>>>>>>>> >>>>>>>>> I copied the file QVTKWidgetPlugin.dll from the >>>>>>>>> VTK >>>>>>>>> binary >>>>>>>>> folders to the plugin folder of QTCreator, which >>>>>>>>> uses >>>>>>>>> QT 5.8 >>>>>>>>> msvs2013 32 bit version. >>>>>>>>> >>>>>>>>> Then I set the include and library paths and >>>>>>>>> added >>>>>>>>> all >>>>>>>>> the VTK >>>>>>>>> libary files from C:\VTK\8.0.1\lib for the >>>>>>>>> linker >>>>>>>>> setting in the >>>>>>>>> project file >>>>>>>>> of a QT application in QtCreator: >>>>>>>>> >>>>>>>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>>>>> >>>>>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>>>>> -lvtkRenderingLOD-8.0 \ >>>>>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>>>>> -lvtkRenderingQt-8.0 \ >>>>>>>>> -lvtkRenderingVolume-8.0 \ >>>>>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>>>>> -lvtksqlite-8.0 \ >>>>>>>>> -lvtksys-8.0 \ >>>>>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>>>>> -lvtkTestingRendering-8.0 \ >>>>>>>>> -lvtktiff-8.0 \ >>>>>>>>> -lvtkverdict-8.0 \ >>>>>>>>> -lvtkViewsContext2D-8.0 \ >>>>>>>>> -lvtkViewsCore-8.0 \ >>>>>>>>> -lvtkViewsInfovis-8.0 \ >>>>>>>>> -lvtkViewsQt-8.0 \ >>>>>>>>> -lvtkzlib-8.0 \ >>>>>>>>> -lvtkalglib-8.0 \ >>>>>>>>> -lvtkChartsCore-8.0 \ >>>>>>>>> -lvtkCommonColor-8.0 \ >>>>>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>>>>> -lvtkCommonCore-8.0 \ >>>>>>>>> -lvtkCommonDataModel-8.0 \ >>>>>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>>>>> -lvtkCommonMath-8.0 \ >>>>>>>>> -lvtkCommonMisc-8.0 \ >>>>>>>>> -lvtkCommonSystem-8.0 \ >>>>>>>>> -lvtkCommonTransforms-8.0 \ >>>>>>>>> -lvtkDICOMParser-8.0 \ >>>>>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>>>>> -lvtkexoIIc-8.0 \ >>>>>>>>> -lvtkexpat-8.0 \ >>>>>>>>> -lvtkFiltersAMR-8.0 \ >>>>>>>>> -lvtkFiltersCore-8.0 \ >>>>>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>>>>> -lvtkFiltersImaging-8.0 \ >>>>>>>>> -lvtkFiltersModeling-8.0 \ >>>>>>>>> -lvtkFiltersParallel-8.0 \ >>>>>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>>>>> -lvtkFiltersPoints-8.0 \ >>>>>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>>>>> -lvtkFiltersSelection-8.0 \ >>>>>>>>> -lvtkFiltersSMP-8.0 \ >>>>>>>>> -lvtkFiltersSources-8.0 \ >>>>>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>>>>> -lvtkFiltersTexture-8.0 \ >>>>>>>>> -lvtkFiltersTopology-8.0 \ >>>>>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>>>>> -lvtkfreetype-8.0 \ >>>>>>>>> -lvtkGeovisCore-8.0 \ >>>>>>>>> -lvtkgl2ps-8.0 \ >>>>>>>>> -lvtkglew-8.0 \ >>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>> -lvtkhdf5_hl-8.0 \ >>>>>>>>> -lvtkhdf5-8.0 \ >>>>>>>>> -lvtkImagingColor-8.0 \ >>>>>>>>> -lvtkImagingCore-8.0 \ >>>>>>>>> -lvtkImagingFourier-8.0 \ >>>>>>>>> -lvtkImagingGeneral-8.0 \ >>>>>>>>> -lvtkImagingHybrid-8.0 \ >>>>>>>>> -lvtkImagingMath-8.0 \ >>>>>>>>> -lvtkImagingMorphological-8.0 \ >>>>>>>>> -lvtkImagingSources-8.0 \ >>>>>>>>> -lvtkImagingStatistics-8.0 \ >>>>>>>>> -lvtkImagingStencil-8.0 \ >>>>>>>>> -lvtkInfovisCore-8.0 \ >>>>>>>>> -lvtkInfovisLayout-8.0 \ >>>>>>>>> -lvtkInteractionImage-8.0 \ >>>>>>>>> -lvtkInteractionStyle-8.0 \ >>>>>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>>>>> -lvtkIOAMR-8.0 \ >>>>>>>>> -lvtkIOCore-8.0 \ >>>>>>>>> -lvtkIOEnSight-8.0 \ >>>>>>>>> -lvtkIOExodus-8.0 \ >>>>>>>>> -lvtkIOExport-8.0 \ >>>>>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>>>>> -lvtkIOGeometry-8.0 \ >>>>>>>>> -lvtkIOImage-8.0 \ >>>>>>>>> -lvtkIOImport-8.0 \ >>>>>>>>> -lvtkIOInfovis-8.0 \ >>>>>>>>> -lvtkIOLegacy-8.0 \ >>>>>>>>> -lvtkIOLSDyna-8.0 \ >>>>>>>>> -lvtkIOMINC-8.0 \ >>>>>>>>> -lvtkIOMovie-8.0 \ >>>>>>>>> -lvtkIONetCDF-8.0 \ >>>>>>>>> -lvtkIOParallel-8.0 \ >>>>>>>>> -lvtkIOParallelXML-8.0 \ >>>>>>>>> -lvtkIOPLY-8.0 \ >>>>>>>>> -lvtkIOSQL-8.0 \ >>>>>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>>>>> -lvtkIOVideo-8.0 \ >>>>>>>>> -lvtkIOXML-8.0 \ >>>>>>>>> -lvtkIOXMLParser-8.0 \ >>>>>>>>> -lvtkjpeg-8.0 \ >>>>>>>>> -lvtkjsoncpp-8.0 \ >>>>>>>>> -lvtklibharu-8.0 \ >>>>>>>>> -lvtklibxml2-8.0 \ >>>>>>>>> -lvtkLocalExample-8.0 \ >>>>>>>>> -lvtklz4-8.0 \ >>>>>>>>> -lvtkmetaio-8.0 \ >>>>>>>>> -lvtknetcdf_c++ \ >>>>>>>>> -lvtkNetCDF-8.0 \ >>>>>>>>> -lvtkoggtheora-8.0 \ >>>>>>>>> -lvtkParallelCore-8.0 \ >>>>>>>>> -lvtkpng-8.0 \ >>>>>>>>> -lvtkproj4-8.0 \ >>>>>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>>>>> -lvtkRenderingCore-8.0 \ >>>>>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>>>>> -lvtkRenderingImage-8.0 \ >>>>>>>>> >>>>>>>>> >>>>>>>>> However, if I add a QVTKWidget on the UI file of >>>>>>>>> the >>>>>>>>> application, include the file QVTKWidget.h in >>>>>>>>> the >>>>>>>>> header file of >>>>>>>>> the application and I try to link it in >>>>>>>>> QtCreator >>>>>>>>> with >>>>>>>>> the >>>>>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>>>>>>> toolchain >>>>>>>>> of >>>>>>>>> QtCreator) sends error messages for unresolved >>>>>>>>> external >>>>>>>>> symbols >>>>>>>>> for all the functions/classes belonging to the >>>>>>>>> QVTKWidget, such as >>>>>>>>> >>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: >>>>>>>>> unresolved >>>>>>>>> external >>>>>>>>> symbol "__declspec(dllimport) public: __thiscall >>>>>>>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>>>>>>> QFlags>>>>>>>> Qt::WindowType>)" >>>>>>>>> >>>>>>>>> >>>>>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>> >>>>>>>>> >>>>>>>>> It seems that the linker could not find the >>>>>>>>> libary >>>>>>>>> for >>>>>>>>> the >>>>>>>>> QVTKWidget plugin, which is loaded since I could >>>>>>>>> chose >>>>>>>>> QtWidget >>>>>>>>> from the widget list in the UI form editor in >>>>>>>>> QtCreator. I do >>>>>>>>> not see any ABI issue here since I use the 32 >>>>>>>>> bit >>>>>>>>> mscv2103 >>>>>>>>> version of Qt and I also compiled and linked the >>>>>>>>> 32 >>>>>>>>> bit >>>>>>>>> version >>>>>>>>> of VTK libaries and plugin files with MSVS2013. >>>>>>>>> I >>>>>>>>> am >>>>>>>>> wondering >>>>>>>>> if anybody could make VTK-8.1 working with Qt. >>>>>>>>> Thanks >>>>>>>>> a >>>>>>>>> lot. >>>>>>>>> >>>>>>>>> Kind regars, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>>>>>>> >>>>>>>> >: >>>>>>>>> >>>>>>>>> Hi Zoltan, >>>>>>>>> >>>>>>>>> I don't know how the widget should be >>>>>>>>> installed >>>>>>>>> or >>>>>>>>> set up in >>>>>>>>> a project, but you could just search for the >>>>>>>>> header >>>>>>>>> file and >>>>>>>>> point INCLUDEPATH to the folder that >>>>>>>>> contains >>>>>>>>> it. >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Joni >>>>>>>>> >>>>>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>>> > wrote: >>>>>>>>> >>>>>>>>> Hi Joni, >>>>>>>>> >>>>>>>>> I see. However I found MSCV2013 32 bit >>>>>>>>> version >>>>>>>>> for Qt >>>>>>>>> 5.8. I install >>>>>>>>> that version and I built the VTK >>>>>>>>> binaries >>>>>>>>> for >>>>>>>>> win32 >>>>>>>>> platform with >>>>>>>>> MVS2013. After having copied the VTK >>>>>>>>> plugin >>>>>>>>> file into >>>>>>>>> the plugin folder >>>>>>>>> of QtCreator I could launch it >>>>>>>>> successfully. >>>>>>>>> The >>>>>>>>> QVTKWidget is in the >>>>>>>>> Widget list of QtCreator now. I could >>>>>>>>> insert a >>>>>>>>> QVTKWidget in the UI form >>>>>>>>> as well. The only problem now is that >>>>>>>>> QtCreator >>>>>>>>> cannot >>>>>>>>> find the header >>>>>>>>> file for QVTKWidget. It is not cleat how >>>>>>>>> to >>>>>>>>> set >>>>>>>>> the >>>>>>>>> INCLUDEPATH in the >>>>>>>>> project file since VS2103 did not create >>>>>>>>> a >>>>>>>>> separate >>>>>>>>> include folder in >>>>>>>>> the target folder C:/VTK/bin for the VTK >>>>>>>>> binaries. Only >>>>>>>>> the library >>>>>>>>> files have a separate folder, >>>>>>>>> C:/VTK/bin/lib/Release. >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>>>>> support at qt.io >>>>>>>>> >>>>>>>>> >>>>>>>> >: >>>>>>>>> >>>>>>>>> Hi Zoltan, >>>>>>>>> >>>>>>>>> On 06 October 2017 at 13:00:00 EEST >>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>>> > wrote: >>>>>>>>> >>>>>>>>> Hi Joni, >>>>>>>>> >>>>>>>>> Thank you very much for your >>>>>>>>> answer. >>>>>>>>> Then I try >>>>>>>>> to install everything >>>>>>>>> from scratch. The only prolem is >>>>>>>>> I >>>>>>>>> have >>>>>>>>> only >>>>>>>>> MSVC 2103 and the only >>>>>>>>> option in the selection list of >>>>>>>>> the >>>>>>>>> online >>>>>>>>> installer for MSVC 2013 is >>>>>>>>> the 64 bit version. Is there >>>>>>>>> somewhere >>>>>>>>> an >>>>>>>>> installer on your website wich >>>>>>>>> provides a relatively new Qt >>>>>>>>> version >>>>>>>>> with MSVC >>>>>>>>> 2103 32 bit version? >>>>>>>>> Thank you very much for your >>>>>>>>> help. >>>>>>>>> >>>>>>>>> >>>>>>>>> No, but you could compile it from >>>>>>>>> source >>>>>>>>> yourself. >>>>>>>>> However, note that you cannot build >>>>>>>>> plugins >>>>>>>>> for new >>>>>>>>> Qt Creator with MSVC 2013 as it uses >>>>>>>>> different ABI. >>>>>>>>> You could use MSVC 2015 or MSVC >>>>>>>>> 2017. >>>>>>>>> >>>>>>>>> Or you could build 64bit version of >>>>>>>>> Qt >>>>>>>>> Creator from >>>>>>>>> source with that Qt version you have >>>>>>>>> installed. >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Joni >>>>>>>>> -- >>>>>>>>> Joni Poikelin >>>>>>>>> Software Engineer, >>>>>>>>> The Qt Company >>>>>>>>> ? >>>>>>>>> FAQs - >>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Joni Poikelin >>>>>>>>> Software Engineer, >>>>>>>>> The Qt Company >>>>>>>>> ? >>>>>>>>> FAQs - >>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK >>>>>>>>> FAQ >>>>>>>>> at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>>>>> at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> > >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>>> >>>> >>> >> From elvis.stansvik at orexplore.com Mon Oct 16 11:00:44 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 16 Oct 2017 17:00:44 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: <059632bb-2ac0-b507-dc96-a1573eb4f483@esi-group.com> References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> <059632bb-2ac0-b507-dc96-a1573eb4f483@esi-group.com> Message-ID: 2017-10-16 16:50 GMT+02:00 Zoltan Kovacs : > Thanks for the detailed information! It is very useful, especially the line > > DEFINES += > vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) > > I inserted it into my project file but I get the error "no override found > for 'vtkPolyDataMapper'". I guess I must include other switches in the > shell_quote argument too, such as vtkRenderingVolumeOpenGL or something > else. Hm, I'm not sure, but think that should have been taken care of by the vtkRenderingOpenGL2. I may have messed something up with the QMake syntax, so it would be interesting to see the actual compile line for one of your sources (again with /U I think), to see what the /D-flag ended up looking like. (Note: Everything is definitely much easier with CMake, and I would highly recommend taking the time switching to it. We use it for our VTK+Qt project and it works just fine. We also use Qt Creator as the primary IDE, and it can open CMakeLists.txt.) Elvis > > Zoltan > > > Am 16.10.2017 um 16:10 schrieb Elvis Stansvik: >> >> 2017-10-16 15:47 GMT+02:00 Zoltan Kovacs : >>> >>> In the project settings I set from Debug version to Release version and I >>> can link the porject now. It seems that the VTK Relase libaries cannot be >>> used with Debug version of the QtCreator project. I was not careful >>> enough >>> when I tried to buil the debug version of the Qt app. Thanks a lot for >>> the >>> linker output info! >> >> >> Ah, glad to hear it. I started experimenting myself in a Windows VM, >> and came up with this .pro file for my minimal test (the cone example >> adapted to use a QVTKOpenGLWidget promoted from QWidget in the Design >> mode): >> >> CONFIG += c++11 >> QT += core gui widgets >> TARGET = VTKQtQMakeTest >> TEMPLATE = app >> SOURCES += main.cpp mainwindow.cpp >> HEADERS += mainwindow.h >> FORMS += mainwindow.ui >> >> INCLUDEPATH += C:/Users/Elvis/Dev/VTK-8.0.1-inst/include/vtk-8.0 >> DEFINES += >> vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >> LIBS += -L"C:/Users/Elvis/Dev/VTK-8.0.1-inst/lib" >> LIBS += -lvtkCommonCore-8.0 \ >> -lvtkCommonDataModel-8.0 \ >> -lvtkCommonExecutionModel-8.0 \ >> -lvtkCommonMath-8.0 \ >> -lvtkCommonMisc-8.0 \ >> -lvtkCommonTransforms-8.0 \ >> -lvtkFiltersCore-8.0 \ >> -lvtkFiltersSources-8.0 \ >> -lvtkGUISupportQt-8.0 \ >> -lvtkInteractionStyle-8.0 \ >> -lvtkRenderingCore-8.0 \ >> -lvtkRenderingOpenGL2-8.0 >> >> I think when using QMake, you will have to mess about with the >> initialization of implementation modules [1] in order for the program >> to run, either by using DEFINES like I did above, or using >> VTK_MODULE_INIT. This is something you can get "for free" when using >> CMake. >> >> I could never run my test app, since the VM (VirtualBox) doesn't have >> a sufficient OpenGL implementation. But it compiled and linked at >> least. >> >> Elvis >> >> [1] >> https://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized >> >>> >>> Zoltan >>> >>> >>> >>> Am 16.10.2017 um 15:14 schrieb Elvis Stansvik: >>>> >>>> >>>> 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs : >>>>> >>>>> >>>>> Unfortunately I cannot find such a file in that folder. I also >>>>> searched >>>>> any >>>>> *.jom file there but the linker might have deleted them. >>>> >>>> >>>> >>>> Yes sorry, I just realized that. See my earlier mail about the /U jom >>>> flag. >>>> >>>> Elvis >>>> >>>>> >>>>> Zoltan >>>>> >>>>> >>>>> Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >>>>>> >>>>>> >>>>>> >>>>>> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs >>>>>> : >>>>>>> >>>>>>> >>>>>>> >>>>>>> Dear Elvis, >>>>>>> >>>>>>> Thanks for the information. I have the files >>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>> in the library list and the libary path is also given in the project >>>>>>> file >>>>>>> loaded in QtCreator but the compiler cannot resolve the symbol >>>>>>> QVTKOpenGLWidget: >>>>>>> >>>>>>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>>>>>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>>>>>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 >>>>>>> -w34189 >>>>>>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>>>>>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>>>>>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>>>>>> -IC:\Qt\5.8\msvc2013\include >>>>>>> -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>>>>>> -IC:\Qt\5.8\msvc2013\include\QtWidgets >>>>>>> -IC:\Qt\5.8\msvc2013\include\QtGui >>>>>>> -IC:\Qt\5.8\msvc2013\include\QtANGLE >>>>>>> -IC:\Qt\5.8\msvc2013\include\QtCore >>>>>>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>>>>>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>>>>>> >>>>>>> distortionpage.cpp >>>>>>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG >>>>>>> /SUBSYSTEM:WINDOWS >>>>>>> "/MANIFESTDEPENDENCY:type='win32' >>>>>>> name='Microsoft.Windows.Common-Controls' >>>>>>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>>>>>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>>>>>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> I think in order to shorten the linker command line and not exceed >>>>>> command line length limits, qmake is using a "Linker Response File" >>>>>> (using @), so I think you have to look into >>>>>> >>>>>> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>> >>>>>> to see the full list of linker arguments. >>>>>> >>>>>> Would be interesting to see the contents of that file. >>>>>> >>>>>> Elvis >>>>>> >>>>>>> >>>>>>> distortionpage.obj : error LNK2019: unresolved external symbol >>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>>>> Qt::WindowType>)" >>>>>>> >>>>>>> >>>>>>> >>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>> referenced in function "public: void __thiscall >>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>> >>>>>>> >>>>>>> It seems that the compiler switches contain the include path for VTK >>>>>>> but >>>>>>> the >>>>>>> library path and the libraries for VTK are missing from the linker >>>>>>> options. >>>>>>> I guess it must be a qmake issue. Thanks anyway. >>>>>>> >>>>>>> Regards, >>>>>>> Zoltan >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs >>>>>>>> : >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Dear Dan, >>>>>>>>> >>>>>>>>> In QtCreator I added a QWidget to the UI form and used "Promote to >>>>>>>>> ..." >>>>>>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h >>>>>>>>> in >>>>>>>>> the >>>>>>>>> header file of the application. However, when linking the source I >>>>>>>>> get >>>>>>>>> the >>>>>>>>> error message >>>>>>>>> >>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class >>>>>>>>> QFlags>>>>>>>> Qt::WindowType>)" >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>> >>>>>>>>> >>>>>>>>> It seems that the MSVC2013 linker cannot find the library of >>>>>>>>> QVTKOpenGLWidget. I searched a library file with a similar name in >>>>>>>>> the >>>>>>>>> folder where CMake generated the VTK libraries with Qt support but >>>>>>>>> I >>>>>>>>> could >>>>>>>>> not find it. I am just wondering if it is missing or some other >>>>>>>>> library >>>>>>>>> file >>>>>>>>> with a completely different name contains this symbol. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The class is part of the vtkGUISupportQt library (on Windows the >>>>>>>> files >>>>>>>> would be vtkGUISupportQt-8.0.lib/dll). >>>>>>>> >>>>>>>> We're using the "promote" functionality in Qt Creator's Design mode >>>>>>>> to >>>>>>>> promote a widget to our custom QVTKOpenGLWidget subclass. It should >>>>>>>> work fine to promote to it directly. >>>>>>>> >>>>>>>> Elvis >>>>>>>> >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by >>>>>>>>>> adding >>>>>>>>>> first >>>>>>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So >>>>>>>>>> you >>>>>>>>>> can >>>>>>>>>> build the UI of your Qt application this way. >>>>>>>>>> >>>>>>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>>>>>> >>>>>>>>>> Hope this helps, >>>>>>>>>> Dan >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>>>>>> > >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>> Dear Mike, >>>>>>>>>> >>>>>>>>>> Thank you very much for your prompt answer. As I wrote to >>>>>>>>>> Dan, >>>>>>>>>> we >>>>>>>>>> have to use QtCreator for the development here. Then I >>>>>>>>>> have >>>>>>>>>> access >>>>>>>>>> only for qmake and I can edit project files for it. If >>>>>>>>>> QVTKOpenGLWidget is the only VTK widget class supported >>>>>>>>>> for >>>>>>>>>> Qt5 >>>>>>>>>> then >>>>>>>>>> I ave to find out how to insert such an object into the UI >>>>>>>>>> form >>>>>>>>>> file >>>>>>>>>> of QT. >>>>>>>>>> >>>>>>>>>> Kind regards, >>>>>>>>>> Zoltan >>>>>>>>>> >>>>>>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>>>>>> >>>>>>>>>> Also, when working with VTK, it will be a lot easier >>>>>>>>>> to >>>>>>>>>> switch >>>>>>>>>> to using CMake instead of Qt project files (QtCreator >>>>>>>>>> supports >>>>>>>>>> CMake). Look at the examples Dan linked to. You will >>>>>>>>>> have >>>>>>>>>> to >>>>>>>>>> update the CMakelists.txt file for Qt. You will >>>>>>>>>> probably >>>>>>>>>> have >>>>>>>>>> to >>>>>>>>>> add the following: >>>>>>>>>> >>>>>>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>>>>>> >>>>>>>>>> and update the target_link_libraries line(add >>>>>>>>>> Qt5::Widget) , >>>>>>>>>> e.g.,: >>>>>>>>>> >>>>>>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>>>>>> ${VTK_LIBRARIES}) >>>>>>>>>> >>>>>>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >> >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>> Zoltan, >>>>>>>>>> This is unrelated to the error you are seeing >>>>>>>>>> however: >>>>>>>>>> >>>>>>>>>> For Qt5 you'll need to use QVTKOpenGLWidget >>>>>>>>>> rather >>>>>>>>>> than >>>>>>>>>> QVTKWidget. See >>>>>>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> All examples are converted to Qt5. Also, VTK >>>>>>>>>> master >>>>>>>>>> has >>>>>>>>>> a >>>>>>>>>> number of >>>>>>>>>> examples that have been converted to Qt5: >>>>>>>>>> Examples/GUI/Qt >>>>>>>>>> >>>>>>>>>> Hope this helps, >>>>>>>>>> Dan >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>>>>>>>> >>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>>> >> >>>>>>>>>> >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>> Dear all, >>>>>>>>>> >>>>>>>>>> In CMake I generated a solution project of >>>>>>>>>> VTK-8.0.1 >>>>>>>>>> with Qt5 >>>>>>>>>> support for MSVS2013. After having run the >>>>>>>>>> ALL_BUILD >>>>>>>>>> and INSTALL >>>>>>>>>> projects with the install prefix C:\VTK\8.0.1 >>>>>>>>>> in >>>>>>>>>> VM2013 >>>>>>>>>> I could >>>>>>>>>> installed the Win32 bit binaries of VTK 8.0.1 >>>>>>>>>> in >>>>>>>>>> that >>>>>>>>>> folder. >>>>>>>>>> The header files and the libraries are >>>>>>>>>> located >>>>>>>>>> in >>>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>>>>>> C:\VTK\8.0.1\lib. >>>>>>>>>> >>>>>>>>>> I copied the file QVTKWidgetPlugin.dll from >>>>>>>>>> the >>>>>>>>>> VTK >>>>>>>>>> binary >>>>>>>>>> folders to the plugin folder of QTCreator, >>>>>>>>>> which >>>>>>>>>> uses >>>>>>>>>> QT 5.8 >>>>>>>>>> msvs2013 32 bit version. >>>>>>>>>> >>>>>>>>>> Then I set the include and library paths and >>>>>>>>>> added >>>>>>>>>> all >>>>>>>>>> the VTK >>>>>>>>>> libary files from C:\VTK\8.0.1\lib for the >>>>>>>>>> linker >>>>>>>>>> setting in the >>>>>>>>>> project file >>>>>>>>>> of a QT application in QtCreator: >>>>>>>>>> >>>>>>>>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>>>>>> >>>>>>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>>>>>> -lvtkRenderingLOD-8.0 \ >>>>>>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>>>>>> -lvtkRenderingQt-8.0 \ >>>>>>>>>> -lvtkRenderingVolume-8.0 \ >>>>>>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>>>>>> -lvtksqlite-8.0 \ >>>>>>>>>> -lvtksys-8.0 \ >>>>>>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>>>>>> -lvtkTestingRendering-8.0 \ >>>>>>>>>> -lvtktiff-8.0 \ >>>>>>>>>> -lvtkverdict-8.0 \ >>>>>>>>>> -lvtkViewsContext2D-8.0 \ >>>>>>>>>> -lvtkViewsCore-8.0 \ >>>>>>>>>> -lvtkViewsInfovis-8.0 \ >>>>>>>>>> -lvtkViewsQt-8.0 \ >>>>>>>>>> -lvtkzlib-8.0 \ >>>>>>>>>> -lvtkalglib-8.0 \ >>>>>>>>>> -lvtkChartsCore-8.0 \ >>>>>>>>>> -lvtkCommonColor-8.0 \ >>>>>>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>>>>>> -lvtkCommonCore-8.0 \ >>>>>>>>>> -lvtkCommonDataModel-8.0 \ >>>>>>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>>>>>> -lvtkCommonMath-8.0 \ >>>>>>>>>> -lvtkCommonMisc-8.0 \ >>>>>>>>>> -lvtkCommonSystem-8.0 \ >>>>>>>>>> -lvtkCommonTransforms-8.0 \ >>>>>>>>>> -lvtkDICOMParser-8.0 \ >>>>>>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>>>>>> -lvtkexoIIc-8.0 \ >>>>>>>>>> -lvtkexpat-8.0 \ >>>>>>>>>> -lvtkFiltersAMR-8.0 \ >>>>>>>>>> -lvtkFiltersCore-8.0 \ >>>>>>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>>>>>> -lvtkFiltersImaging-8.0 \ >>>>>>>>>> -lvtkFiltersModeling-8.0 \ >>>>>>>>>> -lvtkFiltersParallel-8.0 \ >>>>>>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>>>>>> -lvtkFiltersPoints-8.0 \ >>>>>>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>>>>>> -lvtkFiltersSelection-8.0 \ >>>>>>>>>> -lvtkFiltersSMP-8.0 \ >>>>>>>>>> -lvtkFiltersSources-8.0 \ >>>>>>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>>>>>> -lvtkFiltersTexture-8.0 \ >>>>>>>>>> -lvtkFiltersTopology-8.0 \ >>>>>>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>>>>>> -lvtkfreetype-8.0 \ >>>>>>>>>> -lvtkGeovisCore-8.0 \ >>>>>>>>>> -lvtkgl2ps-8.0 \ >>>>>>>>>> -lvtkglew-8.0 \ >>>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>>> -lvtkhdf5_hl-8.0 \ >>>>>>>>>> -lvtkhdf5-8.0 \ >>>>>>>>>> -lvtkImagingColor-8.0 \ >>>>>>>>>> -lvtkImagingCore-8.0 \ >>>>>>>>>> -lvtkImagingFourier-8.0 \ >>>>>>>>>> -lvtkImagingGeneral-8.0 \ >>>>>>>>>> -lvtkImagingHybrid-8.0 \ >>>>>>>>>> -lvtkImagingMath-8.0 \ >>>>>>>>>> -lvtkImagingMorphological-8.0 \ >>>>>>>>>> -lvtkImagingSources-8.0 \ >>>>>>>>>> -lvtkImagingStatistics-8.0 \ >>>>>>>>>> -lvtkImagingStencil-8.0 \ >>>>>>>>>> -lvtkInfovisCore-8.0 \ >>>>>>>>>> -lvtkInfovisLayout-8.0 \ >>>>>>>>>> -lvtkInteractionImage-8.0 \ >>>>>>>>>> -lvtkInteractionStyle-8.0 \ >>>>>>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>>>>>> -lvtkIOAMR-8.0 \ >>>>>>>>>> -lvtkIOCore-8.0 \ >>>>>>>>>> -lvtkIOEnSight-8.0 \ >>>>>>>>>> -lvtkIOExodus-8.0 \ >>>>>>>>>> -lvtkIOExport-8.0 \ >>>>>>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>>>>>> -lvtkIOGeometry-8.0 \ >>>>>>>>>> -lvtkIOImage-8.0 \ >>>>>>>>>> -lvtkIOImport-8.0 \ >>>>>>>>>> -lvtkIOInfovis-8.0 \ >>>>>>>>>> -lvtkIOLegacy-8.0 \ >>>>>>>>>> -lvtkIOLSDyna-8.0 \ >>>>>>>>>> -lvtkIOMINC-8.0 \ >>>>>>>>>> -lvtkIOMovie-8.0 \ >>>>>>>>>> -lvtkIONetCDF-8.0 \ >>>>>>>>>> -lvtkIOParallel-8.0 \ >>>>>>>>>> -lvtkIOParallelXML-8.0 \ >>>>>>>>>> -lvtkIOPLY-8.0 \ >>>>>>>>>> -lvtkIOSQL-8.0 \ >>>>>>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>>>>>> -lvtkIOVideo-8.0 \ >>>>>>>>>> -lvtkIOXML-8.0 \ >>>>>>>>>> -lvtkIOXMLParser-8.0 \ >>>>>>>>>> -lvtkjpeg-8.0 \ >>>>>>>>>> -lvtkjsoncpp-8.0 \ >>>>>>>>>> -lvtklibharu-8.0 \ >>>>>>>>>> -lvtklibxml2-8.0 \ >>>>>>>>>> -lvtkLocalExample-8.0 \ >>>>>>>>>> -lvtklz4-8.0 \ >>>>>>>>>> -lvtkmetaio-8.0 \ >>>>>>>>>> -lvtknetcdf_c++ \ >>>>>>>>>> -lvtkNetCDF-8.0 \ >>>>>>>>>> -lvtkoggtheora-8.0 \ >>>>>>>>>> -lvtkParallelCore-8.0 \ >>>>>>>>>> -lvtkpng-8.0 \ >>>>>>>>>> -lvtkproj4-8.0 \ >>>>>>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>>>>>> -lvtkRenderingCore-8.0 \ >>>>>>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>>>>>> -lvtkRenderingImage-8.0 \ >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> However, if I add a QVTKWidget on the UI file >>>>>>>>>> of >>>>>>>>>> the >>>>>>>>>> application, include the file QVTKWidget.h in >>>>>>>>>> the >>>>>>>>>> header file of >>>>>>>>>> the application and I try to link it in >>>>>>>>>> QtCreator >>>>>>>>>> with >>>>>>>>>> the >>>>>>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>>>>>>>> toolchain >>>>>>>>>> of >>>>>>>>>> QtCreator) sends error messages for >>>>>>>>>> unresolved >>>>>>>>>> external >>>>>>>>>> symbols >>>>>>>>>> for all the functions/classes belonging to >>>>>>>>>> the >>>>>>>>>> QVTKWidget, such as >>>>>>>>>> >>>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: >>>>>>>>>> unresolved >>>>>>>>>> external >>>>>>>>>> symbol "__declspec(dllimport) public: >>>>>>>>>> __thiscall >>>>>>>>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>>>>>>>> QFlags>>>>>>>>> Qt::WindowType>)" >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>> referenced in function "public: void >>>>>>>>>> __thiscall >>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>>> >>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> It seems that the linker could not find the >>>>>>>>>> libary >>>>>>>>>> for >>>>>>>>>> the >>>>>>>>>> QVTKWidget plugin, which is loaded since I >>>>>>>>>> could >>>>>>>>>> chose >>>>>>>>>> QtWidget >>>>>>>>>> from the widget list in the UI form editor in >>>>>>>>>> QtCreator. I do >>>>>>>>>> not see any ABI issue here since I use the 32 >>>>>>>>>> bit >>>>>>>>>> mscv2103 >>>>>>>>>> version of Qt and I also compiled and linked >>>>>>>>>> the >>>>>>>>>> 32 >>>>>>>>>> bit >>>>>>>>>> version >>>>>>>>>> of VTK libaries and plugin files with >>>>>>>>>> MSVS2013. >>>>>>>>>> I >>>>>>>>>> am >>>>>>>>>> wondering >>>>>>>>>> if anybody could make VTK-8.1 working with >>>>>>>>>> Qt. >>>>>>>>>> Thanks >>>>>>>>>> a >>>>>>>>>> lot. >>>>>>>>>> >>>>>>>>>> Kind regars, >>>>>>>>>> Zoltan >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Zoltan >>>>>>>>>> >>>>>>>>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>>>>>>>> >>>>>>>>> >: >>>>>>>>>> >>>>>>>>>> Hi Zoltan, >>>>>>>>>> >>>>>>>>>> I don't know how the widget should be >>>>>>>>>> installed >>>>>>>>>> or >>>>>>>>>> set up in >>>>>>>>>> a project, but you could just search for >>>>>>>>>> the >>>>>>>>>> header >>>>>>>>>> file and >>>>>>>>>> point INCLUDEPATH to the folder that >>>>>>>>>> contains >>>>>>>>>> it. >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Joni >>>>>>>>>> >>>>>>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>>> > wrote: >>>>>>>>>> >>>>>>>>>> Hi Joni, >>>>>>>>>> >>>>>>>>>> I see. However I found MSCV2013 32 >>>>>>>>>> bit >>>>>>>>>> version >>>>>>>>>> for Qt >>>>>>>>>> 5.8. I install >>>>>>>>>> that version and I built the VTK >>>>>>>>>> binaries >>>>>>>>>> for >>>>>>>>>> win32 >>>>>>>>>> platform with >>>>>>>>>> MVS2013. After having copied the VTK >>>>>>>>>> plugin >>>>>>>>>> file into >>>>>>>>>> the plugin folder >>>>>>>>>> of QtCreator I could launch it >>>>>>>>>> successfully. >>>>>>>>>> The >>>>>>>>>> QVTKWidget is in the >>>>>>>>>> Widget list of QtCreator now. I could >>>>>>>>>> insert a >>>>>>>>>> QVTKWidget in the UI form >>>>>>>>>> as well. The only problem now is that >>>>>>>>>> QtCreator >>>>>>>>>> cannot >>>>>>>>>> find the header >>>>>>>>>> file for QVTKWidget. It is not cleat >>>>>>>>>> how >>>>>>>>>> to >>>>>>>>>> set >>>>>>>>>> the >>>>>>>>>> INCLUDEPATH in the >>>>>>>>>> project file since VS2103 did not >>>>>>>>>> create >>>>>>>>>> a >>>>>>>>>> separate >>>>>>>>>> include folder in >>>>>>>>>> the target folder C:/VTK/bin for the >>>>>>>>>> VTK >>>>>>>>>> binaries. Only >>>>>>>>>> the library >>>>>>>>>> files have a separate folder, >>>>>>>>>> C:/VTK/bin/lib/Release. >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Zoltan >>>>>>>>>> >>>>>>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>>>>>> support at qt.io >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >: >>>>>>>>>> >>>>>>>>>> Hi Zoltan, >>>>>>>>>> >>>>>>>>>> On 06 October 2017 at 13:00:00 >>>>>>>>>> EEST >>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>>> > wrote: >>>>>>>>>> >>>>>>>>>> Hi Joni, >>>>>>>>>> >>>>>>>>>> Thank you very much for your >>>>>>>>>> answer. >>>>>>>>>> Then I try >>>>>>>>>> to install everything >>>>>>>>>> from scratch. The only prolem >>>>>>>>>> is >>>>>>>>>> I >>>>>>>>>> have >>>>>>>>>> only >>>>>>>>>> MSVC 2103 and the only >>>>>>>>>> option in the selection list >>>>>>>>>> of >>>>>>>>>> the >>>>>>>>>> online >>>>>>>>>> installer for MSVC 2013 is >>>>>>>>>> the 64 bit version. Is there >>>>>>>>>> somewhere >>>>>>>>>> an >>>>>>>>>> installer on your website >>>>>>>>>> wich >>>>>>>>>> provides a relatively new Qt >>>>>>>>>> version >>>>>>>>>> with MSVC >>>>>>>>>> 2103 32 bit version? >>>>>>>>>> Thank you very much for your >>>>>>>>>> help. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> No, but you could compile it from >>>>>>>>>> source >>>>>>>>>> yourself. >>>>>>>>>> However, note that you cannot >>>>>>>>>> build >>>>>>>>>> plugins >>>>>>>>>> for new >>>>>>>>>> Qt Creator with MSVC 2013 as it >>>>>>>>>> uses >>>>>>>>>> different ABI. >>>>>>>>>> You could use MSVC 2015 or MSVC >>>>>>>>>> 2017. >>>>>>>>>> >>>>>>>>>> Or you could build 64bit version >>>>>>>>>> of >>>>>>>>>> Qt >>>>>>>>>> Creator from >>>>>>>>>> source with that Qt version you >>>>>>>>>> have >>>>>>>>>> installed. >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Joni >>>>>>>>>> -- >>>>>>>>>> Joni Poikelin >>>>>>>>>> Software Engineer, >>>>>>>>>> The Qt Company >>>>>>>>>> ? >>>>>>>>>> FAQs - >>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Joni Poikelin >>>>>>>>>> Software Engineer, >>>>>>>>>> The Qt Company >>>>>>>>>> ? >>>>>>>>>> FAQs - >>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Powered by www.kitware.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> Please keep messages on-topic and check the >>>>>>>>>> VTK >>>>>>>>>> FAQ >>>>>>>>>> at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> Search the list archives at: >>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Powered by www.kitware.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> Please keep messages on-topic and check the VTK >>>>>>>>>> FAQ >>>>>>>>>> at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> Search the list archives at: >>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> > >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Powered by www.kitware.com >>>>>>>>>> >>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>>>>>> at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Search the list archives at: >>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Powered by www.kitware.com >>>>>>>>>> >>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Search the list archives at: >>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>> >>> > From Zoltan.Kovacs at esi-group.com Mon Oct 16 11:11:23 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 16 Oct 2017 17:11:23 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> <059632bb-2ac0-b507-dc96-a1573eb4f483@esi-group.com> Message-ID: <185408a4-9634-bafa-2c67-748d4cd14a1b@esi-group.com> I have the line -lvtkRenderingOpenGL2-8.0 \ in the library list of the project file and the corresponding library file is also in the lib folder of the installed VTK. I can try to include the header vtkAutoinit.h and add these variables with the macro VTK_MODULE_INIT. It may work. Zoltan Am 16.10.2017 um 17:00 schrieb Elvis Stansvik: > 2017-10-16 16:50 GMT+02:00 Zoltan Kovacs : >> Thanks for the detailed information! It is very useful, especially the line >> >> DEFINES += >> vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >> >> I inserted it into my project file but I get the error "no override found >> for 'vtkPolyDataMapper'". I guess I must include other switches in the >> shell_quote argument too, such as vtkRenderingVolumeOpenGL or something >> else. > > Hm, I'm not sure, but think that should have been taken care of by the > vtkRenderingOpenGL2. I may have messed something up with the QMake > syntax, so it would be interesting to see the actual compile line for > one of your sources (again with /U I think), to see what the /D-flag > ended up looking like. > > (Note: Everything is definitely much easier with CMake, and I would > highly recommend taking the time switching to it. We use it for our > VTK+Qt project and it works just fine. We also use Qt Creator as the > primary IDE, and it can open CMakeLists.txt.) > > Elvis > >> >> Zoltan >> >> >> Am 16.10.2017 um 16:10 schrieb Elvis Stansvik: >>> >>> 2017-10-16 15:47 GMT+02:00 Zoltan Kovacs : >>>> >>>> In the project settings I set from Debug version to Release version and I >>>> can link the porject now. It seems that the VTK Relase libaries cannot be >>>> used with Debug version of the QtCreator project. I was not careful >>>> enough >>>> when I tried to buil the debug version of the Qt app. Thanks a lot for >>>> the >>>> linker output info! >>> >>> >>> Ah, glad to hear it. I started experimenting myself in a Windows VM, >>> and came up with this .pro file for my minimal test (the cone example >>> adapted to use a QVTKOpenGLWidget promoted from QWidget in the Design >>> mode): >>> >>> CONFIG += c++11 >>> QT += core gui widgets >>> TARGET = VTKQtQMakeTest >>> TEMPLATE = app >>> SOURCES += main.cpp mainwindow.cpp >>> HEADERS += mainwindow.h >>> FORMS += mainwindow.ui >>> >>> INCLUDEPATH += C:/Users/Elvis/Dev/VTK-8.0.1-inst/include/vtk-8.0 >>> DEFINES += >>> vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >>> LIBS += -L"C:/Users/Elvis/Dev/VTK-8.0.1-inst/lib" >>> LIBS += -lvtkCommonCore-8.0 \ >>> -lvtkCommonDataModel-8.0 \ >>> -lvtkCommonExecutionModel-8.0 \ >>> -lvtkCommonMath-8.0 \ >>> -lvtkCommonMisc-8.0 \ >>> -lvtkCommonTransforms-8.0 \ >>> -lvtkFiltersCore-8.0 \ >>> -lvtkFiltersSources-8.0 \ >>> -lvtkGUISupportQt-8.0 \ >>> -lvtkInteractionStyle-8.0 \ >>> -lvtkRenderingCore-8.0 \ >>> -lvtkRenderingOpenGL2-8.0 >>> >>> I think when using QMake, you will have to mess about with the >>> initialization of implementation modules [1] in order for the program >>> to run, either by using DEFINES like I did above, or using >>> VTK_MODULE_INIT. This is something you can get "for free" when using >>> CMake. >>> >>> I could never run my test app, since the VM (VirtualBox) doesn't have >>> a sufficient OpenGL implementation. But it compiled and linked at >>> least. >>> >>> Elvis >>> >>> [1] >>> https://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized >>> >>>> >>>> Zoltan >>>> >>>> >>>> >>>> Am 16.10.2017 um 15:14 schrieb Elvis Stansvik: >>>>> >>>>> >>>>> 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs : >>>>>> >>>>>> >>>>>> Unfortunately I cannot find such a file in that folder. I also >>>>>> searched >>>>>> any >>>>>> *.jom file there but the linker might have deleted them. >>>>> >>>>> >>>>> >>>>> Yes sorry, I just realized that. See my earlier mail about the /U jom >>>>> flag. >>>>> >>>>> Elvis >>>>> >>>>>> >>>>>> Zoltan >>>>>> >>>>>> >>>>>> Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >>>>>>> >>>>>>> >>>>>>> >>>>>>> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs >>>>>>> : >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Dear Elvis, >>>>>>>> >>>>>>>> Thanks for the information. I have the files >>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>> in the library list and the libary path is also given in the project >>>>>>>> file >>>>>>>> loaded in QtCreator but the compiler cannot resolve the symbol >>>>>>>> QVTKOpenGLWidget: >>>>>>>> >>>>>>>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>>>>>>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>>>>>>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 >>>>>>>> -w34189 >>>>>>>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>>>>>>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>>>>>>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>>>>>>> -IC:\Qt\5.8\msvc2013\include >>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtWidgets >>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtGui >>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtANGLE >>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtCore >>>>>>>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>>>>>>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>>>>>>> >>>>>>>> distortionpage.cpp >>>>>>>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG >>>>>>>> /SUBSYSTEM:WINDOWS >>>>>>>> "/MANIFESTDEPENDENCY:type='win32' >>>>>>>> name='Microsoft.Windows.Common-Controls' >>>>>>>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>>>>>>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>>>>>>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> I think in order to shorten the linker command line and not exceed >>>>>>> command line length limits, qmake is using a "Linker Response File" >>>>>>> (using @), so I think you have to look into >>>>>>> >>>>>>> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>>> >>>>>>> to see the full list of linker arguments. >>>>>>> >>>>>>> Would be interesting to see the contents of that file. >>>>>>> >>>>>>> Elvis >>>>>>> >>>>>>>> >>>>>>>> distortionpage.obj : error LNK2019: unresolved external symbol >>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class QFlags>>>>>>> Qt::WindowType>)" >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>> referenced in function "public: void __thiscall >>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>> >>>>>>>> >>>>>>>> It seems that the compiler switches contain the include path for VTK >>>>>>>> but >>>>>>>> the >>>>>>>> library path and the libraries for VTK are missing from the linker >>>>>>>> options. >>>>>>>> I guess it must be a qmake issue. Thanks anyway. >>>>>>>> >>>>>>>> Regards, >>>>>>>> Zoltan >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs >>>>>>>>> : >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Dear Dan, >>>>>>>>>> >>>>>>>>>> In QtCreator I added a QWidget to the UI form and used "Promote to >>>>>>>>>> ..." >>>>>>>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h >>>>>>>>>> in >>>>>>>>>> the >>>>>>>>>> header file of the application. However, when linking the source I >>>>>>>>>> get >>>>>>>>>> the >>>>>>>>>> error message >>>>>>>>>> >>>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external symbol >>>>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class >>>>>>>>>> QFlags>>>>>>>>> Qt::WindowType>)" >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> It seems that the MSVC2013 linker cannot find the library of >>>>>>>>>> QVTKOpenGLWidget. I searched a library file with a similar name in >>>>>>>>>> the >>>>>>>>>> folder where CMake generated the VTK libraries with Qt support but >>>>>>>>>> I >>>>>>>>>> could >>>>>>>>>> not find it. I am just wondering if it is missing or some other >>>>>>>>>> library >>>>>>>>>> file >>>>>>>>>> with a completely different name contains this symbol. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> The class is part of the vtkGUISupportQt library (on Windows the >>>>>>>>> files >>>>>>>>> would be vtkGUISupportQt-8.0.lib/dll). >>>>>>>>> >>>>>>>>> We're using the "promote" functionality in Qt Creator's Design mode >>>>>>>>> to >>>>>>>>> promote a widget to our custom QVTKOpenGLWidget subclass. It should >>>>>>>>> work fine to promote to it directly. >>>>>>>>> >>>>>>>>> Elvis >>>>>>>>> >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Zoltan >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by >>>>>>>>>>> adding >>>>>>>>>>> first >>>>>>>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So >>>>>>>>>>> you >>>>>>>>>>> can >>>>>>>>>>> build the UI of your Qt application this way. >>>>>>>>>>> >>>>>>>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>>>>>>> >>>>>>>>>>> Hope this helps, >>>>>>>>>>> Dan >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>>>>>>> > >>>>>>>>>>> wrote: >>>>>>>>>>> >>>>>>>>>>> Dear Mike, >>>>>>>>>>> >>>>>>>>>>> Thank you very much for your prompt answer. As I wrote to >>>>>>>>>>> Dan, >>>>>>>>>>> we >>>>>>>>>>> have to use QtCreator for the development here. Then I >>>>>>>>>>> have >>>>>>>>>>> access >>>>>>>>>>> only for qmake and I can edit project files for it. If >>>>>>>>>>> QVTKOpenGLWidget is the only VTK widget class supported >>>>>>>>>>> for >>>>>>>>>>> Qt5 >>>>>>>>>>> then >>>>>>>>>>> I ave to find out how to insert such an object into the UI >>>>>>>>>>> form >>>>>>>>>>> file >>>>>>>>>>> of QT. >>>>>>>>>>> >>>>>>>>>>> Kind regards, >>>>>>>>>>> Zoltan >>>>>>>>>>> >>>>>>>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>>>>>>> >>>>>>>>>>> Also, when working with VTK, it will be a lot easier >>>>>>>>>>> to >>>>>>>>>>> switch >>>>>>>>>>> to using CMake instead of Qt project files (QtCreator >>>>>>>>>>> supports >>>>>>>>>>> CMake). Look at the examples Dan linked to. You will >>>>>>>>>>> have >>>>>>>>>>> to >>>>>>>>>>> update the CMakelists.txt file for Qt. You will >>>>>>>>>>> probably >>>>>>>>>>> have >>>>>>>>>>> to >>>>>>>>>>> add the following: >>>>>>>>>>> >>>>>>>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>>>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>>>>>>> >>>>>>>>>>> and update the target_link_libraries line(add >>>>>>>>>>> Qt5::Widget) , >>>>>>>>>>> e.g.,: >>>>>>>>>>> >>>>>>>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>>>>>>> ${VTK_LIBRARIES}) >>>>>>>>>>> >>>>>>>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >> >>>>>>>>>>> wrote: >>>>>>>>>>> >>>>>>>>>>> Zoltan, >>>>>>>>>>> This is unrelated to the error you are seeing >>>>>>>>>>> however: >>>>>>>>>>> >>>>>>>>>>> For Qt5 you'll need to use QVTKOpenGLWidget >>>>>>>>>>> rather >>>>>>>>>>> than >>>>>>>>>>> QVTKWidget. See >>>>>>>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> All examples are converted to Qt5. Also, VTK >>>>>>>>>>> master >>>>>>>>>>> has >>>>>>>>>>> a >>>>>>>>>>> number of >>>>>>>>>>> examples that have been converted to Qt5: >>>>>>>>>>> Examples/GUI/Qt >>>>>>>>>>> >>>>>>>>>>> Hope this helps, >>>>>>>>>>> Dan >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan Kovacs >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> >> >>>>>>>>>>> >>>>>>>>>>> wrote: >>>>>>>>>>> >>>>>>>>>>> Dear all, >>>>>>>>>>> >>>>>>>>>>> In CMake I generated a solution project of >>>>>>>>>>> VTK-8.0.1 >>>>>>>>>>> with Qt5 >>>>>>>>>>> support for MSVS2013. After having run the >>>>>>>>>>> ALL_BUILD >>>>>>>>>>> and INSTALL >>>>>>>>>>> projects with the install prefix C:\VTK\8.0.1 >>>>>>>>>>> in >>>>>>>>>>> VM2013 >>>>>>>>>>> I could >>>>>>>>>>> installed the Win32 bit binaries of VTK 8.0.1 >>>>>>>>>>> in >>>>>>>>>>> that >>>>>>>>>>> folder. >>>>>>>>>>> The header files and the libraries are >>>>>>>>>>> located >>>>>>>>>>> in >>>>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>>>>>>> C:\VTK\8.0.1\lib. >>>>>>>>>>> >>>>>>>>>>> I copied the file QVTKWidgetPlugin.dll from >>>>>>>>>>> the >>>>>>>>>>> VTK >>>>>>>>>>> binary >>>>>>>>>>> folders to the plugin folder of QTCreator, >>>>>>>>>>> which >>>>>>>>>>> uses >>>>>>>>>>> QT 5.8 >>>>>>>>>>> msvs2013 32 bit version. >>>>>>>>>>> >>>>>>>>>>> Then I set the include and library paths and >>>>>>>>>>> added >>>>>>>>>>> all >>>>>>>>>>> the VTK >>>>>>>>>>> libary files from C:\VTK\8.0.1\lib for the >>>>>>>>>>> linker >>>>>>>>>>> setting in the >>>>>>>>>>> project file >>>>>>>>>>> of a QT application in QtCreator: >>>>>>>>>>> >>>>>>>>>>> INCLUDEPATH += C:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>>>>>>> >>>>>>>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>>>>>>> -lvtkRenderingLOD-8.0 \ >>>>>>>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>>>>>>> -lvtkRenderingQt-8.0 \ >>>>>>>>>>> -lvtkRenderingVolume-8.0 \ >>>>>>>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>>>>>>> -lvtksqlite-8.0 \ >>>>>>>>>>> -lvtksys-8.0 \ >>>>>>>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>>>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>>>>>>> -lvtkTestingRendering-8.0 \ >>>>>>>>>>> -lvtktiff-8.0 \ >>>>>>>>>>> -lvtkverdict-8.0 \ >>>>>>>>>>> -lvtkViewsContext2D-8.0 \ >>>>>>>>>>> -lvtkViewsCore-8.0 \ >>>>>>>>>>> -lvtkViewsInfovis-8.0 \ >>>>>>>>>>> -lvtkViewsQt-8.0 \ >>>>>>>>>>> -lvtkzlib-8.0 \ >>>>>>>>>>> -lvtkalglib-8.0 \ >>>>>>>>>>> -lvtkChartsCore-8.0 \ >>>>>>>>>>> -lvtkCommonColor-8.0 \ >>>>>>>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>>>>>>> -lvtkCommonCore-8.0 \ >>>>>>>>>>> -lvtkCommonDataModel-8.0 \ >>>>>>>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>>>>>>> -lvtkCommonMath-8.0 \ >>>>>>>>>>> -lvtkCommonMisc-8.0 \ >>>>>>>>>>> -lvtkCommonSystem-8.0 \ >>>>>>>>>>> -lvtkCommonTransforms-8.0 \ >>>>>>>>>>> -lvtkDICOMParser-8.0 \ >>>>>>>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>>>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>>>>>>> -lvtkexoIIc-8.0 \ >>>>>>>>>>> -lvtkexpat-8.0 \ >>>>>>>>>>> -lvtkFiltersAMR-8.0 \ >>>>>>>>>>> -lvtkFiltersCore-8.0 \ >>>>>>>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>>>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>>>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>>>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>>>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>>>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>>>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>>>>>>> -lvtkFiltersImaging-8.0 \ >>>>>>>>>>> -lvtkFiltersModeling-8.0 \ >>>>>>>>>>> -lvtkFiltersParallel-8.0 \ >>>>>>>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>>>>>>> -lvtkFiltersPoints-8.0 \ >>>>>>>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>>>>>>> -lvtkFiltersSelection-8.0 \ >>>>>>>>>>> -lvtkFiltersSMP-8.0 \ >>>>>>>>>>> -lvtkFiltersSources-8.0 \ >>>>>>>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>>>>>>> -lvtkFiltersTexture-8.0 \ >>>>>>>>>>> -lvtkFiltersTopology-8.0 \ >>>>>>>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>>>>>>> -lvtkfreetype-8.0 \ >>>>>>>>>>> -lvtkGeovisCore-8.0 \ >>>>>>>>>>> -lvtkgl2ps-8.0 \ >>>>>>>>>>> -lvtkglew-8.0 \ >>>>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>>>> -lvtkhdf5_hl-8.0 \ >>>>>>>>>>> -lvtkhdf5-8.0 \ >>>>>>>>>>> -lvtkImagingColor-8.0 \ >>>>>>>>>>> -lvtkImagingCore-8.0 \ >>>>>>>>>>> -lvtkImagingFourier-8.0 \ >>>>>>>>>>> -lvtkImagingGeneral-8.0 \ >>>>>>>>>>> -lvtkImagingHybrid-8.0 \ >>>>>>>>>>> -lvtkImagingMath-8.0 \ >>>>>>>>>>> -lvtkImagingMorphological-8.0 \ >>>>>>>>>>> -lvtkImagingSources-8.0 \ >>>>>>>>>>> -lvtkImagingStatistics-8.0 \ >>>>>>>>>>> -lvtkImagingStencil-8.0 \ >>>>>>>>>>> -lvtkInfovisCore-8.0 \ >>>>>>>>>>> -lvtkInfovisLayout-8.0 \ >>>>>>>>>>> -lvtkInteractionImage-8.0 \ >>>>>>>>>>> -lvtkInteractionStyle-8.0 \ >>>>>>>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>>>>>>> -lvtkIOAMR-8.0 \ >>>>>>>>>>> -lvtkIOCore-8.0 \ >>>>>>>>>>> -lvtkIOEnSight-8.0 \ >>>>>>>>>>> -lvtkIOExodus-8.0 \ >>>>>>>>>>> -lvtkIOExport-8.0 \ >>>>>>>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>>>>>>> -lvtkIOGeometry-8.0 \ >>>>>>>>>>> -lvtkIOImage-8.0 \ >>>>>>>>>>> -lvtkIOImport-8.0 \ >>>>>>>>>>> -lvtkIOInfovis-8.0 \ >>>>>>>>>>> -lvtkIOLegacy-8.0 \ >>>>>>>>>>> -lvtkIOLSDyna-8.0 \ >>>>>>>>>>> -lvtkIOMINC-8.0 \ >>>>>>>>>>> -lvtkIOMovie-8.0 \ >>>>>>>>>>> -lvtkIONetCDF-8.0 \ >>>>>>>>>>> -lvtkIOParallel-8.0 \ >>>>>>>>>>> -lvtkIOParallelXML-8.0 \ >>>>>>>>>>> -lvtkIOPLY-8.0 \ >>>>>>>>>>> -lvtkIOSQL-8.0 \ >>>>>>>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>>>>>>> -lvtkIOVideo-8.0 \ >>>>>>>>>>> -lvtkIOXML-8.0 \ >>>>>>>>>>> -lvtkIOXMLParser-8.0 \ >>>>>>>>>>> -lvtkjpeg-8.0 \ >>>>>>>>>>> -lvtkjsoncpp-8.0 \ >>>>>>>>>>> -lvtklibharu-8.0 \ >>>>>>>>>>> -lvtklibxml2-8.0 \ >>>>>>>>>>> -lvtkLocalExample-8.0 \ >>>>>>>>>>> -lvtklz4-8.0 \ >>>>>>>>>>> -lvtkmetaio-8.0 \ >>>>>>>>>>> -lvtknetcdf_c++ \ >>>>>>>>>>> -lvtkNetCDF-8.0 \ >>>>>>>>>>> -lvtkoggtheora-8.0 \ >>>>>>>>>>> -lvtkParallelCore-8.0 \ >>>>>>>>>>> -lvtkpng-8.0 \ >>>>>>>>>>> -lvtkproj4-8.0 \ >>>>>>>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>>>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>>>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>>>>>>> -lvtkRenderingCore-8.0 \ >>>>>>>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>>>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>>>>>>> -lvtkRenderingImage-8.0 \ >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> However, if I add a QVTKWidget on the UI file >>>>>>>>>>> of >>>>>>>>>>> the >>>>>>>>>>> application, include the file QVTKWidget.h in >>>>>>>>>>> the >>>>>>>>>>> header file of >>>>>>>>>>> the application and I try to link it in >>>>>>>>>>> QtCreator >>>>>>>>>>> with >>>>>>>>>>> the >>>>>>>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in the >>>>>>>>>>> toolchain >>>>>>>>>>> of >>>>>>>>>>> QtCreator) sends error messages for >>>>>>>>>>> unresolved >>>>>>>>>>> external >>>>>>>>>>> symbols >>>>>>>>>>> for all the functions/classes belonging to >>>>>>>>>>> the >>>>>>>>>>> QVTKWidget, such as >>>>>>>>>>> >>>>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: >>>>>>>>>>> unresolved >>>>>>>>>>> external >>>>>>>>>>> symbol "__declspec(dllimport) public: >>>>>>>>>>> __thiscall >>>>>>>>>>> QVTKWidget::QVTKWidget(class QWidget *,class >>>>>>>>>>> QFlags>>>>>>>>>> Qt::WindowType>)" >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>>> referenced in function "public: void >>>>>>>>>>> __thiscall >>>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>>>> >>>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> It seems that the linker could not find the >>>>>>>>>>> libary >>>>>>>>>>> for >>>>>>>>>>> the >>>>>>>>>>> QVTKWidget plugin, which is loaded since I >>>>>>>>>>> could >>>>>>>>>>> chose >>>>>>>>>>> QtWidget >>>>>>>>>>> from the widget list in the UI form editor in >>>>>>>>>>> QtCreator. I do >>>>>>>>>>> not see any ABI issue here since I use the 32 >>>>>>>>>>> bit >>>>>>>>>>> mscv2103 >>>>>>>>>>> version of Qt and I also compiled and linked >>>>>>>>>>> the >>>>>>>>>>> 32 >>>>>>>>>>> bit >>>>>>>>>>> version >>>>>>>>>>> of VTK libaries and plugin files with >>>>>>>>>>> MSVS2013. >>>>>>>>>>> I >>>>>>>>>>> am >>>>>>>>>>> wondering >>>>>>>>>>> if anybody could make VTK-8.1 working with >>>>>>>>>>> Qt. >>>>>>>>>>> Thanks >>>>>>>>>>> a >>>>>>>>>>> lot. >>>>>>>>>>> >>>>>>>>>>> Kind regars, >>>>>>>>>>> Zoltan >>>>>>>>>>> >>>>>>>>>>> Regards, >>>>>>>>>>> Zoltan >>>>>>>>>>> >>>>>>>>>>> Am 09.10.2017 um 07:34 schrieb support at qt.io >>>>>>>>>>> >>>>>>>>>> >: >>>>>>>>>>> >>>>>>>>>>> Hi Zoltan, >>>>>>>>>>> >>>>>>>>>>> I don't know how the widget should be >>>>>>>>>>> installed >>>>>>>>>>> or >>>>>>>>>>> set up in >>>>>>>>>>> a project, but you could just search for >>>>>>>>>>> the >>>>>>>>>>> header >>>>>>>>>>> file and >>>>>>>>>>> point INCLUDEPATH to the folder that >>>>>>>>>>> contains >>>>>>>>>>> it. >>>>>>>>>>> >>>>>>>>>>> Regards, >>>>>>>>>>> Joni >>>>>>>>>>> >>>>>>>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> > wrote: >>>>>>>>>>> >>>>>>>>>>> Hi Joni, >>>>>>>>>>> >>>>>>>>>>> I see. However I found MSCV2013 32 >>>>>>>>>>> bit >>>>>>>>>>> version >>>>>>>>>>> for Qt >>>>>>>>>>> 5.8. I install >>>>>>>>>>> that version and I built the VTK >>>>>>>>>>> binaries >>>>>>>>>>> for >>>>>>>>>>> win32 >>>>>>>>>>> platform with >>>>>>>>>>> MVS2013. After having copied the VTK >>>>>>>>>>> plugin >>>>>>>>>>> file into >>>>>>>>>>> the plugin folder >>>>>>>>>>> of QtCreator I could launch it >>>>>>>>>>> successfully. >>>>>>>>>>> The >>>>>>>>>>> QVTKWidget is in the >>>>>>>>>>> Widget list of QtCreator now. I could >>>>>>>>>>> insert a >>>>>>>>>>> QVTKWidget in the UI form >>>>>>>>>>> as well. The only problem now is that >>>>>>>>>>> QtCreator >>>>>>>>>>> cannot >>>>>>>>>>> find the header >>>>>>>>>>> file for QVTKWidget. It is not cleat >>>>>>>>>>> how >>>>>>>>>>> to >>>>>>>>>>> set >>>>>>>>>>> the >>>>>>>>>>> INCLUDEPATH in the >>>>>>>>>>> project file since VS2103 did not >>>>>>>>>>> create >>>>>>>>>>> a >>>>>>>>>>> separate >>>>>>>>>>> include folder in >>>>>>>>>>> the target folder C:/VTK/bin for the >>>>>>>>>>> VTK >>>>>>>>>>> binaries. Only >>>>>>>>>>> the library >>>>>>>>>>> files have a separate folder, >>>>>>>>>>> C:/VTK/bin/lib/Release. >>>>>>>>>>> >>>>>>>>>>> Regards, >>>>>>>>>>> Zoltan >>>>>>>>>>> >>>>>>>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>>>>>>> support at qt.io >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >: >>>>>>>>>>> >>>>>>>>>>> Hi Zoltan, >>>>>>>>>>> >>>>>>>>>>> On 06 October 2017 at 13:00:00 >>>>>>>>>>> EEST >>>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> > wrote: >>>>>>>>>>> >>>>>>>>>>> Hi Joni, >>>>>>>>>>> >>>>>>>>>>> Thank you very much for your >>>>>>>>>>> answer. >>>>>>>>>>> Then I try >>>>>>>>>>> to install everything >>>>>>>>>>> from scratch. The only prolem >>>>>>>>>>> is >>>>>>>>>>> I >>>>>>>>>>> have >>>>>>>>>>> only >>>>>>>>>>> MSVC 2103 and the only >>>>>>>>>>> option in the selection list >>>>>>>>>>> of >>>>>>>>>>> the >>>>>>>>>>> online >>>>>>>>>>> installer for MSVC 2013 is >>>>>>>>>>> the 64 bit version. Is there >>>>>>>>>>> somewhere >>>>>>>>>>> an >>>>>>>>>>> installer on your website >>>>>>>>>>> wich >>>>>>>>>>> provides a relatively new Qt >>>>>>>>>>> version >>>>>>>>>>> with MSVC >>>>>>>>>>> 2103 32 bit version? >>>>>>>>>>> Thank you very much for your >>>>>>>>>>> help. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> No, but you could compile it from >>>>>>>>>>> source >>>>>>>>>>> yourself. >>>>>>>>>>> However, note that you cannot >>>>>>>>>>> build >>>>>>>>>>> plugins >>>>>>>>>>> for new >>>>>>>>>>> Qt Creator with MSVC 2013 as it >>>>>>>>>>> uses >>>>>>>>>>> different ABI. >>>>>>>>>>> You could use MSVC 2015 or MSVC >>>>>>>>>>> 2017. >>>>>>>>>>> >>>>>>>>>>> Or you could build 64bit version >>>>>>>>>>> of >>>>>>>>>>> Qt >>>>>>>>>>> Creator from >>>>>>>>>>> source with that Qt version you >>>>>>>>>>> have >>>>>>>>>>> installed. >>>>>>>>>>> >>>>>>>>>>> Regards, >>>>>>>>>>> Joni >>>>>>>>>>> -- >>>>>>>>>>> Joni Poikelin >>>>>>>>>>> Software Engineer, >>>>>>>>>>> The Qt Company >>>>>>>>>>> ? >>>>>>>>>>> FAQs - >>>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Joni Poikelin >>>>>>>>>>> Software Engineer, >>>>>>>>>>> The Qt Company >>>>>>>>>>> ? >>>>>>>>>>> FAQs - >>>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> Please keep messages on-topic and check the >>>>>>>>>>> VTK >>>>>>>>>>> FAQ >>>>>>>>>>> at: >>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> Search the list archives at: >>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> Please keep messages on-topic and check the VTK >>>>>>>>>>> FAQ >>>>>>>>>>> at: >>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> Search the list archives at: >>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> > >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>> >>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>>>>>>> at: >>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Search the list archives at: >>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>> >>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Search the list archives at: >>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Powered by www.kitware.com >>>>>>>>>> >>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>> >>>>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >> From elvis.stansvik at orexplore.com Mon Oct 16 11:20:18 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 16 Oct 2017 17:20:18 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: <185408a4-9634-bafa-2c67-748d4cd14a1b@esi-group.com> References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> <059632bb-2ac0-b507-dc96-a1573eb4f483@esi-group.com> <185408a4-9634-bafa-2c67-748d4cd14a1b@esi-group.com> Message-ID: 2017-10-16 17:11 GMT+02:00 Zoltan Kovacs : > I have the line > -lvtkRenderingOpenGL2-8.0 \ > in the library list of the project file and the corresponding library file > is also in the lib folder of the installed VTK. I can try to include the > header vtkAutoinit.h and add these variables with the macro VTK_MODULE_INIT. > It may work. Yes, it may be more reliable to use the VTK_MODULE_INIT macro perhaps, but I think it should work with the *_AUTOINIT defines as well. Just remember when using VTK_MODULE_INIT to do everything before you include the first VTK header. I had a look at my compile output on Windows when using DEFINES += vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) and it had -DvtkRenderingCore_AUTOINIT="2(vtk^CteractionStyle,vtkRenderingOpenGL2)" which I think is correct. But yes, if you're doing volume rendering, you would also need: DEFINES += vtkRenderingVolume_AUTOINIT=$$shell_quote(1(vtkRenderingVolumeOpenGL2)) But I don't think you would have gotten "no override found for 'vtkPolyDataMapper'" from missing that.. I think that error would be indicative of a missing vtkRenderingOpenGL2 initialization (not sure though..). Elvis > > Zoltan > > > > Am 16.10.2017 um 17:00 schrieb Elvis Stansvik: >> >> 2017-10-16 16:50 GMT+02:00 Zoltan Kovacs : >>> >>> Thanks for the detailed information! It is very useful, especially the >>> line >>> >>> DEFINES += >>> >>> vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >>> >>> I inserted it into my project file but I get the error "no override found >>> for 'vtkPolyDataMapper'". I guess I must include other switches in the >>> shell_quote argument too, such as vtkRenderingVolumeOpenGL or something >>> else. >> >> >> Hm, I'm not sure, but think that should have been taken care of by the >> vtkRenderingOpenGL2. I may have messed something up with the QMake >> syntax, so it would be interesting to see the actual compile line for >> one of your sources (again with /U I think), to see what the /D-flag >> ended up looking like. >> >> (Note: Everything is definitely much easier with CMake, and I would >> highly recommend taking the time switching to it. We use it for our >> VTK+Qt project and it works just fine. We also use Qt Creator as the >> primary IDE, and it can open CMakeLists.txt.) >> >> Elvis >> >>> >>> Zoltan >>> >>> >>> Am 16.10.2017 um 16:10 schrieb Elvis Stansvik: >>>> >>>> >>>> 2017-10-16 15:47 GMT+02:00 Zoltan Kovacs : >>>>> >>>>> >>>>> In the project settings I set from Debug version to Release version and >>>>> I >>>>> can link the porject now. It seems that the VTK Relase libaries cannot >>>>> be >>>>> used with Debug version of the QtCreator project. I was not careful >>>>> enough >>>>> when I tried to buil the debug version of the Qt app. Thanks a lot for >>>>> the >>>>> linker output info! >>>> >>>> >>>> >>>> Ah, glad to hear it. I started experimenting myself in a Windows VM, >>>> and came up with this .pro file for my minimal test (the cone example >>>> adapted to use a QVTKOpenGLWidget promoted from QWidget in the Design >>>> mode): >>>> >>>> CONFIG += c++11 >>>> QT += core gui widgets >>>> TARGET = VTKQtQMakeTest >>>> TEMPLATE = app >>>> SOURCES += main.cpp mainwindow.cpp >>>> HEADERS += mainwindow.h >>>> FORMS += mainwindow.ui >>>> >>>> INCLUDEPATH += C:/Users/Elvis/Dev/VTK-8.0.1-inst/include/vtk-8.0 >>>> DEFINES += >>>> >>>> vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >>>> LIBS += -L"C:/Users/Elvis/Dev/VTK-8.0.1-inst/lib" >>>> LIBS += -lvtkCommonCore-8.0 \ >>>> -lvtkCommonDataModel-8.0 \ >>>> -lvtkCommonExecutionModel-8.0 \ >>>> -lvtkCommonMath-8.0 \ >>>> -lvtkCommonMisc-8.0 \ >>>> -lvtkCommonTransforms-8.0 \ >>>> -lvtkFiltersCore-8.0 \ >>>> -lvtkFiltersSources-8.0 \ >>>> -lvtkGUISupportQt-8.0 \ >>>> -lvtkInteractionStyle-8.0 \ >>>> -lvtkRenderingCore-8.0 \ >>>> -lvtkRenderingOpenGL2-8.0 >>>> >>>> I think when using QMake, you will have to mess about with the >>>> initialization of implementation modules [1] in order for the program >>>> to run, either by using DEFINES like I did above, or using >>>> VTK_MODULE_INIT. This is something you can get "for free" when using >>>> CMake. >>>> >>>> I could never run my test app, since the VM (VirtualBox) doesn't have >>>> a sufficient OpenGL implementation. But it compiled and linked at >>>> least. >>>> >>>> Elvis >>>> >>>> [1] >>>> >>>> https://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized >>>> >>>>> >>>>> Zoltan >>>>> >>>>> >>>>> >>>>> Am 16.10.2017 um 15:14 schrieb Elvis Stansvik: >>>>>> >>>>>> >>>>>> >>>>>> 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs >>>>>> : >>>>>>> >>>>>>> >>>>>>> >>>>>>> Unfortunately I cannot find such a file in that folder. I also >>>>>>> searched >>>>>>> any >>>>>>> *.jom file there but the linker might have deleted them. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Yes sorry, I just realized that. See my earlier mail about the /U jom >>>>>> flag. >>>>>> >>>>>> Elvis >>>>>> >>>>>>> >>>>>>> Zoltan >>>>>>> >>>>>>> >>>>>>> Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs >>>>>>>> : >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Dear Elvis, >>>>>>>>> >>>>>>>>> Thanks for the information. I have the files >>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>> in the library list and the libary path is also given in the >>>>>>>>> project >>>>>>>>> file >>>>>>>>> loaded in QtCreator but the compiler cannot resolve the symbol >>>>>>>>> QVTKOpenGLWidget: >>>>>>>>> >>>>>>>>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>>>>>>>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>>>>>>>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 >>>>>>>>> -w34189 >>>>>>>>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>>>>>>>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>>>>>>>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>> -IC:\Qt\5.8\msvc2013\include >>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtWidgets >>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtGui >>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtANGLE >>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtCore >>>>>>>>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>>>>>>>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>>>>>>>> >>>>>>>>> distortionpage.cpp >>>>>>>>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG >>>>>>>>> /SUBSYSTEM:WINDOWS >>>>>>>>> "/MANIFESTDEPENDENCY:type='win32' >>>>>>>>> name='Microsoft.Windows.Common-Controls' >>>>>>>>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>>>>>>>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>>>>>>>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I think in order to shorten the linker command line and not exceed >>>>>>>> command line length limits, qmake is using a "Linker Response File" >>>>>>>> (using @), so I think you have to look into >>>>>>>> >>>>>>>> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>>>> >>>>>>>> to see the full list of linker arguments. >>>>>>>> >>>>>>>> Would be interesting to see the contents of that file. >>>>>>>> >>>>>>>> Elvis >>>>>>>> >>>>>>>>> >>>>>>>>> distortionpage.obj : error LNK2019: unresolved external symbol >>>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class >>>>>>>>> QFlags>>>>>>>> Qt::WindowType>)" >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>> >>>>>>>>> >>>>>>>>> It seems that the compiler switches contain the include path for >>>>>>>>> VTK >>>>>>>>> but >>>>>>>>> the >>>>>>>>> library path and the libraries for VTK are missing from the linker >>>>>>>>> options. >>>>>>>>> I guess it must be a qmake issue. Thanks anyway. >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs >>>>>>>>>> : >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Dear Dan, >>>>>>>>>>> >>>>>>>>>>> In QtCreator I added a QWidget to the UI form and used "Promote >>>>>>>>>>> to >>>>>>>>>>> ..." >>>>>>>>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h >>>>>>>>>>> in >>>>>>>>>>> the >>>>>>>>>>> header file of the application. However, when linking the source >>>>>>>>>>> I >>>>>>>>>>> get >>>>>>>>>>> the >>>>>>>>>>> error message >>>>>>>>>>> >>>>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external >>>>>>>>>>> symbol >>>>>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class >>>>>>>>>>> QFlags>>>>>>>>>> Qt::WindowType>)" >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> It seems that the MSVC2013 linker cannot find the library of >>>>>>>>>>> QVTKOpenGLWidget. I searched a library file with a similar name >>>>>>>>>>> in >>>>>>>>>>> the >>>>>>>>>>> folder where CMake generated the VTK libraries with Qt support >>>>>>>>>>> but >>>>>>>>>>> I >>>>>>>>>>> could >>>>>>>>>>> not find it. I am just wondering if it is missing or some other >>>>>>>>>>> library >>>>>>>>>>> file >>>>>>>>>>> with a completely different name contains this symbol. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> The class is part of the vtkGUISupportQt library (on Windows the >>>>>>>>>> files >>>>>>>>>> would be vtkGUISupportQt-8.0.lib/dll). >>>>>>>>>> >>>>>>>>>> We're using the "promote" functionality in Qt Creator's Design >>>>>>>>>> mode >>>>>>>>>> to >>>>>>>>>> promote a widget to our custom QVTKOpenGLWidget subclass. It >>>>>>>>>> should >>>>>>>>>> work fine to promote to it directly. >>>>>>>>>> >>>>>>>>>> Elvis >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Regards, >>>>>>>>>>> Zoltan >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by >>>>>>>>>>>> adding >>>>>>>>>>>> first >>>>>>>>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So >>>>>>>>>>>> you >>>>>>>>>>>> can >>>>>>>>>>>> build the UI of your Qt application this way. >>>>>>>>>>>> >>>>>>>>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>>>>>>>> >>>>>>>>>>>> Hope this helps, >>>>>>>>>>>> Dan >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>>>>>>>> >>>>>>>>>>> > >>>>>>>>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>> Dear Mike, >>>>>>>>>>>> >>>>>>>>>>>> Thank you very much for your prompt answer. As I wrote >>>>>>>>>>>> to >>>>>>>>>>>> Dan, >>>>>>>>>>>> we >>>>>>>>>>>> have to use QtCreator for the development here. Then I >>>>>>>>>>>> have >>>>>>>>>>>> access >>>>>>>>>>>> only for qmake and I can edit project files for it. If >>>>>>>>>>>> QVTKOpenGLWidget is the only VTK widget class supported >>>>>>>>>>>> for >>>>>>>>>>>> Qt5 >>>>>>>>>>>> then >>>>>>>>>>>> I ave to find out how to insert such an object into the >>>>>>>>>>>> UI >>>>>>>>>>>> form >>>>>>>>>>>> file >>>>>>>>>>>> of QT. >>>>>>>>>>>> >>>>>>>>>>>> Kind regards, >>>>>>>>>>>> Zoltan >>>>>>>>>>>> >>>>>>>>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>>>>>>>> >>>>>>>>>>>> Also, when working with VTK, it will be a lot >>>>>>>>>>>> easier >>>>>>>>>>>> to >>>>>>>>>>>> switch >>>>>>>>>>>> to using CMake instead of Qt project files >>>>>>>>>>>> (QtCreator >>>>>>>>>>>> supports >>>>>>>>>>>> CMake). Look at the examples Dan linked to. You >>>>>>>>>>>> will >>>>>>>>>>>> have >>>>>>>>>>>> to >>>>>>>>>>>> update the CMakelists.txt file for Qt. You will >>>>>>>>>>>> probably >>>>>>>>>>>> have >>>>>>>>>>>> to >>>>>>>>>>>> add the following: >>>>>>>>>>>> >>>>>>>>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>>>>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>>>>>>>> >>>>>>>>>>>> and update the target_link_libraries line(add >>>>>>>>>>>> Qt5::Widget) , >>>>>>>>>>>> e.g.,: >>>>>>>>>>>> >>>>>>>>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>>>>>>>> ${VTK_LIBRARIES}) >>>>>>>>>>>> >>>>>>>>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >> >>>>>>>>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>> Zoltan, >>>>>>>>>>>> This is unrelated to the error you are seeing >>>>>>>>>>>> however: >>>>>>>>>>>> >>>>>>>>>>>> For Qt5 you'll need to use QVTKOpenGLWidget >>>>>>>>>>>> rather >>>>>>>>>>>> than >>>>>>>>>>>> QVTKWidget. See >>>>>>>>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> > >>>>>>>>>>>> All examples are converted to Qt5. Also, VTK >>>>>>>>>>>> master >>>>>>>>>>>> has >>>>>>>>>>>> a >>>>>>>>>>>> number of >>>>>>>>>>>> examples that have been converted to Qt5: >>>>>>>>>>>> Examples/GUI/Qt >>>>>>>>>>>> >>>>>>>>>>>> Hope this helps, >>>>>>>>>>>> Dan >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan >>>>>>>>>>>> Kovacs >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> >> >>>>>>>>>>>> >>>>>>>>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>> Dear all, >>>>>>>>>>>> >>>>>>>>>>>> In CMake I generated a solution project of >>>>>>>>>>>> VTK-8.0.1 >>>>>>>>>>>> with Qt5 >>>>>>>>>>>> support for MSVS2013. After having run the >>>>>>>>>>>> ALL_BUILD >>>>>>>>>>>> and INSTALL >>>>>>>>>>>> projects with the install prefix >>>>>>>>>>>> C:\VTK\8.0.1 >>>>>>>>>>>> in >>>>>>>>>>>> VM2013 >>>>>>>>>>>> I could >>>>>>>>>>>> installed the Win32 bit binaries of VTK >>>>>>>>>>>> 8.0.1 >>>>>>>>>>>> in >>>>>>>>>>>> that >>>>>>>>>>>> folder. >>>>>>>>>>>> The header files and the libraries are >>>>>>>>>>>> located >>>>>>>>>>>> in >>>>>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>>>>>>>> C:\VTK\8.0.1\lib. >>>>>>>>>>>> >>>>>>>>>>>> I copied the file QVTKWidgetPlugin.dll >>>>>>>>>>>> from >>>>>>>>>>>> the >>>>>>>>>>>> VTK >>>>>>>>>>>> binary >>>>>>>>>>>> folders to the plugin folder of QTCreator, >>>>>>>>>>>> which >>>>>>>>>>>> uses >>>>>>>>>>>> QT 5.8 >>>>>>>>>>>> msvs2013 32 bit version. >>>>>>>>>>>> >>>>>>>>>>>> Then I set the include and library paths >>>>>>>>>>>> and >>>>>>>>>>>> added >>>>>>>>>>>> all >>>>>>>>>>>> the VTK >>>>>>>>>>>> libary files from C:\VTK\8.0.1\lib for the >>>>>>>>>>>> linker >>>>>>>>>>>> setting in the >>>>>>>>>>>> project file >>>>>>>>>>>> of a QT application in QtCreator: >>>>>>>>>>>> >>>>>>>>>>>> INCLUDEPATH += >>>>>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>>>>>>>> >>>>>>>>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>>>>>>>> -lvtkRenderingLOD-8.0 \ >>>>>>>>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>>>>>>>> -lvtkRenderingQt-8.0 \ >>>>>>>>>>>> -lvtkRenderingVolume-8.0 \ >>>>>>>>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>>>>>>>> -lvtksqlite-8.0 \ >>>>>>>>>>>> -lvtksys-8.0 \ >>>>>>>>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>>>>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>>>>>>>> -lvtkTestingRendering-8.0 \ >>>>>>>>>>>> -lvtktiff-8.0 \ >>>>>>>>>>>> -lvtkverdict-8.0 \ >>>>>>>>>>>> -lvtkViewsContext2D-8.0 \ >>>>>>>>>>>> -lvtkViewsCore-8.0 \ >>>>>>>>>>>> -lvtkViewsInfovis-8.0 \ >>>>>>>>>>>> -lvtkViewsQt-8.0 \ >>>>>>>>>>>> -lvtkzlib-8.0 \ >>>>>>>>>>>> -lvtkalglib-8.0 \ >>>>>>>>>>>> -lvtkChartsCore-8.0 \ >>>>>>>>>>>> -lvtkCommonColor-8.0 \ >>>>>>>>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>>>>>>>> -lvtkCommonCore-8.0 \ >>>>>>>>>>>> -lvtkCommonDataModel-8.0 \ >>>>>>>>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>>>>>>>> -lvtkCommonMath-8.0 \ >>>>>>>>>>>> -lvtkCommonMisc-8.0 \ >>>>>>>>>>>> -lvtkCommonSystem-8.0 \ >>>>>>>>>>>> -lvtkCommonTransforms-8.0 \ >>>>>>>>>>>> -lvtkDICOMParser-8.0 \ >>>>>>>>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>>>>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>>>>>>>> -lvtkexoIIc-8.0 \ >>>>>>>>>>>> -lvtkexpat-8.0 \ >>>>>>>>>>>> -lvtkFiltersAMR-8.0 \ >>>>>>>>>>>> -lvtkFiltersCore-8.0 \ >>>>>>>>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>>>>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>>>>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>>>>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>>>>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>>>>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>>>>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>>>>>>>> -lvtkFiltersImaging-8.0 \ >>>>>>>>>>>> -lvtkFiltersModeling-8.0 \ >>>>>>>>>>>> -lvtkFiltersParallel-8.0 \ >>>>>>>>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>>>>>>>> -lvtkFiltersPoints-8.0 \ >>>>>>>>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>>>>>>>> -lvtkFiltersSelection-8.0 \ >>>>>>>>>>>> -lvtkFiltersSMP-8.0 \ >>>>>>>>>>>> -lvtkFiltersSources-8.0 \ >>>>>>>>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>>>>>>>> -lvtkFiltersTexture-8.0 \ >>>>>>>>>>>> -lvtkFiltersTopology-8.0 \ >>>>>>>>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>>>>>>>> -lvtkfreetype-8.0 \ >>>>>>>>>>>> -lvtkGeovisCore-8.0 \ >>>>>>>>>>>> -lvtkgl2ps-8.0 \ >>>>>>>>>>>> -lvtkglew-8.0 \ >>>>>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>>>>> -lvtkhdf5_hl-8.0 \ >>>>>>>>>>>> -lvtkhdf5-8.0 \ >>>>>>>>>>>> -lvtkImagingColor-8.0 \ >>>>>>>>>>>> -lvtkImagingCore-8.0 \ >>>>>>>>>>>> -lvtkImagingFourier-8.0 \ >>>>>>>>>>>> -lvtkImagingGeneral-8.0 \ >>>>>>>>>>>> -lvtkImagingHybrid-8.0 \ >>>>>>>>>>>> -lvtkImagingMath-8.0 \ >>>>>>>>>>>> -lvtkImagingMorphological-8.0 \ >>>>>>>>>>>> -lvtkImagingSources-8.0 \ >>>>>>>>>>>> -lvtkImagingStatistics-8.0 \ >>>>>>>>>>>> -lvtkImagingStencil-8.0 \ >>>>>>>>>>>> -lvtkInfovisCore-8.0 \ >>>>>>>>>>>> -lvtkInfovisLayout-8.0 \ >>>>>>>>>>>> -lvtkInteractionImage-8.0 \ >>>>>>>>>>>> -lvtkInteractionStyle-8.0 \ >>>>>>>>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>>>>>>>> -lvtkIOAMR-8.0 \ >>>>>>>>>>>> -lvtkIOCore-8.0 \ >>>>>>>>>>>> -lvtkIOEnSight-8.0 \ >>>>>>>>>>>> -lvtkIOExodus-8.0 \ >>>>>>>>>>>> -lvtkIOExport-8.0 \ >>>>>>>>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>>>>>>>> -lvtkIOGeometry-8.0 \ >>>>>>>>>>>> -lvtkIOImage-8.0 \ >>>>>>>>>>>> -lvtkIOImport-8.0 \ >>>>>>>>>>>> -lvtkIOInfovis-8.0 \ >>>>>>>>>>>> -lvtkIOLegacy-8.0 \ >>>>>>>>>>>> -lvtkIOLSDyna-8.0 \ >>>>>>>>>>>> -lvtkIOMINC-8.0 \ >>>>>>>>>>>> -lvtkIOMovie-8.0 \ >>>>>>>>>>>> -lvtkIONetCDF-8.0 \ >>>>>>>>>>>> -lvtkIOParallel-8.0 \ >>>>>>>>>>>> -lvtkIOParallelXML-8.0 \ >>>>>>>>>>>> -lvtkIOPLY-8.0 \ >>>>>>>>>>>> -lvtkIOSQL-8.0 \ >>>>>>>>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>>>>>>>> -lvtkIOVideo-8.0 \ >>>>>>>>>>>> -lvtkIOXML-8.0 \ >>>>>>>>>>>> -lvtkIOXMLParser-8.0 \ >>>>>>>>>>>> -lvtkjpeg-8.0 \ >>>>>>>>>>>> -lvtkjsoncpp-8.0 \ >>>>>>>>>>>> -lvtklibharu-8.0 \ >>>>>>>>>>>> -lvtklibxml2-8.0 \ >>>>>>>>>>>> -lvtkLocalExample-8.0 \ >>>>>>>>>>>> -lvtklz4-8.0 \ >>>>>>>>>>>> -lvtkmetaio-8.0 \ >>>>>>>>>>>> -lvtknetcdf_c++ \ >>>>>>>>>>>> -lvtkNetCDF-8.0 \ >>>>>>>>>>>> -lvtkoggtheora-8.0 \ >>>>>>>>>>>> -lvtkParallelCore-8.0 \ >>>>>>>>>>>> -lvtkpng-8.0 \ >>>>>>>>>>>> -lvtkproj4-8.0 \ >>>>>>>>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>>>>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>>>>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>>>>>>>> -lvtkRenderingCore-8.0 \ >>>>>>>>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>>>>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>>>>>>>> -lvtkRenderingImage-8.0 \ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> However, if I add a QVTKWidget on the UI >>>>>>>>>>>> file >>>>>>>>>>>> of >>>>>>>>>>>> the >>>>>>>>>>>> application, include the file QVTKWidget.h >>>>>>>>>>>> in >>>>>>>>>>>> the >>>>>>>>>>>> header file of >>>>>>>>>>>> the application and I try to link it in >>>>>>>>>>>> QtCreator >>>>>>>>>>>> with >>>>>>>>>>>> the >>>>>>>>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in >>>>>>>>>>>> the >>>>>>>>>>>> toolchain >>>>>>>>>>>> of >>>>>>>>>>>> QtCreator) sends error messages for >>>>>>>>>>>> unresolved >>>>>>>>>>>> external >>>>>>>>>>>> symbols >>>>>>>>>>>> for all the functions/classes belonging to >>>>>>>>>>>> the >>>>>>>>>>>> QVTKWidget, such as >>>>>>>>>>>> >>>>>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: >>>>>>>>>>>> unresolved >>>>>>>>>>>> external >>>>>>>>>>>> symbol "__declspec(dllimport) public: >>>>>>>>>>>> __thiscall >>>>>>>>>>>> QVTKWidget::QVTKWidget(class QWidget >>>>>>>>>>>> *,class >>>>>>>>>>>> QFlags>>>>>>>>>>> Qt::WindowType>)" >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>>>> referenced in function "public: void >>>>>>>>>>>> __thiscall >>>>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget >>>>>>>>>>>> *)" >>>>>>>>>>>> >>>>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> It seems that the linker could not find >>>>>>>>>>>> the >>>>>>>>>>>> libary >>>>>>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>> QVTKWidget plugin, which is loaded since I >>>>>>>>>>>> could >>>>>>>>>>>> chose >>>>>>>>>>>> QtWidget >>>>>>>>>>>> from the widget list in the UI form editor >>>>>>>>>>>> in >>>>>>>>>>>> QtCreator. I do >>>>>>>>>>>> not see any ABI issue here since I use the >>>>>>>>>>>> 32 >>>>>>>>>>>> bit >>>>>>>>>>>> mscv2103 >>>>>>>>>>>> version of Qt and I also compiled and >>>>>>>>>>>> linked >>>>>>>>>>>> the >>>>>>>>>>>> 32 >>>>>>>>>>>> bit >>>>>>>>>>>> version >>>>>>>>>>>> of VTK libaries and plugin files with >>>>>>>>>>>> MSVS2013. >>>>>>>>>>>> I >>>>>>>>>>>> am >>>>>>>>>>>> wondering >>>>>>>>>>>> if anybody could make VTK-8.1 working with >>>>>>>>>>>> Qt. >>>>>>>>>>>> Thanks >>>>>>>>>>>> a >>>>>>>>>>>> lot. >>>>>>>>>>>> >>>>>>>>>>>> Kind regars, >>>>>>>>>>>> Zoltan >>>>>>>>>>>> >>>>>>>>>>>> Regards, >>>>>>>>>>>> Zoltan >>>>>>>>>>>> >>>>>>>>>>>> Am 09.10.2017 um 07:34 schrieb >>>>>>>>>>>> support at qt.io >>>>>>>>>>>> >>>>>>>>>>> >: >>>>>>>>>>>> >>>>>>>>>>>> Hi Zoltan, >>>>>>>>>>>> >>>>>>>>>>>> I don't know how the widget should be >>>>>>>>>>>> installed >>>>>>>>>>>> or >>>>>>>>>>>> set up in >>>>>>>>>>>> a project, but you could just search >>>>>>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>> header >>>>>>>>>>>> file and >>>>>>>>>>>> point INCLUDEPATH to the folder that >>>>>>>>>>>> contains >>>>>>>>>>>> it. >>>>>>>>>>>> >>>>>>>>>>>> Regards, >>>>>>>>>>>> Joni >>>>>>>>>>>> >>>>>>>>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> > wrote: >>>>>>>>>>>> >>>>>>>>>>>> Hi Joni, >>>>>>>>>>>> >>>>>>>>>>>> I see. However I found MSCV2013 32 >>>>>>>>>>>> bit >>>>>>>>>>>> version >>>>>>>>>>>> for Qt >>>>>>>>>>>> 5.8. I install >>>>>>>>>>>> that version and I built the VTK >>>>>>>>>>>> binaries >>>>>>>>>>>> for >>>>>>>>>>>> win32 >>>>>>>>>>>> platform with >>>>>>>>>>>> MVS2013. After having copied the >>>>>>>>>>>> VTK >>>>>>>>>>>> plugin >>>>>>>>>>>> file into >>>>>>>>>>>> the plugin folder >>>>>>>>>>>> of QtCreator I could launch it >>>>>>>>>>>> successfully. >>>>>>>>>>>> The >>>>>>>>>>>> QVTKWidget is in the >>>>>>>>>>>> Widget list of QtCreator now. I >>>>>>>>>>>> could >>>>>>>>>>>> insert a >>>>>>>>>>>> QVTKWidget in the UI form >>>>>>>>>>>> as well. The only problem now is >>>>>>>>>>>> that >>>>>>>>>>>> QtCreator >>>>>>>>>>>> cannot >>>>>>>>>>>> find the header >>>>>>>>>>>> file for QVTKWidget. It is not >>>>>>>>>>>> cleat >>>>>>>>>>>> how >>>>>>>>>>>> to >>>>>>>>>>>> set >>>>>>>>>>>> the >>>>>>>>>>>> INCLUDEPATH in the >>>>>>>>>>>> project file since VS2103 did not >>>>>>>>>>>> create >>>>>>>>>>>> a >>>>>>>>>>>> separate >>>>>>>>>>>> include folder in >>>>>>>>>>>> the target folder C:/VTK/bin for >>>>>>>>>>>> the >>>>>>>>>>>> VTK >>>>>>>>>>>> binaries. Only >>>>>>>>>>>> the library >>>>>>>>>>>> files have a separate folder, >>>>>>>>>>>> C:/VTK/bin/lib/Release. >>>>>>>>>>>> >>>>>>>>>>>> Regards, >>>>>>>>>>>> Zoltan >>>>>>>>>>>> >>>>>>>>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>>>>>>>> support at qt.io >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >: >>>>>>>>>>>> >>>>>>>>>>>> Hi Zoltan, >>>>>>>>>>>> >>>>>>>>>>>> On 06 October 2017 at 13:00:00 >>>>>>>>>>>> EEST >>>>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> > wrote: >>>>>>>>>>>> >>>>>>>>>>>> Hi Joni, >>>>>>>>>>>> >>>>>>>>>>>> Thank you very much for >>>>>>>>>>>> your >>>>>>>>>>>> answer. >>>>>>>>>>>> Then I try >>>>>>>>>>>> to install everything >>>>>>>>>>>> from scratch. The only >>>>>>>>>>>> prolem >>>>>>>>>>>> is >>>>>>>>>>>> I >>>>>>>>>>>> have >>>>>>>>>>>> only >>>>>>>>>>>> MSVC 2103 and the only >>>>>>>>>>>> option in the selection >>>>>>>>>>>> list >>>>>>>>>>>> of >>>>>>>>>>>> the >>>>>>>>>>>> online >>>>>>>>>>>> installer for MSVC 2013 is >>>>>>>>>>>> the 64 bit version. Is >>>>>>>>>>>> there >>>>>>>>>>>> somewhere >>>>>>>>>>>> an >>>>>>>>>>>> installer on your website >>>>>>>>>>>> wich >>>>>>>>>>>> provides a relatively new >>>>>>>>>>>> Qt >>>>>>>>>>>> version >>>>>>>>>>>> with MSVC >>>>>>>>>>>> 2103 32 bit version? >>>>>>>>>>>> Thank you very much for >>>>>>>>>>>> your >>>>>>>>>>>> help. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> No, but you could compile it >>>>>>>>>>>> from >>>>>>>>>>>> source >>>>>>>>>>>> yourself. >>>>>>>>>>>> However, note that you cannot >>>>>>>>>>>> build >>>>>>>>>>>> plugins >>>>>>>>>>>> for new >>>>>>>>>>>> Qt Creator with MSVC 2013 as >>>>>>>>>>>> it >>>>>>>>>>>> uses >>>>>>>>>>>> different ABI. >>>>>>>>>>>> You could use MSVC 2015 or >>>>>>>>>>>> MSVC >>>>>>>>>>>> 2017. >>>>>>>>>>>> >>>>>>>>>>>> Or you could build 64bit >>>>>>>>>>>> version >>>>>>>>>>>> of >>>>>>>>>>>> Qt >>>>>>>>>>>> Creator from >>>>>>>>>>>> source with that Qt version >>>>>>>>>>>> you >>>>>>>>>>>> have >>>>>>>>>>>> installed. >>>>>>>>>>>> >>>>>>>>>>>> Regards, >>>>>>>>>>>> Joni >>>>>>>>>>>> -- >>>>>>>>>>>> Joni Poikelin >>>>>>>>>>>> Software Engineer, >>>>>>>>>>>> The Qt Company >>>>>>>>>>>> ? >>>>>>>>>>>> FAQs - >>>>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Joni Poikelin >>>>>>>>>>>> Software Engineer, >>>>>>>>>>>> The Qt Company >>>>>>>>>>>> ? >>>>>>>>>>>> FAQs - >>>>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Visit other Kitware open-source projects >>>>>>>>>>>> at >>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> Please keep messages on-topic and check >>>>>>>>>>>> the >>>>>>>>>>>> VTK >>>>>>>>>>>> FAQ >>>>>>>>>>>> at: >>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> Please keep messages on-topic and check the >>>>>>>>>>>> VTK >>>>>>>>>>>> FAQ >>>>>>>>>>>> at: >>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>> >>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>>>>>>>> at: >>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>> >>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>> >>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>> >>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>> >>>>>>>>>>> Search the list archives at: >>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>> >>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>> > From elvis.stansvik at orexplore.com Mon Oct 16 11:21:04 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 16 Oct 2017 17:21:04 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> <059632bb-2ac0-b507-dc96-a1573eb4f483@esi-group.com> <185408a4-9634-bafa-2c67-748d4cd14a1b@esi-group.com> Message-ID: 2017-10-16 17:20 GMT+02:00 Elvis Stansvik : > 2017-10-16 17:11 GMT+02:00 Zoltan Kovacs : >> I have the line >> -lvtkRenderingOpenGL2-8.0 \ >> in the library list of the project file and the corresponding library file >> is also in the lib folder of the installed VTK. I can try to include the >> header vtkAutoinit.h and add these variables with the macro VTK_MODULE_INIT. >> It may work. > > Yes, it may be more reliable to use the VTK_MODULE_INIT macro perhaps, > but I think it should work with the *_AUTOINIT defines as well. > > Just remember when using VTK_MODULE_INIT to do everything before you > include the first VTK header. > > I had a look at my compile output on Windows when using > > DEFINES += vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) > > and it had > > -DvtkRenderingCore_AUTOINIT="2(vtk^CteractionStyle,vtkRenderingOpenGL2)" Ehm, minus that ^C of course. > > which I think is correct. > > But yes, if you're doing volume rendering, you would also need: > > DEFINES += vtkRenderingVolume_AUTOINIT=$$shell_quote(1(vtkRenderingVolumeOpenGL2)) > > But I don't think you would have gotten "no override found for > 'vtkPolyDataMapper'" from missing that.. I think that error would be > indicative of a missing vtkRenderingOpenGL2 initialization (not sure > though..). > > Elvis > >> >> Zoltan >> >> >> >> Am 16.10.2017 um 17:00 schrieb Elvis Stansvik: >>> >>> 2017-10-16 16:50 GMT+02:00 Zoltan Kovacs : >>>> >>>> Thanks for the detailed information! It is very useful, especially the >>>> line >>>> >>>> DEFINES += >>>> >>>> vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >>>> >>>> I inserted it into my project file but I get the error "no override found >>>> for 'vtkPolyDataMapper'". I guess I must include other switches in the >>>> shell_quote argument too, such as vtkRenderingVolumeOpenGL or something >>>> else. >>> >>> >>> Hm, I'm not sure, but think that should have been taken care of by the >>> vtkRenderingOpenGL2. I may have messed something up with the QMake >>> syntax, so it would be interesting to see the actual compile line for >>> one of your sources (again with /U I think), to see what the /D-flag >>> ended up looking like. >>> >>> (Note: Everything is definitely much easier with CMake, and I would >>> highly recommend taking the time switching to it. We use it for our >>> VTK+Qt project and it works just fine. We also use Qt Creator as the >>> primary IDE, and it can open CMakeLists.txt.) >>> >>> Elvis >>> >>>> >>>> Zoltan >>>> >>>> >>>> Am 16.10.2017 um 16:10 schrieb Elvis Stansvik: >>>>> >>>>> >>>>> 2017-10-16 15:47 GMT+02:00 Zoltan Kovacs : >>>>>> >>>>>> >>>>>> In the project settings I set from Debug version to Release version and >>>>>> I >>>>>> can link the porject now. It seems that the VTK Relase libaries cannot >>>>>> be >>>>>> used with Debug version of the QtCreator project. I was not careful >>>>>> enough >>>>>> when I tried to buil the debug version of the Qt app. Thanks a lot for >>>>>> the >>>>>> linker output info! >>>>> >>>>> >>>>> >>>>> Ah, glad to hear it. I started experimenting myself in a Windows VM, >>>>> and came up with this .pro file for my minimal test (the cone example >>>>> adapted to use a QVTKOpenGLWidget promoted from QWidget in the Design >>>>> mode): >>>>> >>>>> CONFIG += c++11 >>>>> QT += core gui widgets >>>>> TARGET = VTKQtQMakeTest >>>>> TEMPLATE = app >>>>> SOURCES += main.cpp mainwindow.cpp >>>>> HEADERS += mainwindow.h >>>>> FORMS += mainwindow.ui >>>>> >>>>> INCLUDEPATH += C:/Users/Elvis/Dev/VTK-8.0.1-inst/include/vtk-8.0 >>>>> DEFINES += >>>>> >>>>> vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >>>>> LIBS += -L"C:/Users/Elvis/Dev/VTK-8.0.1-inst/lib" >>>>> LIBS += -lvtkCommonCore-8.0 \ >>>>> -lvtkCommonDataModel-8.0 \ >>>>> -lvtkCommonExecutionModel-8.0 \ >>>>> -lvtkCommonMath-8.0 \ >>>>> -lvtkCommonMisc-8.0 \ >>>>> -lvtkCommonTransforms-8.0 \ >>>>> -lvtkFiltersCore-8.0 \ >>>>> -lvtkFiltersSources-8.0 \ >>>>> -lvtkGUISupportQt-8.0 \ >>>>> -lvtkInteractionStyle-8.0 \ >>>>> -lvtkRenderingCore-8.0 \ >>>>> -lvtkRenderingOpenGL2-8.0 >>>>> >>>>> I think when using QMake, you will have to mess about with the >>>>> initialization of implementation modules [1] in order for the program >>>>> to run, either by using DEFINES like I did above, or using >>>>> VTK_MODULE_INIT. This is something you can get "for free" when using >>>>> CMake. >>>>> >>>>> I could never run my test app, since the VM (VirtualBox) doesn't have >>>>> a sufficient OpenGL implementation. But it compiled and linked at >>>>> least. >>>>> >>>>> Elvis >>>>> >>>>> [1] >>>>> >>>>> https://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized >>>>> >>>>>> >>>>>> Zoltan >>>>>> >>>>>> >>>>>> >>>>>> Am 16.10.2017 um 15:14 schrieb Elvis Stansvik: >>>>>>> >>>>>>> >>>>>>> >>>>>>> 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs >>>>>>> : >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Unfortunately I cannot find such a file in that folder. I also >>>>>>>> searched >>>>>>>> any >>>>>>>> *.jom file there but the linker might have deleted them. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yes sorry, I just realized that. See my earlier mail about the /U jom >>>>>>> flag. >>>>>>> >>>>>>> Elvis >>>>>>> >>>>>>>> >>>>>>>> Zoltan >>>>>>>> >>>>>>>> >>>>>>>> Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs >>>>>>>>> : >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Dear Elvis, >>>>>>>>>> >>>>>>>>>> Thanks for the information. I have the files >>>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>>> in the library list and the libary path is also given in the >>>>>>>>>> project >>>>>>>>>> file >>>>>>>>>> loaded in QtCreator but the compiler cannot resolve the symbol >>>>>>>>>> QVTKOpenGLWidget: >>>>>>>>>> >>>>>>>>>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>>>>>>>>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>>>>>>>>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 >>>>>>>>>> -w34189 >>>>>>>>>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>>>>>>>>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>>>>>>>>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>>> -IC:\Qt\5.8\msvc2013\include >>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtWidgets >>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtGui >>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtANGLE >>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtCore >>>>>>>>>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>>>>>>>>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>>>>>>>>> >>>>>>>>>> distortionpage.cpp >>>>>>>>>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG >>>>>>>>>> /SUBSYSTEM:WINDOWS >>>>>>>>>> "/MANIFESTDEPENDENCY:type='win32' >>>>>>>>>> name='Microsoft.Windows.Common-Controls' >>>>>>>>>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>>>>>>>>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>>>>>>>>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> I think in order to shorten the linker command line and not exceed >>>>>>>>> command line length limits, qmake is using a "Linker Response File" >>>>>>>>> (using @), so I think you have to look into >>>>>>>>> >>>>>>>>> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>>>>> >>>>>>>>> to see the full list of linker arguments. >>>>>>>>> >>>>>>>>> Would be interesting to see the contents of that file. >>>>>>>>> >>>>>>>>> Elvis >>>>>>>>> >>>>>>>>>> >>>>>>>>>> distortionpage.obj : error LNK2019: unresolved external symbol >>>>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class >>>>>>>>>> QFlags>>>>>>>>> Qt::WindowType>)" >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> It seems that the compiler switches contain the include path for >>>>>>>>>> VTK >>>>>>>>>> but >>>>>>>>>> the >>>>>>>>>> library path and the libraries for VTK are missing from the linker >>>>>>>>>> options. >>>>>>>>>> I guess it must be a qmake issue. Thanks anyway. >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Zoltan >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs >>>>>>>>>>> : >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Dear Dan, >>>>>>>>>>>> >>>>>>>>>>>> In QtCreator I added a QWidget to the UI form and used "Promote >>>>>>>>>>>> to >>>>>>>>>>>> ..." >>>>>>>>>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h >>>>>>>>>>>> in >>>>>>>>>>>> the >>>>>>>>>>>> header file of the application. However, when linking the source >>>>>>>>>>>> I >>>>>>>>>>>> get >>>>>>>>>>>> the >>>>>>>>>>>> error message >>>>>>>>>>>> >>>>>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external >>>>>>>>>>>> symbol >>>>>>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class >>>>>>>>>>>> QFlags>>>>>>>>>>> Qt::WindowType>)" >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> It seems that the MSVC2013 linker cannot find the library of >>>>>>>>>>>> QVTKOpenGLWidget. I searched a library file with a similar name >>>>>>>>>>>> in >>>>>>>>>>>> the >>>>>>>>>>>> folder where CMake generated the VTK libraries with Qt support >>>>>>>>>>>> but >>>>>>>>>>>> I >>>>>>>>>>>> could >>>>>>>>>>>> not find it. I am just wondering if it is missing or some other >>>>>>>>>>>> library >>>>>>>>>>>> file >>>>>>>>>>>> with a completely different name contains this symbol. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> The class is part of the vtkGUISupportQt library (on Windows the >>>>>>>>>>> files >>>>>>>>>>> would be vtkGUISupportQt-8.0.lib/dll). >>>>>>>>>>> >>>>>>>>>>> We're using the "promote" functionality in Qt Creator's Design >>>>>>>>>>> mode >>>>>>>>>>> to >>>>>>>>>>> promote a widget to our custom QVTKOpenGLWidget subclass. It >>>>>>>>>>> should >>>>>>>>>>> work fine to promote to it directly. >>>>>>>>>>> >>>>>>>>>>> Elvis >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Regards, >>>>>>>>>>>> Zoltan >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by >>>>>>>>>>>>> adding >>>>>>>>>>>>> first >>>>>>>>>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So >>>>>>>>>>>>> you >>>>>>>>>>>>> can >>>>>>>>>>>>> build the UI of your Qt application this way. >>>>>>>>>>>>> >>>>>>>>>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>>>>>>>>> >>>>>>>>>>>>> Hope this helps, >>>>>>>>>>>>> Dan >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>>> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> Dear Mike, >>>>>>>>>>>>> >>>>>>>>>>>>> Thank you very much for your prompt answer. As I wrote >>>>>>>>>>>>> to >>>>>>>>>>>>> Dan, >>>>>>>>>>>>> we >>>>>>>>>>>>> have to use QtCreator for the development here. Then I >>>>>>>>>>>>> have >>>>>>>>>>>>> access >>>>>>>>>>>>> only for qmake and I can edit project files for it. If >>>>>>>>>>>>> QVTKOpenGLWidget is the only VTK widget class supported >>>>>>>>>>>>> for >>>>>>>>>>>>> Qt5 >>>>>>>>>>>>> then >>>>>>>>>>>>> I ave to find out how to insert such an object into the >>>>>>>>>>>>> UI >>>>>>>>>>>>> form >>>>>>>>>>>>> file >>>>>>>>>>>>> of QT. >>>>>>>>>>>>> >>>>>>>>>>>>> Kind regards, >>>>>>>>>>>>> Zoltan >>>>>>>>>>>>> >>>>>>>>>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>>>>>>>>> >>>>>>>>>>>>> Also, when working with VTK, it will be a lot >>>>>>>>>>>>> easier >>>>>>>>>>>>> to >>>>>>>>>>>>> switch >>>>>>>>>>>>> to using CMake instead of Qt project files >>>>>>>>>>>>> (QtCreator >>>>>>>>>>>>> supports >>>>>>>>>>>>> CMake). Look at the examples Dan linked to. You >>>>>>>>>>>>> will >>>>>>>>>>>>> have >>>>>>>>>>>>> to >>>>>>>>>>>>> update the CMakelists.txt file for Qt. You will >>>>>>>>>>>>> probably >>>>>>>>>>>>> have >>>>>>>>>>>>> to >>>>>>>>>>>>> add the following: >>>>>>>>>>>>> >>>>>>>>>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>>>>>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>>>>>>>>> >>>>>>>>>>>>> and update the target_link_libraries line(add >>>>>>>>>>>>> Qt5::Widget) , >>>>>>>>>>>>> e.g.,: >>>>>>>>>>>>> >>>>>>>>>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>>>>>>>>> ${VTK_LIBRARIES}) >>>>>>>>>>>>> >>>>>>>>>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >> >>>>>>>>>>>>> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> Zoltan, >>>>>>>>>>>>> This is unrelated to the error you are seeing >>>>>>>>>>>>> however: >>>>>>>>>>>>> >>>>>>>>>>>>> For Qt5 you'll need to use QVTKOpenGLWidget >>>>>>>>>>>>> rather >>>>>>>>>>>>> than >>>>>>>>>>>>> QVTKWidget. See >>>>>>>>>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>>> All examples are converted to Qt5. Also, VTK >>>>>>>>>>>>> master >>>>>>>>>>>>> has >>>>>>>>>>>>> a >>>>>>>>>>>>> number of >>>>>>>>>>>>> examples that have been converted to Qt5: >>>>>>>>>>>>> Examples/GUI/Qt >>>>>>>>>>>>> >>>>>>>>>>>>> Hope this helps, >>>>>>>>>>>>> Dan >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan >>>>>>>>>>>>> Kovacs >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> >> >>>>>>>>>>>>> >>>>>>>>>>>>> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> Dear all, >>>>>>>>>>>>> >>>>>>>>>>>>> In CMake I generated a solution project of >>>>>>>>>>>>> VTK-8.0.1 >>>>>>>>>>>>> with Qt5 >>>>>>>>>>>>> support for MSVS2013. After having run the >>>>>>>>>>>>> ALL_BUILD >>>>>>>>>>>>> and INSTALL >>>>>>>>>>>>> projects with the install prefix >>>>>>>>>>>>> C:\VTK\8.0.1 >>>>>>>>>>>>> in >>>>>>>>>>>>> VM2013 >>>>>>>>>>>>> I could >>>>>>>>>>>>> installed the Win32 bit binaries of VTK >>>>>>>>>>>>> 8.0.1 >>>>>>>>>>>>> in >>>>>>>>>>>>> that >>>>>>>>>>>>> folder. >>>>>>>>>>>>> The header files and the libraries are >>>>>>>>>>>>> located >>>>>>>>>>>>> in >>>>>>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>>>>>>>>> C:\VTK\8.0.1\lib. >>>>>>>>>>>>> >>>>>>>>>>>>> I copied the file QVTKWidgetPlugin.dll >>>>>>>>>>>>> from >>>>>>>>>>>>> the >>>>>>>>>>>>> VTK >>>>>>>>>>>>> binary >>>>>>>>>>>>> folders to the plugin folder of QTCreator, >>>>>>>>>>>>> which >>>>>>>>>>>>> uses >>>>>>>>>>>>> QT 5.8 >>>>>>>>>>>>> msvs2013 32 bit version. >>>>>>>>>>>>> >>>>>>>>>>>>> Then I set the include and library paths >>>>>>>>>>>>> and >>>>>>>>>>>>> added >>>>>>>>>>>>> all >>>>>>>>>>>>> the VTK >>>>>>>>>>>>> libary files from C:\VTK\8.0.1\lib for the >>>>>>>>>>>>> linker >>>>>>>>>>>>> setting in the >>>>>>>>>>>>> project file >>>>>>>>>>>>> of a QT application in QtCreator: >>>>>>>>>>>>> >>>>>>>>>>>>> INCLUDEPATH += >>>>>>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>>>>>>>>> >>>>>>>>>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>>>>>>>>> -lvtkRenderingLOD-8.0 \ >>>>>>>>>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>>>>>>>>> -lvtkRenderingQt-8.0 \ >>>>>>>>>>>>> -lvtkRenderingVolume-8.0 \ >>>>>>>>>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>>>>>>>>> -lvtksqlite-8.0 \ >>>>>>>>>>>>> -lvtksys-8.0 \ >>>>>>>>>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>>>>>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>>>>>>>>> -lvtkTestingRendering-8.0 \ >>>>>>>>>>>>> -lvtktiff-8.0 \ >>>>>>>>>>>>> -lvtkverdict-8.0 \ >>>>>>>>>>>>> -lvtkViewsContext2D-8.0 \ >>>>>>>>>>>>> -lvtkViewsCore-8.0 \ >>>>>>>>>>>>> -lvtkViewsInfovis-8.0 \ >>>>>>>>>>>>> -lvtkViewsQt-8.0 \ >>>>>>>>>>>>> -lvtkzlib-8.0 \ >>>>>>>>>>>>> -lvtkalglib-8.0 \ >>>>>>>>>>>>> -lvtkChartsCore-8.0 \ >>>>>>>>>>>>> -lvtkCommonColor-8.0 \ >>>>>>>>>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>>>>>>>>> -lvtkCommonCore-8.0 \ >>>>>>>>>>>>> -lvtkCommonDataModel-8.0 \ >>>>>>>>>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>>>>>>>>> -lvtkCommonMath-8.0 \ >>>>>>>>>>>>> -lvtkCommonMisc-8.0 \ >>>>>>>>>>>>> -lvtkCommonSystem-8.0 \ >>>>>>>>>>>>> -lvtkCommonTransforms-8.0 \ >>>>>>>>>>>>> -lvtkDICOMParser-8.0 \ >>>>>>>>>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>>>>>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>>>>>>>>> -lvtkexoIIc-8.0 \ >>>>>>>>>>>>> -lvtkexpat-8.0 \ >>>>>>>>>>>>> -lvtkFiltersAMR-8.0 \ >>>>>>>>>>>>> -lvtkFiltersCore-8.0 \ >>>>>>>>>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>>>>>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>>>>>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>>>>>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>>>>>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>>>>>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>>>>>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>>>>>>>>> -lvtkFiltersImaging-8.0 \ >>>>>>>>>>>>> -lvtkFiltersModeling-8.0 \ >>>>>>>>>>>>> -lvtkFiltersParallel-8.0 \ >>>>>>>>>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>>>>>>>>> -lvtkFiltersPoints-8.0 \ >>>>>>>>>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>>>>>>>>> -lvtkFiltersSelection-8.0 \ >>>>>>>>>>>>> -lvtkFiltersSMP-8.0 \ >>>>>>>>>>>>> -lvtkFiltersSources-8.0 \ >>>>>>>>>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>>>>>>>>> -lvtkFiltersTexture-8.0 \ >>>>>>>>>>>>> -lvtkFiltersTopology-8.0 \ >>>>>>>>>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>>>>>>>>> -lvtkfreetype-8.0 \ >>>>>>>>>>>>> -lvtkGeovisCore-8.0 \ >>>>>>>>>>>>> -lvtkgl2ps-8.0 \ >>>>>>>>>>>>> -lvtkglew-8.0 \ >>>>>>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>>>>>> -lvtkhdf5_hl-8.0 \ >>>>>>>>>>>>> -lvtkhdf5-8.0 \ >>>>>>>>>>>>> -lvtkImagingColor-8.0 \ >>>>>>>>>>>>> -lvtkImagingCore-8.0 \ >>>>>>>>>>>>> -lvtkImagingFourier-8.0 \ >>>>>>>>>>>>> -lvtkImagingGeneral-8.0 \ >>>>>>>>>>>>> -lvtkImagingHybrid-8.0 \ >>>>>>>>>>>>> -lvtkImagingMath-8.0 \ >>>>>>>>>>>>> -lvtkImagingMorphological-8.0 \ >>>>>>>>>>>>> -lvtkImagingSources-8.0 \ >>>>>>>>>>>>> -lvtkImagingStatistics-8.0 \ >>>>>>>>>>>>> -lvtkImagingStencil-8.0 \ >>>>>>>>>>>>> -lvtkInfovisCore-8.0 \ >>>>>>>>>>>>> -lvtkInfovisLayout-8.0 \ >>>>>>>>>>>>> -lvtkInteractionImage-8.0 \ >>>>>>>>>>>>> -lvtkInteractionStyle-8.0 \ >>>>>>>>>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>>>>>>>>> -lvtkIOAMR-8.0 \ >>>>>>>>>>>>> -lvtkIOCore-8.0 \ >>>>>>>>>>>>> -lvtkIOEnSight-8.0 \ >>>>>>>>>>>>> -lvtkIOExodus-8.0 \ >>>>>>>>>>>>> -lvtkIOExport-8.0 \ >>>>>>>>>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>>>>>>>>> -lvtkIOGeometry-8.0 \ >>>>>>>>>>>>> -lvtkIOImage-8.0 \ >>>>>>>>>>>>> -lvtkIOImport-8.0 \ >>>>>>>>>>>>> -lvtkIOInfovis-8.0 \ >>>>>>>>>>>>> -lvtkIOLegacy-8.0 \ >>>>>>>>>>>>> -lvtkIOLSDyna-8.0 \ >>>>>>>>>>>>> -lvtkIOMINC-8.0 \ >>>>>>>>>>>>> -lvtkIOMovie-8.0 \ >>>>>>>>>>>>> -lvtkIONetCDF-8.0 \ >>>>>>>>>>>>> -lvtkIOParallel-8.0 \ >>>>>>>>>>>>> -lvtkIOParallelXML-8.0 \ >>>>>>>>>>>>> -lvtkIOPLY-8.0 \ >>>>>>>>>>>>> -lvtkIOSQL-8.0 \ >>>>>>>>>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>>>>>>>>> -lvtkIOVideo-8.0 \ >>>>>>>>>>>>> -lvtkIOXML-8.0 \ >>>>>>>>>>>>> -lvtkIOXMLParser-8.0 \ >>>>>>>>>>>>> -lvtkjpeg-8.0 \ >>>>>>>>>>>>> -lvtkjsoncpp-8.0 \ >>>>>>>>>>>>> -lvtklibharu-8.0 \ >>>>>>>>>>>>> -lvtklibxml2-8.0 \ >>>>>>>>>>>>> -lvtkLocalExample-8.0 \ >>>>>>>>>>>>> -lvtklz4-8.0 \ >>>>>>>>>>>>> -lvtkmetaio-8.0 \ >>>>>>>>>>>>> -lvtknetcdf_c++ \ >>>>>>>>>>>>> -lvtkNetCDF-8.0 \ >>>>>>>>>>>>> -lvtkoggtheora-8.0 \ >>>>>>>>>>>>> -lvtkParallelCore-8.0 \ >>>>>>>>>>>>> -lvtkpng-8.0 \ >>>>>>>>>>>>> -lvtkproj4-8.0 \ >>>>>>>>>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>>>>>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>>>>>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>>>>>>>>> -lvtkRenderingCore-8.0 \ >>>>>>>>>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>>>>>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>>>>>>>>> -lvtkRenderingImage-8.0 \ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> However, if I add a QVTKWidget on the UI >>>>>>>>>>>>> file >>>>>>>>>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>> application, include the file QVTKWidget.h >>>>>>>>>>>>> in >>>>>>>>>>>>> the >>>>>>>>>>>>> header file of >>>>>>>>>>>>> the application and I try to link it in >>>>>>>>>>>>> QtCreator >>>>>>>>>>>>> with >>>>>>>>>>>>> the >>>>>>>>>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in >>>>>>>>>>>>> the >>>>>>>>>>>>> toolchain >>>>>>>>>>>>> of >>>>>>>>>>>>> QtCreator) sends error messages for >>>>>>>>>>>>> unresolved >>>>>>>>>>>>> external >>>>>>>>>>>>> symbols >>>>>>>>>>>>> for all the functions/classes belonging to >>>>>>>>>>>>> the >>>>>>>>>>>>> QVTKWidget, such as >>>>>>>>>>>>> >>>>>>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: >>>>>>>>>>>>> unresolved >>>>>>>>>>>>> external >>>>>>>>>>>>> symbol "__declspec(dllimport) public: >>>>>>>>>>>>> __thiscall >>>>>>>>>>>>> QVTKWidget::QVTKWidget(class QWidget >>>>>>>>>>>>> *,class >>>>>>>>>>>>> QFlags>>>>>>>>>>>> Qt::WindowType>)" >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>>>>> referenced in function "public: void >>>>>>>>>>>>> __thiscall >>>>>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget >>>>>>>>>>>>> *)" >>>>>>>>>>>>> >>>>>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> It seems that the linker could not find >>>>>>>>>>>>> the >>>>>>>>>>>>> libary >>>>>>>>>>>>> for >>>>>>>>>>>>> the >>>>>>>>>>>>> QVTKWidget plugin, which is loaded since I >>>>>>>>>>>>> could >>>>>>>>>>>>> chose >>>>>>>>>>>>> QtWidget >>>>>>>>>>>>> from the widget list in the UI form editor >>>>>>>>>>>>> in >>>>>>>>>>>>> QtCreator. I do >>>>>>>>>>>>> not see any ABI issue here since I use the >>>>>>>>>>>>> 32 >>>>>>>>>>>>> bit >>>>>>>>>>>>> mscv2103 >>>>>>>>>>>>> version of Qt and I also compiled and >>>>>>>>>>>>> linked >>>>>>>>>>>>> the >>>>>>>>>>>>> 32 >>>>>>>>>>>>> bit >>>>>>>>>>>>> version >>>>>>>>>>>>> of VTK libaries and plugin files with >>>>>>>>>>>>> MSVS2013. >>>>>>>>>>>>> I >>>>>>>>>>>>> am >>>>>>>>>>>>> wondering >>>>>>>>>>>>> if anybody could make VTK-8.1 working with >>>>>>>>>>>>> Qt. >>>>>>>>>>>>> Thanks >>>>>>>>>>>>> a >>>>>>>>>>>>> lot. >>>>>>>>>>>>> >>>>>>>>>>>>> Kind regars, >>>>>>>>>>>>> Zoltan >>>>>>>>>>>>> >>>>>>>>>>>>> Regards, >>>>>>>>>>>>> Zoltan >>>>>>>>>>>>> >>>>>>>>>>>>> Am 09.10.2017 um 07:34 schrieb >>>>>>>>>>>>> support at qt.io >>>>>>>>>>>>> >>>>>>>>>>>> >: >>>>>>>>>>>>> >>>>>>>>>>>>> Hi Zoltan, >>>>>>>>>>>>> >>>>>>>>>>>>> I don't know how the widget should be >>>>>>>>>>>>> installed >>>>>>>>>>>>> or >>>>>>>>>>>>> set up in >>>>>>>>>>>>> a project, but you could just search >>>>>>>>>>>>> for >>>>>>>>>>>>> the >>>>>>>>>>>>> header >>>>>>>>>>>>> file and >>>>>>>>>>>>> point INCLUDEPATH to the folder that >>>>>>>>>>>>> contains >>>>>>>>>>>>> it. >>>>>>>>>>>>> >>>>>>>>>>>>> Regards, >>>>>>>>>>>>> Joni >>>>>>>>>>>>> >>>>>>>>>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> > wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> Hi Joni, >>>>>>>>>>>>> >>>>>>>>>>>>> I see. However I found MSCV2013 32 >>>>>>>>>>>>> bit >>>>>>>>>>>>> version >>>>>>>>>>>>> for Qt >>>>>>>>>>>>> 5.8. I install >>>>>>>>>>>>> that version and I built the VTK >>>>>>>>>>>>> binaries >>>>>>>>>>>>> for >>>>>>>>>>>>> win32 >>>>>>>>>>>>> platform with >>>>>>>>>>>>> MVS2013. After having copied the >>>>>>>>>>>>> VTK >>>>>>>>>>>>> plugin >>>>>>>>>>>>> file into >>>>>>>>>>>>> the plugin folder >>>>>>>>>>>>> of QtCreator I could launch it >>>>>>>>>>>>> successfully. >>>>>>>>>>>>> The >>>>>>>>>>>>> QVTKWidget is in the >>>>>>>>>>>>> Widget list of QtCreator now. I >>>>>>>>>>>>> could >>>>>>>>>>>>> insert a >>>>>>>>>>>>> QVTKWidget in the UI form >>>>>>>>>>>>> as well. The only problem now is >>>>>>>>>>>>> that >>>>>>>>>>>>> QtCreator >>>>>>>>>>>>> cannot >>>>>>>>>>>>> find the header >>>>>>>>>>>>> file for QVTKWidget. It is not >>>>>>>>>>>>> cleat >>>>>>>>>>>>> how >>>>>>>>>>>>> to >>>>>>>>>>>>> set >>>>>>>>>>>>> the >>>>>>>>>>>>> INCLUDEPATH in the >>>>>>>>>>>>> project file since VS2103 did not >>>>>>>>>>>>> create >>>>>>>>>>>>> a >>>>>>>>>>>>> separate >>>>>>>>>>>>> include folder in >>>>>>>>>>>>> the target folder C:/VTK/bin for >>>>>>>>>>>>> the >>>>>>>>>>>>> VTK >>>>>>>>>>>>> binaries. Only >>>>>>>>>>>>> the library >>>>>>>>>>>>> files have a separate folder, >>>>>>>>>>>>> C:/VTK/bin/lib/Release. >>>>>>>>>>>>> >>>>>>>>>>>>> Regards, >>>>>>>>>>>>> Zoltan >>>>>>>>>>>>> >>>>>>>>>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>>>>>>>>> support at qt.io >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >: >>>>>>>>>>>>> >>>>>>>>>>>>> Hi Zoltan, >>>>>>>>>>>>> >>>>>>>>>>>>> On 06 October 2017 at 13:00:00 >>>>>>>>>>>>> EEST >>>>>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> > wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> Hi Joni, >>>>>>>>>>>>> >>>>>>>>>>>>> Thank you very much for >>>>>>>>>>>>> your >>>>>>>>>>>>> answer. >>>>>>>>>>>>> Then I try >>>>>>>>>>>>> to install everything >>>>>>>>>>>>> from scratch. The only >>>>>>>>>>>>> prolem >>>>>>>>>>>>> is >>>>>>>>>>>>> I >>>>>>>>>>>>> have >>>>>>>>>>>>> only >>>>>>>>>>>>> MSVC 2103 and the only >>>>>>>>>>>>> option in the selection >>>>>>>>>>>>> list >>>>>>>>>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>> online >>>>>>>>>>>>> installer for MSVC 2013 is >>>>>>>>>>>>> the 64 bit version. Is >>>>>>>>>>>>> there >>>>>>>>>>>>> somewhere >>>>>>>>>>>>> an >>>>>>>>>>>>> installer on your website >>>>>>>>>>>>> wich >>>>>>>>>>>>> provides a relatively new >>>>>>>>>>>>> Qt >>>>>>>>>>>>> version >>>>>>>>>>>>> with MSVC >>>>>>>>>>>>> 2103 32 bit version? >>>>>>>>>>>>> Thank you very much for >>>>>>>>>>>>> your >>>>>>>>>>>>> help. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> No, but you could compile it >>>>>>>>>>>>> from >>>>>>>>>>>>> source >>>>>>>>>>>>> yourself. >>>>>>>>>>>>> However, note that you cannot >>>>>>>>>>>>> build >>>>>>>>>>>>> plugins >>>>>>>>>>>>> for new >>>>>>>>>>>>> Qt Creator with MSVC 2013 as >>>>>>>>>>>>> it >>>>>>>>>>>>> uses >>>>>>>>>>>>> different ABI. >>>>>>>>>>>>> You could use MSVC 2015 or >>>>>>>>>>>>> MSVC >>>>>>>>>>>>> 2017. >>>>>>>>>>>>> >>>>>>>>>>>>> Or you could build 64bit >>>>>>>>>>>>> version >>>>>>>>>>>>> of >>>>>>>>>>>>> Qt >>>>>>>>>>>>> Creator from >>>>>>>>>>>>> source with that Qt version >>>>>>>>>>>>> you >>>>>>>>>>>>> have >>>>>>>>>>>>> installed. >>>>>>>>>>>>> >>>>>>>>>>>>> Regards, >>>>>>>>>>>>> Joni >>>>>>>>>>>>> -- >>>>>>>>>>>>> Joni Poikelin >>>>>>>>>>>>> Software Engineer, >>>>>>>>>>>>> The Qt Company >>>>>>>>>>>>> ? >>>>>>>>>>>>> FAQs - >>>>>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Joni Poikelin >>>>>>>>>>>>> Software Engineer, >>>>>>>>>>>>> The Qt Company >>>>>>>>>>>>> ? >>>>>>>>>>>>> FAQs - >>>>>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Visit other Kitware open-source projects >>>>>>>>>>>>> at >>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> Please keep messages on-topic and check >>>>>>>>>>>>> the >>>>>>>>>>>>> VTK >>>>>>>>>>>>> FAQ >>>>>>>>>>>>> at: >>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> Please keep messages on-topic and check the >>>>>>>>>>>>> VTK >>>>>>>>>>>>> FAQ >>>>>>>>>>>>> at: >>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>> >>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>>>>>>>>> at: >>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>> >>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>> >>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>> >>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>> >>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>> >>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>> >> From Zoltan.Kovacs at esi-group.com Mon Oct 16 11:43:14 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Mon, 16 Oct 2017 17:43:14 +0200 Subject: [vtkusers] Inresolved external for QVTKWidget in VTK-8.0.1. In-Reply-To: References: <0d6f851e-674d-5b09-1e8b-542fae4a3795@esi-group.com> <5cb2929f-95dd-e0bb-4388-64a80f42e6f9@esi-group.com> <0f87c646-5d0d-9a40-a520-a12ec34199c3@esi-group.com> <059632bb-2ac0-b507-dc96-a1573eb4f483@esi-group.com> <185408a4-9634-bafa-2c67-748d4cd14a1b@esi-group.com> Message-ID: <3b7ab236-97e2-d4bd-a7a8-67a56690113f@esi-group.com> Actually, the macro VTK_MODULE_INIT worked. I have only the issues now like ERROR: In C:\VTK\VTK-8.0.1\VTK-8.0.1\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, line 701 vtkWin32OpenGLRenderWindow (050E8798): We have determined that your graphics system is an Intel SandyBridge based system. These systems only partially support VTK. If you encounter any issues please make sure your graphics drivers from Intel are up to date. ERROR: In C:\VTK\VTK-8.0.1\VTK-8.0.1\GUISupport\Qt\QVTKInteractor.cxx, line 147 QVTKInteractor (04FF6098): QVTKInteractor cannot control the event loop. The first ERROR is just because of the partially support of Intel SandyBridge by VTK. That is OK :-) . The second one is due to my limited knowledge on the usage of vtkInteractor with QVTKWidget. But it is not a technical issue. I just have to find out the correct usage. Since I want to open an STL file by VTK in a Qt window I do not need the volume rendering now. It works now with an STL file: the polgon surface appears QtVTKWidget window and I can rotate it with mouse even if I had an error with the QVTKInteractor. Of course, you are right. It would be definetely easier to use CMake with VTK and I would gladly migrate from qmake to cmake. Unfortunately the development project here uses qmake for the application handling STL files. However, it seems to work now. Thanks a lot! Zoltan Am 16.10.2017 um 17:21 schrieb Elvis Stansvik: > 2017-10-16 17:20 GMT+02:00 Elvis Stansvik : >> 2017-10-16 17:11 GMT+02:00 Zoltan Kovacs : >>> I have the line >>> -lvtkRenderingOpenGL2-8.0 \ >>> in the library list of the project file and the corresponding library file >>> is also in the lib folder of the installed VTK. I can try to include the >>> header vtkAutoinit.h and add these variables with the macro VTK_MODULE_INIT. >>> It may work. >> >> Yes, it may be more reliable to use the VTK_MODULE_INIT macro perhaps, >> but I think it should work with the *_AUTOINIT defines as well. >> >> Just remember when using VTK_MODULE_INIT to do everything before you >> include the first VTK header. >> >> I had a look at my compile output on Windows when using >> >> DEFINES += vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >> >> and it had >> >> -DvtkRenderingCore_AUTOINIT="2(vtk^CteractionStyle,vtkRenderingOpenGL2)" > > Ehm, minus that ^C of course. > >> >> which I think is correct. >> >> But yes, if you're doing volume rendering, you would also need: >> >> DEFINES += vtkRenderingVolume_AUTOINIT=$$shell_quote(1(vtkRenderingVolumeOpenGL2)) >> >> But I don't think you would have gotten "no override found for >> 'vtkPolyDataMapper'" from missing that.. I think that error would be >> indicative of a missing vtkRenderingOpenGL2 initialization (not sure >> though..). >> >> Elvis >> >>> >>> Zoltan >>> >>> >>> >>> Am 16.10.2017 um 17:00 schrieb Elvis Stansvik: >>>> >>>> 2017-10-16 16:50 GMT+02:00 Zoltan Kovacs : >>>>> >>>>> Thanks for the detailed information! It is very useful, especially the >>>>> line >>>>> >>>>> DEFINES += >>>>> >>>>> vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >>>>> >>>>> I inserted it into my project file but I get the error "no override found >>>>> for 'vtkPolyDataMapper'". I guess I must include other switches in the >>>>> shell_quote argument too, such as vtkRenderingVolumeOpenGL or something >>>>> else. >>>> >>>> >>>> Hm, I'm not sure, but think that should have been taken care of by the >>>> vtkRenderingOpenGL2. I may have messed something up with the QMake >>>> syntax, so it would be interesting to see the actual compile line for >>>> one of your sources (again with /U I think), to see what the /D-flag >>>> ended up looking like. >>>> >>>> (Note: Everything is definitely much easier with CMake, and I would >>>> highly recommend taking the time switching to it. We use it for our >>>> VTK+Qt project and it works just fine. We also use Qt Creator as the >>>> primary IDE, and it can open CMakeLists.txt.) >>>> >>>> Elvis >>>> >>>>> >>>>> Zoltan >>>>> >>>>> >>>>> Am 16.10.2017 um 16:10 schrieb Elvis Stansvik: >>>>>> >>>>>> >>>>>> 2017-10-16 15:47 GMT+02:00 Zoltan Kovacs : >>>>>>> >>>>>>> >>>>>>> In the project settings I set from Debug version to Release version and >>>>>>> I >>>>>>> can link the porject now. It seems that the VTK Relase libaries cannot >>>>>>> be >>>>>>> used with Debug version of the QtCreator project. I was not careful >>>>>>> enough >>>>>>> when I tried to buil the debug version of the Qt app. Thanks a lot for >>>>>>> the >>>>>>> linker output info! >>>>>> >>>>>> >>>>>> >>>>>> Ah, glad to hear it. I started experimenting myself in a Windows VM, >>>>>> and came up with this .pro file for my minimal test (the cone example >>>>>> adapted to use a QVTKOpenGLWidget promoted from QWidget in the Design >>>>>> mode): >>>>>> >>>>>> CONFIG += c++11 >>>>>> QT += core gui widgets >>>>>> TARGET = VTKQtQMakeTest >>>>>> TEMPLATE = app >>>>>> SOURCES += main.cpp mainwindow.cpp >>>>>> HEADERS += mainwindow.h >>>>>> FORMS += mainwindow.ui >>>>>> >>>>>> INCLUDEPATH += C:/Users/Elvis/Dev/VTK-8.0.1-inst/include/vtk-8.0 >>>>>> DEFINES += >>>>>> >>>>>> vtkRenderingCore_AUTOINIT=$$shell_quote(2(vtkInteractionStyle,vtkRenderingOpenGL2)) >>>>>> LIBS += -L"C:/Users/Elvis/Dev/VTK-8.0.1-inst/lib" >>>>>> LIBS += -lvtkCommonCore-8.0 \ >>>>>> -lvtkCommonDataModel-8.0 \ >>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>> -lvtkCommonMath-8.0 \ >>>>>> -lvtkCommonMisc-8.0 \ >>>>>> -lvtkCommonTransforms-8.0 \ >>>>>> -lvtkFiltersCore-8.0 \ >>>>>> -lvtkFiltersSources-8.0 \ >>>>>> -lvtkGUISupportQt-8.0 \ >>>>>> -lvtkInteractionStyle-8.0 \ >>>>>> -lvtkRenderingCore-8.0 \ >>>>>> -lvtkRenderingOpenGL2-8.0 >>>>>> >>>>>> I think when using QMake, you will have to mess about with the >>>>>> initialization of implementation modules [1] in order for the program >>>>>> to run, either by using DEFINES like I did above, or using >>>>>> VTK_MODULE_INIT. This is something you can get "for free" when using >>>>>> CMake. >>>>>> >>>>>> I could never run my test app, since the VM (VirtualBox) doesn't have >>>>>> a sufficient OpenGL implementation. But it compiled and linked at >>>>>> least. >>>>>> >>>>>> Elvis >>>>>> >>>>>> [1] >>>>>> >>>>>> https://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized >>>>>> >>>>>>> >>>>>>> Zoltan >>>>>>> >>>>>>> >>>>>>> >>>>>>> Am 16.10.2017 um 15:14 schrieb Elvis Stansvik: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> 2017-10-16 15:12 GMT+02:00 Zoltan Kovacs >>>>>>>> : >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Unfortunately I cannot find such a file in that folder. I also >>>>>>>>> searched >>>>>>>>> any >>>>>>>>> *.jom file there but the linker might have deleted them. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yes sorry, I just realized that. See my earlier mail about the /U jom >>>>>>>> flag. >>>>>>>> >>>>>>>> Elvis >>>>>>>> >>>>>>>>> >>>>>>>>> Zoltan >>>>>>>>> >>>>>>>>> >>>>>>>>> Am 16.10.2017 um 13:12 schrieb Elvis Stansvik: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> 2017-10-16 13:00 GMT+02:00 Zoltan Kovacs >>>>>>>>>> : >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Dear Elvis, >>>>>>>>>>> >>>>>>>>>>> Thanks for the information. I have the files >>>>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>>>> in the library list and the libary path is also given in the >>>>>>>>>>> project >>>>>>>>>>> file >>>>>>>>>>> loaded in QtCreator but the compiler cannot resolve the symbol >>>>>>>>>>> QVTKOpenGLWidget: >>>>>>>>>>> >>>>>>>>>>> Starte "C:\Qt\Tools\QtCreator\bin\jom.exe" >>>>>>>>>>> C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug >>>>>>>>>>> cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 >>>>>>>>>>> -w34189 >>>>>>>>>>> -w44996 -EHsc /Fddebug\AM_GUI.vc.pdb -DUNICODE -DWIN32 -DLINUX >>>>>>>>>>> -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB >>>>>>>>>>> -DQT_CORE_LIB -I..\AM_GUI -I. -IC:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>>>> -IC:\Qt\5.8\msvc2013\include >>>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtPrintSupport >>>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtWidgets >>>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtGui >>>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtANGLE >>>>>>>>>>> -IC:\Qt\5.8\msvc2013\include\QtCore >>>>>>>>>>> -Idebug -I. -IC:\Qt\5.8\msvc2013\mkspecs\win32-msvc2013 -Fodebug\ >>>>>>>>>>> @C:\Users\zko\AppData\Local\Temp\distortionpage.obj.8900.125.jom >>>>>>>>>>> >>>>>>>>>>> distortionpage.cpp >>>>>>>>>>> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG >>>>>>>>>>> /SUBSYSTEM:WINDOWS >>>>>>>>>>> "/MANIFESTDEPENDENCY:type='win32' >>>>>>>>>>> name='Microsoft.Windows.Common-Controls' >>>>>>>>>>> version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' >>>>>>>>>>> processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AM_GUI.exe >>>>>>>>>>> @C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> I think in order to shorten the linker command line and not exceed >>>>>>>>>> command line length limits, qmake is using a "Linker Response File" >>>>>>>>>> (using @), so I think you have to look into >>>>>>>>>> >>>>>>>>>> C:\Users\zko\AppData\Local\Temp\AM_GUI.exe.8900.4259.jom >>>>>>>>>> >>>>>>>>>> to see the full list of linker arguments. >>>>>>>>>> >>>>>>>>>> Would be interesting to see the contents of that file. >>>>>>>>>> >>>>>>>>>> Elvis >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> distortionpage.obj : error LNK2019: unresolved external symbol >>>>>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class >>>>>>>>>>> QFlags>>>>>>>>>> Qt::WindowType>)" >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> It seems that the compiler switches contain the include path for >>>>>>>>>>> VTK >>>>>>>>>>> but >>>>>>>>>>> the >>>>>>>>>>> library path and the libraries for VTK are missing from the linker >>>>>>>>>>> options. >>>>>>>>>>> I guess it must be a qmake issue. Thanks anyway. >>>>>>>>>>> >>>>>>>>>>> Regards, >>>>>>>>>>> Zoltan >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Am 16.10.2017 um 11:59 schrieb Elvis Stansvik: >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> 2017-10-16 11:39 GMT+02:00 Zoltan Kovacs >>>>>>>>>>>> : >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Dear Dan, >>>>>>>>>>>>> >>>>>>>>>>>>> In QtCreator I added a QWidget to the UI form and used "Promote >>>>>>>>>>>>> to >>>>>>>>>>>>> ..." >>>>>>>>>>>>> QVTKOpenGLWidget class for it. I also included QVTKOpenGLWidget.h >>>>>>>>>>>>> in >>>>>>>>>>>>> the >>>>>>>>>>>>> header file of the application. However, when linking the source >>>>>>>>>>>>> I >>>>>>>>>>>>> get >>>>>>>>>>>>> the >>>>>>>>>>>>> error message >>>>>>>>>>>>> >>>>>>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: unresolved external >>>>>>>>>>>>> symbol >>>>>>>>>>>>> "__declspec(dllimport) public: __thiscall >>>>>>>>>>>>> QVTKOpenGLWidget::QVTKOpenGLWidget(class QWidget *,class >>>>>>>>>>>>> QFlags>>>>>>>>>>>> Qt::WindowType>)" >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> (__imp_??0QVTKOpenGLWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>>>>> referenced in function "public: void __thiscall >>>>>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget *)" >>>>>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> It seems that the MSVC2013 linker cannot find the library of >>>>>>>>>>>>> QVTKOpenGLWidget. I searched a library file with a similar name >>>>>>>>>>>>> in >>>>>>>>>>>>> the >>>>>>>>>>>>> folder where CMake generated the VTK libraries with Qt support >>>>>>>>>>>>> but >>>>>>>>>>>>> I >>>>>>>>>>>>> could >>>>>>>>>>>>> not find it. I am just wondering if it is missing or some other >>>>>>>>>>>>> library >>>>>>>>>>>>> file >>>>>>>>>>>>> with a completely different name contains this symbol. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> The class is part of the vtkGUISupportQt library (on Windows the >>>>>>>>>>>> files >>>>>>>>>>>> would be vtkGUISupportQt-8.0.lib/dll). >>>>>>>>>>>> >>>>>>>>>>>> We're using the "promote" functionality in Qt Creator's Design >>>>>>>>>>>> mode >>>>>>>>>>>> to >>>>>>>>>>>> promote a widget to our custom QVTKOpenGLWidget subclass. It >>>>>>>>>>>> should >>>>>>>>>>>> work fine to promote to it directly. >>>>>>>>>>>> >>>>>>>>>>>> Elvis >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Regards, >>>>>>>>>>>>> Zoltan >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Am 10.10.2017 um 19:23 schrieb Dan Lipsa: >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> In Qt Designer you should be able to use QVTKOpenGLWidget by >>>>>>>>>>>>>> adding >>>>>>>>>>>>>> first >>>>>>>>>>>>>> a QOpenGLWidget and then 'Promote to ...' a QVTKOpenGLWidget. So >>>>>>>>>>>>>> you >>>>>>>>>>>>>> can >>>>>>>>>>>>>> build the UI of your Qt application this way. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am not sure what is needed for QtCreator. I don't use that. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Hope this helps, >>>>>>>>>>>>>> Dan >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Tue, Oct 10, 2017 at 10:59 AM, Zoltan Kovacs >>>>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Mike, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thank you very much for your prompt answer. As I wrote >>>>>>>>>>>>>> to >>>>>>>>>>>>>> Dan, >>>>>>>>>>>>>> we >>>>>>>>>>>>>> have to use QtCreator for the development here. Then I >>>>>>>>>>>>>> have >>>>>>>>>>>>>> access >>>>>>>>>>>>>> only for qmake and I can edit project files for it. If >>>>>>>>>>>>>> QVTKOpenGLWidget is the only VTK widget class supported >>>>>>>>>>>>>> for >>>>>>>>>>>>>> Qt5 >>>>>>>>>>>>>> then >>>>>>>>>>>>>> I ave to find out how to insert such an object into the >>>>>>>>>>>>>> UI >>>>>>>>>>>>>> form >>>>>>>>>>>>>> file >>>>>>>>>>>>>> of QT. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Kind regards, >>>>>>>>>>>>>> Zoltan >>>>>>>>>>>>>> >>>>>>>>>>>>>> Am 10.10.2017 um 16:48 schrieb Mike Chinander: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Also, when working with VTK, it will be a lot >>>>>>>>>>>>>> easier >>>>>>>>>>>>>> to >>>>>>>>>>>>>> switch >>>>>>>>>>>>>> to using CMake instead of Qt project files >>>>>>>>>>>>>> (QtCreator >>>>>>>>>>>>>> supports >>>>>>>>>>>>>> CMake). Look at the examples Dan linked to. You >>>>>>>>>>>>>> will >>>>>>>>>>>>>> have >>>>>>>>>>>>>> to >>>>>>>>>>>>>> update the CMakelists.txt file for Qt. You will >>>>>>>>>>>>>> probably >>>>>>>>>>>>>> have >>>>>>>>>>>>>> to >>>>>>>>>>>>>> add the following: >>>>>>>>>>>>>> >>>>>>>>>>>>>> FIND_PACKAGE(Qt5Core REQUIRED) >>>>>>>>>>>>>> FIND_PACKAGE(Qt5Widgets REQUIRED) >>>>>>>>>>>>>> >>>>>>>>>>>>>> and update the target_link_libraries line(add >>>>>>>>>>>>>> Qt5::Widget) , >>>>>>>>>>>>>> e.g.,: >>>>>>>>>>>>>> >>>>>>>>>>>>>> target_link_libraries(QtBarChart Qt5::Widgets >>>>>>>>>>>>>> ${VTK_LIBRARIES}) >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Tue, Oct 10, 2017 at 9:33 AM, Dan Lipsa >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >> >>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zoltan, >>>>>>>>>>>>>> This is unrelated to the error you are seeing >>>>>>>>>>>>>> however: >>>>>>>>>>>>>> >>>>>>>>>>>>>> For Qt5 you'll need to use QVTKOpenGLWidget >>>>>>>>>>>>>> rather >>>>>>>>>>>>>> than >>>>>>>>>>>>>> QVTKWidget. See >>>>>>>>>>>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>>> All examples are converted to Qt5. Also, VTK >>>>>>>>>>>>>> master >>>>>>>>>>>>>> has >>>>>>>>>>>>>> a >>>>>>>>>>>>>> number of >>>>>>>>>>>>>> examples that have been converted to Qt5: >>>>>>>>>>>>>> Examples/GUI/Qt >>>>>>>>>>>>>> >>>>>>>>>>>>>> Hope this helps, >>>>>>>>>>>>>> Dan >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Tue, Oct 10, 2017 at 10:10 AM, Zoltan >>>>>>>>>>>>>> Kovacs >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> >> >>>>>>>>>>>>>> >>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Dear all, >>>>>>>>>>>>>> >>>>>>>>>>>>>> In CMake I generated a solution project of >>>>>>>>>>>>>> VTK-8.0.1 >>>>>>>>>>>>>> with Qt5 >>>>>>>>>>>>>> support for MSVS2013. After having run the >>>>>>>>>>>>>> ALL_BUILD >>>>>>>>>>>>>> and INSTALL >>>>>>>>>>>>>> projects with the install prefix >>>>>>>>>>>>>> C:\VTK\8.0.1 >>>>>>>>>>>>>> in >>>>>>>>>>>>>> VM2013 >>>>>>>>>>>>>> I could >>>>>>>>>>>>>> installed the Win32 bit binaries of VTK >>>>>>>>>>>>>> 8.0.1 >>>>>>>>>>>>>> in >>>>>>>>>>>>>> that >>>>>>>>>>>>>> folder. >>>>>>>>>>>>>> The header files and the libraries are >>>>>>>>>>>>>> located >>>>>>>>>>>>>> in >>>>>>>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 and >>>>>>>>>>>>>> C:\VTK\8.0.1\lib. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I copied the file QVTKWidgetPlugin.dll >>>>>>>>>>>>>> from >>>>>>>>>>>>>> the >>>>>>>>>>>>>> VTK >>>>>>>>>>>>>> binary >>>>>>>>>>>>>> folders to the plugin folder of QTCreator, >>>>>>>>>>>>>> which >>>>>>>>>>>>>> uses >>>>>>>>>>>>>> QT 5.8 >>>>>>>>>>>>>> msvs2013 32 bit version. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Then I set the include and library paths >>>>>>>>>>>>>> and >>>>>>>>>>>>>> added >>>>>>>>>>>>>> all >>>>>>>>>>>>>> the VTK >>>>>>>>>>>>>> libary files from C:\VTK\8.0.1\lib for the >>>>>>>>>>>>>> linker >>>>>>>>>>>>>> setting in the >>>>>>>>>>>>>> project file >>>>>>>>>>>>>> of a QT application in QtCreator: >>>>>>>>>>>>>> >>>>>>>>>>>>>> INCLUDEPATH += >>>>>>>>>>>>>> C:\VTK\8.0.1\include\vtk-8.0 >>>>>>>>>>>>>> LIBS += -LC:\VTK\8.0.1\lib >>>>>>>>>>>>>> >>>>>>>>>>>>>> LIBS += -lvtkRenderingLabel-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingLOD-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingOpenGL2-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingQt-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingVolume-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingVolumeOpenGL2-8.0 \ >>>>>>>>>>>>>> -lvtksqlite-8.0 \ >>>>>>>>>>>>>> -lvtksys-8.0 \ >>>>>>>>>>>>>> -lvtkTestingGenericBridge-8.0 \ >>>>>>>>>>>>>> -lvtkTestingIOSQL-8.0 \ >>>>>>>>>>>>>> -lvtkTestingRendering-8.0 \ >>>>>>>>>>>>>> -lvtktiff-8.0 \ >>>>>>>>>>>>>> -lvtkverdict-8.0 \ >>>>>>>>>>>>>> -lvtkViewsContext2D-8.0 \ >>>>>>>>>>>>>> -lvtkViewsCore-8.0 \ >>>>>>>>>>>>>> -lvtkViewsInfovis-8.0 \ >>>>>>>>>>>>>> -lvtkViewsQt-8.0 \ >>>>>>>>>>>>>> -lvtkzlib-8.0 \ >>>>>>>>>>>>>> -lvtkalglib-8.0 \ >>>>>>>>>>>>>> -lvtkChartsCore-8.0 \ >>>>>>>>>>>>>> -lvtkCommonColor-8.0 \ >>>>>>>>>>>>>> -lvtkCommonComputationalGeometry-8.0 \ >>>>>>>>>>>>>> -lvtkCommonCore-8.0 \ >>>>>>>>>>>>>> -lvtkCommonDataModel-8.0 \ >>>>>>>>>>>>>> -lvtkCommonExecutionModel-8.0 \ >>>>>>>>>>>>>> -lvtkCommonMath-8.0 \ >>>>>>>>>>>>>> -lvtkCommonMisc-8.0 \ >>>>>>>>>>>>>> -lvtkCommonSystem-8.0 \ >>>>>>>>>>>>>> -lvtkCommonTransforms-8.0 \ >>>>>>>>>>>>>> -lvtkDICOMParser-8.0 \ >>>>>>>>>>>>>> -lvtkDomainsChemistry-8.0 \ >>>>>>>>>>>>>> -lvtkDomainsChemistryOpenGL2-8.0 \ >>>>>>>>>>>>>> -lvtkexoIIc-8.0 \ >>>>>>>>>>>>>> -lvtkexpat-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersAMR-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersCore-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersExtraction-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersFlowPaths-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersGeneral-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersGeneric-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersGeometry-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersHybrid-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersHyperTree-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersImaging-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersModeling-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersParallel-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersParallelImaging-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersPoints-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersProgrammable-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersSelection-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersSMP-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersSources-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersStatistics-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersTexture-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersTopology-8.0 \ >>>>>>>>>>>>>> -lvtkFiltersVerdict-8.0 \ >>>>>>>>>>>>>> -lvtkfreetype-8.0 \ >>>>>>>>>>>>>> -lvtkGeovisCore-8.0 \ >>>>>>>>>>>>>> -lvtkgl2ps-8.0 \ >>>>>>>>>>>>>> -lvtkglew-8.0 \ >>>>>>>>>>>>>> -lvtkGUISupportQt-8.0 \ >>>>>>>>>>>>>> -lvtkGUISupportQtSQL-8.0 \ >>>>>>>>>>>>>> -lvtkhdf5_hl-8.0 \ >>>>>>>>>>>>>> -lvtkhdf5-8.0 \ >>>>>>>>>>>>>> -lvtkImagingColor-8.0 \ >>>>>>>>>>>>>> -lvtkImagingCore-8.0 \ >>>>>>>>>>>>>> -lvtkImagingFourier-8.0 \ >>>>>>>>>>>>>> -lvtkImagingGeneral-8.0 \ >>>>>>>>>>>>>> -lvtkImagingHybrid-8.0 \ >>>>>>>>>>>>>> -lvtkImagingMath-8.0 \ >>>>>>>>>>>>>> -lvtkImagingMorphological-8.0 \ >>>>>>>>>>>>>> -lvtkImagingSources-8.0 \ >>>>>>>>>>>>>> -lvtkImagingStatistics-8.0 \ >>>>>>>>>>>>>> -lvtkImagingStencil-8.0 \ >>>>>>>>>>>>>> -lvtkInfovisCore-8.0 \ >>>>>>>>>>>>>> -lvtkInfovisLayout-8.0 \ >>>>>>>>>>>>>> -lvtkInteractionImage-8.0 \ >>>>>>>>>>>>>> -lvtkInteractionStyle-8.0 \ >>>>>>>>>>>>>> -lvtkInteractionWidgets-8.0 \ >>>>>>>>>>>>>> -lvtkIOAMR-8.0 \ >>>>>>>>>>>>>> -lvtkIOCore-8.0 \ >>>>>>>>>>>>>> -lvtkIOEnSight-8.0 \ >>>>>>>>>>>>>> -lvtkIOExodus-8.0 \ >>>>>>>>>>>>>> -lvtkIOExport-8.0 \ >>>>>>>>>>>>>> -lvtkIOExportOpenGL2-8.0 \ >>>>>>>>>>>>>> -lvtkIOGeometry-8.0 \ >>>>>>>>>>>>>> -lvtkIOImage-8.0 \ >>>>>>>>>>>>>> -lvtkIOImport-8.0 \ >>>>>>>>>>>>>> -lvtkIOInfovis-8.0 \ >>>>>>>>>>>>>> -lvtkIOLegacy-8.0 \ >>>>>>>>>>>>>> -lvtkIOLSDyna-8.0 \ >>>>>>>>>>>>>> -lvtkIOMINC-8.0 \ >>>>>>>>>>>>>> -lvtkIOMovie-8.0 \ >>>>>>>>>>>>>> -lvtkIONetCDF-8.0 \ >>>>>>>>>>>>>> -lvtkIOParallel-8.0 \ >>>>>>>>>>>>>> -lvtkIOParallelXML-8.0 \ >>>>>>>>>>>>>> -lvtkIOPLY-8.0 \ >>>>>>>>>>>>>> -lvtkIOSQL-8.0 \ >>>>>>>>>>>>>> -lvtkIOTecplotTable-8.0 \ >>>>>>>>>>>>>> -lvtkIOVideo-8.0 \ >>>>>>>>>>>>>> -lvtkIOXML-8.0 \ >>>>>>>>>>>>>> -lvtkIOXMLParser-8.0 \ >>>>>>>>>>>>>> -lvtkjpeg-8.0 \ >>>>>>>>>>>>>> -lvtkjsoncpp-8.0 \ >>>>>>>>>>>>>> -lvtklibharu-8.0 \ >>>>>>>>>>>>>> -lvtklibxml2-8.0 \ >>>>>>>>>>>>>> -lvtkLocalExample-8.0 \ >>>>>>>>>>>>>> -lvtklz4-8.0 \ >>>>>>>>>>>>>> -lvtkmetaio-8.0 \ >>>>>>>>>>>>>> -lvtknetcdf_c++ \ >>>>>>>>>>>>>> -lvtkNetCDF-8.0 \ >>>>>>>>>>>>>> -lvtkoggtheora-8.0 \ >>>>>>>>>>>>>> -lvtkParallelCore-8.0 \ >>>>>>>>>>>>>> -lvtkpng-8.0 \ >>>>>>>>>>>>>> -lvtkproj4-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingAnnotation-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingContext2D-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingContextOpenGL2-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingCore-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingFreeType-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingGL2PSOpenGL2-8.0 \ >>>>>>>>>>>>>> -lvtkRenderingImage-8.0 \ >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> However, if I add a QVTKWidget on the UI >>>>>>>>>>>>>> file >>>>>>>>>>>>>> of >>>>>>>>>>>>>> the >>>>>>>>>>>>>> application, include the file QVTKWidget.h >>>>>>>>>>>>>> in >>>>>>>>>>>>>> the >>>>>>>>>>>>>> header file of >>>>>>>>>>>>>> the application and I try to link it in >>>>>>>>>>>>>> QtCreator >>>>>>>>>>>>>> with >>>>>>>>>>>>>> the >>>>>>>>>>>>>> 32-bit VTK and Qt libraries, MSVS2013 (in >>>>>>>>>>>>>> the >>>>>>>>>>>>>> toolchain >>>>>>>>>>>>>> of >>>>>>>>>>>>>> QtCreator) sends error messages for >>>>>>>>>>>>>> unresolved >>>>>>>>>>>>>> external >>>>>>>>>>>>>> symbols >>>>>>>>>>>>>> for all the functions/classes belonging to >>>>>>>>>>>>>> the >>>>>>>>>>>>>> QVTKWidget, such as >>>>>>>>>>>>>> >>>>>>>>>>>>>> distortionpage.obj:-1: Fehler: LNK2019: >>>>>>>>>>>>>> unresolved >>>>>>>>>>>>>> external >>>>>>>>>>>>>> symbol "__declspec(dllimport) public: >>>>>>>>>>>>>> __thiscall >>>>>>>>>>>>>> QVTKWidget::QVTKWidget(class QWidget >>>>>>>>>>>>>> *,class >>>>>>>>>>>>>> QFlags>>>>>>>>>>>>> Qt::WindowType>)" >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) >>>>>>>>>>>>>> referenced in function "public: void >>>>>>>>>>>>>> __thiscall >>>>>>>>>>>>>> Ui_DistortionPage::setupUi(class QWidget >>>>>>>>>>>>>> *)" >>>>>>>>>>>>>> >>>>>>>>>>>>>> (?setupUi at Ui_DistortionPage@@QAEXPAVQWidget@@@Z) >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> It seems that the linker could not find >>>>>>>>>>>>>> the >>>>>>>>>>>>>> libary >>>>>>>>>>>>>> for >>>>>>>>>>>>>> the >>>>>>>>>>>>>> QVTKWidget plugin, which is loaded since I >>>>>>>>>>>>>> could >>>>>>>>>>>>>> chose >>>>>>>>>>>>>> QtWidget >>>>>>>>>>>>>> from the widget list in the UI form editor >>>>>>>>>>>>>> in >>>>>>>>>>>>>> QtCreator. I do >>>>>>>>>>>>>> not see any ABI issue here since I use the >>>>>>>>>>>>>> 32 >>>>>>>>>>>>>> bit >>>>>>>>>>>>>> mscv2103 >>>>>>>>>>>>>> version of Qt and I also compiled and >>>>>>>>>>>>>> linked >>>>>>>>>>>>>> the >>>>>>>>>>>>>> 32 >>>>>>>>>>>>>> bit >>>>>>>>>>>>>> version >>>>>>>>>>>>>> of VTK libaries and plugin files with >>>>>>>>>>>>>> MSVS2013. >>>>>>>>>>>>>> I >>>>>>>>>>>>>> am >>>>>>>>>>>>>> wondering >>>>>>>>>>>>>> if anybody could make VTK-8.1 working with >>>>>>>>>>>>>> Qt. >>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>> a >>>>>>>>>>>>>> lot. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Kind regars, >>>>>>>>>>>>>> Zoltan >>>>>>>>>>>>>> >>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>> Zoltan >>>>>>>>>>>>>> >>>>>>>>>>>>>> Am 09.10.2017 um 07:34 schrieb >>>>>>>>>>>>>> support at qt.io >>>>>>>>>>>>>> >>>>>>>>>>>>> >: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Zoltan, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I don't know how the widget should be >>>>>>>>>>>>>> installed >>>>>>>>>>>>>> or >>>>>>>>>>>>>> set up in >>>>>>>>>>>>>> a project, but you could just search >>>>>>>>>>>>>> for >>>>>>>>>>>>>> the >>>>>>>>>>>>>> header >>>>>>>>>>>>>> file and >>>>>>>>>>>>>> point INCLUDEPATH to the folder that >>>>>>>>>>>>>> contains >>>>>>>>>>>>>> it. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>> Joni >>>>>>>>>>>>>> >>>>>>>>>>>>>> On 06 October 2017 at 18:26:00 EEST >>>>>>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> > wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Joni, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I see. However I found MSCV2013 32 >>>>>>>>>>>>>> bit >>>>>>>>>>>>>> version >>>>>>>>>>>>>> for Qt >>>>>>>>>>>>>> 5.8. I install >>>>>>>>>>>>>> that version and I built the VTK >>>>>>>>>>>>>> binaries >>>>>>>>>>>>>> for >>>>>>>>>>>>>> win32 >>>>>>>>>>>>>> platform with >>>>>>>>>>>>>> MVS2013. After having copied the >>>>>>>>>>>>>> VTK >>>>>>>>>>>>>> plugin >>>>>>>>>>>>>> file into >>>>>>>>>>>>>> the plugin folder >>>>>>>>>>>>>> of QtCreator I could launch it >>>>>>>>>>>>>> successfully. >>>>>>>>>>>>>> The >>>>>>>>>>>>>> QVTKWidget is in the >>>>>>>>>>>>>> Widget list of QtCreator now. I >>>>>>>>>>>>>> could >>>>>>>>>>>>>> insert a >>>>>>>>>>>>>> QVTKWidget in the UI form >>>>>>>>>>>>>> as well. The only problem now is >>>>>>>>>>>>>> that >>>>>>>>>>>>>> QtCreator >>>>>>>>>>>>>> cannot >>>>>>>>>>>>>> find the header >>>>>>>>>>>>>> file for QVTKWidget. It is not >>>>>>>>>>>>>> cleat >>>>>>>>>>>>>> how >>>>>>>>>>>>>> to >>>>>>>>>>>>>> set >>>>>>>>>>>>>> the >>>>>>>>>>>>>> INCLUDEPATH in the >>>>>>>>>>>>>> project file since VS2103 did not >>>>>>>>>>>>>> create >>>>>>>>>>>>>> a >>>>>>>>>>>>>> separate >>>>>>>>>>>>>> include folder in >>>>>>>>>>>>>> the target folder C:/VTK/bin for >>>>>>>>>>>>>> the >>>>>>>>>>>>>> VTK >>>>>>>>>>>>>> binaries. Only >>>>>>>>>>>>>> the library >>>>>>>>>>>>>> files have a separate folder, >>>>>>>>>>>>>> C:/VTK/bin/lib/Release. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>> Zoltan >>>>>>>>>>>>>> >>>>>>>>>>>>>> Am 06.10.2017 um 12:08 schrieb >>>>>>>>>>>>>> support at qt.io >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Zoltan, >>>>>>>>>>>>>> >>>>>>>>>>>>>> On 06 October 2017 at 13:00:00 >>>>>>>>>>>>>> EEST >>>>>>>>>>>>>> Zoltan.Kovacs at esi-group.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> > wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Joni, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thank you very much for >>>>>>>>>>>>>> your >>>>>>>>>>>>>> answer. >>>>>>>>>>>>>> Then I try >>>>>>>>>>>>>> to install everything >>>>>>>>>>>>>> from scratch. The only >>>>>>>>>>>>>> prolem >>>>>>>>>>>>>> is >>>>>>>>>>>>>> I >>>>>>>>>>>>>> have >>>>>>>>>>>>>> only >>>>>>>>>>>>>> MSVC 2103 and the only >>>>>>>>>>>>>> option in the selection >>>>>>>>>>>>>> list >>>>>>>>>>>>>> of >>>>>>>>>>>>>> the >>>>>>>>>>>>>> online >>>>>>>>>>>>>> installer for MSVC 2013 is >>>>>>>>>>>>>> the 64 bit version. Is >>>>>>>>>>>>>> there >>>>>>>>>>>>>> somewhere >>>>>>>>>>>>>> an >>>>>>>>>>>>>> installer on your website >>>>>>>>>>>>>> wich >>>>>>>>>>>>>> provides a relatively new >>>>>>>>>>>>>> Qt >>>>>>>>>>>>>> version >>>>>>>>>>>>>> with MSVC >>>>>>>>>>>>>> 2103 32 bit version? >>>>>>>>>>>>>> Thank you very much for >>>>>>>>>>>>>> your >>>>>>>>>>>>>> help. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> No, but you could compile it >>>>>>>>>>>>>> from >>>>>>>>>>>>>> source >>>>>>>>>>>>>> yourself. >>>>>>>>>>>>>> However, note that you cannot >>>>>>>>>>>>>> build >>>>>>>>>>>>>> plugins >>>>>>>>>>>>>> for new >>>>>>>>>>>>>> Qt Creator with MSVC 2013 as >>>>>>>>>>>>>> it >>>>>>>>>>>>>> uses >>>>>>>>>>>>>> different ABI. >>>>>>>>>>>>>> You could use MSVC 2015 or >>>>>>>>>>>>>> MSVC >>>>>>>>>>>>>> 2017. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Or you could build 64bit >>>>>>>>>>>>>> version >>>>>>>>>>>>>> of >>>>>>>>>>>>>> Qt >>>>>>>>>>>>>> Creator from >>>>>>>>>>>>>> source with that Qt version >>>>>>>>>>>>>> you >>>>>>>>>>>>>> have >>>>>>>>>>>>>> installed. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>> Joni >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Joni Poikelin >>>>>>>>>>>>>> Software Engineer, >>>>>>>>>>>>>> The Qt Company >>>>>>>>>>>>>> ? >>>>>>>>>>>>>> FAQs - >>>>>>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Joni Poikelin >>>>>>>>>>>>>> Software Engineer, >>>>>>>>>>>>>> The Qt Company >>>>>>>>>>>>>> ? >>>>>>>>>>>>>> FAQs - >>>>>>>>>>>>>> https://wiki.qt.io/KnowledgeBase:SupportFAQ >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Visit other Kitware open-source projects >>>>>>>>>>>>>> at >>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please keep messages on-topic and check >>>>>>>>>>>>>> the >>>>>>>>>>>>>> VTK >>>>>>>>>>>>>> FAQ >>>>>>>>>>>>>> at: >>>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please keep messages on-topic and check the >>>>>>>>>>>>>> VTK >>>>>>>>>>>>>> FAQ >>>>>>>>>>>>>> at: >>>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ >>>>>>>>>>>>>> at: >>>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>> >>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>> >>>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>>> >>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>>> >>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>> >>> From elvis.stansvik at orexplore.com Tue Oct 17 02:36:35 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 17 Oct 2017 08:36:35 +0200 Subject: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets In-Reply-To: <1853915668.12432281507888815273.JavaMail.httpd@fep-webmail-05> References: <1853915668.12432281507888815273.JavaMail.httpd@fep-webmail-05> Message-ID: Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" < bartolomei-luca at virgilio.it>: Hello everyone! I have a problem with the QT GUI I am creating. Basically, I have an interactive QWidget, a QVTKWidget and a "Quit" button. When I launch my app, I can interact with the QWidget without any problem (I have a 3D interactive scene, where I can zoom and rotate). However, as soon as the QVTKWidget becomes "active" (i.e. some function in my code start using it or if I click on it), both the QWidget and the QVTKWidget freeze. The app keeps on working, since the "Quit" button works as it should. If I have a GUI with either the QWidget or the QVTKWidget (only one of them) everything works fine. The problem is if I try to include both of them at the same time. Do you have any idea why this happens? I don't have any immediate ideas. It would really help to see a small example where the problem occurs. Does it work if you put two of your QWidgets in the application. I mean, if you remove the QVTKWidget and put another one of your QWidget where it was? Elvis Thanks a lot for you help. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 bartolomei-luca at virgilio.it Tue Oct 17 03:22:21 2017 From: bartolomei-luca at virgilio.it (bartolomei-luca at virgilio.it) Date: Tue, 17 Oct 2017 09:22:21 +0200 (CEST) Subject: [vtkusers] R: Re: QVTKWidget in QT GUI freezes other QWidgets Message-ID: <1085408466.13589331508224941049.JavaMail.httpd@fep-webmail-04> Hello Elvis, thanks for your reply. I don't have the gui avaiable right now; I will send a picture as soon as I can. To answer your question: yes, if I remove the QVTKWidget and replace it with QWidget everything works. The problems occur only when the QVTKWidget is present. The GUI is built to work in this way:1) start showing stuff on the QWidget;2) After a while, the QVTKWidget shows some other stuff. The QWidget is showing some interactive scene and it uses a library ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem happen because the QVTKWidget interfere with the already existing OpenGL context? I don't know if this is the cause, because it is sufficient to have the QVTKWidget on the Gui to make the QWidget freeze. Anyway, I have looked at this example: https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUTbut no luck so far. Maybe is a problem of drivers (I have an Nvidia GeForce GTX 950M on Ubuntu 14.04 LTS). Best,Luca ----Messaggio originale---- Da: "Elvis Stansvik" Data: 17-ott-2017 8.36 A: Cc: "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" :Hello everyone! I have a problem with the QT GUI I am creating. Basically, I have an interactive QWidget, a QVTKWidget and a "Quit" button. When I launch my app, I can interact with the QWidget without any problem (I have a 3D interactive scene, where I can zoom and rotate). However, as soon as the QVTKWidget becomes "active" (i.e. some function in my code start using it or if I click on it), both the QWidget and the QVTKWidget freeze. The app keeps on working, since the "Quit" button works as it should. If I have a GUI with either the QWidget or the QVTKWidget (only one of them) everything works fine. The problem is if I try to include both of them at the same time. Do you have any idea why this happens? I don't have any immediate ideas. It would really help to see a small example where the problem occurs. Does it work if you put two of your QWidgets in the application. I mean, if you remove the QVTKWidget and put another one of your QWidget where it was? Elvis Thanks a lot for you help. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Oct 17 03:28:58 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 17 Oct 2017 09:28:58 +0200 Subject: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets In-Reply-To: <1085408466.13589331508224941049.JavaMail.httpd@fep-webmail-04> References: <1085408466.13589331508224941049.JavaMail.httpd@fep-webmail-04> Message-ID: 2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it : > Hello Elvis, > > thanks for your reply. > I don't have the gui avaiable right now; I will send a picture as soon as I > can. > > To answer your question: yes, if I remove the QVTKWidget and replace it with > QWidget everything works. The problems occur only when the QVTKWidget is > present. > > The GUI is built to work in this way: > 1) start showing stuff on the QWidget; > 2) After a while, the QVTKWidget shows some other stuff. > > The QWidget is showing some interactive scene and it uses a library > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem > happen because the QVTKWidget interfere with the already existing OpenGL > context? I don't know, but it sounds like it's possible. I think there are other people on this list who knows much more about OpenGL and how VTK uses it than I do, so I'll let those answer that. Elvis > I don't know if this is the cause, because it is sufficient to have the > QVTKWidget on the Gui to make the QWidget freeze. > > Anyway, I have looked at this example: > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT > but no luck so far. Maybe is a problem of drivers (I have an Nvidia GeForce > GTX 950M on Ubuntu 14.04 LTS). > > Best, > Luca > > > ----Messaggio originale---- > Da: "Elvis Stansvik" > Data: 17-ott-2017 8.36 > A: > Cc: "VTK Users" > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" > : > > Hello everyone! > > I have a problem with the QT GUI I am creating. Basically, I have an > interactive QWidget, a QVTKWidget and a "Quit" button. > > When I launch my app, I can interact with the QWidget without any problem (I > have a 3D interactive scene, where I can zoom and rotate). > However, as soon as the QVTKWidget becomes "active" (i.e. some function in > my code start using it or if I click on it), both the QWidget and the > QVTKWidget freeze. The app keeps on working, since the "Quit" button works > as it should. > > If I have a GUI with either the QWidget or the QVTKWidget (only one of them) > everything works fine. The problem is if I try to include both of them at > the same time. > > Do you have any idea why this happens? > > > I don't have any immediate ideas. It would really help to see a small > example where the problem occurs. > > Does it work if you put two of your QWidgets in the application. I mean, if > you remove the QVTKWidget and put another one of your QWidget where it was? > > Elvis > > > Thanks a lot for you help. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 f.nellmeldin at open-engineering.com Tue Oct 17 04:44:42 2017 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Tue, 17 Oct 2017 10:44:42 +0200 Subject: [vtkusers] Size of labels in vtkScalarBarActor In-Reply-To: References: Message-ID: Thank you for your help, after playing a lot with the configuration of this class, I managed to achieve what I wanted. Thank you very much. I include my code for future reference. Thanks a lot! // NOTE: m_configuration is a struct with the configuration to use for the scalar bar vtkSmartPointer m_scalarBarActor = vtkSmartPointer::New(); m_scalarBarActor->SetHeight(0.75); m_scalarBarActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); m_scalarBarActor->GetPositionCoordinate()->SetValue(0.02, 0.1, 0.0); m_scalarBarActor->DrawColorBarOn(); m_scalarBarActor->SetFixedAnnotationLeaderLineColor(true); m_scalarBarActor->SetMaximumWidthInPixels(80); m_scalarBarActor->AutomaticAnnotationsOff(); m_scalarBarActor->AutomaticLabelFormatOff(); m_scalarBarActor->SetAddRangeAnnotations(0); m_scalarBarActor->AnnotationTextScalingOn(); m_scalarBarActor->UnconstrainedFontSizeOff(); m_scalarBarActor->SetScalarBarLength(0.8); m_scalarBarActor->SetScalarBarThickness(30); m_scalarBarActor->SetOrientationToVertical(); m_scalarBarActor->ForceHorizontalTitleOn(); m_scalarBarActor->SetTitleJustification(VTK_TEXT_LEFT); vtkTextProperty* titleTextProperty = m_scalarBarActor->GetTitleTextProperty(); vtkTextProperty* labelTextProperty = m_scalarBarActor->GetLabelTextProperty(); labelTextProperty->SetColor(0.0,0.0,0.0); labelTextProperty->BoldOff(); labelTextProperty->ItalicOff(); labelTextProperty->ShadowOn(); titleTextProperty->SetFontFamily(m_configuration.fontToUse); // 0 for arial, 1 for courier, 2 for times titleTextProperty->SetFontSize(m_configuration.sizeTitle); labelTextProperty->SetFontFamily(m_configuration.fontToUse); // 0 for arial, 1 for courier, 2 for times labelTextProperty->SetFontSize(m_configuration.sizeLabels); m_scalarBarActor->SetLabelFormat(m_configuration.numberFormat.c_str()); m_scalarBarActor->SetRangeLabelFormat(m_scalarBarActor->GetLabelFormat()); m_scalarBarActor->SetMaximumNumberOfColors(m_configuration.numOfColors); m_scalarBarActor->SetNumberOfLabels(m_configuration.numOfLabels); double rangeForTable[2]; rangeForTable[0] = m_configuration.currentRange[m_configuration.componentToUse*2]; rangeForTable[1] = m_configuration.currentRange[m_configuration.componentToUse*2+1]; // This is the LookupTable for vtkContext2DScalarBarActor vtkSmartPointer tempLUT = vtkSmartPointer::New(); tempLUT->SetColorSpaceToHSV(); tempLUT->SetHSVWrap(0); tempLUT->AddHSVPoint(rangeForTable[0], m_configuration.rangeHue[0], m_configuration.rangeSaturation[0], m_configuration.rangeValue[0]); tempLUT->AddHSVPoint(rangeForTable[1], m_configuration.rangeHue[1], m_configuration.rangeSaturation[1], m_configuration.rangeValue[1]); tempLUT->SetNumberOfValues(m_configuration.numOfColors); tempLUT->SetIndexedLookup(0); tempLUT->SetScaleToLinear(); tempLUT->Build(); // This is the LookupTable for vtkActor that shows the result in the model. vtkSmartPointer m_scalarBarLUT = vtkSmartPointer::New(); m_scalarBarLUT->SetRampToLinear(); m_scalarBarLUT->SetTableRange(rangeForTable); m_scalarBarLUT->SetNumberOfTableValues(m_configuration.numOfColors); m_scalarBarLUT->SetUseAboveRangeColor(1); m_scalarBarLUT->SetUseBelowRangeColor(1); m_scalarBarLUT->SetBelowRangeColor(m_configuration.belowRangeColor); m_scalarBarLUT->SetAboveRangeColor(m_configuration.aboveRangeColor); // Copy the values from one table to the other double deltaColor = rangeForTable[1] - rangeForTable[0]; for (int i = 0; i < m_configuration.numOfColors; ++i) { double colorRGBA[4] = {1.0, 0.0, 0.0, 1.0}; double currentColorStep = (double(i)/m_configuration.numOfColors); double v = rangeForTable[0] + deltaColor*currentColorStep; tempLUT->GetColor(v, colorRGBA); m_scalarBarLUT->SetTableValue(i, colorRGBA); } m_scalarBarLUT->Build(); m_scalarBarActor->SetLookupTable(tempLUT); // Mapper is the mapper of the vtkActor, defined in another place m_mapper->SetScalarRange(rangeForTable); m_mapper->SetLookupTable(m_scalarBarLUT); On 13 October 2017 at 15:05, Cory Quammen wrote: > [snip] > >> Then, I tried to define the LookupTable as vtkDiscretizableColorTransferFunction, >> but I can't find the way to make it work. >> First of all, I would like to define the first and last value, and map >> between them using a given number of values (see call >> SetNumberOfTableValues). In vtkLookupTable I do this by setting the HSV >> range. I guess I could do the same calling vtkDiscretizableColorTransferFunction::AddHSVPoint(). >> But the colors in between are not correct. >> > > > By default the vtkDiscretizableColorTransferFunction interpolates colors > through the RGB color space. To replicate what the vtkLookupTable does, you > will need to call > > tempLUT->SetColorSpaceToHSV(); > > >> Second thing is that the range is wrong and the method >> vtkScalarsToColors::SetTableRange is not available in >> vtkDiscretizableColorTransferFunction. >> > > tempLUT->SetRange(min, max); should do the trick. > > HTH, > Cory > > >> See in the screenshot how the values go from 0 to 1 instead of from 293 >> to 630... >> >> Here's the code of how I do it with vtkLookupTable: >> vtkSmartPointer tempLUT = vtkSmartPointer> >::New(); >> tempLUT->SetRampToLinear(); >> tempLUT->SetTableRange (rangeForTable); >> tempLUT->SetNumberOfTableValues(m_configuration.numOfColors); >> tempLUT->SetHueRange (m_configuration.rangeHue[0], >> m_configuration.rangeHue[1]); >> tempLUT->SetSaturationRange (m_configuration.rangeSaturation[0], >> m_configuration.rangeSaturation[1]); >> tempLUT->SetValueRange (m_configuration.rangeValue[0], >> m_configuration.rangeValue[1]); >> tempLUT->Build(); >> >> Here's my code with vtkDiscretizableColorTransferFunction, which doesn't >> work (see screenshot): >> vtkSmartPointer tempLUT = >> vtkSmartPointer::New(); >> tempLUT->AddHSVPoint(0, m_configuration.rangeHue[0], >> m_configuration.rangeSaturation[0], m_configuration.rangeValue[0]); >> tempLUT->AddHSVPoint(1, m_configuration.rangeHue[1], >> m_configuration.rangeSaturation[1], m_configuration.rangeValue[1]); >> tempLUT->SetNumberOfValues(m_configuration.numOfColors); >> tempLUT->SetIndexedLookup(0); >> tempLUT->Build(); >> >> I attach a screenshot of the difference I get. >> >> Thank you! >> >> On 12 October 2017 at 15:37, Cory Quammen >> wrote: >> >>> Fernando, >>> >>> Because you are using a scalar bar actor from ParaView, I suggest using >>> the vtkContext2DScalarBarActor. Font sizes are fixed in this scalar bar >>> actor implementation. >>> >>> HTH, >>> Cory >>> >>> On Thu, Oct 12, 2017 at 9:33 AM, Fernando Nellmeldin < >>> f.nellmeldin at open-engineering.com> wrote: >>> >>>> Hello. >>>> >>>> I know that this issue was discussed many times before in this list, >>>> but I can't find a way to do what I want. I'm using VTK 7.1.1 (under >>>> Windows). So maybe there were some improvements. >>>> >>>> In fact, I'm using vtkPVScalarBarActor which includes some very well >>>> welcomed improvements, but the discussion should apply also to the normal >>>> vtkScalarBarActor. >>>> https://www.paraview.org/ParaView/Doc/Nightly/www/cxx-doc/cl >>>> assvtkPVScalarBarActor.html >>>> >>>> The issue is that the size of the labels for values depends on the >>>> viewport. So when the viewport changes the size, the labels also change >>>> their size. Is it possible to avoid this? I would like to set the size of >>>> the labels as constant or at least to define a maximum/minimum size, >>>> because sometimes it gets veeeeery small/big and it is not very pleaseant. >>>> >>>> Thank you! >>>> >>>> PS: >>>> Here's my code to configure the vtkPVScalarBarActor, in case it's >>>> useful... (I guess there are some calls that are useless): >>>> >>>> vtkSmartPointer scalarBarActor = >>>> vtkSmartPointer::New(); >>>> scalarBarActor->GetPositionCoordinate()->SetCoordinateSystem >>>> ToDisplay(); >>>> scalarBarActor->GetPositionCoordinate()->SetValue(20, 20, 0.0); >>>> >>>> scalarBarActor->SetAddRangeAnnotations(0); >>>> scalarBarActor->DrawTickMarksOff(); >>>> scalarBarActor->UnconstrainedFontSizeOff(); >>>> scalarBarActor->AnnotationTextScalingOn(); >>>> scalarBarActor->SetFixedAnnotationLeaderLineColor(true); >>>> >>>> scalarBarActor->SetOrientationToVertical(); >>>> //scalarBarActor->SetWidth(0.1); // width in viewport coordinates >>>> scalarBarActor->SetMaximumWidthInPixels(80); >>>> scalarBarActor->GetLabelTextProperty()->BoldOff(); >>>> scalarBarActor->GetLabelTextProperty()->ItalicOff(); >>>> scalarBarActor->GetLabelTextProperty()->ShadowOn(); >>>> scalarBarActor->AutomaticLabelFormatOff(); >>>> scalarBarActor->SetLabelFormat("%.2f"); >>>> scalarBarActor->SetRangeLabelFormat(scalarBarActor->GetLabelFormat()); >>>> scalarBarActor->SetMaximumNumberOfColors(100); >>>> scalarBarActor->SetNumberOfLabels(5); >>>> >>>> scalarBarActor->SetLookupTable(tempLUT); // defined elsewhere, doesn't >>>> matter >>>> >>>> scalarBarActor->SetTitle("Displacements"); >>>> scalarBarActor->SetTitleJustification(VTK_TEXT_RIGHT); >>>> scalarBarActor->GetTitleTextProperty()->SetFontSize(8); >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Cory Quammen >>> Staff R&D Engineer >>> Kitware, Inc. >>> >> >> >> >> -- >> *Fernando NELLMELDIN* >> Software Engineer >> *_______________________________________________________________* >> >> *Open Engineering s.a.* >> >> Rue Bois Saint-Jean 15 >> >> /1 >> B-4102 Seraing (Belgium) >> Tel: +32.4.353.30.34 <+32%204%20353%2030%2034> >> >> http://www.open-engineering.com >> https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym >> >> >> *_________________________________________________________________________* >> > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yangmin_hust at 126.com Tue Oct 17 05:17:06 2017 From: yangmin_hust at 126.com (minyang) Date: Tue, 17 Oct 2017 02:17:06 -0700 (MST) Subject: [vtkusers] How to catch render texture failed when not enough memory, VTK6.3 Message-ID: <1508231826698-0.post@n5.nabble.com> Hi VTK user, I open several VTK renderers, display meshes with texture with integrated graphics. Then, when is not enough memory, VTK crashed in vtkOpenGLTexture::Load(0, vtkTexture::Render(). *Is it possible to catch this exception?* I use VTK6.3. thanks a lot. min yang -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From kahuna0k at gmail.com Tue Oct 17 07:02:23 2017 From: kahuna0k at gmail.com (Kahuna K) Date: Tue, 17 Oct 2017 04:02:23 -0700 Subject: [vtkusers] Compiling VTK 8.0.1 with VTKm on Windows (MSVC2015) Message-ID: Hello, I?m trying to compile VTK 8.0.1 with AcceleratorsVTKm with CUDA and TBB enabled. I?ve tried the vtkm-1.0.0 release, the master branch from the vtkm git repo and commit: commit 1f451d538bf9a7beec0f443775f79c9348f9a376 Merge: 3a8a64df 33afb076 Author: Robert Maynard Date: Fri Aug 11 12:23:14 2017 +0000 that was the last one with ResultField in vtkm::filter None of them worked, the last one was the one that took me further, but vtkmGradient.cu will fail complaining about vtkm::cont::vtkmCellSetExplicitAOS and vtkm::cont::vtkmCellSetSingleType missing GetNumIndicesArray. What is the recommended version of vtkm to compile VTK-8.0.1? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Tue Oct 17 08:21:08 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 17 Oct 2017 12:21:08 +0000 Subject: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets In-Reply-To: References: <1085408466.13589331508224941049.JavaMail.httpd@fep-webmail-04> Message-ID: Hi Luca, - Do the QWidget and QVTKWidget overlap at all or are they separated by some QFrame border, etc. ? If they are not overlapping, it means they are not sharing the OpenGL context. - Have you tried replacing the ROS widget with a simple button to see if the QVTKWidget works properly? - Lastly, the QVTKWidget is known to have rendering issues with Qt5. Try using the QVTKOpenGLWidget to see if anything changes. Best, Sankhesh ? On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik wrote: > 2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it > : > > Hello Elvis, > > > > thanks for your reply. > > I don't have the gui avaiable right now; I will send a picture as soon > as I > > can. > > > > To answer your question: yes, if I remove the QVTKWidget and replace it > with > > QWidget everything works. The problems occur only when the QVTKWidget is > > present. > > > > The GUI is built to work in this way: > > 1) start showing stuff on the QWidget; > > 2) After a while, the QVTKWidget shows some other stuff. > > > > The QWidget is showing some interactive scene and it uses a library > > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem > > happen because the QVTKWidget interfere with the already existing OpenGL > > context? > > I don't know, but it sounds like it's possible. I think there are > other people on this list who knows much more about OpenGL and how VTK > uses it than I do, so I'll let those answer that. > > Elvis > > > I don't know if this is the cause, because it is sufficient to have the > > QVTKWidget on the Gui to make the QWidget freeze. > > > > Anyway, I have looked at this example: > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT > > but no luck so far. Maybe is a problem of drivers (I have an Nvidia > GeForce > > GTX 950M on Ubuntu 14.04 LTS). > > > > Best, > > Luca > > > > > > ----Messaggio originale---- > > Da: "Elvis Stansvik" > > Data: 17-ott-2017 8.36 > > A: > > Cc: "VTK Users" > > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > > > > > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" > > : > > > > Hello everyone! > > > > I have a problem with the QT GUI I am creating. Basically, I have an > > interactive QWidget, a QVTKWidget and a "Quit" button. > > > > When I launch my app, I can interact with the QWidget without any > problem (I > > have a 3D interactive scene, where I can zoom and rotate). > > However, as soon as the QVTKWidget becomes "active" (i.e. some function > in > > my code start using it or if I click on it), both the QWidget and the > > QVTKWidget freeze. The app keeps on working, since the "Quit" button > works > > as it should. > > > > If I have a GUI with either the QWidget or the QVTKWidget (only one of > them) > > everything works fine. The problem is if I try to include both of them at > > the same time. > > > > Do you have any idea why this happens? > > > > > > I don't have any immediate ideas. It would really help to see a small > > example where the problem occurs. > > > > Does it work if you put two of your QWidgets in the application. I mean, > if > > you remove the QVTKWidget and put another one of your QWidget where it > was? > > > > Elvis > > > > > > Thanks a lot for you help. > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From arw.tyx-ouy_mz at ezweb.ne.jp Tue Oct 17 09:13:01 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Tue, 17 Oct 2017 06:13:01 -0700 (MST) Subject: [vtkusers] Histogram between two points on DICOM image Message-ID: <1508245981107-0.post@n5.nabble.com> Hi, I want to create histogram plot between 2 points in dicom image. But I am newer of VTK so I don't know how i do this. I don't know these things. 1. specify two points as coordinate 2. get pixel values on the line 3. create histogram I could read dicom image. So please help me! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bartolomei-luca at virgilio.it Tue Oct 17 09:24:15 2017 From: bartolomei-luca at virgilio.it (bartolomei-luca at virgilio.it) Date: Tue, 17 Oct 2017 15:24:15 +0200 (CEST) Subject: [vtkusers] R: Re: QVTKWidget in QT GUI freezes other QWidgets Message-ID: <177210175.13357841508246655551.JavaMail.httpd@fep-webmail-05> Hello Sankhesh, thanks a lot for the reply. Let's say the GUI "pipeline" is as I explained to Elvis. Then: At the moment the two widgets are under the central widget (a QWidget). They are in two different tabs of a QTabWidget. I tried to move the QVTKWidget out of its tab but no luck. I have also noted another thing. If I show at the same time the QWidget and the QVTKWidget, the QVTKWidget works fine, but the QWidget freeze. That's why I thought that it could be an OpenGL context issue. What do you mean by "replacing ROS widget with a simple button"? In any case, I can make QVTKWidget work, but no success with the QWidget. It just freeze on the last view.Unfortunately, QVTKOpenGLWidget is available only for VTK 8.0 and higher. I am using VTK 7.1 and I cannot upgrade to 8.0 because of the cmake that is installed on my laptop. I cannot upgrade the cmake version due to some compatibility issues with ROS. I will get in a lot of trouble if I try to do that. Is there a way to use glut or vtkOpenGLRenderer (available in vtk 7.1)?Thanks a lot again for the help. Best, Luca ----Messaggio originale---- Da: "Sankhesh Jhaveri" Data: 17-ott-2017 14.21 A: "Elvis Stansvik", "bartolomei-luca at virgilio.it" Cc: "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets Hi Luca, Do the QWidget and QVTKWidget overlap at all or are they separated by some QFrame border, etc. ? If they are not overlapping, it means they are not sharing the OpenGL context. Have you tried replacing the ROS widget with a simple button to see if the QVTKWidget works properly? Lastly, the QVTKWidget is known to have rendering issues with Qt5. Try using the QVTKOpenGLWidget to see if anything changes. Best, Sankhesh ? On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik wrote: 2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it : > Hello Elvis, > > thanks for your reply. > I don't have the gui avaiable right now; I will send a picture as soon as I > can. > > To answer your question: yes, if I remove the QVTKWidget and replace it with > QWidget everything works. The problems occur only when the QVTKWidget is > present. > > The GUI is built to work in this way: > 1) start showing stuff on the QWidget; > 2) After a while, the QVTKWidget shows some other stuff. > > The QWidget is showing some interactive scene and it uses a library > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem > happen because the QVTKWidget interfere with the already existing OpenGL > context? I don't know, but it sounds like it's possible. I think there are other people on this list who knows much more about OpenGL and how VTK uses it than I do, so I'll let those answer that. Elvis > I don't know if this is the cause, because it is sufficient to have the > QVTKWidget on the Gui to make the QWidget freeze. > > Anyway, I have looked at this example: > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT > but no luck so far. Maybe is a problem of drivers (I have an Nvidia GeForce > GTX 950M on Ubuntu 14.04 LTS). > > Best, > Luca > > > ----Messaggio originale---- > Da: "Elvis Stansvik" > Data: 17-ott-2017 8.36 > A: > Cc: "VTK Users" > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" > : > > Hello everyone! > > I have a problem with the QT GUI I am creating. Basically, I have an > interactive QWidget, a QVTKWidget and a "Quit" button. > > When I launch my app, I can interact with the QWidget without any problem (I > have a 3D interactive scene, where I can zoom and rotate). > However, as soon as the QVTKWidget becomes "active" (i.e. some function in > my code start using it or if I click on it), both the QWidget and the > QVTKWidget freeze. The app keeps on working, since the "Quit" button works > as it should. > > If I have a GUI with either the QWidget or the QVTKWidget (only one of them) > everything works fine. The problem is if I try to include both of them at > the same time. > > Do you have any idea why this happens? > > > I don't have any immediate ideas. It would really help to see a small > example where the problem occurs. > > Does it work if you put two of your QWidgets in the application. I mean, if > you remove the QVTKWidget and put another one of your QWidget where it was? > > Elvis > > > Thanks a lot for you help. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Tue Oct 17 10:03:08 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 17 Oct 2017 14:03:08 +0000 Subject: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets In-Reply-To: <177210175.13357841508246655551.JavaMail.httpd@fep-webmail-05> References: <177210175.13357841508246655551.JavaMail.httpd@fep-webmail-05> Message-ID: How are you initializing the QVTKWidget? One other thing to test would be to try removing the QTabWidget and showing both the QVTKWidget and QWidget in the same central widget side-by-side. Finally, you could see if the setup works fine with Qt4. I am not sure how you would put a GLUT window inside a QWidget. But if you have can do that, you could try the vtkExternalOpenGLRenderWindow. See TestGLUTRenderWindow.cxx for an example. ? On Tue, Oct 17, 2017 at 9:24 AM bartolomei-luca at virgilio.it < bartolomei-luca at virgilio.it> wrote: > Hello Sankhesh, > > thanks a lot for the reply. > > Let's say the GUI "pipeline" is as I explained to Elvis. Then: > > - At the moment the two widgets are under the central widget (a > QWidget). They are in two different tabs of a QTabWidget. I tried to move > the QVTKWidget out of its tab but no luck. I have also noted another thing. > If I show at the same time the QWidget and the QVTKWidget, the QVTKWidget > works fine, but the QWidget freeze. That's why I thought that it could be > an OpenGL context issue. > - What do you mean by "replacing ROS widget with a simple button"? In > any case, I can make QVTKWidget work, but no success with the QWidget. It > just freeze on the last view. > - Unfortunately, QVTKOpenGLWidget is available only for VTK 8.0 and > higher. I am using VTK 7.1 and I cannot upgrade to 8.0 because of the cmake > that is installed on my laptop. I cannot upgrade the cmake version due to > some compatibility issues with ROS. I will get in a lot of trouble if I try > to do that. Is there a way to use glut or vtkOpenGLRenderer (available in > vtk 7.1)? > > Thanks a lot again for the help. > Best, > Luca > > ----Messaggio originale---- > Da: "Sankhesh Jhaveri" > Data: 17-ott-2017 14.21 > A: "Elvis Stansvik", " > bartolomei-luca at virgilio.it" > > > Cc: "VTK Users" > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > Hi Luca, > > - > > Do the QWidget and QVTKWidget overlap at all or are they separated by > some QFrame border, etc. ? If they are not overlapping, it means they are > not sharing the OpenGL context. > - > > Have you tried replacing the ROS widget with a simple button to see if > the QVTKWidget works properly? > - > > Lastly, the QVTKWidget is known to have rendering issues with Qt5. Try > using the QVTKOpenGLWidget to see if anything changes. > > Best, > Sankhesh > ? > > On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> 2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it >> : >> > Hello Elvis, >> > >> > thanks for your reply. >> > I don't have the gui avaiable right now; I will send a picture as soon >> as I >> > can. >> > >> > To answer your question: yes, if I remove the QVTKWidget and replace it >> with >> > QWidget everything works. The problems occur only when the QVTKWidget is >> > present. >> > >> > The GUI is built to work in this way: >> > 1) start showing stuff on the QWidget; >> > 2) After a while, the QVTKWidget shows some other stuff. >> > >> > The QWidget is showing some interactive scene and it uses a library >> > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem >> > happen because the QVTKWidget interfere with the already existing OpenGL >> > context? >> >> I don't know, but it sounds like it's possible. I think there are >> other people on this list who knows much more about OpenGL and how VTK >> uses it than I do, so I'll let those answer that. >> >> Elvis >> >> > I don't know if this is the cause, because it is sufficient to have the >> > QVTKWidget on the Gui to make the QWidget freeze. >> > >> > Anyway, I have looked at this example: >> > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT >> > but no luck so far. Maybe is a problem of drivers (I have an Nvidia >> GeForce >> > GTX 950M on Ubuntu 14.04 LTS). >> > >> > Best, >> > Luca >> > >> > >> > ----Messaggio originale---- >> > Da: "Elvis Stansvik" >> > Data: 17-ott-2017 8.36 >> > A: >> > Cc: "VTK Users" >> > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets >> > >> > >> > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" >> > : >> > >> > Hello everyone! >> > >> > I have a problem with the QT GUI I am creating. Basically, I have an >> > interactive QWidget, a QVTKWidget and a "Quit" button. >> > >> > When I launch my app, I can interact with the QWidget without any >> problem (I >> > have a 3D interactive scene, where I can zoom and rotate). >> > However, as soon as the QVTKWidget becomes "active" (i.e. some function >> in >> > my code start using it or if I click on it), both the QWidget and the >> > QVTKWidget freeze. The app keeps on working, since the "Quit" button >> works >> > as it should. >> > >> > If I have a GUI with either the QWidget or the QVTKWidget (only one of >> them) >> > everything works fine. The problem is if I try to include both of them >> at >> > the same time. >> > >> > Do you have any idea why this happens? >> > >> > >> > I don't have any immediate ideas. It would really help to see a small >> > example where the problem occurs. >> > >> > Does it work if you put two of your QWidgets in the application. I >> mean, if >> > you remove the QVTKWidget and put another one of your QWidget where it >> was? >> > >> > Elvis >> > >> > >> > Thanks a lot for you help. >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > 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 >> > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Tue Oct 17 10:18:51 2017 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Tue, 17 Oct 2017 10:18:51 -0400 Subject: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets In-Reply-To: References: <177210175.13357841508246655551.JavaMail.httpd@fep-webmail-05> Message-ID: When one of the projects I work on first started using Qt5 with VTK we had similar problems. Embedding a QVTKWidget in a Qt5 Tab or Scroll widget or using it alongside other OpenGL-based widgets in Qt5 can cause these kinds of issues and this was the motivation for creating the QVTKOpenGLWidget. The QVTKOpenGLWidget correctly lets Qt manage the OpenGL context rather than hacking it in with window system calls. You could try grabbing the QVTKOpenGLWidget code from VTK 8.0.0 and copying it into your project as a temporary solution (I'm not sure if it relies on any features added between 7.1 and 8.0). You said upgrading CMake was blocking you from using more recent VTK? The CMake developers try really hard to be backwards compatible. Have you reported the issues you are having to them? I know they try their best to handle compatibility issues that are reported. HTH, Shawn On Tue, Oct 17, 2017 at 10:03 AM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > How are you initializing the QVTKWidget? > One other thing to test would be to try removing the QTabWidget and > showing both the QVTKWidget and QWidget in the same central widget > side-by-side. Finally, you could see if the setup works fine with Qt4. > > I am not sure how you would put a GLUT window inside a QWidget. But if you > have can do that, you could try the vtkExternalOpenGLRenderWindow. See > TestGLUTRenderWindow.cxx > > for an example. > ? > > On Tue, Oct 17, 2017 at 9:24 AM bartolomei-luca at virgilio.it < > bartolomei-luca at virgilio.it> wrote: > >> Hello Sankhesh, >> >> thanks a lot for the reply. >> >> Let's say the GUI "pipeline" is as I explained to Elvis. Then: >> >> - At the moment the two widgets are under the central widget (a >> QWidget). They are in two different tabs of a QTabWidget. I tried to move >> the QVTKWidget out of its tab but no luck. I have also noted another thing. >> If I show at the same time the QWidget and the QVTKWidget, the QVTKWidget >> works fine, but the QWidget freeze. That's why I thought that it could be >> an OpenGL context issue. >> - What do you mean by "replacing ROS widget with a simple button"? In >> any case, I can make QVTKWidget work, but no success with the QWidget. It >> just freeze on the last view. >> - Unfortunately, QVTKOpenGLWidget is available only for VTK 8.0 and >> higher. I am using VTK 7.1 and I cannot upgrade to 8.0 because of the cmake >> that is installed on my laptop. I cannot upgrade the cmake version due to >> some compatibility issues with ROS. I will get in a lot of trouble if I try >> to do that. Is there a way to use glut or vtkOpenGLRenderer (available in >> vtk 7.1)? >> >> Thanks a lot again for the help. >> Best, >> Luca >> >> ----Messaggio originale---- >> Da: "Sankhesh Jhaveri" >> Data: 17-ott-2017 14.21 >> A: "Elvis Stansvik", " >> bartolomei-luca at virgilio.it" >> >> >> Cc: "VTK Users" >> Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets >> >> Hi Luca, >> >> - >> >> Do the QWidget and QVTKWidget overlap at all or are they separated by >> some QFrame border, etc. ? If they are not overlapping, it means they are >> not sharing the OpenGL context. >> - >> >> Have you tried replacing the ROS widget with a simple button to see >> if the QVTKWidget works properly? >> - >> >> Lastly, the QVTKWidget is known to have rendering issues with Qt5. >> Try using the QVTKOpenGLWidget to see if anything changes. >> >> Best, >> Sankhesh >> ? >> >> On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >> >>> 2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it >>> : >>> > Hello Elvis, >>> > >>> > thanks for your reply. >>> > I don't have the gui avaiable right now; I will send a picture as soon >>> as I >>> > can. >>> > >>> > To answer your question: yes, if I remove the QVTKWidget and replace >>> it with >>> > QWidget everything works. The problems occur only when the QVTKWidget >>> is >>> > present. >>> > >>> > The GUI is built to work in this way: >>> > 1) start showing stuff on the QWidget; >>> > 2) After a while, the QVTKWidget shows some other stuff. >>> > >>> > The QWidget is showing some interactive scene and it uses a library >>> > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem >>> > happen because the QVTKWidget interfere with the already existing >>> OpenGL >>> > context? >>> >>> I don't know, but it sounds like it's possible. I think there are >>> other people on this list who knows much more about OpenGL and how VTK >>> uses it than I do, so I'll let those answer that. >>> >>> Elvis >>> >>> > I don't know if this is the cause, because it is sufficient to have the >>> > QVTKWidget on the Gui to make the QWidget freeze. >>> > >>> > Anyway, I have looked at this example: >>> > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT >>> > but no luck so far. Maybe is a problem of drivers (I have an Nvidia >>> GeForce >>> > GTX 950M on Ubuntu 14.04 LTS). >>> > >>> > Best, >>> > Luca >>> > >>> > >>> > ----Messaggio originale---- >>> > Da: "Elvis Stansvik" >>> > Data: 17-ott-2017 8.36 >>> > A: >>> > Cc: "VTK Users" >>> > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets >>> > >>> > >>> > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" >>> > : >>> > >>> > Hello everyone! >>> > >>> > I have a problem with the QT GUI I am creating. Basically, I have an >>> > interactive QWidget, a QVTKWidget and a "Quit" button. >>> > >>> > When I launch my app, I can interact with the QWidget without any >>> problem (I >>> > have a 3D interactive scene, where I can zoom and rotate). >>> > However, as soon as the QVTKWidget becomes "active" (i.e. some >>> function in >>> > my code start using it or if I click on it), both the QWidget and the >>> > QVTKWidget freeze. The app keeps on working, since the "Quit" button >>> works >>> > as it should. >>> > >>> > If I have a GUI with either the QWidget or the QVTKWidget (only one of >>> them) >>> > everything works fine. The problem is if I try to include both of them >>> at >>> > the same time. >>> > >>> > Do you have any idea why this happens? >>> > >>> > >>> > I don't have any immediate ideas. It would really help to see a small >>> > example where the problem occurs. >>> > >>> > Does it work if you put two of your QWidgets in the application. I >>> mean, if >>> > you remove the QVTKWidget and put another one of your QWidget where it >>> was? >>> > >>> > Elvis >>> > >>> > >>> > Thanks a lot for you help. >>> > >>> > _______________________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Please keep messages on-topic and check the VTK FAQ at: >>> > http://www.vtk.org/Wiki/VTK_FAQ >>> > >>> > 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 >>> >> -- >> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >> | (518) 881-4417 >> ? >> >> -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 briend at cyceron.fr Tue Oct 17 10:30:34 2017 From: briend at cyceron.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCUklFTkQ=?=) Date: Tue, 17 Oct 2017 16:30:34 +0200 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: References: <1294093b-b1d2-12f7-c38a-56b55db8e021@cyceron.fr> Message-ID: <1d412e7d-de9c-df8b-9cd9-b4bdb859bf7d@cyceron.fr> Thanks a lot Yoshimi. However there is a problem of attibute in the script: ??? appendFilter.AddInputData(dijkstra.GetOutputPort()) AttributeError: AddInputData Does the script works for you? Best, Frederic Le 13/10/2017 ? 03:26, kenichiro yoshimi a ?crit?: > Hello Frederic, > > The options about constrained shortest path can not be found in the > vtkDijkstraGraphGeodesicPath. I don't know it is helpful or not but it > is possible to add points to pass through as some of the constraints. > It works in the following way due to applying vtkAppendFilter > successively to some outputs of vtkDijkstraGraphGeodesicPath. > > --- > import vtk > import math > > cylinder= vtk.vtkSphereSource() > cylinder.SetCenter(0.0, 0.0, 0.0) > cylinder.SetRadius(0.5) > > appendFilter = vtk.vtkAppendFilter() > appendFilter.MergePointsOn() > > vIds = [4, 12, 23, 28] > > p0 = [0,0,0] > p1 = [0,0,0] > dist = 0.0 > for n in range(len(vIds)-1): > v0 = vIds[n] > v1 = vIds[n+1] > > dijkstra = vtk.vtkDijkstraGraphGeodesicPath() > dijkstra.SetInputConnection(cylinder.GetOutputPort()) > dijkstra.SetStartVertex(v0) > dijkstra.SetEndVertex(v1) > dijkstra.Update() > > pts = dijkstra.GetOutput().GetPoints() > for ptId in range(pts.GetNumberOfPoints()-1): > pts.GetPoint(ptId, p0) > pts.GetPoint(ptId+1, p1) > print(math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1))) > dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) > > appendFilter.AddInputData(dijkstra.GetOutput()) > > print(dist) > > appendFilter.Update() > --- > > Thanks > > 2017-10-13 1:26 GMT+09:00 Fr?d?ric BRIEND : >> Hi, >> >> Always with vtkDijkstraGraphGeodesicPath function, is-it possible to >> constrained the geodesic shortest paths (example)? >> and thus to add points beetween the "dijkstra.SetStartVertex(X)" and the >> "dijkstra.SetEndVertex(Y)"? >> >> Thanks in advance! >> >> Frederic >> >> >> >> Le 12/10/2017 ? 04:52, kenichiro yoshimi a ?crit : >> >> Hi, >> >> The vtkDijkstraGraphGeodesicPath filter seems to output a sorted point >> set along the geodesic path. Hence, a straightforward way of getting >> the distance is summing the lengths of each segment that makes up it. >> --- >> pts = dijkstra.GetOutput().GetPoints() >> >> p0 = [0,0,0] >> p1 = [0,0,0] >> dist = 0.0 >> for ptId in range(pts.GetNumberOfPoints()-1): >> pts.GetPoint(ptId, p0) >> pts.GetPoint(ptId+1, p1) >> dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) >> >> print(dist) >> --- >> >> Regards >> >> 2017-10-12 2:12 GMT+09:00 Fr?d?ric BRIEND : >> >> Hi, >> >> Sorry for the double post. >> Since the old post of Karthik, is there a way with >> "vtkDijkstraGraphGeodesicPath" to have the distance by GetGeodesicLength() ? >> How to do otherwise? >> >> Thanks in advance! >> >> My python script: >> >> cylinder= vtk.vtkSphereSource() >> cylinder.SetCenter(0.0, 0.0, 0.0) >> cylinder.SetRadius(0.5) >> >> dijkstra = vtk.vtkDijkstraGraphGeodesicPath() >> dijkstra.SetInputConnection(cylinder.GetOutputPort()) >> dijkstra.SetStartVertex(4) >> dijkstra.SetEndVertex(28) >> dijkstra.Update() >> >> weights = vtk.vtkDoubleArray() >> size=dijkstra.GetCumulativeWeights(weights) >> >> print size >> >> I obtain for size: none >> >> -- >> >> Frederic Briend >> >> PhD Candidate >> >> Universit? de Caen Normandie >> >> Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, >> EA 7466) >> >> GIP CYCERON, Caen 14000, France >> >> Tel +33 2 31 47 01 56 >> >> Email : briend at cyceron.fr >> >> http://www.ists.cyceron.fr/ >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> -- >> >> Frederic Briend >> >> PhD Candidate >> >> Universit? de Caen Normandie >> >> Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, >> EA 7466) >> >> GIP CYCERON, Caen 14000, France >> >> Tel +33 2 31 47 01 56 >> >> Email : briend at cyceron.fr >> >> http://www.ists.cyceron.fr/ -- FredericBriend PhD Candidate Universit? de Caen Normandie Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, EA 7466) GIP CYCERON, Caen 14000, France Tel +33 2 31 47 01 56 Email : briend at cyceron.fr http://www.ists.cyceron.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Oct 17 10:40:45 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 17 Oct 2017 07:40:45 -0700 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: <1d412e7d-de9c-df8b-9cd9-b4bdb859bf7d@cyceron.fr> References: <1294093b-b1d2-12f7-c38a-56b55db8e021@cyceron.fr> <1d412e7d-de9c-df8b-9cd9-b4bdb859bf7d@cyceron.fr> Message-ID: Should be: appendFilter.AddInputConnection(dijkstra.GetOutputPort()) On Tue, Oct 17, 2017 at 7:30 AM, Fr?d?ric BRIEND wrote: > Thanks a lot Yoshimi. > However there is a problem of attibute in the script: > > appendFilter.AddInputData(dijkstra.GetOutputPort()) > AttributeError: AddInputData > > Does the script works for you? > Best, > > Frederic > > Le 13/10/2017 ? 03:26, kenichiro yoshimi a ?crit : > > Hello Frederic, > > The options about constrained shortest path can not be found in the > vtkDijkstraGraphGeodesicPath. I don't know it is helpful or not but it > is possible to add points to pass through as some of the constraints. > It works in the following way due to applying vtkAppendFilter > successively to some outputs of vtkDijkstraGraphGeodesicPath. > > --- > import vtk > import math > > cylinder= vtk.vtkSphereSource() > cylinder.SetCenter(0.0, 0.0, 0.0) > cylinder.SetRadius(0.5) > > appendFilter = vtk.vtkAppendFilter() > appendFilter.MergePointsOn() > > vIds = [4, 12, 23, 28] > > p0 = [0,0,0] > p1 = [0,0,0] > dist = 0.0 > for n in range(len(vIds)-1): > v0 = vIds[n] > v1 = vIds[n+1] > > dijkstra = vtk.vtkDijkstraGraphGeodesicPath() > dijkstra.SetInputConnection(cylinder.GetOutputPort()) > dijkstra.SetStartVertex(v0) > dijkstra.SetEndVertex(v1) > dijkstra.Update() > > pts = dijkstra.GetOutput().GetPoints() > for ptId in range(pts.GetNumberOfPoints()-1): > pts.GetPoint(ptId, p0) > pts.GetPoint(ptId+1, p1) > print(math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1))) > dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) > > appendFilter.AddInputData(dijkstra.GetOutput()) > > print(dist) > > appendFilter.Update() > --- > > Thanks > > 2017-10-13 1:26 GMT+09:00 Fr?d?ric BRIEND : > > Hi, > > Always with vtkDijkstraGraphGeodesicPath function, is-it possible to > constrained the geodesic shortest paths (example)? > and thus to add points beetween the "dijkstra.SetStartVertex(X)" and the > "dijkstra.SetEndVertex(Y)"? > > Thanks in advance! > > Frederic > > > > Le 12/10/2017 ? 04:52, kenichiro yoshimi a ?crit : > > Hi, > > The vtkDijkstraGraphGeodesicPath filter seems to output a sorted point > set along the geodesic path. Hence, a straightforward way of getting > the distance is summing the lengths of each segment that makes up it. > --- > pts = dijkstra.GetOutput().GetPoints() > > p0 = [0,0,0] > p1 = [0,0,0] > dist = 0.0 > for ptId in range(pts.GetNumberOfPoints()-1): > pts.GetPoint(ptId, p0) > pts.GetPoint(ptId+1, p1) > dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) > > print(dist) > --- > > Regards > > 2017-10-12 2:12 GMT+09:00 Fr?d?ric BRIEND : > > Hi, > > Sorry for the double post. > Since the old post of Karthik, is there a way with > "vtkDijkstraGraphGeodesicPath" to have the distance by GetGeodesicLength() ? > How to do otherwise? > > Thanks in advance! > > My python script: > > cylinder= vtk.vtkSphereSource() > cylinder.SetCenter(0.0, 0.0, 0.0) > cylinder.SetRadius(0.5) > > dijkstra = vtk.vtkDijkstraGraphGeodesicPath() > dijkstra.SetInputConnection(cylinder.GetOutputPort()) > dijkstra.SetStartVertex(4) > dijkstra.SetEndVertex(28) > dijkstra.Update() > > weights = vtk.vtkDoubleArray() > size=dijkstra.GetCumulativeWeights(weights) > > print size > > I obtain for size: none > > -- > > Frederic Briend > > PhD Candidate > > Universit? de Caen Normandie > > Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, > EA 7466) > > GIP CYCERON, Caen 14000, France > > Tel +33 2 31 47 01 56 > > Email : briend at cyceron.fr > http://www.ists.cyceron.fr/ > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects athttp://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at:http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe:http://public.kitware.com/mailman/listinfo/vtkusers > > > -- > > Frederic Briend > > PhD Candidate > > Universit? de Caen Normandie > > Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, > EA 7466) > > GIP CYCERON, Caen 14000, France > > Tel +33 2 31 47 01 56 <+33%202%2031%2047%2001%2056> > > Email : briend at cyceron.fr > http://www.ists.cyceron.fr/ > > > -- > > Frederic Briend > > PhD Candidate > > Universit? de Caen Normandie > > Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie > (ISTS, EA 7466) > > GIP CYCERON, Caen 14000, France > > Tel +33 2 31 47 01 56 > > Email : briend at cyceron.fr > > http://www.ists.cyceron.fr/ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 HTML attachment was scrubbed... URL: From briend at cyceron.fr Tue Oct 17 10:49:26 2017 From: briend at cyceron.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCUklFTkQ=?=) Date: Tue, 17 Oct 2017 16:49:26 +0200 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: References: <1294093b-b1d2-12f7-c38a-56b55db8e021@cyceron.fr> <1d412e7d-de9c-df8b-9cd9-b4bdb859bf7d@cyceron.fr> Message-ID: <5de22ec9-99ed-ac02-aff3-ec8303378f83@cyceron.fr> Indeed, thanks a lot! Frederic Le 17/10/2017 ? 16:40, Bill Lorensen a ?crit?: > Should be: > appendFilter.AddInputConnection(dijkstra.GetOutputPort()) > > On Tue, Oct 17, 2017 at 7:30 AM, Fr?d?ric BRIEND > wrote: > > Thanks a lot Yoshimi. > However there is a problem of attibute in the script: > > ??? appendFilter.AddInputData(dijkstra.GetOutputPort()) > AttributeError: AddInputData > > Does the script works for you? > Best, > > Frederic > > > Le 13/10/2017 ? 03:26, kenichiro yoshimi a ?crit?: >> Hello Frederic, >> >> The options about constrained shortest path can not be found in the >> vtkDijkstraGraphGeodesicPath. I don't know it is helpful or not but it >> is possible to add points to pass through as some of the constraints. >> It works in the following way due to applying vtkAppendFilter >> successively to some outputs of vtkDijkstraGraphGeodesicPath. >> >> --- >> import vtk >> import math >> >> cylinder= vtk.vtkSphereSource() >> cylinder.SetCenter(0.0, 0.0, 0.0) >> cylinder.SetRadius(0.5) >> >> appendFilter = vtk.vtkAppendFilter() >> appendFilter.MergePointsOn() >> >> vIds = [4, 12, 23, 28] >> >> p0 = [0,0,0] >> p1 = [0,0,0] >> dist = 0.0 >> for n in range(len(vIds)-1): >> v0 = vIds[n] >> v1 = vIds[n+1] >> >> dijkstra = vtk.vtkDijkstraGraphGeodesicPath() >> dijkstra.SetInputConnection(cylinder.GetOutputPort()) >> dijkstra.SetStartVertex(v0) >> dijkstra.SetEndVertex(v1) >> dijkstra.Update() >> >> pts = dijkstra.GetOutput().GetPoints() >> for ptId in range(pts.GetNumberOfPoints()-1): >> pts.GetPoint(ptId, p0) >> pts.GetPoint(ptId+1, p1) >> print(math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1))) >> dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) >> >> appendFilter.AddInputData(dijkstra.GetOutput()) >> >> print(dist) >> >> appendFilter.Update() >> --- >> >> Thanks >> >> 2017-10-13 1:26 GMT+09:00 Fr?d?ric BRIEND : >>> Hi, >>> >>> Always with vtkDijkstraGraphGeodesicPath function, is-it possible to >>> constrained the geodesic shortest paths (example)? >>> and thus to add points beetween the "dijkstra.SetStartVertex(X)" and the >>> "dijkstra.SetEndVertex(Y)"? >>> >>> Thanks in advance! >>> >>> Frederic >>> >>> >>> >>> Le 12/10/2017 ? 04:52, kenichiro yoshimi a ?crit : >>> >>> Hi, >>> >>> The vtkDijkstraGraphGeodesicPath filter seems to output a sorted point >>> set along the geodesic path. Hence, a straightforward way of getting >>> the distance is summing the lengths of each segment that makes up it. >>> --- >>> pts = dijkstra.GetOutput().GetPoints() >>> >>> p0 = [0,0,0] >>> p1 = [0,0,0] >>> dist = 0.0 >>> for ptId in range(pts.GetNumberOfPoints()-1): >>> pts.GetPoint(ptId, p0) >>> pts.GetPoint(ptId+1, p1) >>> dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) >>> >>> print(dist) >>> --- >>> >>> Regards >>> >>> 2017-10-12 2:12 GMT+09:00 Fr?d?ric BRIEND : >>> >>> Hi, >>> >>> Sorry for the double post. >>> Since the old post of Karthik, is there a way with >>> "vtkDijkstraGraphGeodesicPath" to have the distance by GetGeodesicLength() ? >>> How to do otherwise? >>> >>> Thanks in advance! >>> >>> My python script: >>> >>> cylinder= vtk.vtkSphereSource() >>> cylinder.SetCenter(0.0, 0.0, 0.0) >>> cylinder.SetRadius(0.5) >>> >>> dijkstra = vtk.vtkDijkstraGraphGeodesicPath() >>> dijkstra.SetInputConnection(cylinder.GetOutputPort()) >>> dijkstra.SetStartVertex(4) >>> dijkstra.SetEndVertex(28) >>> dijkstra.Update() >>> >>> weights = vtk.vtkDoubleArray() >>> size=dijkstra.GetCumulativeWeights(weights) >>> >>> print size >>> >>> I obtain for size: none >>> >>> -- >>> >>> Frederic Briend >>> >>> PhD Candidate >>> >>> Universit? de Caen Normandie >>> >>> Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, >>> EA 7466) >>> >>> GIP CYCERON, Caen 14000, France >>> >>> Tel +33 2 31 47 01 56 >>> >>> Email :briend at cyceron.fr >>> >>> http://www.ists.cyceron.fr/ >>> >>> >>> _______________________________________________ >>> Powered bywww.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at:http://markmail.org/search/?q=vtkusers >>> >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> -- >>> >>> Frederic Briend >>> >>> PhD Candidate >>> >>> Universit? de Caen Normandie >>> >>> Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, >>> EA 7466) >>> >>> GIP CYCERON, Caen 14000, France >>> >>> Tel+33 2 31 47 01 56 >>> >>> Email :briend at cyceron.fr >>> >>> http://www.ists.cyceron.fr/ > > -- > > FredericBriend > > PhD Candidate > > Universit? de Caen Normandie > > Laboratoire Imagerie et Strat?gies Th?rapeutiques de la > Schizophr?nie (ISTS, EA 7466) > > GIP CYCERON, Caen 14000, France > > Tel +33 2 31 47 01 56 > > Email : briend at cyceron.fr > > http://www.ists.cyceron.fr/ > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 -- FredericBriend PhD Candidate Universit? de Caen Normandie Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, EA 7466) GIP CYCERON, Caen 14000, France Tel +33 2 31 47 01 56 Email : briend at cyceron.fr http://www.ists.cyceron.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartolomei-luca at virgilio.it Tue Oct 17 11:23:19 2017 From: bartolomei-luca at virgilio.it (bartolomei-luca at virgilio.it) Date: Tue, 17 Oct 2017 17:23:19 +0200 (CEST) Subject: [vtkusers] R: Re: QVTKWidget in QT GUI freezes other QWidgets Message-ID: <1668920305.13410841508253799760.JavaMail.httpd@fep-webmail-05> Thanks to everyone for the inputs. I will try to include the QVTKOpenGLWidget in my project. I will let you know if I succeed in doing that and if this solve the issue. @Shawn -> About the Cmake: I can successfully build VTK 8.0 and use it in QT if I use a newer version of cmake (currently, the default cmake version for my system is 3.2.2). The problem is that I cannot build my project with VTK 8.0 using ROS. So the problem is not Cmake itself, but the version ROS uses for building (too "old" for VTK 8.0). I will try also to fix this. For the moment, thanks to all. I will let you know in case of success/failure. Best,Luca ----Messaggio originale---- Da: "Shawn Waldon" Data: 17-ott-2017 16.18 A: "Sankhesh Jhaveri" Cc: "bartolomei-luca at virgilio.it", "Elvis Stansvik", "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets When one of the projects I work on first started using Qt5 with VTK we had similar problems. Embedding a QVTKWidget in a Qt5 Tab or Scroll widget or using it alongside other OpenGL-based widgets in Qt5 can cause these kinds of issues and this was the motivation for creating the QVTKOpenGLWidget. The QVTKOpenGLWidget correctly lets Qt manage the OpenGL context rather than hacking it in with window system calls. You could try grabbing the QVTKOpenGLWidget code from VTK 8.0.0 and copying it into your project as a temporary solution (I'm not sure if it relies on any features added between 7.1 and 8.0). You said upgrading CMake was blocking you from using more recent VTK? The CMake developers try really hard to be backwards compatible. Have you reported the issues you are having to them? I know they try their best to handle compatibility issues that are reported. HTH, Shawn On Tue, Oct 17, 2017 at 10:03 AM, Sankhesh Jhaveri wrote: How are you initializing the QVTKWidget? One other thing to test would be to try removing the QTabWidget and showing both the QVTKWidget and QWidget in the same central widget side-by-side. Finally, you could see if the setup works fine with Qt4. I am not sure how you would put a GLUT window inside a QWidget. But if you have can do that, you could try the vtkExternalOpenGLRenderWindow. See TestGLUTRenderWindow.cxx for an example. ? On Tue, Oct 17, 2017 at 9:24 AM bartolomei-luca at virgilio.it wrote: Hello Sankhesh, thanks a lot for the reply. Let's say the GUI "pipeline" is as I explained to Elvis. Then: At the moment the two widgets are under the central widget (a QWidget). They are in two different tabs of a QTabWidget. I tried to move the QVTKWidget out of its tab but no luck. I have also noted another thing. If I show at the same time the QWidget and the QVTKWidget, the QVTKWidget works fine, but the QWidget freeze. That's why I thought that it could be an OpenGL context issue. What do you mean by "replacing ROS widget with a simple button"? In any case, I can make QVTKWidget work, but no success with the QWidget. It just freeze on the last view.Unfortunately, QVTKOpenGLWidget is available only for VTK 8.0 and higher. I am using VTK 7.1 and I cannot upgrade to 8.0 because of the cmake that is installed on my laptop. I cannot upgrade the cmake version due to some compatibility issues with ROS. I will get in a lot of trouble if I try to do that. Is there a way to use glut or vtkOpenGLRenderer (available in vtk 7.1)?Thanks a lot again for the help. Best, Luca ----Messaggio originale---- Da: "Sankhesh Jhaveri" Data: 17-ott-2017 14.21 A: "Elvis Stansvik", "bartolomei-luca at virgilio.it" Cc: "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets Hi Luca, Do the QWidget and QVTKWidget overlap at all or are they separated by some QFrame border, etc. ? If they are not overlapping, it means they are not sharing the OpenGL context. Have you tried replacing the ROS widget with a simple button to see if the QVTKWidget works properly? Lastly, the QVTKWidget is known to have rendering issues with Qt5. Try using the QVTKOpenGLWidget to see if anything changes. Best, Sankhesh ? On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik wrote: 2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it : > Hello Elvis, > > thanks for your reply. > I don't have the gui avaiable right now; I will send a picture as soon as I > can. > > To answer your question: yes, if I remove the QVTKWidget and replace it with > QWidget everything works. The problems occur only when the QVTKWidget is > present. > > The GUI is built to work in this way: > 1) start showing stuff on the QWidget; > 2) After a while, the QVTKWidget shows some other stuff. > > The QWidget is showing some interactive scene and it uses a library > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem > happen because the QVTKWidget interfere with the already existing OpenGL > context? I don't know, but it sounds like it's possible. I think there are other people on this list who knows much more about OpenGL and how VTK uses it than I do, so I'll let those answer that. Elvis > I don't know if this is the cause, because it is sufficient to have the > QVTKWidget on the Gui to make the QWidget freeze. > > Anyway, I have looked at this example: > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT > but no luck so far. Maybe is a problem of drivers (I have an Nvidia GeForce > GTX 950M on Ubuntu 14.04 LTS). > > Best, > Luca > > > ----Messaggio originale---- > Da: "Elvis Stansvik" > Data: 17-ott-2017 8.36 > A: > Cc: "VTK Users" > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" > : > > Hello everyone! > > I have a problem with the QT GUI I am creating. Basically, I have an > interactive QWidget, a QVTKWidget and a "Quit" button. > > When I launch my app, I can interact with the QWidget without any problem (I > have a 3D interactive scene, where I can zoom and rotate). > However, as soon as the QVTKWidget becomes "active" (i.e. some function in > my code start using it or if I click on it), both the QWidget and the > QVTKWidget freeze. The app keeps on working, since the "Quit" button works > as it should. > > If I have a GUI with either the QWidget or the QVTKWidget (only one of them) > everything works fine. The problem is if I try to include both of them at > the same time. > > Do you have any idea why this happens? > > > I don't have any immediate ideas. It would really help to see a small > example where the problem occurs. > > Does it work if you put two of your QWidgets in the application. I mean, if > you remove the QVTKWidget and put another one of your QWidget where it was? > > Elvis > > > Thanks a lot for you help. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 stephen.langer at nist.gov Tue Oct 17 17:34:12 2017 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Tue, 17 Oct 2017 21:34:12 +0000 Subject: [vtkusers] how to handle an empty pipeline? Message-ID: <5EF295C7-E9E3-4BE9-930D-1ED2FA7B910E@contoso.com> Hi -- What's the right way to handle a pipeline that might at times have no data in it? I'm connecting to a vtkDataSetMapper, and if the input stream is empty vtk prints a warning "vtkDataSetSurfaceFilter: Number of cells is zero, no data to process". I don't create the vtkDataSetSurfaceFilter myself -- it's been inserted into the pipeline by the mapper. It doesn't do that if the input data is poly data, and if I change the input to poly data, the mapper seems quite happy with the empty pipeline, so it's odd that it complains in one case but not the other. Is there something that I should do at the pipeline source to tell the pipeline not to run? Is there a way to suppress just this one warning message? I'm using vtk 7.1.1 in C++. Thanks. -- Steve From bill.lorensen at gmail.com Tue Oct 17 18:36:36 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 17 Oct 2017 15:36:36 -0700 Subject: [vtkusers] how to handle an empty pipeline? In-Reply-To: <5EF295C7-E9E3-4BE9-930D-1ED2FA7B910E@contoso.com> References: <5EF295C7-E9E3-4BE9-930D-1ED2FA7B910E@contoso.com> Message-ID: You can catch the warnings/errors like this: https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/ObserveError/ On Tue, Oct 17, 2017 at 2:34 PM, Langer, Stephen A. (Fed) wrote: > Hi -- > > What's the right way to handle a pipeline that might at times have no data in it? I'm connecting to a vtkDataSetMapper, and if the input stream is empty vtk prints a warning "vtkDataSetSurfaceFilter: Number of cells is zero, no data to process". I don't create the vtkDataSetSurfaceFilter myself -- it's been inserted into the pipeline by the mapper. It doesn't do that if the input data is poly data, and if I change the input to poly data, the mapper seems quite happy with the empty pipeline, so it's odd that it complains in one case but not the other. > > Is there something that I should do at the pipeline source to tell the pipeline not to run? Is there a way to suppress just this one warning message? > > I'm using vtk 7.1.1 in C++. > > Thanks. > -- Steve > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 alessandro.volz at gmail.com Wed Oct 18 08:55:45 2017 From: alessandro.volz at gmail.com (Alessandro Volz) Date: Wed, 18 Oct 2017 14:55:45 +0200 Subject: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets In-Reply-To: <1668920305.13410841508253799760.JavaMail.httpd@fep-webmail-05> References: <1668920305.13410841508253799760.JavaMail.httpd@fep-webmail-05> Message-ID: <7570DC1F-DF13-42FE-B271-9C2F3A827DE8@gmail.com> Luca, I haven't looked into your problem/thread in detail, but I have one suggestion that might come useful: are you maybe at some point doing things in a secondary thread, and somehow passing data to your widget from this thread? It has happened to me in the past, and the GUI would temporarily switch to drawing in black or not updating any more. If you are using background threads, look into this. Best, Alessandro > On Oct 17, 2017, at 5:23 PM, bartolomei-luca at virgilio.it wrote: > > Thanks to everyone for the inputs. > > I will try to include the QVTKOpenGLWidget in my project. I will let you know if I succeed in doing that and if this solve the issue. > > @Shawn -> About the Cmake: I can successfully build VTK 8.0 and use it in QT if I use a newer version of cmake (currently, the default cmake version for my system is 3.2.2). The problem is that I cannot build my project with VTK 8.0 using ROS. So the problem is not Cmake itself, but the version ROS uses for building (too "old" for VTK 8.0). I will try also to fix this. > > For the moment, thanks to all. I will let you know in case of success/failure. > Best, > Luca > ----Messaggio originale---- > Da: "Shawn Waldon" > Data: 17-ott-2017 16.18 > A: "Sankhesh Jhaveri" > Cc: "bartolomei-luca at virgilio.it", "Elvis Stansvik", "VTK Users" > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > When one of the projects I work on first started using Qt5 with VTK we had similar problems. Embedding a QVTKWidget in a Qt5 Tab or Scroll widget or using it alongside other OpenGL-based widgets in Qt5 can cause these kinds of issues and this was the motivation for creating the QVTKOpenGLWidget. The QVTKOpenGLWidget correctly lets Qt manage the OpenGL context rather than hacking it in with window system calls. You could try grabbing the QVTKOpenGLWidget code from VTK 8.0.0 and copying it into your project as a temporary solution (I'm not sure if it relies on any features added between 7.1 and 8.0). > > You said upgrading CMake was blocking you from using more recent VTK? The CMake developers try really hard to be backwards compatible. Have you reported the issues you are having to them? I know they try their best to handle compatibility issues that are reported. > > HTH, > Shawn > > > On Tue, Oct 17, 2017 at 10:03 AM, Sankhesh Jhaveri > wrote: > How are you initializing the QVTKWidget? > One other thing to test would be to try removing the QTabWidget and showing both the QVTKWidget and QWidget in the same central widget side-by-side. Finally, you could see if the setup works fine with Qt4. > > I am not sure how you would put a GLUT window inside a QWidget. But if you have can do that, you could try the vtkExternalOpenGLRenderWindow. See TestGLUTRenderWindow.cxx for an example. > > > On Tue, Oct 17, 2017 at 9:24 AM bartolomei-luca at virgilio.it > wrote: > Hello Sankhesh, > > thanks a lot for the reply. > > Let's say the GUI "pipeline" is as I explained to Elvis. Then: > At the moment the two widgets are under the central widget (a QWidget). They are in two different tabs of a QTabWidget. I tried to move the QVTKWidget out of its tab but no luck. I have also noted another thing. If I show at the same time the QWidget and the QVTKWidget, the QVTKWidget works fine, but the QWidget freeze. That's why I thought that it could be an OpenGL context issue. > What do you mean by "replacing ROS widget with a simple button"? In any case, I can make QVTKWidget work, but no success with the QWidget. It just freeze on the last view. > Unfortunately, QVTKOpenGLWidget is available only for VTK 8.0 and higher. I am using VTK 7.1 and I cannot upgrade to 8.0 because of the cmake that is installed on my laptop. I cannot upgrade the cmake version due to some compatibility issues with ROS. I will get in a lot of trouble if I try to do that. Is there a way to use glut or vtkOpenGLRenderer (available in vtk 7.1)? > Thanks a lot again for the help. > Best, > Luca > > ----Messaggio originale---- > Da: "Sankhesh Jhaveri" > > Data: 17-ott-2017 14.21 > A: "Elvis Stansvik">, "bartolomei-luca at virgilio.it "> > > Cc: "VTK Users"> > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > Hi Luca, > > Do the QWidget and QVTKWidget overlap at all or are they separated by some QFrame border, etc. ? If they are not overlapping, it means they are not sharing the OpenGL context. > Have you tried replacing the ROS widget with a simple button to see if the QVTKWidget works properly? > Lastly, the QVTKWidget is known to have rendering issues with Qt5. Try using the QVTKOpenGLWidget to see if anything changes. > Best, > Sankhesh > > > On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik > wrote: > 2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it > >: > > Hello Elvis, > > > > thanks for your reply. > > I don't have the gui avaiable right now; I will send a picture as soon as I > > can. > > > > To answer your question: yes, if I remove the QVTKWidget and replace it with > > QWidget everything works. The problems occur only when the QVTKWidget is > > present. > > > > The GUI is built to work in this way: > > 1) start showing stuff on the QWidget; > > 2) After a while, the QVTKWidget shows some other stuff. > > > > The QWidget is showing some interactive scene and it uses a library > > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem > > happen because the QVTKWidget interfere with the already existing OpenGL > > context? > > I don't know, but it sounds like it's possible. I think there are > other people on this list who knows much more about OpenGL and how VTK > uses it than I do, so I'll let those answer that. > > Elvis > > > I don't know if this is the cause, because it is sufficient to have the > > QVTKWidget on the Gui to make the QWidget freeze. > > > > Anyway, I have looked at this example: > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT > > but no luck so far. Maybe is a problem of drivers (I have an Nvidia GeForce > > GTX 950M on Ubuntu 14.04 LTS). > > > > Best, > > Luca > > > > > > ----Messaggio originale---- > > Da: "Elvis Stansvik" > > > Data: 17-ott-2017 8.36 > > A: > > > Cc: "VTK Users"> > > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > > > > > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it " > > >: > > > > Hello everyone! > > > > I have a problem with the QT GUI I am creating. Basically, I have an > > interactive QWidget, a QVTKWidget and a "Quit" button. > > > > When I launch my app, I can interact with the QWidget without any problem (I > > have a 3D interactive scene, where I can zoom and rotate). > > However, as soon as the QVTKWidget becomes "active" (i.e. some function in > > my code start using it or if I click on it), both the QWidget and the > > QVTKWidget freeze. The app keeps on working, since the "Quit" button works > > as it should. > > > > If I have a GUI with either the QWidget or the QVTKWidget (only one of them) > > everything works fine. The problem is if I try to include both of them at > > the same time. > > > > Do you have any idea why this happens? > > > > > > I don't have any immediate ideas. It would really help to see a small > > example where the problem occurs. > > > > Does it work if you put two of your QWidgets in the application. I mean, if > > you remove the QVTKWidget and put another one of your QWidget where it was? > > > > Elvis > > > > > > Thanks a lot for you help. > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 > -- > Sankhesh Jhaveri > > Sr. Research & Development Engineer | Kitware | (518) 881-4417 > > -- > Sankhesh Jhaveri > > Sr. Research & Development Engineer | Kitware | (518) 881-4417 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 f.nellmeldin at open-engineering.com Wed Oct 18 10:00:41 2017 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Wed, 18 Oct 2017 16:00:41 +0200 Subject: [vtkusers] Export mesh of cutting plane In-Reply-To: References: Message-ID: Hello, sorry for coming back to this topic, but I have found some cases where this doesn't work. I attached a screenshot. On top is the 3d mesh cut by a plane parallel to the screen. We can see that are some elements (hexahedrons) that got cut and they were split in sets of tetrahedrons. At the bottom, we see the result of calling vtkCutter -> vtkCleanUnstructuredGrid -> vtkXMLUnstructuredGridWriter. The result are all quads and all the generated nodes by the cut are gone, and we see no triangles. I would expect to have the same result that we see on the top, but with 2d elements instead of 3d. Here's my code: void cutModel(vtkSmartPointer model, double normal[3]) { vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(0.0, 0.0, 0.0); plane->SetNormal(normal); vtkSmartPointer cutter = vtkSmartPointer::New(); cutter->SetCutFunction(plane); cutter->SetInputData(model); cutter->GenerateTrianglesOff(); cutter->Update(); vtkSmartPointer cleaner = vtkSmartPointer::New(); cleaner->SetInputConnection(cutter->GetOutputPort()); cleaner->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("planecut.vtu"); writer->SetInputConnection(cleaner->GetOutputPort()); writer->SetDataModeToAscii(); writer->Write(); } Thank you. On 29 September 2017 at 13:23, Fernando Nellmeldin < f.nellmeldin at open-engineering.com> wrote: > Hello, that worked as a charm, thank you very much for your time!! > > On 29 September 2017 at 11:31, kenichiro yoshimi > wrote: > >> Hi Fernando, >> >> This will be accomplished by using vtkCleanUnstructuredGrid class >> found in ParaView without triangulation. I have attached a simple >> code. >> >> Thanks >> >> 2017-09-29 16:37 GMT+09:00 Fernando Nellmeldin >> : >> > Hello. That did the job! (although I get a triangle mesh while the >> initial >> > surface was full of sliced hexahedron (quads). >> > >> > Thank you! >> > >> > On 29 September 2017 at 04:05, kenichiro yoshimi < >> rccm.kyoshimi at gmail.com> >> > wrote: >> >> >> >> Hello, >> >> >> >> Using vtkDataSetTriangleFilter is a simple way which allows you to >> >> convert polyData to unstructuredGrid. Something like this (VTK-8.0.0): >> >> --- >> >> // Create cutter >> >> vtkSmartPointer cutter = >> >> vtkSmartPointer::New(); >> >> cutter->SetCutFunction(plane); >> >> cutter->SetInputConnection(model->GetOutputPort()); >> >> >> >> // Convert polyData to unstructuredGrid >> >> vtkSmartPointer triFilter = >> >> vtkSmartPointer::New(); >> >> triFilter->SetInputConnection(cutter->GetOutputPort()); >> >> triFilter->Update(); >> >> >> >> vtkSmartPointer writer = >> >> vtkSmartPointer::New(); >> >> writer->SetFileName("unstructuredGrid.vtu"); >> >> writer->SetInputConnection(triFilter->GetOutputPort()); >> >> writer->Write(); >> >> --- >> >> >> >> Regards >> >> >> >> 2017-09-28 23:43 GMT+09:00 Fernando Nellmeldin >> >> : >> >> > Hello. >> >> > I have a method to cut a volume in a vtkUnstructuredGrid given a >> >> > vtkPlane. >> >> > I'm using vtkTableBasedClipDataSet to extract half of the model, >> also as >> >> > vtkUnstructuredGrid. This is working. >> >> > >> >> > Now, I would like to obtain ONLY the surface of the cut, than means: >> I >> >> > want >> >> > a vtkUnstructuredGrid with the nodes and faces being on the surface >> of >> >> > the >> >> > cut. >> >> > How can this be achieved? >> >> > >> >> > I tried using vtkCutter with vtkStripper but the mesh I get doesn't >> have >> >> > any >> >> > cells, only the points and their associated data. >> >> > >> >> > Here's how my code looks like. >> >> > >> >> > Thank You! >> >> > >> >> > vtkSmartPointer model = >> >> > vtkSmartPointer::New(); >> >> > // fill the ugrid ... >> >> > >> >> > // Create The Plane to cut >> >> > vtkSmartPointer plane = vtkSmartPointer::New(); >> >> > plane->SetOrigin(0.0, 0.0, 0.0); >> >> > plane->SetNormal(1.0, 0, 0); >> >> > >> >> > // Code to cut the model in half >> >> > vtkSmartPointer clipDataSet = >> >> > vtkSmartPointer::New(); >> >> > clipDataSet->SetClipFunction(plane); >> >> > clipDataSet->InsideOutOn(); >> >> > clipDataSet->GenerateClippedOutputOn(); >> >> > clipDataSet->SetInputConnection(model->GetProducerPort()); >> >> > clipDataSet->Update(); >> >> > >> >> > // This has half the model, this is Ok but not what I want >> >> > vtkSmartPointer halfModel = >> >> > clipDataSet->GetOutput(); >> >> > >> >> > ////****//// >> >> > // BEGINS code not working to extract the surface of the cut >> >> > vtkSmartPointer cutter = vtkSmartPointer::Ne >> w(); >> >> > cutter->SetCutFunction(plane); >> >> > cutter->SetInputConnection(model->GetProducerPort()); >> >> > cutter->Update(); >> >> > >> >> > vtkSmartPointer stripper = >> >> > vtkSmartPointer::New(); >> >> > stripper->SetInputConnection(cutter->GetOutputPort()); >> >> > stripper->Update(); >> >> > >> >> > vtkSmartPointer pd = vtkSmartPointer:: >> New(); >> >> > pd->SetPoints(stripper->GetOutput()->GetPoints()); >> >> > pd->SetPolys(stripper->GetOutput()->GetLines()); >> >> > >> >> > vtkSmartPointer clipped = >> >> > vtkSmartPointer::New(); >> >> > clipped->ShallowCopy(pd); >> >> > >> >> > // Here I see that there is no Cells >> >> > clipped->Print(std::cout); >> >> > >> >> > // ENDS code to extract the surface of the cut >> >> > ////****//// >> >> > >> >> > // Write the unstructured grid >> >> > vtkSmartPointer writer = >> >> > vtkSmartPointer::New(); >> >> > writer->SetFileName("d:/unstructuredGrid.vtu"); >> >> > writer->SetInput(clipped); >> >> > writer->SetDataModeToAscii(); >> >> > writer->Write(); >> >> > // file doesnt have any cell, only points and pointdata >> >> > >> >> > _______________________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Please keep messages on-topic and check the VTK FAQ at: >> >> > http://www.vtk.org/Wiki/VTK_FAQ >> >> > >> >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> > >> >> > Follow this link to subscribe/unsubscribe: >> >> > http://public.kitware.com/mailman/listinfo/vtkusers >> >> > >> > >> > >> > >> > >> > -- >> > Fernando NELLMELDIN >> > Software Engineer >> > _______________________________________________________________ >> > >> > Open Engineering s.a. >> > >> > Rue Bois Saint-Jean 15/1 >> > B-4102 Seraing (Belgium) >> > Tel: +32.4.353.30.34 >> > >> > http://www.open-engineering.com >> > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym >> > ____________________________________________________________ >> _____________ >> > > > > -- > *Fernando NELLMELDIN* > Software Engineer > *_______________________________________________________________* > > *Open Engineering s.a.* > > Rue Bois Saint-Jean 15/1 > B-4102 Seraing (Belgium) > Tel: +32.4.353.30.34 > > http://www.open-engineering.com > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym > > *_________________________________________________________________________* > -- *Fernando NELLMELDIN* Software Engineer *_______________________________________________________________* *Open Engineering s.a.* Rue Bois Saint-Jean 15/1 B-4102 Seraing (Belgium) Tel: +32.4.353.30.34 http://www.open-engineering.com https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym *_________________________________________________________________________* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: planecutcomparison.png Type: image/png Size: 74265 bytes Desc: not available URL: From stephen.langer at nist.gov Wed Oct 18 11:03:56 2017 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Wed, 18 Oct 2017 15:03:56 +0000 Subject: [vtkusers] how to handle an empty pipeline? In-Reply-To: References: <5EF295C7-E9E3-4BE9-930D-1ED2FA7B910E@contoso.com> Message-ID: <965F6E51-7745-40A1-BBFA-C90E29E256EA@nist.gov> Thanks for the suggestion, but it won't work in this case. The warning messages come from a vtkDataSetSurfaceFilter that's created as a protected member of the vtkDataSetMapper class, so I can't call vtkDataSetSurfaceFilter::AddObserver. Subclassing vtkDatatSetMapper and overriding Render to get access to the filter would work, but feels wrong? Is this a bug? A warning is raised when the input to the vtkDataSetMapper is empty, except when the input type is VTK_POLY_DATA. -- Steve On 10/17/17, 6:36 PM, "Bill Lorensen" wrote: You can catch the warnings/errors like this: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FUtilities%2FObserveError%2F&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=Jse9qOUuZCUa9o7yU3%2FLH2HH5I0%2FlkyeL2DtyHoPjCU%3D&reserved=0 On Tue, Oct 17, 2017 at 2:34 PM, Langer, Stephen A. (Fed) wrote: > Hi -- > > What's the right way to handle a pipeline that might at times have no data in it? I'm connecting to a vtkDataSetMapper, and if the input stream is empty vtk prints a warning "vtkDataSetSurfaceFilter: Number of cells is zero, no data to process". I don't create the vtkDataSetSurfaceFilter myself -- it's been inserted into the pipeline by the mapper. It doesn't do that if the input data is poly data, and if I change the input to poly data, the mapper seems quite happy with the empty pipeline, so it's odd that it complains in one case but not the other. > > Is there something that I should do at the pipeline source to tell the pipeline not to run? Is there a way to suppress just this one warning message? > > I'm using vtk 7.1.1 in C++. > > Thanks. > -- Steve > > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=RYg%2BPlwic7Tna%2F7XBHOzzdvhkoMlxxumVNKWqExIbgs%3D&reserved=0 > > Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=alDmSCFYyHNTCJSBl%2FfPxBQUcuQ3wtlxy%2BJkCEKzZJo%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=YS8KxC6fI9R%2B5fACCQbDC7N3eBbFj8qy1k2SIFz%2B%2FBM%3D&reserved=0 > > Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=SYRMsiT14ntcdMMbSsGahJCJavp8%2BJFOrqx%2B2x4QJ1A%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=uPalP%2BrHte%2FjsQeaMUBuxCuAOY7vv2Eye5aZHbxhIY0%3D&reserved=0 -- Unpaid intern in BillsBasement at noware dot com From lasso at queensu.ca Wed Oct 18 11:26:36 2017 From: lasso at queensu.ca (Andras Lasso) Date: Wed, 18 Oct 2017 15:26:36 +0000 Subject: [vtkusers] how to handle an empty pipeline? In-Reply-To: <965F6E51-7745-40A1-BBFA-C90E29E256EA@nist.gov> References: <5EF295C7-E9E3-4BE9-930D-1ED2FA7B910E@contoso.com> <965F6E51-7745-40A1-BBFA-C90E29E256EA@nist.gov> Message-ID: I don't know if it's good practice, but when there is no input data I usually do either of the followings: - hide the actor so that no pipeline updates are requested by the renderer - detach the data processing pipeline from the visualization pipeline (SetInputData(NULL)) - add a dummy data set (such as polydata with a single point) as input I would be interested if there is a particular method recommended by VTK core developers. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Langer, Stephen A. (Fed) Sent: Wednesday, October 18, 2017 11:04 AM To: Bill Lorensen Cc: vtkusers at vtk.org Subject: Re: [vtkusers] how to handle an empty pipeline? Thanks for the suggestion, but it won't work in this case. The warning messages come from a vtkDataSetSurfaceFilter that's created as a protected member of the vtkDataSetMapper class, so I can't call vtkDataSetSurfaceFilter::AddObserver. Subclassing vtkDatatSetMapper and overriding Render to get access to the filter would work, but feels wrong? Is this a bug? A warning is raised when the input to the vtkDataSetMapper is empty, except when the input type is VTK_POLY_DATA. -- Steve On 10/17/17, 6:36 PM, "Bill Lorensen" wrote: You can catch the warnings/errors like this: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FUtilities%2FObserveError%2F&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=Jse9qOUuZCUa9o7yU3%2FLH2HH5I0%2FlkyeL2DtyHoPjCU%3D&reserved=0 On Tue, Oct 17, 2017 at 2:34 PM, Langer, Stephen A. (Fed) wrote: > Hi -- > > What's the right way to handle a pipeline that might at times have no data in it? I'm connecting to a vtkDataSetMapper, and if the input stream is empty vtk prints a warning "vtkDataSetSurfaceFilter: Number of cells is zero, no data to process". I don't create the vtkDataSetSurfaceFilter myself -- it's been inserted into the pipeline by the mapper. It doesn't do that if the input data is poly data, and if I change the input to poly data, the mapper seems quite happy with the empty pipeline, so it's odd that it complains in one case but not the other. > > Is there something that I should do at the pipeline source to tell the pipeline not to run? Is there a way to suppress just this one warning message? > > I'm using vtk 7.1.1 in C++. > > Thanks. > -- Steve > > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=RYg%2BPlwic7Tna%2F7XBHOzzdvhkoMlxxumVNKWqExIbgs%3D&reserved=0 > > Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=alDmSCFYyHNTCJSBl%2FfPxBQUcuQ3wtlxy%2BJkCEKzZJo%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=YS8KxC6fI9R%2B5fACCQbDC7N3eBbFj8qy1k2SIFz%2B%2FBM%3D&reserved=0 > > Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=SYRMsiT14ntcdMMbSsGahJCJavp8%2BJFOrqx%2B2x4QJ1A%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=uPalP%2BrHte%2FjsQeaMUBuxCuAOY7vv2Eye5aZHbxhIY0%3D&reserved=0 -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=G5HjQYP%2BVtTeYvFpw2uVv8NLpIQe6H4wc1C1cxhVuy0%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=%2Bxy3iWcIaSmwEYbuQ34qfqfv1Z6sYw6uy9TdggyCkiI%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=wt2SqH2w2KmIFagMwyf%2BWX4VIBEJVy9Q8y3Soz8Bg0E%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=lqTS030GCguYDE%2B5gRTx%2BUS4GDeDfxL%2B1gk63C7OK%2BY%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=XSlLpR9Hd1eQ8WY2xvZiHWeSnDQgQilkekPWN0RbkLY%3D&reserved=0 From stephen.langer at nist.gov Wed Oct 18 11:47:12 2017 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Wed, 18 Oct 2017 15:47:12 +0000 Subject: [vtkusers] how to handle an empty pipeline? In-Reply-To: References: <5EF295C7-E9E3-4BE9-930D-1ED2FA7B910E@contoso.com> <965F6E51-7745-40A1-BBFA-C90E29E256EA@nist.gov> Message-ID: What do you do if you don't know that the pipeline will be empty? There might be a filter that doesn't pass any of the data, but the data source and the controlling code can't know that until the pipeline executes. -- Steve On 10/18/17, 11:26 AM, "Andras Lasso" wrote: I don't know if it's good practice, but when there is no input data I usually do either of the followings: - hide the actor so that no pipeline updates are requested by the renderer - detach the data processing pipeline from the visualization pipeline (SetInputData(NULL)) - add a dummy data set (such as polydata with a single point) as input I would be interested if there is a particular method recommended by VTK core developers. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Langer, Stephen A. (Fed) Sent: Wednesday, October 18, 2017 11:04 AM To: Bill Lorensen Cc: vtkusers at vtk.org Subject: Re: [vtkusers] how to handle an empty pipeline? Thanks for the suggestion, but it won't work in this case. The warning messages come from a vtkDataSetSurfaceFilter that's created as a protected member of the vtkDataSetMapper class, so I can't call vtkDataSetSurfaceFilter::AddObserver. Subclassing vtkDatatSetMapper and overriding Render to get access to the filter would work, but feels wrong? Is this a bug? A warning is raised when the input to the vtkDataSetMapper is empty, except when the input type is VTK_POLY_DATA. -- Steve On 10/17/17, 6:36 PM, "Bill Lorensen" wrote: You can catch the warnings/errors like this: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FUtilities%2FObserveError%2F&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=Jse9qOUuZCUa9o7yU3%2FLH2HH5I0%2FlkyeL2DtyHoPjCU%3D&reserved=0 On Tue, Oct 17, 2017 at 2:34 PM, Langer, Stephen A. (Fed) wrote: > Hi -- > > What's the right way to handle a pipeline that might at times have no data in it? I'm connecting to a vtkDataSetMapper, and if the input stream is empty vtk prints a warning "vtkDataSetSurfaceFilter: Number of cells is zero, no data to process". I don't create the vtkDataSetSurfaceFilter myself -- it's been inserted into the pipeline by the mapper. It doesn't do that if the input data is poly data, and if I change the input to poly data, the mapper seems quite happy with the empty pipeline, so it's odd that it complains in one case but not the other. > > Is there something that I should do at the pipeline source to tell the pipeline not to run? Is there a way to suppress just this one warning message? > > I'm using vtk 7.1.1 in C++. > > Thanks. > -- Steve > > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=RYg%2BPlwic7Tna%2F7XBHOzzdvhkoMlxxumVNKWqExIbgs%3D&reserved=0 > > Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=alDmSCFYyHNTCJSBl%2FfPxBQUcuQ3wtlxy%2BJkCEKzZJo%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=YS8KxC6fI9R%2B5fACCQbDC7N3eBbFj8qy1k2SIFz%2B%2FBM%3D&reserved=0 > > Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=SYRMsiT14ntcdMMbSsGahJCJavp8%2BJFOrqx%2B2x4QJ1A%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=uPalP%2BrHte%2FjsQeaMUBuxCuAOY7vv2Eye5aZHbxhIY0%3D&reserved=0 -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=G5HjQYP%2BVtTeYvFpw2uVv8NLpIQe6H4wc1C1cxhVuy0%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=%2Bxy3iWcIaSmwEYbuQ34qfqfv1Z6sYw6uy9TdggyCkiI%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=wt2SqH2w2KmIFagMwyf%2BWX4VIBEJVy9Q8y3Soz8Bg0E%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=lqTS030GCguYDE%2B5gRTx%2BUS4GDeDfxL%2B1gk63C7OK%2BY%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=XSlLpR9Hd1eQ8WY2xvZiHWeSnDQgQilkekPWN0RbkLY%3D&reserved=0 From lasso at queensu.ca Wed Oct 18 11:58:00 2017 From: lasso at queensu.ca (Andras Lasso) Date: Wed, 18 Oct 2017 15:58:00 +0000 Subject: [vtkusers] how to handle an empty pipeline? In-Reply-To: References: <5EF295C7-E9E3-4BE9-930D-1ED2FA7B910E@contoso.com> <965F6E51-7745-40A1-BBFA-C90E29E256EA@nist.gov> Message-ID: When the input is modified I call Update() on the filter and check the output to see if the result is empty. Andras -----Original Message----- From: Langer, Stephen A. (Fed) [mailto:stephen.langer at nist.gov] Sent: Wednesday, October 18, 2017 11:47 AM To: Andras Lasso ; Bill Lorensen Cc: vtkusers at vtk.org Subject: Re: [vtkusers] how to handle an empty pipeline? What do you do if you don't know that the pipeline will be empty? There might be a filter that doesn't pass any of the data, but the data source and the controlling code can't know that until the pipeline executes. -- Steve On 10/18/17, 11:26 AM, "Andras Lasso" wrote: I don't know if it's good practice, but when there is no input data I usually do either of the followings: - hide the actor so that no pipeline updates are requested by the renderer - detach the data processing pipeline from the visualization pipeline (SetInputData(NULL)) - add a dummy data set (such as polydata with a single point) as input I would be interested if there is a particular method recommended by VTK core developers. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Langer, Stephen A. (Fed) Sent: Wednesday, October 18, 2017 11:04 AM To: Bill Lorensen Cc: vtkusers at vtk.org Subject: Re: [vtkusers] how to handle an empty pipeline? Thanks for the suggestion, but it won't work in this case. The warning messages come from a vtkDataSetSurfaceFilter that's created as a protected member of the vtkDataSetMapper class, so I can't call vtkDataSetSurfaceFilter::AddObserver. Subclassing vtkDatatSetMapper and overriding Render to get access to the filter would work, but feels wrong? Is this a bug? A warning is raised when the input to the vtkDataSetMapper is empty, except when the input type is VTK_POLY_DATA. -- Steve On 10/17/17, 6:36 PM, "Bill Lorensen" wrote: You can catch the warnings/errors like this: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FUtilities%2FObserveError%2F&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=Jse9qOUuZCUa9o7yU3%2FLH2HH5I0%2FlkyeL2DtyHoPjCU%3D&reserved=0 On Tue, Oct 17, 2017 at 2:34 PM, Langer, Stephen A. (Fed) wrote: > Hi -- > > What's the right way to handle a pipeline that might at times have no data in it? I'm connecting to a vtkDataSetMapper, and if the input stream is empty vtk prints a warning "vtkDataSetSurfaceFilter: Number of cells is zero, no data to process". I don't create the vtkDataSetSurfaceFilter myself -- it's been inserted into the pipeline by the mapper. It doesn't do that if the input data is poly data, and if I change the input to poly data, the mapper seems quite happy with the empty pipeline, so it's odd that it complains in one case but not the other. > > Is there something that I should do at the pipeline source to tell the pipeline not to run? Is there a way to suppress just this one warning message? > > I'm using vtk 7.1.1 in C++. > > Thanks. > -- Steve > > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=RYg%2BPlwic7Tna%2F7XBHOzzdvhkoMlxxumVNKWqExIbgs%3D&reserved=0 > > Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=alDmSCFYyHNTCJSBl%2FfPxBQUcuQ3wtlxy%2BJkCEKzZJo%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=YS8KxC6fI9R%2B5fACCQbDC7N3eBbFj8qy1k2SIFz%2B%2FBM%3D&reserved=0 > > Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=SYRMsiT14ntcdMMbSsGahJCJavp8%2BJFOrqx%2B2x4QJ1A%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=uPalP%2BrHte%2FjsQeaMUBuxCuAOY7vv2Eye5aZHbxhIY0%3D&reserved=0 -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=G5HjQYP%2BVtTeYvFpw2uVv8NLpIQe6H4wc1C1cxhVuy0%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=%2Bxy3iWcIaSmwEYbuQ34qfqfv1Z6sYw6uy9TdggyCkiI%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=wt2SqH2w2KmIFagMwyf%2BWX4VIBEJVy9Q8y3Soz8Bg0E%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=lqTS030GCguYDE%2B5gRTx%2BUS4GDeDfxL%2B1gk63C7OK%2BY%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=XSlLpR9Hd1eQ8WY2xvZiHWeSnDQgQilkekPWN0RbkLY%3D&reserved=0 From stephen.langer at nist.gov Wed Oct 18 13:59:00 2017 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Wed, 18 Oct 2017 17:59:00 +0000 Subject: [vtkusers] how to handle an empty pipeline? In-Reply-To: References: <5EF295C7-E9E3-4BE9-930D-1ED2FA7B910E@contoso.com> <965F6E51-7745-40A1-BBFA-C90E29E256EA@nist.gov> Message-ID: <1F7B9730-3259-432C-891C-2AF262964B46@nist.gov> Ok, thanks. I'll see how difficult that'll be in my case. The simple solution would be to just delete one line from vtkDataSetSurfaceFilter, but that'll make it harder to distribute my code. -- Steve On 10/18/17, 11:58 AM, "Andras Lasso" wrote: When the input is modified I call Update() on the filter and check the output to see if the result is empty. Andras -----Original Message----- From: Langer, Stephen A. (Fed) [mailto:stephen.langer at nist.gov] Sent: Wednesday, October 18, 2017 11:47 AM To: Andras Lasso ; Bill Lorensen Cc: vtkusers at vtk.org Subject: Re: [vtkusers] how to handle an empty pipeline? What do you do if you don't know that the pipeline will be empty? There might be a filter that doesn't pass any of the data, but the data source and the controlling code can't know that until the pipeline executes. -- Steve On 10/18/17, 11:26 AM, "Andras Lasso" wrote: I don't know if it's good practice, but when there is no input data I usually do either of the followings: - hide the actor so that no pipeline updates are requested by the renderer - detach the data processing pipeline from the visualization pipeline (SetInputData(NULL)) - add a dummy data set (such as polydata with a single point) as input I would be interested if there is a particular method recommended by VTK core developers. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Langer, Stephen A. (Fed) Sent: Wednesday, October 18, 2017 11:04 AM To: Bill Lorensen Cc: vtkusers at vtk.org Subject: Re: [vtkusers] how to handle an empty pipeline? Thanks for the suggestion, but it won't work in this case. The warning messages come from a vtkDataSetSurfaceFilter that's created as a protected member of the vtkDataSetMapper class, so I can't call vtkDataSetSurfaceFilter::AddObserver. Subclassing vtkDatatSetMapper and overriding Render to get access to the filter would work, but feels wrong? Is this a bug? A warning is raised when the input to the vtkDataSetMapper is empty, except when the input type is VTK_POLY_DATA. -- Steve On 10/17/17, 6:36 PM, "Bill Lorensen" wrote: You can catch the warnings/errors like this: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FUtilities%2FObserveError%2F&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=Jse9qOUuZCUa9o7yU3%2FLH2HH5I0%2FlkyeL2DtyHoPjCU%3D&reserved=0 On Tue, Oct 17, 2017 at 2:34 PM, Langer, Stephen A. (Fed) wrote: > Hi -- > > What's the right way to handle a pipeline that might at times have no data in it? I'm connecting to a vtkDataSetMapper, and if the input stream is empty vtk prints a warning "vtkDataSetSurfaceFilter: Number of cells is zero, no data to process". I don't create the vtkDataSetSurfaceFilter myself -- it's been inserted into the pipeline by the mapper. It doesn't do that if the input data is poly data, and if I change the input to poly data, the mapper seems quite happy with the empty pipeline, so it's odd that it complains in one case but not the other. > > Is there something that I should do at the pipeline source to tell the pipeline not to run? Is there a way to suppress just this one warning message? > > I'm using vtk 7.1.1 in C++. > > Thanks. > -- Steve > > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=RYg%2BPlwic7Tna%2F7XBHOzzdvhkoMlxxumVNKWqExIbgs%3D&reserved=0 > > Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=alDmSCFYyHNTCJSBl%2FfPxBQUcuQ3wtlxy%2BJkCEKzZJo%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=YS8KxC6fI9R%2B5fACCQbDC7N3eBbFj8qy1k2SIFz%2B%2FBM%3D&reserved=0 > > Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=SYRMsiT14ntcdMMbSsGahJCJavp8%2BJFOrqx%2B2x4QJ1A%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=uPalP%2BrHte%2FjsQeaMUBuxCuAOY7vv2Eye5aZHbxhIY0%3D&reserved=0 -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=G5HjQYP%2BVtTeYvFpw2uVv8NLpIQe6H4wc1C1cxhVuy0%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=%2Bxy3iWcIaSmwEYbuQ34qfqfv1Z6sYw6uy9TdggyCkiI%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=wt2SqH2w2KmIFagMwyf%2BWX4VIBEJVy9Q8y3Soz8Bg0E%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=lqTS030GCguYDE%2B5gRTx%2BUS4GDeDfxL%2B1gk63C7OK%2BY%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=XSlLpR9Hd1eQ8WY2xvZiHWeSnDQgQilkekPWN0RbkLY%3D&reserved=0 From jcplatt at dsl.pipex.com Wed Oct 18 17:30:05 2017 From: jcplatt at dsl.pipex.com (John Platt) Date: Wed, 18 Oct 2017 22:30:05 +0100 Subject: [vtkusers] how to handle an empty pipeline? In-Reply-To: <1F7B9730-3259-432C-891C-2AF262964B46@nist.gov> References: <5EF295C7-E9E3-4BE9-930D-1ED2FA7B910E@contoso.com> <965F6E51-7745-40A1-BBFA-C90E29E256EA@nist.gov> <1F7B9730-3259-432C-891C-2AF262964B46@nist.gov> Message-ID: <903e0b63-1e07-3d8c-292a-edd67a44d722@dsl.pipex.com> Hi Steve, In VTK 5.10, I use vtkDataSetSurfaceFilter2 which is identical to vtkDataSetSurfaceFilter except for the following lines in RequestData() which deal with the case of no cells to ensure the output is correctly formed ... ? if (numCells == 0) ??? { ??? output->CopyStructure( input ); ??? output->GetPointData()->PassData( input->GetPointData() ); ??? output->GetCellData()->PassData( input->GetCellData() ); ??? return 1; ??? } I have found some filters handle the case of no cells gracefully, others bail out too soon leaving malformed output. You could use vtkDataSetSurfaceFilter2 before the input to vtkDataSetMapper in your pipeline which would send polydata into the mapper. HTH, John. On 10/18/2017 6:59 PM, Langer, Stephen A. (Fed) wrote: > Ok, thanks. I'll see how difficult that'll be in my case. > The simple solution would be to just delete one line from vtkDataSetSurfaceFilter, but that'll make it harder to distribute my code. > > -- Steve > > On 10/18/17, 11:58 AM, "Andras Lasso" wrote: > > When the input is modified I call Update() on the filter and check the output to see if the result is empty. > > Andras > > -----Original Message----- > From: Langer, Stephen A. (Fed) [mailto:stephen.langer at nist.gov] > Sent: Wednesday, October 18, 2017 11:47 AM > To: Andras Lasso ; Bill Lorensen > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] how to handle an empty pipeline? > > What do you do if you don't know that the pipeline will be empty? There might be a filter that doesn't pass any of the data, but the data source and the controlling code can't know that until the pipeline executes. > > -- Steve > > On 10/18/17, 11:26 AM, "Andras Lasso" wrote: > > I don't know if it's good practice, but when there is no input data I usually do either of the followings: > - hide the actor so that no pipeline updates are requested by the renderer > - detach the data processing pipeline from the visualization pipeline (SetInputData(NULL)) > - add a dummy data set (such as polydata with a single point) as input > > I would be interested if there is a particular method recommended by VTK core developers. > > Andras > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Langer, Stephen A. (Fed) > Sent: Wednesday, October 18, 2017 11:04 AM > To: Bill Lorensen > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] how to handle an empty pipeline? > > Thanks for the suggestion, but it won't work in this case. The warning messages come from a vtkDataSetSurfaceFilter that's created as a protected member of the vtkDataSetMapper class, so I can't call vtkDataSetSurfaceFilter::AddObserver. Subclassing vtkDatatSetMapper and overriding Render to get access to the filter would work, but feels wrong? > > Is this a bug? A warning is raised when the input to the vtkDataSetMapper is empty, except when the input type is VTK_POLY_DATA. > > -- Steve > > On 10/17/17, 6:36 PM, "Bill Lorensen" wrote: > > You can catch the warnings/errors like this: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FUtilities%2FObserveError%2F&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=Jse9qOUuZCUa9o7yU3%2FLH2HH5I0%2FlkyeL2DtyHoPjCU%3D&reserved=0 > > > On Tue, Oct 17, 2017 at 2:34 PM, Langer, Stephen A. (Fed) > wrote: > > Hi -- > > > > What's the right way to handle a pipeline that might at times have no data in it? I'm connecting to a vtkDataSetMapper, and if the input stream is empty vtk prints a warning "vtkDataSetSurfaceFilter: Number of cells is zero, no data to process". I don't create the vtkDataSetSurfaceFilter myself -- it's been inserted into the pipeline by the mapper. It doesn't do that if the input data is poly data, and if I change the input to poly data, the mapper seems quite happy with the empty pipeline, so it's odd that it complains in one case but not the other. > > > > Is there something that I should do at the pipeline source to tell the pipeline not to run? Is there a way to suppress just this one warning message? > > > > I'm using vtk 7.1.1 in C++. > > > > Thanks. > > -- Steve > > > > _______________________________________________ > > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=RYg%2BPlwic7Tna%2F7XBHOzzdvhkoMlxxumVNKWqExIbgs%3D&reserved=0 > > > > Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=alDmSCFYyHNTCJSBl%2FfPxBQUcuQ3wtlxy%2BJkCEKzZJo%3D&reserved=0 > > > > Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=YS8KxC6fI9R%2B5fACCQbDC7N3eBbFj8qy1k2SIFz%2B%2FBM%3D&reserved=0 > > > > Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=SYRMsiT14ntcdMMbSsGahJCJavp8%2BJFOrqx%2B2x4QJ1A%3D&reserved=0 > > > > Follow this link to subscribe/unsubscribe: > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=uPalP%2BrHte%2FjsQeaMUBuxCuAOY7vv2Eye5aZHbxhIY0%3D&reserved=0 > > > > -- > Unpaid intern in BillsBasement at noware dot com > > > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=G5HjQYP%2BVtTeYvFpw2uVv8NLpIQe6H4wc1C1cxhVuy0%3D&reserved=0 > > Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=%2Bxy3iWcIaSmwEYbuQ34qfqfv1Z6sYw6uy9TdggyCkiI%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=wt2SqH2w2KmIFagMwyf%2BWX4VIBEJVy9Q8y3Soz8Bg0E%3D&reserved=0 > > Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=lqTS030GCguYDE%2B5gRTx%2BUS4GDeDfxL%2B1gk63C7OK%2BY%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Caab96158e64644f5a0a308d516399b7a%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636439359028042607&sdata=XSlLpR9Hd1eQ8WY2xvZiHWeSnDQgQilkekPWN0RbkLY%3D&reserved=0 > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 yangmin_hust at 126.com Wed Oct 18 21:27:27 2017 From: yangmin_hust at 126.com (minyang) Date: Wed, 18 Oct 2017 18:27:27 -0700 (MST) Subject: [vtkusers] How to catch render texture failed when not enough memory, VTK6.3 In-Reply-To: <1508231826698-0.post@n5.nabble.com> References: <1508231826698-0.post@n5.nabble.com> Message-ID: <1508376447806-0.post@n5.nabble.com> Update: Opened debug window, but can not catch this exception. I guess it occurred in OpenGL. Can we have a way catch it? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Andrew at Ryonic.io Thu Oct 19 01:30:26 2017 From: Andrew at Ryonic.io (Andrew) Date: Wed, 18 Oct 2017 22:30:26 -0700 (MST) Subject: [vtkusers] Dynamically Add and Render Points using vtkPolyData Message-ID: <1508391026744-0.post@n5.nabble.com> Hi All, This will be my first post, I am new to VTK so I apologize for any Noobie mistakes. Outline: Our project uses a 2D lidar on a Robot to profile areas as it moves, we are currently using VTK to visualize these point clouds. The application needs to be real time as such we receive 10 scans a second with roughly 360 points per scan. What is the best way to add points to PolyData and render it? The current method adds these points to the Polydata via: //Setup lidar_points = gcnew vtkPoints(); lidar_points_colors = gcnew vtkUnsignedCharArray(); lidar_points_colors->SetName("LidarPointsColors"); lidar_points_colors->SetNumberOfComponents(3); lidar_points_data->GetPointData()->SetScalars(lidar_points_colors); vertices = gcnew vtkCellArray(); lidar_points_data->SetPoints(lidar_points); lidar_points_data->SetVerts(vertices); lidar_points_data->GetPointData()->SetScalars(lidar_points_colors); lidar_points_mapper->ImmediateModeRenderingOn(); //Per scan for (point p in scan) { vtkPointData^ newPoint = vtkPointData::New(); int Id = lidar_points->InsertNextPoint(new_lidar_point_x, new_lidar_point_y, new_lidar_point_z); vertices->InsertNextCell(1); vertices->InsertCellPoint(Id); } lidar_points->Modified(); lidar_points_data->Modified(); lidar_points_data->Update(); lidar_render_window->Render(); I have checked and the Insert for each scan takes 3ms regardless of total point size of PolyData. But the Render(); method starts at 4-5ms for an empty set and quickly grows to 150ms for 1 million points. which already slows down the 10Hz scan rate. Interestingly when the scans stop, using the mouse to interact with the scene gives a very good FPS even when there are 3 Million points The system has a GPU and I can verify the render calls do use the GPU, using the mouse with 3 Million points maxes the GPU (100% utilization). While Points are added and rendered both the GPU and CPU of the system are below 50%, I have tried using threads to Split adding points from the render event but Vtk really didnt enjoy that :P Any Feed back would be very helpful -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Thu Oct 19 02:04:14 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Thu, 19 Oct 2017 15:04:14 +0900 Subject: [vtkusers] Export mesh of cutting plane In-Reply-To: References: Message-ID: Hello, Firstly the cutting algorithms are different between vtkTableBasedClipDataSet and vtkCutter, thus in general the generated cross sections are quite different. I have no idea how to extract a section surface directly from output of vtkTableBasedClipDataSet, however here are two insufficient ways: 1) vtkTableBasedClipDataSet -> vtkCutter (Cutter.tar.gz) 2) vtkTableBasedClipDataSet -> vtkGeometryFilter -> vtkPolyDataNormals -> vtkConnectivityFilter (Cutter2.tar.gz) --- 1) This method conducts double cutting using the same plane in turn. But in order to avoid the broken polygons as output of vtkCutter, the position of a cutting plain need to be slightly shifted from the used in vtkTableBasedClipDataSet. This means good accuracy of results are not be retained. 2) This method divides the surface by feature edges (vtkPolyDataNormals) and then selects the desired surface among them based on polygonal connectivity (vtkConnectivityFilter). Here, the origin of a cutting plane need to be known and be only on the cross section of objects so as to extract the cross section according to the criteria "extract the region closest to the origin". In addition, in vtkPolyDataNormals the feature angle to determine feature edges need to be adjusted in accordance with each dataset. I'm sorry for my poor English. 2017-10-18 23:00 GMT+09:00 Fernando Nellmeldin : > Hello, sorry for coming back to this topic, but I have found some cases > where this doesn't work. > > I attached a screenshot. > On top is the 3d mesh cut by a plane parallel to the screen. We can see that > are some elements (hexahedrons) that got cut and they were split in sets of > tetrahedrons. > At the bottom, we see the result of calling vtkCutter -> > vtkCleanUnstructuredGrid -> vtkXMLUnstructuredGridWriter. The result are all > quads and all the generated nodes by the cut are gone, and we see no > triangles. > I would expect to have the same result that we see on the top, but with 2d > elements instead of 3d. > > Here's my code: > > void cutModel(vtkSmartPointer model, double normal[3]) > { > vtkSmartPointer plane = vtkSmartPointer::New(); > plane->SetOrigin(0.0, 0.0, 0.0); > plane->SetNormal(normal); > > vtkSmartPointer cutter = vtkSmartPointer::New(); > cutter->SetCutFunction(plane); > cutter->SetInputData(model); > cutter->GenerateTrianglesOff(); > cutter->Update(); > > vtkSmartPointer cleaner = > vtkSmartPointer::New(); > cleaner->SetInputConnection(cutter->GetOutputPort()); > cleaner->Update(); > vtkSmartPointer writer = > vtkSmartPointer::New(); > writer->SetFileName("planecut.vtu"); > writer->SetInputConnection(cleaner->GetOutputPort()); > writer->SetDataModeToAscii(); > writer->Write(); > } > > > > Thank you. > > > On 29 September 2017 at 13:23, Fernando Nellmeldin > wrote: >> >> Hello, that worked as a charm, thank you very much for your time!! >> >> On 29 September 2017 at 11:31, kenichiro yoshimi >> wrote: >>> >>> Hi Fernando, >>> >>> This will be accomplished by using vtkCleanUnstructuredGrid class >>> found in ParaView without triangulation. I have attached a simple >>> code. >>> >>> Thanks >>> >>> 2017-09-29 16:37 GMT+09:00 Fernando Nellmeldin >>> : >>> > Hello. That did the job! (although I get a triangle mesh while the >>> > initial >>> > surface was full of sliced hexahedron (quads). >>> > >>> > Thank you! >>> > >>> > On 29 September 2017 at 04:05, kenichiro yoshimi >>> > >>> > wrote: >>> >> >>> >> Hello, >>> >> >>> >> Using vtkDataSetTriangleFilter is a simple way which allows you to >>> >> convert polyData to unstructuredGrid. Something like this (VTK-8.0.0): >>> >> --- >>> >> // Create cutter >>> >> vtkSmartPointer cutter = >>> >> vtkSmartPointer::New(); >>> >> cutter->SetCutFunction(plane); >>> >> cutter->SetInputConnection(model->GetOutputPort()); >>> >> >>> >> // Convert polyData to unstructuredGrid >>> >> vtkSmartPointer triFilter = >>> >> vtkSmartPointer::New(); >>> >> triFilter->SetInputConnection(cutter->GetOutputPort()); >>> >> triFilter->Update(); >>> >> >>> >> vtkSmartPointer writer = >>> >> vtkSmartPointer::New(); >>> >> writer->SetFileName("unstructuredGrid.vtu"); >>> >> writer->SetInputConnection(triFilter->GetOutputPort()); >>> >> writer->Write(); >>> >> --- >>> >> >>> >> Regards >>> >> >>> >> 2017-09-28 23:43 GMT+09:00 Fernando Nellmeldin >>> >> : >>> >> > Hello. >>> >> > I have a method to cut a volume in a vtkUnstructuredGrid given a >>> >> > vtkPlane. >>> >> > I'm using vtkTableBasedClipDataSet to extract half of the model, >>> >> > also as >>> >> > vtkUnstructuredGrid. This is working. >>> >> > >>> >> > Now, I would like to obtain ONLY the surface of the cut, than means: >>> >> > I >>> >> > want >>> >> > a vtkUnstructuredGrid with the nodes and faces being on the surface >>> >> > of >>> >> > the >>> >> > cut. >>> >> > How can this be achieved? >>> >> > >>> >> > I tried using vtkCutter with vtkStripper but the mesh I get doesn't >>> >> > have >>> >> > any >>> >> > cells, only the points and their associated data. >>> >> > >>> >> > Here's how my code looks like. >>> >> > >>> >> > Thank You! >>> >> > >>> >> > vtkSmartPointer model = >>> >> > vtkSmartPointer::New(); >>> >> > // fill the ugrid ... >>> >> > >>> >> > // Create The Plane to cut >>> >> > vtkSmartPointer plane = vtkSmartPointer::New(); >>> >> > plane->SetOrigin(0.0, 0.0, 0.0); >>> >> > plane->SetNormal(1.0, 0, 0); >>> >> > >>> >> > // Code to cut the model in half >>> >> > vtkSmartPointer clipDataSet = >>> >> > vtkSmartPointer::New(); >>> >> > clipDataSet->SetClipFunction(plane); >>> >> > clipDataSet->InsideOutOn(); >>> >> > clipDataSet->GenerateClippedOutputOn(); >>> >> > clipDataSet->SetInputConnection(model->GetProducerPort()); >>> >> > clipDataSet->Update(); >>> >> > >>> >> > // This has half the model, this is Ok but not what I want >>> >> > vtkSmartPointer halfModel = >>> >> > clipDataSet->GetOutput(); >>> >> > >>> >> > ////****//// >>> >> > // BEGINS code not working to extract the surface of the cut >>> >> > vtkSmartPointer cutter = >>> >> > vtkSmartPointer::New(); >>> >> > cutter->SetCutFunction(plane); >>> >> > cutter->SetInputConnection(model->GetProducerPort()); >>> >> > cutter->Update(); >>> >> > >>> >> > vtkSmartPointer stripper = >>> >> > vtkSmartPointer::New(); >>> >> > stripper->SetInputConnection(cutter->GetOutputPort()); >>> >> > stripper->Update(); >>> >> > >>> >> > vtkSmartPointer pd = >>> >> > vtkSmartPointer::New(); >>> >> > pd->SetPoints(stripper->GetOutput()->GetPoints()); >>> >> > pd->SetPolys(stripper->GetOutput()->GetLines()); >>> >> > >>> >> > vtkSmartPointer clipped = >>> >> > vtkSmartPointer::New(); >>> >> > clipped->ShallowCopy(pd); >>> >> > >>> >> > // Here I see that there is no Cells >>> >> > clipped->Print(std::cout); >>> >> > >>> >> > // ENDS code to extract the surface of the cut >>> >> > ////****//// >>> >> > >>> >> > // Write the unstructured grid >>> >> > vtkSmartPointer writer = >>> >> > vtkSmartPointer::New(); >>> >> > writer->SetFileName("d:/unstructuredGrid.vtu"); >>> >> > writer->SetInput(clipped); >>> >> > writer->SetDataModeToAscii(); >>> >> > writer->Write(); >>> >> > // file doesnt have any cell, only points and pointdata >>> >> > >>> >> > _______________________________________________ >>> >> > Powered by www.kitware.com >>> >> > >>> >> > Visit other Kitware open-source projects at >>> >> > http://www.kitware.com/opensource/opensource.html >>> >> > >>> >> > Please keep messages on-topic and check the VTK FAQ at: >>> >> > http://www.vtk.org/Wiki/VTK_FAQ >>> >> > >>> >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >> > >>> >> > Follow this link to subscribe/unsubscribe: >>> >> > http://public.kitware.com/mailman/listinfo/vtkusers >>> >> > >>> > >>> > >>> > >>> > >>> > -- >>> > Fernando NELLMELDIN >>> > Software Engineer >>> > _______________________________________________________________ >>> > >>> > Open Engineering s.a. >>> > >>> > Rue Bois Saint-Jean 15/1 >>> > B-4102 Seraing (Belgium) >>> > Tel: +32.4.353.30.34 >>> > >>> > http://www.open-engineering.com >>> > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym >>> > >>> > _________________________________________________________________________ >> >> >> >> >> -- >> Fernando NELLMELDIN >> Software Engineer >> _______________________________________________________________ >> >> Open Engineering s.a. >> >> Rue Bois Saint-Jean 15/1 >> B-4102 Seraing (Belgium) >> Tel: +32.4.353.30.34 >> >> http://www.open-engineering.com >> https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym >> _________________________________________________________________________ > > > > > -- > Fernando NELLMELDIN > Software Engineer > _______________________________________________________________ > > Open Engineering s.a. > > Rue Bois Saint-Jean 15/1 > B-4102 Seraing (Belgium) > Tel: +32.4.353.30.34 > > http://www.open-engineering.com > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym > _________________________________________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Cutter2.tar.gz Type: application/x-gzip Size: 1056 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Cutter.tar.gz Type: application/x-gzip Size: 3007 bytes Desc: not available URL: From bartolomei-luca at virgilio.it Thu Oct 19 03:22:05 2017 From: bartolomei-luca at virgilio.it (bartolomei-luca at virgilio.it) Date: Thu, 19 Oct 2017 09:22:05 +0200 (CEST) Subject: [vtkusers] R: Re: QVTKWidget in QT GUI freezes other QWidgets Message-ID: <1985803214.14106731508397725718.JavaMail.httpd@fep-webmail-07.iol.local> Hi Alessandro, at first I thought that something similar to what you describe was happening. I looked into this and double checked my code, but I think that the issue is due to OpenGL. Thanks for the hint anyway! Best, Luca ----Messaggio originale---- Da: "Alessandro Volz" Data: 18-ott-2017 14.55 A: "bartolomei-luca at virgilio.it" Cc: "Shawn Waldon", "Sankhesh Jhaveri", "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets Luca, I haven't looked into your problem/thread in detail, but I have one suggestion that might come useful: are you maybe at some point doing things in a secondary thread, and somehow passing data to your widget from this thread?It has happened to me in the past, and the GUI would temporarily switch to drawing in black or not updating any more.If you are using background threads, look into this.Best,AlessandroOn Oct 17, 2017, at 5:23 PM, bartolomei-luca at virgilio.it wrote:Thanks to everyone for the inputs.I will try to include the QVTKOpenGLWidget in my project. I will let you know if I succeed in doing that and if this solve the issue. at Shawn -> About the Cmake: I can successfully build VTK 8.0 and use it in QT if I use a newer version of cmake (currently, the default cmake version for my system is 3.2.2). The problem is that I cannot build my project with VTK 8.0 using ROS. So the problem is not Cmake itself, but the version ROS uses for building (too "old" for VTK 8.0). I will try also to fix this.For the moment, thanks to all. I will let you know in case of success/failure.Best,Luca ----Messaggio originale---- Da: "Shawn Waldon" Data: 17-ott-2017 16.18 A: "Sankhesh Jhaveri" Cc: "bartolomei-luca at virgilio.it", "Elvis Stansvik", "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets When one of the projects I work on first started using Qt5 with VTK we had similar problems. Embedding a QVTKWidget in a Qt5 Tab or Scroll widget or using it alongside other OpenGL-based widgets in Qt5 can cause these kinds of issues and this was the motivation for creating the QVTKOpenGLWidget. The QVTKOpenGLWidget correctly lets Qt manage the OpenGL context rather than hacking it in with window system calls. You could try grabbing the QVTKOpenGLWidget code from VTK 8.0.0 and copying it into your project as a temporary solution (I'm not sure if it relies on any features added between 7.1 and 8.0).You said upgrading CMake was blocking you from using more recent VTK? The CMake developers try really hard to be backwards compatible. Have you reported the issues you are having to them? I know they try their best to handle compatibility issues that are reported.HTH,ShawnOn Tue, Oct 17, 2017 at 10:03 AM, Sankhesh Jhaveri wrote:How are you initializing the QVTKWidget?One other thing to test would be to try removing the QTabWidget and showing both the QVTKWidget and QWidget in the same central widget side-by-side. Finally, you could see if the setup works fine with Qt4.I am not sure how you would put a GLUT window inside a QWidget. But if you have can do that, you could try the vtkExternalOpenGLRenderWindow. See TestGLUTRenderWindow.cxx for an example. ?On Tue, Oct 17, 2017 at 9:24 AM bartolomei-luca at virgilio.it wrote:Hello Sankhesh,thanks a lot for the reply.Let's say the GUI "pipeline" is as I explained to Elvis. Then:At the moment the two widgets are under the central widget (a QWidget). They are in two different tabs of a QTabWidget. I tried to move the QVTKWidget out of its tab but no luck. I have also noted another thing. If I show at the same time the QWidget and the QVTKWidget, the QVTKWidget works fine, but the QWidget freeze. That's why I thought that it could be an OpenGL context issue.What do you mean by "replacing ROS widget with a simple button"? In any case, I can make QVTKWidget work, but no success with the QWidget. It just freeze on the last view.Unfortunately, QVTKOpenGLWidget is available only for VTK 8.0 and higher. I am using VTK 7.1 and I cannot upgrade to 8.0 because of the cmake that is installed on my laptop. I cannot upgrade the cmake version due to some compatibility issues with ROS. I will get in a lot of trouble if I try to do that. Is there a way to use glut or vtkOpenGLRenderer (available in vtk 7.1)?Thanks a lot again for the help.Best,Luca ----Messaggio originale---- Da: "Sankhesh Jhaveri" Data: 17-ott-2017 14.21 A: "Elvis Stansvik", "bartolomei-luca at virgilio.it" Cc: "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets Hi Luca, Do the QWidget and QVTKWidget overlap at all or are they separated by some QFrame border, etc. ? If they are not overlapping, it means they are not sharing the OpenGL context. Have you tried replacing the ROS widget with a simple button to see if the QVTKWidget works properly? Lastly, the QVTKWidget is known to have rendering issues with Qt5. Try using the QVTKOpenGLWidget to see if anything changes. Best,Sankhesh ?On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik wrote:2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it : > Hello Elvis, > > thanks for your reply. > I don't have the gui avaiable right now; I will send a picture as soon as I > can. > > To answer your question: yes, if I remove the QVTKWidget and replace it with > QWidget everything works. The problems occur only when the QVTKWidget is > present. > > The GUI is built to work in this way: > 1) start showing stuff on the QWidget; > 2) After a while, the QVTKWidget shows some other stuff. > > The QWidget is showing some interactive scene and it uses a library > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem > happen because the QVTKWidget interfere with the already existing OpenGL > context? I don't know, but it sounds like it's possible. I think there are other people on this list who knows much more about OpenGL and how VTK uses it than I do, so I'll let those answer that. Elvis > I don't know if this is the cause, because it is sufficient to have the > QVTKWidget on the Gui to make the QWidget freeze. > > Anyway, I have looked at this example: > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT > but no luck so far. Maybe is a problem of drivers (I have an Nvidia GeForce > GTX 950M on Ubuntu 14.04 LTS). > > Best, > Luca > > > ----Messaggio originale---- > Da: "Elvis Stansvik" > Data: 17-ott-2017 8.36 > A: > Cc: "VTK Users" > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" > : > > Hello everyone! > > I have a problem with the QT GUI I am creating. Basically, I have an > interactive QWidget, a QVTKWidget and a "Quit" button. > > When I launch my app, I can interact with the QWidget without any problem (I > have a 3D interactive scene, where I can zoom and rotate). > However, as soon as the QVTKWidget becomes "active" (i.e. some function in > my code start using it or if I click on it), both the QWidget and the > QVTKWidget freeze. The app keeps on working, since the "Quit" button works > as it should. > > If I have a GUI with either the QWidget or the QVTKWidget (only one of them) > everything works fine. The problem is if I try to include both of them at > the same time. > > Do you have any idea why this happens? > > > I don't have any immediate ideas. It would really help to see a small > example where the problem occurs. > > Does it work if you put two of your QWidgets in the application. I mean, if > you remove the QVTKWidget and put another one of your QWidget where it was? > > Elvis > > > Thanks a lot for you help. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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.comVisit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.htmlPlease keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQSearch the list archives at: http://markmail.org/search/?q=vtkusersFollow this link to subscribe/unsubscribe:http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.nellmeldin at open-engineering.com Thu Oct 19 04:20:00 2017 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Thu, 19 Oct 2017 10:20:00 +0200 Subject: [vtkusers] Export mesh of cutting plane In-Reply-To: References: Message-ID: Hello. Thank you for your answer. The method 1 worked ! I don't like method 2 because it depends a lot on the input data, which can change... (that angle thing is a little too much for our case). We'll use method 1 for the moment! My problem was that the input of vtkCutter wasn't the output of vtkTableBasedClipDataSet but the original model itself, then the mesh in the cut got calculated twice and using different methods. Thanks a lot! On 19 October 2017 at 08:04, kenichiro yoshimi wrote: > Hello, > > Firstly the cutting algorithms are different between > vtkTableBasedClipDataSet and vtkCutter, thus in general the generated > cross sections are quite different. > > I have no idea how to extract a section surface directly from output > of vtkTableBasedClipDataSet, however here are two insufficient ways: > 1) vtkTableBasedClipDataSet -> vtkCutter (Cutter.tar.gz) > 2) vtkTableBasedClipDataSet -> vtkGeometryFilter -> vtkPolyDataNormals > -> vtkConnectivityFilter (Cutter2.tar.gz) > > --- > 1) This method conducts double cutting using the same plane in turn. > But in order to avoid the broken polygons as output of vtkCutter, the > position of a cutting plain need to be slightly shifted from the used > in vtkTableBasedClipDataSet. This means good accuracy of results are > not be retained. > 2) This method divides the surface by feature edges (vtkPolyDataNormals) > and then selects the desired surface among them based on polygonal > connectivity (vtkConnectivityFilter). Here, the origin of a cutting > plane need to be known and be only on the cross section of objects so > as to extract the cross section according to the criteria "extract the > region closest to the origin". In addition, in vtkPolyDataNormals the > feature angle to determine feature edges need to be adjusted in > accordance with each dataset. > > I'm sorry for my poor English. > > 2017-10-18 23:00 GMT+09:00 Fernando Nellmeldin > : > > Hello, sorry for coming back to this topic, but I have found some cases > > where this doesn't work. > > > > I attached a screenshot. > > On top is the 3d mesh cut by a plane parallel to the screen. We can see > that > > are some elements (hexahedrons) that got cut and they were split in sets > of > > tetrahedrons. > > At the bottom, we see the result of calling vtkCutter -> > > vtkCleanUnstructuredGrid -> vtkXMLUnstructuredGridWriter. The result are > all > > quads and all the generated nodes by the cut are gone, and we see no > > triangles. > > I would expect to have the same result that we see on the top, but with > 2d > > elements instead of 3d. > > > > Here's my code: > > > > void cutModel(vtkSmartPointer model, double > normal[3]) > > { > > vtkSmartPointer plane = vtkSmartPointer::New(); > > plane->SetOrigin(0.0, 0.0, 0.0); > > plane->SetNormal(normal); > > > > vtkSmartPointer cutter = vtkSmartPointer::New(); > > cutter->SetCutFunction(plane); > > cutter->SetInputData(model); > > cutter->GenerateTrianglesOff(); > > cutter->Update(); > > > > vtkSmartPointer cleaner = > > vtkSmartPointer::New(); > > cleaner->SetInputConnection(cutter->GetOutputPort()); > > cleaner->Update(); > > vtkSmartPointer writer = > > vtkSmartPointer::New(); > > writer->SetFileName("planecut.vtu"); > > writer->SetInputConnection(cleaner->GetOutputPort()); > > writer->SetDataModeToAscii(); > > writer->Write(); > > } > > > > > > > > Thank you. > > > > > > On 29 September 2017 at 13:23, Fernando Nellmeldin > > wrote: > >> > >> Hello, that worked as a charm, thank you very much for your time!! > >> > >> On 29 September 2017 at 11:31, kenichiro yoshimi < > rccm.kyoshimi at gmail.com> > >> wrote: > >>> > >>> Hi Fernando, > >>> > >>> This will be accomplished by using vtkCleanUnstructuredGrid class > >>> found in ParaView without triangulation. I have attached a simple > >>> code. > >>> > >>> Thanks > >>> > >>> 2017-09-29 16:37 GMT+09:00 Fernando Nellmeldin > >>> : > >>> > Hello. That did the job! (although I get a triangle mesh while the > >>> > initial > >>> > surface was full of sliced hexahedron (quads). > >>> > > >>> > Thank you! > >>> > > >>> > On 29 September 2017 at 04:05, kenichiro yoshimi > >>> > > >>> > wrote: > >>> >> > >>> >> Hello, > >>> >> > >>> >> Using vtkDataSetTriangleFilter is a simple way which allows you to > >>> >> convert polyData to unstructuredGrid. Something like this > (VTK-8.0.0): > >>> >> --- > >>> >> // Create cutter > >>> >> vtkSmartPointer cutter = > >>> >> vtkSmartPointer::New(); > >>> >> cutter->SetCutFunction(plane); > >>> >> cutter->SetInputConnection(model->GetOutputPort()); > >>> >> > >>> >> // Convert polyData to unstructuredGrid > >>> >> vtkSmartPointer triFilter = > >>> >> vtkSmartPointer::New(); > >>> >> triFilter->SetInputConnection(cutter->GetOutputPort()); > >>> >> triFilter->Update(); > >>> >> > >>> >> vtkSmartPointer writer = > >>> >> vtkSmartPointer::New(); > >>> >> writer->SetFileName("unstructuredGrid.vtu"); > >>> >> writer->SetInputConnection(triFilter->GetOutputPort()); > >>> >> writer->Write(); > >>> >> --- > >>> >> > >>> >> Regards > >>> >> > >>> >> 2017-09-28 23:43 GMT+09:00 Fernando Nellmeldin > >>> >> : > >>> >> > Hello. > >>> >> > I have a method to cut a volume in a vtkUnstructuredGrid given a > >>> >> > vtkPlane. > >>> >> > I'm using vtkTableBasedClipDataSet to extract half of the model, > >>> >> > also as > >>> >> > vtkUnstructuredGrid. This is working. > >>> >> > > >>> >> > Now, I would like to obtain ONLY the surface of the cut, than > means: > >>> >> > I > >>> >> > want > >>> >> > a vtkUnstructuredGrid with the nodes and faces being on the > surface > >>> >> > of > >>> >> > the > >>> >> > cut. > >>> >> > How can this be achieved? > >>> >> > > >>> >> > I tried using vtkCutter with vtkStripper but the mesh I get > doesn't > >>> >> > have > >>> >> > any > >>> >> > cells, only the points and their associated data. > >>> >> > > >>> >> > Here's how my code looks like. > >>> >> > > >>> >> > Thank You! > >>> >> > > >>> >> > vtkSmartPointer model = > >>> >> > vtkSmartPointer::New(); > >>> >> > // fill the ugrid ... > >>> >> > > >>> >> > // Create The Plane to cut > >>> >> > vtkSmartPointer plane = vtkSmartPointer:: > New(); > >>> >> > plane->SetOrigin(0.0, 0.0, 0.0); > >>> >> > plane->SetNormal(1.0, 0, 0); > >>> >> > > >>> >> > // Code to cut the model in half > >>> >> > vtkSmartPointer clipDataSet = > >>> >> > vtkSmartPointer::New(); > >>> >> > clipDataSet->SetClipFunction(plane); > >>> >> > clipDataSet->InsideOutOn(); > >>> >> > clipDataSet->GenerateClippedOutputOn(); > >>> >> > clipDataSet->SetInputConnection(model->GetProducerPort()); > >>> >> > clipDataSet->Update(); > >>> >> > > >>> >> > // This has half the model, this is Ok but not what I want > >>> >> > vtkSmartPointer halfModel = > >>> >> > clipDataSet->GetOutput(); > >>> >> > > >>> >> > ////****//// > >>> >> > // BEGINS code not working to extract the surface of the cut > >>> >> > vtkSmartPointer cutter = > >>> >> > vtkSmartPointer::New(); > >>> >> > cutter->SetCutFunction(plane); > >>> >> > cutter->SetInputConnection(model->GetProducerPort()); > >>> >> > cutter->Update(); > >>> >> > > >>> >> > vtkSmartPointer stripper = > >>> >> > vtkSmartPointer::New(); > >>> >> > stripper->SetInputConnection(cutter->GetOutputPort()); > >>> >> > stripper->Update(); > >>> >> > > >>> >> > vtkSmartPointer pd = > >>> >> > vtkSmartPointer::New(); > >>> >> > pd->SetPoints(stripper->GetOutput()->GetPoints()); > >>> >> > pd->SetPolys(stripper->GetOutput()->GetLines()); > >>> >> > > >>> >> > vtkSmartPointer clipped = > >>> >> > vtkSmartPointer::New(); > >>> >> > clipped->ShallowCopy(pd); > >>> >> > > >>> >> > // Here I see that there is no Cells > >>> >> > clipped->Print(std::cout); > >>> >> > > >>> >> > // ENDS code to extract the surface of the cut > >>> >> > ////****//// > >>> >> > > >>> >> > // Write the unstructured grid > >>> >> > vtkSmartPointer writer = > >>> >> > vtkSmartPointer::New(); > >>> >> > writer->SetFileName("d:/unstructuredGrid.vtu"); > >>> >> > writer->SetInput(clipped); > >>> >> > writer->SetDataModeToAscii(); > >>> >> > writer->Write(); > >>> >> > // file doesnt have any cell, only points and pointdata > >>> >> > > >>> >> > _______________________________________________ > >>> >> > Powered by www.kitware.com > >>> >> > > >>> >> > Visit other Kitware open-source projects at > >>> >> > http://www.kitware.com/opensource/opensource.html > >>> >> > > >>> >> > Please keep messages on-topic and check the VTK FAQ at: > >>> >> > http://www.vtk.org/Wiki/VTK_FAQ > >>> >> > > >>> >> > Search the list archives at: http://markmail.org/search/?q= > vtkusers > >>> >> > > >>> >> > Follow this link to subscribe/unsubscribe: > >>> >> > http://public.kitware.com/mailman/listinfo/vtkusers > >>> >> > > >>> > > >>> > > >>> > > >>> > > >>> > -- > >>> > Fernando NELLMELDIN > >>> > Software Engineer > >>> > _______________________________________________________________ > >>> > > >>> > Open Engineering s.a. > >>> > > >>> > Rue Bois Saint-Jean 15/1 > >>> > B-4102 Seraing (Belgium) > >>> > Tel: +32.4.353.30.34 > >>> > > >>> > http://www.open-engineering.com > >>> > https://www.linkedin.com/company/open-engineering?trk= > biz-companies-cym > >>> > > >>> > ____________________________________________________________ > _____________ > >> > >> > >> > >> > >> -- > >> Fernando NELLMELDIN > >> Software Engineer > >> _______________________________________________________________ > >> > >> Open Engineering s.a. > >> > >> Rue Bois Saint-Jean 15/1 > >> B-4102 Seraing (Belgium) > >> Tel: +32.4.353.30.34 > >> > >> http://www.open-engineering.com > >> https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym > >> ____________________________________________________________ > _____________ > > > > > > > > > > -- > > Fernando NELLMELDIN > > Software Engineer > > _______________________________________________________________ > > > > Open Engineering s.a. > > > > Rue Bois Saint-Jean 15/1 > > B-4102 Seraing (Belgium) > > Tel: +32.4.353.30.34 > > > > http://www.open-engineering.com > > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym > > ____________________________________________________________ > _____________ > -- *Fernando NELLMELDIN* Software Engineer *_______________________________________________________________* *Open Engineering s.a.* Rue Bois Saint-Jean 15/1 B-4102 Seraing (Belgium) Tel: +32.4.353.30.34 http://www.open-engineering.com https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym *_________________________________________________________________________* -------------- next part -------------- An HTML attachment was scrubbed... URL: From arw.tyx-ouy_mz at ezweb.ne.jp Thu Oct 19 09:38:46 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Thu, 19 Oct 2017 06:38:46 -0700 (MST) Subject: [vtkusers] get vtkImageData point Message-ID: <1508420326459-0.post@n5.nabble.com> Hi, I get the pixel value from x-y-z real-world coordinate. For getting pixel value, by vtkImageData Class Reference, GetScalarPoint is useful but its arguments are only int, i-j-k points of image. So I want to convert real-world x-y-z coordinate to image i-j-k points and get pixel value. If there is directory converting method, please tell me. Or I could convert x-y-z coordinate to vtkIdType by using FindPoint method. So, please tell me the method converting vtkIdType to image i-j-k points. Please help! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jimi_vtk at foxmail.com Thu Oct 19 09:35:52 2017 From: jimi_vtk at foxmail.com (=?ISO-8859-1?B?cHA=?=) Date: Thu, 19 Oct 2017 21:35:52 +0800 Subject: [vtkusers] how to get 3D rending together dicom image with drawing contous Message-ID: Hi, I have get 3D display using vtkFixedPointVolumeRayCastMapper for CT dicom images. I also have several drawing contours from CT dicom images. I use vtkVoxelContoursToSurfaceFilter to get 3D display about drawing contours. I want to get 3D display together dicom image with drawing contours in the same vtkRenderer. But the 3D display of drawing contours is not in the correct position in 3D display of ct dicom images. x, y position is ok. z position is not correct. So what shall I do? Is there some examples to do this ? Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Oct 19 09:47:25 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 19 Oct 2017 07:47:25 -0600 Subject: [vtkusers] get vtkImageData point In-Reply-To: <1508420326459-0.post@n5.nabble.com> References: <1508420326459-0.post@n5.nabble.com> Message-ID: You can use vtkImplicitVolume, it has these methods: void SetVolume(vtkImageData *data) - set the data to use double FunctionValue(double xyz[3]) - get the data value at (x,y,z) Or you can use vtkImageInterpolator, which is described here: https://www.vtk.org/Wiki/VTK/Image_Interpolators - David On Thu, Oct 19, 2017 at 7:38 AM, arwtyxouymz wrote: > Hi, > > I get the pixel value from x-y-z real-world coordinate. > For getting pixel value, by vtkImageData Class Reference, GetScalarPoint is > useful but its arguments are only int, i-j-k points of image. > > So I want to convert real-world x-y-z coordinate to image i-j-k points and > get pixel value. > If there is directory converting method, please tell me. > > Or > I could convert x-y-z coordinate to vtkIdType by using FindPoint method. > So, please tell me the method converting vtkIdType to image i-j-k points. > > Please help! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.krivosheev at xcision.com Thu Oct 19 10:25:45 2017 From: oleg.krivosheev at xcision.com (Oleg Krivosheev) Date: Thu, 19 Oct 2017 10:25:45 -0400 Subject: [vtkusers] How to read ImageType (0008,0008) in VTK DICOM Reader? Message-ID: Hi, All I have an application on hands sitting on top of VTK 5.3. Using vtkDICOMImageReader I'm getting image position, width, height, ..., so far so good. But is there a good way to read ImageType string with tag (0008,0008)? More general, could I read any tag back using vtkDICOMImageReader? Pass tag value, get back what's in the DICOM file? thank you OK -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Oct 19 11:12:14 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 19 Oct 2017 08:12:14 -0700 Subject: [vtkusers] get vtkImageData point In-Reply-To: <1508420326459-0.post@n5.nabble.com> References: <1508420326459-0.post@n5.nabble.com> Message-ID: Use vtkImageData:: ComputeStructuredCoordinates https://www.vtk.org/doc/nightly/html/classvtkImageData.html On Thu, Oct 19, 2017 at 6:38 AM, arwtyxouymz wrote: > Hi, > > I get the pixel value from x-y-z real-world coordinate. > For getting pixel value, by vtkImageData Class Reference, GetScalarPoint is > useful but its arguments are only int, i-j-k points of image. > > So I want to convert real-world x-y-z coordinate to image i-j-k points and > get pixel value. > If there is directory converting method, please tell me. > > Or > I could convert x-y-z coordinate to vtkIdType by using FindPoint method. > So, please tell me the method converting vtkIdType to image i-j-k points. > > Please help! > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 briend at cyceron.fr Thu Oct 19 11:42:08 2017 From: briend at cyceron.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCUklFTkQ=?=) Date: Thu, 19 Oct 2017 17:42:08 +0200 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: References: <1294093b-b1d2-12f7-c38a-56b55db8e021@cyceron.fr> Message-ID: Last question Yoshimi (or others), With your script*, is-there a way to extract the point (in x,y,z or vertex value) where dist/2 (the half of the total geodesic distance)? Thanks for your kindness, Frederic * import vtk import math cylinder= vtk.vtkSphereSource() cylinder.SetCenter(0.0, 0.0, 0.0) cylinder.SetRadius(0.5) appendFilter = vtk.vtkAppendFilter() appendFilter.MergePointsOn() vIds = [4, 12, 23, 28] p0 = [0,0,0] p1 = [0,0,0] dist = 0.0 for n in range(len(vIds)-1): v0 = vIds[n] v1 = vIds[n+1] dijkstra = vtk.vtkDijkstraGraphGeodesicPath() dijkstra.SetInputConnection(cylinder.GetOutputPort()) dijkstra.SetStartVertex(v0) dijkstra.SetEndVertex(v1) dijkstra.Update() pts = dijkstra.GetOutput().GetPoints() for ptId in range(pts.GetNumberOfPoints()-1): pts.GetPoint(ptId, p0) pts.GetPoint(ptId+1, p1) print(math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1))) dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) appendFilter.AddInputConnection(dijkstra.GetOutput()) print(dist) appendFilter.Update() From natorenvliet at gmail.com Thu Oct 19 19:29:43 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Thu, 19 Oct 2017 19:29:43 -0400 Subject: [vtkusers] Generating Cells For Unstructured Grids Message-ID: Hi all, I am working through some examples and trying to add my own data. I'm running VTK-8 on ubuntu 16.04. The original examples code adds 8 cells, the example runs fine, my hack of the example attempts to add 49000ish cells comes out with an error. The following code: gap_data_block = get_gap_data_block() voxelPoints = vtk.vtkPoints() voxelPoints.SetNumberOfPoints(len(gap_data_block)) voxelPoints.SetData(VN.numpy_to_vtk(gap_data_block, deep=True)) print("len(gap_data_block)) print(gap_data_block.shape) aVoxel = vtk.vtkVoxel() for i in range(len(gap_data_block[:, 0])): print(len(gap_data_block), i) aVoxel.GetPointIds().SetId(i, i) Gives the following output and nasty error - what is going on here?? Output: Length Gap Data Block: 49432 Shape Gap Data Block: (49432, 3) 0 1 2 . . . 1601 1602 *** Error in `/usr/local/bin/vtkpython': corrupted size vs. prev_size: 0x0000000002c884f0 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f491973f7e5] /lib/x86_64-linux-gnu/libc.so.6(+0x82aec)[0x7f491974aaec] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f491974c184] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyDict_New+0xb)[0x7f49190f6a7b] /usr/local/lib/libvtkWrappingPython35Core-8.0.so.1(PyVTKObject_FromPointer+0x462)[0x7f48f6425b3c] /usr/local/lib/libvtkWrappingPython35Core-8.0.so.1(_ZN13vtkPythonUtil20GetObjectFromPointerEP13vtkObjectBase+0x4b5)[0x7f48f64140e9] /usr/local/lib/libvtkCommonCorePython35D-8.0.so.1(_ZN13vtkPythonArgs14BuildVTKObjectEPKv+0x18)[0x7f48f677b90c] /usr/local/lib/libvtkCommonDataModelPython35D-8.0.so.1(+0x13d6ed)[0x7f48f39296ed] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyCFunction_Call+0xc9)[0x7f49190ef039] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalFrameEx+0x7555)[0x7f49191fb1b5] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalFrameEx+0x79d9)[0x7f49191fb639] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(+0x24ac6c)[0x7f491928bc6c] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalCodeEx+0x23)[0x7f491928bd43] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalCode+0x1b)[0x7f49191f39cb] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyRun_StringFlags+0x8f)[0x7f4919210e6f] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyRun_SimpleStringFlags+0x3b)[0x7f4919211eab] /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(Py_Main+0x7c7)[0x7f4919278d57] /usr/local/bin/vtkpython(main+0x527)[0x40200c] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f49196e8830] /usr/local/bin/vtkpython(_start+0x29)[0x401989] ======= Memory map: ======== 00400000-00404000 r-xp 00000000 08:35 32780695 /usr/local/bin/vtkpython 00603000-00604000 r--p 00003000 08:35 32780695 /usr/local/bin/vtkpython 00604000-00605000 rw-p 00004000 08:35 32780695 /usr/local/bin/vtkpython 01d85000-06252000 rw-p 00000000 00:00 0 [heap] 7f4896b0a000-7f4898205000 rw-p 00000000 00:00 0 7f489f640000-7f489f680000 rw-p 00000000 00:00 0 7f489fb00000-7f489fb40000 rw-p 00000000 00:00 0 7f48a4000000-7f48a4229000 rw-p 00000000 00:00 0 7f48a4229000-7f48a8000000 ---p 00000000 00:00 0 7f48a8000000-7f48a9ce4000 rw-p 00000000 00:00 0 7f48a9ce4000-7f48ac000000 ---p 00000000 00:00 0 7f48ac000000-7f48adca1000 rw-p 00000000 00:00 0 7f48adca1000-7f48b0000000 ---p 00000000 00:00 0 7f48b2365000-7f48b23a5000 rw-p 00000000 00:00 0 7f48b23a5000-7f48b23a8000 r-xp 00000000 08:35 32510071 /usr/lib/python3.5/lib-dynload/_ multiprocessing.cpython-35m-x86_64-linux-gnu.so 7f48b23a8000-7f48b25a7000 ---p 00003000 08:35 32510071 /usr/lib/python3.5/lib-dynload/_ multiprocessing.cpython-35m-x86_64-linux-gnu.so 7f48b25a7000-7f48b25a8000 r--p 00002000 08:35 32510071 /usr/lib/python3.5/lib-dynload/_ multiprocessing.cpython-35m-x86_64-linux-gnu.so 7f48b25a8000-7f48b25a9000 rw-p 00003000 08:35 32510071 /usr/lib/python3.5/lib-dynload/_ multiprocessing.cpython-35m-x86_64-linux-gnu.so 7f48b25a9000-7f48b2629000 rw-p 00000000 00:00 0 7f48b5efd000-7f48b5f3d000 rw-p 00000000 00:00 0 7f48b61bd000-7f48b61fd000 rw-p 00000000 00:00 0 7f48b62bd000-7f48b661f000 rw-p 00000000 00:00 0 7f48b661f000-7f48b6649000 r-xp 00000000 08:35 32514684 /usr/lib/python3/dist-packages/matplotlib/_ path.cpython-35m-x86_64-linux-gnu.so 7f48b6649000-7f48b6849000 ---p 0002a000 08:35 32514684 /usr/lib/python3/dist-packages/matplotlib/_ path.cpython-35m-x86_64-linux-gnu.so 7f48b6849000-7f48b684a000 r--p 0002a000 08:35 32514684 /usr/lib/python3/dist-packages/matplotlib/_ path.cpython-35m-x86_64-linux-gnu.so 7f48b684a000-7f48b684b000 rw-p 0002b000 08:35 32514684 /usr/lib/python3/dist-packages/matplotlib/_ path.cpython-35m-x86_64-linux-gnu.so 7f48b684b000-7f48b68cc000 rw-p 00000000 00:00 0 7f48b68cc000-7f48b68dd000 r-xp 00000000 08:35 32510070 /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so 7f48b68dd000-7f48b6adc000 ---p 00011000 08:35 32510070 /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so 7f48b6adc000-7f48b6add000 r--p 00010000 08:35 32510070 /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so 7f48b6add000-7f48b6ade000 rw-p 00011000 08:35 32510070 /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so 7f48b6ade000-7f48b6b3c000 r-xp 00000000 08:35 2101571 /lib/x86_64-linux-gnu/libssl.so.1.0.0 7f48b6b3c000-7f48b6d3c000 ---p 0005e000 08:35 2101571 /lib/x86_64-linux-gnu/libssl.so.1.0.0 7f48b6d3c000-7f48b6d40000 r--p 0005e000 08:35 2101571 /lib/x86_64-linux-gnu/libssl.so.1.0.0 7f48b6d40000-7f48b6d47000 rw-p 00062000 08:35 2101571 /lib/x86_64-linux-gnu/libssl.so.1.0.0 7f48b6d47000-7f48b6d5e000 r-xp 00000000 08:35 32507025 /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so 7f48b6d5e000-7f48b6f5e000 ---p 00017000 08:35 32507025 /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so 7f48b6f5e000-7f48b6f5f000 r--p 00017000 08:35 32507025 /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so 7f48b6f5f000-7f48b6f64000 rw-p 00018000 08:35 32507025 /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so 7f48b6f64000-7f48b71a4000 rw-p 00000000 00:00 0 7f48b71a4000-7f48b71a5000 r-xp 00000000 08:35 32507023 /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so 7f48b71a5000-7f48b73a4000 ---p 00001000 08:35 32507023 /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so 7f48b73a4000-7f48b73a5000 r--p 00000000 08:35 32507023 /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so 7f48b73a5000-7f48b73a6000 rw-p 00001000 08:35 32507023 /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so 7f48b73a6000-7f48b74e6000 rw-p 00000000 00:00 0 7f48b74e6000-7f48b74f5000 r-xp 00000000 08:35 38939108 /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so 7f48b74f5000-7f48b76f5000 ---p 0000f000 08:35 38939108 /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so 7f48b76f5000-7f48b76f6000 r--p 0000f000 08:35 38939108 /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so 7f48b76f6000-7f48b76f9000 rw-p 00010000 08:35 38939108 /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so 7f48b76f9000-7f48b770a000 r-xp 00000000 08:35 38939111 /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so 7f48b770a000-7f48b7909000 ---p 00011000 08:35 38939111 /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so 7f48b7909000-7f48b790a000 r--p 00010000 08:35 38939111 /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so 7f48b790a000-7f48b790d000 rw-p 00011000 08:35 38939111 /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so 7f48b790d000-7f48b794e000 rw-p 00000000 00:00 0 7f48b794e000-7f48b7952000 r-xp 00000000 08:35 38939144 /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so 7f48b7952000-7f48b7b51000 ---p 00004000 08:35 38939144 /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so 7f48b7b51000-7f48b7b52000 r--p 00003000 08:35 38939144 /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so 7f48b7b52000-7f48b7b53000 rw-p 00004000 08:35 38939144 /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so 7f48b7b53000-7f48b7b5e000 r-xp 00000000 08:35 38939143 /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so 7f48b7b5e000-7f48b7d5d000 ---p 0000b000 08:35 38939143 /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so 7f48b7d5d000-7f48b7d5e000 r--p 0000a000 08:35 38939143 /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so 7f48b7d5e000-7f48b7d60000 rw-p 0000b000 08:35 38939143 /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so 7f48b7d60000-7f48b7d76000 r-xp 00000000 08:35 38939145 /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so 7f48b7d76000-7f48b7f75000 ---p 00016000 08:35 38939145 /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so 7f48b7f75000-7f48b7f76000 r--p 00015000 08:35 38939145 /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so 7f48b7f76000-7f48b7f79000 rw-p 00016000 08:35 38939145 /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so 7f48b7f79000-7f48b7f8e000 r-xp 00000000 08:35 38939142 /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so 7f48b7f8e000-7f48b818d000 ---p 00015000 08:35 38939142 /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so 7f48b818d000-7f48b818e000 r--p 00014000 08:35 38939142 /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so 7f48b818e000-7f48b8191000 rw-p 00015000 08:35 38939142 /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so 7f48b8191000-7f48b8192000 rw-p 00000000 00:00 0 7f48b8192000-7f48b819f000 r-xp 00000000 08:35 38939101 /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so 7f48b819f000-7f48b839e000 ---p 0000d000 08:35 38939101 /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so 7f48b839e000-7f48b839f000 r--p 0000c000 08:35 38939101 /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so 7f48b839f000-7f48b83a1000 rw-p 0000d000 08:35 38939101 /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so 7f48b83a1000-7f48b83b5000 r-xp 00000000 08:35 38939149 /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so 7f48b83b5000-7f48b85b4000 ---p 00014000 08:35 38939149 /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so 7f48b85b4000-7f48b85b5000 r--p 00013000 08:35 38939149 /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so 7f48b85b5000-7f48b85b8000 rw-p 00014000 08:35 38939149 /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so 7f48b85b8000-7f48b85bf000 r-xp 00000000 08:35 38939102 /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_64-linux-gnu.so 7f48b85bf000-7f48b87bf000 ---p 00007000 08:35 38939102 /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_64-linux-gnu.so 7f48b87bf000-7f48b87c0000 r--p 00007000 08:35 38939102 /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_64-linux-gnu.so 7f48b87c0000-7f48b87c1000 rw-p 00008000 08:35 38939102 /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_64-linux-gnu.so 7f48b87c1000-7f48b87cb000 r-xp 00000000 08:35 38939164 /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so 7f48b87cb000-7f48b89ca000 ---p 0000a000 08:35 38939164 /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so 7f48b89ca000-7f48b89cb000 r--p 00009000 08:35 38939164 /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so 7f48b89cb000-7f48b89cc000 rw-p 0000a000 08:35 38939164 /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so 7f48b89cc000-7f48b89f4000 r-xp 00000000 08:35 38939163 /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so 7f48b89f4000-7f48b8bf3000 ---p 00028000 08:35 38939163 /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so 7f48b8bf3000-7f48b8bf4000 r--p 00027000 08:35 38939163 /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so 7f48b8bf4000-7f48b8bfc000 rw-p 00028000 08:35 38939163 /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so 7f48b8bfc000-7f48b8bfd000 rw-p 00000000 00:00 0 7f48b8bfd000-7f48b8c11000 r-xp 00000000 08:35 38939099 /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so 7f48b8c11000-7f48b8e10000 ---p 00014000 08:35 38939099 /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so 7f48b8e10000-7f48b8e11000 r--p 00013000 08:35 38939099 /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so 7f48b8e11000-7f48b8e15000 rw-p 00014000 08:35 38939099 /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so 7f48b8e15000-7f48b8e2b000 r-xp 00000000 08:35 38939165 /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so 7f48b8e2b000-7f48b902a000 ---p 00016000 08:35 38939165 /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so 7f48b902a000-7f48b902b000 r--p 00015000 08:35 38939165 /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so 7f48b902b000-7f48b902e000 rw-p 00016000 08:35 38939165 /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so 7f48b902e000-7f48b902f000 rw-p 00000000 00:00 0 7f48b902f000-7f48b9036000 r-xp 00000000 08:35 38939109 /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so 7f48b9036000-7f48b9235000 ---p 00007000 08:35 38939109 /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so 7f48b9235000-7f48b9236000 r--p 00006000 08:35 38939109 /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so 7f48b9236000-7f48b9238000 rw-p 00007000 08:35 38939109 /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so 7f48b9238000-7f48b9249000 r-xp 00000000 08:35 38939098 /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so 7f48b9249000-7f48b9448000 ---p 00011000 08:35 38939098 /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so 7f48b9448000-7f48b9449000 r--p 00010000 08:35 38939098 /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so 7f48b9449000-7f48b944b000 rw-p 00011000 08:35 38939098 /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so 7f48b944b000-7f48b944c000 rw-p 00000000 00:00 0 7f48b944c000-7f48b9455000 r-xp 00000000 08:35 38939150 /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so 7f48b9455000-7f48b9654000 ---p 00009000 08:35 38939150 /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so 7f48b9654000-7f48b9655000 r--p 00008000 08:35 38939150 /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so 7f48b9655000-7f48b9656000 rw-p 00009000 08:35 38939150 /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so 7f48b9656000-7f48b9696000 rw-p 00000000 00:00 0 7f48b9696000-7f48b96d9000 r-xp 00000000 08:35 38939100 /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so 7f48b96d9000-7f48b98d8000 ---p 00043000 08:35 38939100 /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so 7f48b98d8000-7f48b98d9000 r--p 00042000 08:35 38939100 /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so 7f48b98d9000-7f48b98e3000 rw-p 00043000 08:35 38939100 /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so 7f48b98e3000-7f48b9901000 r-xp 00000000 08:35 32248272 /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 7f48b9901000-7f48b9b00000 ---p 0001e000 08:35 32248272 /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 7f48b9b00000-7f48b9b01000 r--p 0001d000 08:35 32248272 /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 7f48b9b01000-7f48b9b02000 rw-p 0001e000 08:35 32248272 /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 7f48b9b02000-7f48b9b03000 rw-p 00000000 00:00 0 7f48b9b03000-7f48b9b2b000 r-xp 00000000 08:35 38939110 /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so 7f48b9b2b000-7f48b9d2a000 ---p 00028000 08:35 38939110 /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so 7f48b9d2a000-7f48b9d2b000 r--p 00027000 08:35 38939110 /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so 7f48b9d2b000-7f48b9d2d000 rw-p 00028000 08:35 38939110 /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so 7f48b9d2d000-7f48b9d43000 r-xp 00000000 08:35 38939146 /usr/lib/python3/dist-packages/h5py/_objects.cpython-35m-x86_64-linux-gnu.so 7f48b9d43000-7f48b9f42000 ---p 00016000 08:35 38939146 /usr/lib/python3/dist-packages/h5py/_objects.cpython-35m-x86_64-linux-gnu.so 7f48b9f42000-7f48b9f43000 r--p 00015000 08:35 38939146 /usr/lib/python3/dist-packages/h5py/_objects.cpython-35m-x86_64-linux-gnu.soAborted (core dumped) -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Thu Oct 19 19:51:36 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Thu, 19 Oct 2017 19:51:36 -0400 Subject: [vtkusers] Generating Cells For Unstructured Grids In-Reply-To: References: Message-ID: Please disregard this question... obvious. On Thu, Oct 19, 2017 at 7:29 PM, Nick Torenvliet wrote: > Hi all, > > I am working through some examples and trying to add my own data. > > I'm running VTK-8 on ubuntu 16.04. > > The original examples code adds 8 cells, the example runs fine, > my hack of the example attempts to add 49000ish cells comes out with an > error. > > The following code: > > gap_data_block = get_gap_data_block() > voxelPoints = vtk.vtkPoints() > voxelPoints.SetNumberOfPoints(len(gap_data_block)) > voxelPoints.SetData(VN.numpy_to_vtk(gap_data_block, deep=True)) > > print("len(gap_data_block)) > print(gap_data_block.shape) > > aVoxel = vtk.vtkVoxel() > > for i in range(len(gap_data_block[:, 0])): > print(len(gap_data_block), i) > aVoxel.GetPointIds().SetId(i, i) > > Gives the following output and nasty error - what is going on here?? > > Output: > Length Gap Data Block: 49432 > Shape Gap Data Block: (49432, 3) > 0 > 1 > 2 > . > . > . > 1601 > 1602 > *** Error in `/usr/local/bin/vtkpython': corrupted size vs. prev_size: > 0x0000000002c884f0 *** > ======= Backtrace: ========= > /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f491973f7e5] > /lib/x86_64-linux-gnu/libc.so.6(+0x82aec)[0x7f491974aaec] > /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f491974c184] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyDict_ > New+0xb)[0x7f49190f6a7b] > /usr/local/lib/libvtkWrappingPython35Core-8.0.so.1(PyVTKObject_ > FromPointer+0x462)[0x7f48f6425b3c] > /usr/local/lib/libvtkWrappingPython35Core-8.0.so.1(_ > ZN13vtkPythonUtil20GetObjectFromPointerEP13vtkObjectBase+ > 0x4b5)[0x7f48f64140e9] > /usr/local/lib/libvtkCommonCorePython35D-8.0.so.1(_ > ZN13vtkPythonArgs14BuildVTKObjectEPKv+0x18)[0x7f48f677b90c] > /usr/local/lib/libvtkCommonDataModelPython35D-8.0.so.1(+0x13d6ed)[ > 0x7f48f39296ed] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyCFunction_Call+0xc9)[ > 0x7f49190ef039] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalFrameEx+0x7555)[ > 0x7f49191fb1b5] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalFrameEx+0x79d9)[ > 0x7f49191fb639] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(+0x24ac6c)[0x7f491928bc6c] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalCodeEx+0x23)[ > 0x7f491928bd43] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_ > EvalCode+0x1b)[0x7f49191f39cb] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyRun_StringFlags+0x8f)[ > 0x7f4919210e6f] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyRun_ > SimpleStringFlags+0x3b)[0x7f4919211eab] > /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(Py_Main+ > 0x7c7)[0x7f4919278d57] > /usr/local/bin/vtkpython(main+0x527)[0x40200c] > /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f49196e8830] > /usr/local/bin/vtkpython(_start+0x29)[0x401989] > ======= Memory map: ======== > 00400000-00404000 r-xp 00000000 08:35 32780695 > /usr/local/bin/vtkpython > 00603000-00604000 r--p 00003000 08:35 32780695 > /usr/local/bin/vtkpython > 00604000-00605000 rw-p 00004000 08:35 32780695 > /usr/local/bin/vtkpython > 01d85000-06252000 rw-p 00000000 00:00 0 > [heap] > 7f4896b0a000-7f4898205000 rw-p 00000000 00:00 0 > 7f489f640000-7f489f680000 rw-p 00000000 00:00 0 > 7f489fb00000-7f489fb40000 rw-p 00000000 00:00 0 > 7f48a4000000-7f48a4229000 rw-p 00000000 00:00 0 > 7f48a4229000-7f48a8000000 ---p 00000000 00:00 0 > 7f48a8000000-7f48a9ce4000 rw-p 00000000 00:00 0 > 7f48a9ce4000-7f48ac000000 ---p 00000000 00:00 0 > 7f48ac000000-7f48adca1000 rw-p 00000000 00:00 0 > 7f48adca1000-7f48b0000000 ---p 00000000 00:00 0 > 7f48b2365000-7f48b23a5000 rw-p 00000000 00:00 0 > 7f48b23a5000-7f48b23a8000 r-xp 00000000 08:35 32510071 > /usr/lib/python3.5/lib-dynload/_multiprocessing. > cpython-35m-x86_64-linux-gnu.so > 7f48b23a8000-7f48b25a7000 ---p 00003000 08:35 32510071 > /usr/lib/python3.5/lib-dynload/_multiprocessing. > cpython-35m-x86_64-linux-gnu.so > 7f48b25a7000-7f48b25a8000 r--p 00002000 08:35 32510071 > /usr/lib/python3.5/lib-dynload/_multiprocessing. > cpython-35m-x86_64-linux-gnu.so > 7f48b25a8000-7f48b25a9000 rw-p 00003000 08:35 32510071 > /usr/lib/python3.5/lib-dynload/_multiprocessing. > cpython-35m-x86_64-linux-gnu.so > 7f48b25a9000-7f48b2629000 rw-p 00000000 00:00 0 > 7f48b5efd000-7f48b5f3d000 rw-p 00000000 00:00 0 > 7f48b61bd000-7f48b61fd000 rw-p 00000000 00:00 0 > 7f48b62bd000-7f48b661f000 rw-p 00000000 00:00 0 > 7f48b661f000-7f48b6649000 r-xp 00000000 08:35 32514684 > /usr/lib/python3/dist-packages/matplotlib/_path. > cpython-35m-x86_64-linux-gnu.so > 7f48b6649000-7f48b6849000 ---p 0002a000 08:35 32514684 > /usr/lib/python3/dist-packages/matplotlib/_path. > cpython-35m-x86_64-linux-gnu.so > 7f48b6849000-7f48b684a000 r--p 0002a000 08:35 32514684 > /usr/lib/python3/dist-packages/matplotlib/_path. > cpython-35m-x86_64-linux-gnu.so > 7f48b684a000-7f48b684b000 rw-p 0002b000 08:35 32514684 > /usr/lib/python3/dist-packages/matplotlib/_path. > cpython-35m-x86_64-linux-gnu.so > 7f48b684b000-7f48b68cc000 rw-p 00000000 00:00 0 > 7f48b68cc000-7f48b68dd000 r-xp 00000000 08:35 32510070 > /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so > 7f48b68dd000-7f48b6adc000 ---p 00011000 08:35 32510070 > /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so > 7f48b6adc000-7f48b6add000 r--p 00010000 08:35 32510070 > /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so > 7f48b6add000-7f48b6ade000 rw-p 00011000 08:35 32510070 > /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so > 7f48b6ade000-7f48b6b3c000 r-xp 00000000 08:35 2101571 > /lib/x86_64-linux-gnu/libssl.so.1.0.0 > 7f48b6b3c000-7f48b6d3c000 ---p 0005e000 08:35 2101571 > /lib/x86_64-linux-gnu/libssl.so.1.0.0 > 7f48b6d3c000-7f48b6d40000 r--p 0005e000 08:35 2101571 > /lib/x86_64-linux-gnu/libssl.so.1.0.0 > 7f48b6d40000-7f48b6d47000 rw-p 00062000 08:35 2101571 > /lib/x86_64-linux-gnu/libssl.so.1.0.0 > 7f48b6d47000-7f48b6d5e000 r-xp 00000000 08:35 32507025 > /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so > 7f48b6d5e000-7f48b6f5e000 ---p 00017000 08:35 32507025 > /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so > 7f48b6f5e000-7f48b6f5f000 r--p 00017000 08:35 32507025 > /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so > 7f48b6f5f000-7f48b6f64000 rw-p 00018000 08:35 32507025 > /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so > 7f48b6f64000-7f48b71a4000 rw-p 00000000 00:00 0 > 7f48b71a4000-7f48b71a5000 r-xp 00000000 08:35 32507023 > /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so > 7f48b71a5000-7f48b73a4000 ---p 00001000 08:35 32507023 > /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so > 7f48b73a4000-7f48b73a5000 r--p 00000000 08:35 32507023 > /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so > 7f48b73a5000-7f48b73a6000 rw-p 00001000 08:35 32507023 > /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so > 7f48b73a6000-7f48b74e6000 rw-p 00000000 00:00 0 > 7f48b74e6000-7f48b74f5000 r-xp 00000000 08:35 38939108 > /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so > 7f48b74f5000-7f48b76f5000 ---p 0000f000 08:35 38939108 > /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so > 7f48b76f5000-7f48b76f6000 r--p 0000f000 08:35 38939108 > /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so > 7f48b76f6000-7f48b76f9000 rw-p 00010000 08:35 38939108 > /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so > 7f48b76f9000-7f48b770a000 r-xp 00000000 08:35 38939111 > /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so > 7f48b770a000-7f48b7909000 ---p 00011000 08:35 38939111 > /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so > 7f48b7909000-7f48b790a000 r--p 00010000 08:35 38939111 > /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so > 7f48b790a000-7f48b790d000 rw-p 00011000 08:35 38939111 > /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so > 7f48b790d000-7f48b794e000 rw-p 00000000 00:00 0 > 7f48b794e000-7f48b7952000 r-xp 00000000 08:35 38939144 > /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so > 7f48b7952000-7f48b7b51000 ---p 00004000 08:35 38939144 > /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so > 7f48b7b51000-7f48b7b52000 r--p 00003000 08:35 38939144 > /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so > 7f48b7b52000-7f48b7b53000 rw-p 00004000 08:35 38939144 > /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so > 7f48b7b53000-7f48b7b5e000 r-xp 00000000 08:35 38939143 > /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so > 7f48b7b5e000-7f48b7d5d000 ---p 0000b000 08:35 38939143 > /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so > 7f48b7d5d000-7f48b7d5e000 r--p 0000a000 08:35 38939143 > /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so > 7f48b7d5e000-7f48b7d60000 rw-p 0000b000 08:35 38939143 > /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so > 7f48b7d60000-7f48b7d76000 r-xp 00000000 08:35 38939145 > /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so > 7f48b7d76000-7f48b7f75000 ---p 00016000 08:35 38939145 > /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so > 7f48b7f75000-7f48b7f76000 r--p 00015000 08:35 38939145 > /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so > 7f48b7f76000-7f48b7f79000 rw-p 00016000 08:35 38939145 > /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so > 7f48b7f79000-7f48b7f8e000 r-xp 00000000 08:35 38939142 > /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so > 7f48b7f8e000-7f48b818d000 ---p 00015000 08:35 38939142 > /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so > 7f48b818d000-7f48b818e000 r--p 00014000 08:35 38939142 > /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so > 7f48b818e000-7f48b8191000 rw-p 00015000 08:35 38939142 > /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so > 7f48b8191000-7f48b8192000 rw-p 00000000 00:00 0 > 7f48b8192000-7f48b819f000 r-xp 00000000 08:35 38939101 > /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so > 7f48b819f000-7f48b839e000 ---p 0000d000 08:35 38939101 > /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so > 7f48b839e000-7f48b839f000 r--p 0000c000 08:35 38939101 > /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so > 7f48b839f000-7f48b83a1000 rw-p 0000d000 08:35 38939101 > /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so > 7f48b83a1000-7f48b83b5000 r-xp 00000000 08:35 38939149 > /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so > 7f48b83b5000-7f48b85b4000 ---p 00014000 08:35 38939149 > /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so > 7f48b85b4000-7f48b85b5000 r--p 00013000 08:35 38939149 > /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so > 7f48b85b5000-7f48b85b8000 rw-p 00014000 08:35 38939149 > /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so > 7f48b85b8000-7f48b85bf000 r-xp 00000000 08:35 38939102 > /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_64-linux-gnu.so > 7f48b85bf000-7f48b87bf000 ---p 00007000 08:35 38939102 > /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_64-linux-gnu.so > 7f48b87bf000-7f48b87c0000 r--p 00007000 08:35 38939102 > /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_64-linux-gnu.so > 7f48b87c0000-7f48b87c1000 rw-p 00008000 08:35 38939102 > /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_64-linux-gnu.so > 7f48b87c1000-7f48b87cb000 r-xp 00000000 08:35 38939164 > /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so > 7f48b87cb000-7f48b89ca000 ---p 0000a000 08:35 38939164 > /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so > 7f48b89ca000-7f48b89cb000 r--p 00009000 08:35 38939164 > /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so > 7f48b89cb000-7f48b89cc000 rw-p 0000a000 08:35 38939164 > /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so > 7f48b89cc000-7f48b89f4000 r-xp 00000000 08:35 38939163 > /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so > 7f48b89f4000-7f48b8bf3000 ---p 00028000 08:35 38939163 > /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so > 7f48b8bf3000-7f48b8bf4000 r--p 00027000 08:35 38939163 > /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so > 7f48b8bf4000-7f48b8bfc000 rw-p 00028000 08:35 38939163 > /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so > 7f48b8bfc000-7f48b8bfd000 rw-p 00000000 00:00 0 > 7f48b8bfd000-7f48b8c11000 r-xp 00000000 08:35 38939099 > /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so > 7f48b8c11000-7f48b8e10000 ---p 00014000 08:35 38939099 > /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so > 7f48b8e10000-7f48b8e11000 r--p 00013000 08:35 38939099 > /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so > 7f48b8e11000-7f48b8e15000 rw-p 00014000 08:35 38939099 > /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so > 7f48b8e15000-7f48b8e2b000 r-xp 00000000 08:35 38939165 > /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so > 7f48b8e2b000-7f48b902a000 ---p 00016000 08:35 38939165 > /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so > 7f48b902a000-7f48b902b000 r--p 00015000 08:35 38939165 > /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so > 7f48b902b000-7f48b902e000 rw-p 00016000 08:35 38939165 > /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so > 7f48b902e000-7f48b902f000 rw-p 00000000 00:00 0 > 7f48b902f000-7f48b9036000 r-xp 00000000 08:35 38939109 > /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so > 7f48b9036000-7f48b9235000 ---p 00007000 08:35 38939109 > /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so > 7f48b9235000-7f48b9236000 r--p 00006000 08:35 38939109 > /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so > 7f48b9236000-7f48b9238000 rw-p 00007000 08:35 38939109 > /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so > 7f48b9238000-7f48b9249000 r-xp 00000000 08:35 38939098 > /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so > 7f48b9249000-7f48b9448000 ---p 00011000 08:35 38939098 > /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so > 7f48b9448000-7f48b9449000 r--p 00010000 08:35 38939098 > /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so > 7f48b9449000-7f48b944b000 rw-p 00011000 08:35 38939098 > /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so > 7f48b944b000-7f48b944c000 rw-p 00000000 00:00 0 > 7f48b944c000-7f48b9455000 r-xp 00000000 08:35 38939150 > /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so > 7f48b9455000-7f48b9654000 ---p 00009000 08:35 38939150 > /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so > 7f48b9654000-7f48b9655000 r--p 00008000 08:35 38939150 > /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so > 7f48b9655000-7f48b9656000 rw-p 00009000 08:35 38939150 > /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so > 7f48b9656000-7f48b9696000 rw-p 00000000 00:00 0 > 7f48b9696000-7f48b96d9000 r-xp 00000000 08:35 38939100 > /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so > 7f48b96d9000-7f48b98d8000 ---p 00043000 08:35 38939100 > /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so > 7f48b98d8000-7f48b98d9000 r--p 00042000 08:35 38939100 > /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so > 7f48b98d9000-7f48b98e3000 rw-p 00043000 08:35 38939100 > /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so > 7f48b98e3000-7f48b9901000 r-xp 00000000 08:35 32248272 > /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 > 7f48b9901000-7f48b9b00000 ---p 0001e000 08:35 32248272 > /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 > 7f48b9b00000-7f48b9b01000 r--p 0001d000 08:35 32248272 > /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 > 7f48b9b01000-7f48b9b02000 rw-p 0001e000 08:35 32248272 > /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 > 7f48b9b02000-7f48b9b03000 rw-p 00000000 00:00 0 > 7f48b9b03000-7f48b9b2b000 r-xp 00000000 08:35 38939110 > /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so > 7f48b9b2b000-7f48b9d2a000 ---p 00028000 08:35 38939110 > /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so > 7f48b9d2a000-7f48b9d2b000 r--p 00027000 08:35 38939110 > /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so > 7f48b9d2b000-7f48b9d2d000 rw-p 00028000 08:35 38939110 > /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so > 7f48b9d2d000-7f48b9d43000 r-xp 00000000 08:35 38939146 > /usr/lib/python3/dist-packages/h5py/_objects.cpython-35m-x86_64-linux-gnu. > so > 7f48b9d43000-7f48b9f42000 ---p 00016000 08:35 38939146 > /usr/lib/python3/dist-packages/h5py/_objects.cpython-35m-x86_64-linux-gnu. > so > 7f48b9f42000-7f48b9f43000 r--p 00015000 08:35 38939146 > /usr/lib/python3/dist-packages/h5py/_objects.cpython-35m-x86_64-linux-gnu.soAborted > (core dumped) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Thu Oct 19 20:45:51 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Thu, 19 Oct 2017 20:45:51 -0400 Subject: [vtkusers] Merging an example with my data Message-ID: I am looking at the pointToCellData.py example. In that example an unstructured grid reader opens a .vtk file and extracts some named unstructured grid scalar and vector data like so... reader = vtk.vtkUnstructuredGridReader() reader.SetFileName(VTK_DATA_ROOT + "/Data/blow.vtk") reader.SetScalarsName("thickness9") reader.SetVectorsName("displacement9") p2c = vtk.vtkPointDataToCellData() p2c.SetInputConnection(reader.GetOutputPort()) p2c.PassPointDataOn() warp = vtk.vtkWarpVector() warp.SetInputConnection(p2c.GetOutputPort()) thresh = vtk.vtkThreshold() thresh.SetInputConnection(warp.GetOutputPort()) thresh.ThresholdBetween(0.25, 0.75) thresh.SetInputArrayToProcess(1, 0, 0, 0, "thickness9") In the code I've written to front end this, I want to replace the reader with my own method for extracting an unstructured grid like so... gap_data_block, gap_file_info = getgap.get_gap_data_from_files(gap_file) points = vtk.vtkPoints() points.SetData(VN.numpy_to_vtk(gap_data_block, deep=True)) ugrid = vtk.vtkUnstructuredGrid() ugrid.SetPoints(points) Where gap_data_block is a numpy array of shape (n,3) carrying data for dimensions are x/y/z. Ultimately I want to get a surface elevation plot of gap_data_block by working through the example code cited above. As part of this (extremely) pedagogical experience, I feel I need to do two things: 1. Find a way to label columns one and two of get_data_block as a vector using some equivalent to reader.SetVectorsName() 2. Find a way to label columns three of get_data_block as a scalar using some equivalent to reader.SetVectorsName() 3. Find a way to set the input connection, or input data of a vtkPointDataToCellData object to my vtkUnstructuredGrid object ugrid. I've been looking at this for a few hours now, any help getting my ugrid to an elevation plot would be appreciated. Thanks, nt -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Thu Oct 19 20:47:04 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Thu, 19 Oct 2017 20:47:04 -0400 Subject: [vtkusers] Merging an example with my data In-Reply-To: References: Message-ID: Ummmm two things, three things, does it matter? On Thu, Oct 19, 2017 at 8:45 PM, Nick Torenvliet wrote: > I am looking at the pointToCellData.py example. > > In that example an unstructured grid reader opens a .vtk file and extracts > some named unstructured grid scalar and vector data like so... > > reader = vtk.vtkUnstructuredGridReader() > reader.SetFileName(VTK_DATA_ROOT + "/Data/blow.vtk") > reader.SetScalarsName("thickness9") > reader.SetVectorsName("displacement9") > > p2c = vtk.vtkPointDataToCellData() > p2c.SetInputConnection(reader.GetOutputPort()) > p2c.PassPointDataOn() > warp = vtk.vtkWarpVector() > warp.SetInputConnection(p2c.GetOutputPort()) > thresh = vtk.vtkThreshold() > thresh.SetInputConnection(warp.GetOutputPort()) > thresh.ThresholdBetween(0.25, 0.75) > thresh.SetInputArrayToProcess(1, 0, 0, 0, "thickness9") > > > In the code I've written to front end this, I want to replace the reader > with my own method for extracting an unstructured grid like so... > > gap_data_block, gap_file_info = getgap.get_gap_data_from_files(gap_file) > points = vtk.vtkPoints() > points.SetData(VN.numpy_to_vtk(gap_data_block, deep=True)) > ugrid = vtk.vtkUnstructuredGrid() > ugrid.SetPoints(points) > > Where gap_data_block is a numpy array of shape (n,3) carrying data for > dimensions are x/y/z. > > Ultimately I want to get a surface elevation plot of gap_data_block by > working through the example code cited above. > > As part of this (extremely) pedagogical experience, I feel I need to do > two things: > > 1. Find a way to label columns one and two of get_data_block as a > vector using some equivalent to reader.SetVectorsName() > 2. Find a way to label columns three of get_data_block as a scalar > using some equivalent to reader.SetVectorsName() > 3. Find a way to set the input connection, or input data of a > vtkPointDataToCellData object to my vtkUnstructuredGrid object ugrid. > > I've been looking at this for a few hours now, any help getting my ugrid > to an elevation plot would be appreciated. > > Thanks, > > nt > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arw.tyx-ouy_mz at ezweb.ne.jp Fri Oct 20 01:10:31 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Thu, 19 Oct 2017 22:10:31 -0700 (MST) Subject: [vtkusers] get vtkImageData point In-Reply-To: References: <1508420326459-0.post@n5.nabble.com> Message-ID: <1508476231058-0.post@n5.nabble.com> Thank you Bill! I read the document of vtkImageData::ComputeStructuredCoordinates, but I don't know the parameters. The definition is : virtual int vtkImageData::ComputeStructuredCoordinates(const double x[3], int ijk[3], double pcoords[3]) I know x is the real world x-y-z coordinate, and ijk is image point, but what is pcoords??? pcoords is the parametric coordinates in the cell, but i don't know that. And i thought the usage : const double p[3] = {x, y, z}; // already know double pcoords[3] = {?, ?, ?}; // already know int ijk[3]; // I want know int check = image->ComputeStructuredCoordinates(p, ijk, pcoords); if (check == 1) { std::cout << "(" << ijk[0] << ", " << ijk[1] << ", " << ijk[2] << ")" << std::endl; } Is this right? please help me! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Fri Oct 20 01:29:52 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 20 Oct 2017 14:29:52 +0900 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: References: <1294093b-b1d2-12f7-c38a-56b55db8e021@cyceron.fr> Message-ID: Hello Frederic, vtkSCurveSpline seems to be capable of calculating the coordinate at the midpoint of the geodesic path by an interpolating spline. --- import vtk import math cylinder= vtk.vtkSphereSource() cylinder.SetCenter(0.0, 0.0, 0.0) cylinder.SetRadius(0.5) points = vtk.vtkPoints() vIds = [4, 12, 23, 28] p0 = [0]*3 p1 = [0]*3 dist = 0.0 for n in range(len(vIds)-1): v0 = vIds[n] v1 = vIds[n+1] dijkstra = vtk.vtkDijkstraGraphGeodesicPath() dijkstra.SetInputConnection(cylinder.GetOutputPort()) dijkstra.SetStartVertex(v0) dijkstra.SetEndVertex(v1) dijkstra.Update() pts = dijkstra.GetOutput().GetPoints() end = n: > Last question Yoshimi (or others), > > With your script*, is-there a way to extract the point (in x,y,z or vertex > value) where dist/2 (the half of the total geodesic distance)? > > Thanks for your kindness, > > Frederic > > * > > > import vtk > import math > > cylinder= vtk.vtkSphereSource() > cylinder.SetCenter(0.0, 0.0, 0.0) > cylinder.SetRadius(0.5) > > appendFilter = vtk.vtkAppendFilter() > appendFilter.MergePointsOn() > > vIds = [4, 12, 23, 28] > > p0 = [0,0,0] > p1 = [0,0,0] > dist = 0.0 > for n in range(len(vIds)-1): > v0 = vIds[n] > v1 = vIds[n+1] > > dijkstra = vtk.vtkDijkstraGraphGeodesicPath() > dijkstra.SetInputConnection(cylinder.GetOutputPort()) > dijkstra.SetStartVertex(v0) > dijkstra.SetEndVertex(v1) > dijkstra.Update() > > pts = dijkstra.GetOutput().GetPoints() > for ptId in range(pts.GetNumberOfPoints()-1): > pts.GetPoint(ptId, p0) > pts.GetPoint(ptId+1, p1) > print(math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1))) > dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) > > appendFilter.AddInputConnection(dijkstra.GetOutput()) > > print(dist) > > appendFilter.Update() > From Andx_roo at live.com Fri Oct 20 02:19:40 2017 From: Andx_roo at live.com (Andaharoo) Date: Thu, 19 Oct 2017 23:19:40 -0700 (MST) Subject: [vtkusers] Adding Implicit Functions To Renderer? Message-ID: <1508480380434-0.post@n5.nabble.com> Pretty simple question. But I couldn't find anything googling. How can I add vtkImplicitFunctions as actors. For instance, I want to add a vtkPlane as an actor to the renderer. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From arw.tyx-ouy_mz at ezweb.ne.jp Fri Oct 20 03:06:26 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Fri, 20 Oct 2017 00:06:26 -0700 (MST) Subject: [vtkusers] DICOM pixel value is strange Message-ID: <1508483186051-0.post@n5.nabble.com> Hi, I wrote the code to pick the DICOM pixel value, but pixel value is strange. My code is below: ``` vtkSmartPointer image = reader->GetOutput(); int ijk[3]; double pcoords[3]; for (vtkIdType id = 0; id < image->GetNumberOfPoints(); ++id) { int check = image->ComputeStructuredCoordinates(image->GetPoint(id), ijk, pcoords); cout << "ID: " << id << ", "; cout << "ijk: " << "(" << ijk[0] << ", " << ijk[1] << ", " << ijk[2] << "), "; auto *pixel = static_cast(image->GetScalarPointer(ijk)); cout << "Pixel: " << *pixel << endl; } ``` I supposed *pixel value is in the range 0 ~ 255, but actual output is like -2.06898e+289. Why? Moreover, *pixel max value is 1.98914e-289, and sometimes *pixel is nan. It's strange!!! Can you help me? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mathieu.westphal at kitware.com Fri Oct 20 03:56:43 2017 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Fri, 20 Oct 2017 09:56:43 +0200 Subject: [vtkusers] Generating Cells For Unstructured Grids In-Reply-To: References: Message-ID: Hello If you have found a solution, it would be nice to share it for anyone having a similar problem in the future. Best, Mathieu Westphal On Fri, Oct 20, 2017 at 1:51 AM, Nick Torenvliet wrote: > Please disregard this question... obvious. > > On Thu, Oct 19, 2017 at 7:29 PM, Nick Torenvliet > wrote: > >> Hi all, >> >> I am working through some examples and trying to add my own data. >> >> I'm running VTK-8 on ubuntu 16.04. >> >> The original examples code adds 8 cells, the example runs fine, >> my hack of the example attempts to add 49000ish cells comes out with an >> error. >> >> The following code: >> >> gap_data_block = get_gap_data_block() >> voxelPoints = vtk.vtkPoints() >> voxelPoints.SetNumberOfPoints(len(gap_data_block)) >> voxelPoints.SetData(VN.numpy_to_vtk(gap_data_block, deep=True)) >> >> print("len(gap_data_block)) >> print(gap_data_block.shape) >> >> aVoxel = vtk.vtkVoxel() >> >> for i in range(len(gap_data_block[:, 0])): >> print(len(gap_data_block), i) >> aVoxel.GetPointIds().SetId(i, i) >> >> Gives the following output and nasty error - what is going on here?? >> >> Output: >> Length Gap Data Block: 49432 >> Shape Gap Data Block: (49432, 3) >> 0 >> 1 >> 2 >> . >> . >> . >> 1601 >> 1602 >> *** Error in `/usr/local/bin/vtkpython': corrupted size vs. prev_size: >> 0x0000000002c884f0 *** >> ======= Backtrace: ========= >> /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f491973f7e5] >> /lib/x86_64-linux-gnu/libc.so.6(+0x82aec)[0x7f491974aaec] >> /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f491974c184] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyDict_New+ >> 0xb)[0x7f49190f6a7b] >> /usr/local/lib/libvtkWrappingPython35Core-8.0.so.1( >> PyVTKObject_FromPointer+0x462)[0x7f48f6425b3c] >> /usr/local/lib/libvtkWrappingPython35Core-8.0.so.1(_ZN13vtkP >> ythonUtil20GetObjectFromPointerEP13vtkObjectBase+0x4b5)[0x7f48f64140e9] >> /usr/local/lib/libvtkCommonCorePython35D-8.0.so.1(_ZN13vtkPy >> thonArgs14BuildVTKObjectEPKv+0x18)[0x7f48f677b90c] >> /usr/local/lib/libvtkCommonDataModelPython35D-8.0.so.1(+ >> 0x13d6ed)[0x7f48f39296ed] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyCFunction_ >> Call+0xc9)[0x7f49190ef039] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalFr >> ameEx+0x7555)[0x7f49191fb1b5] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalFr >> ameEx+0x79d9)[0x7f49191fb639] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(+0x24ac6c)[0x7f491928bc6c] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalCo >> deEx+0x23)[0x7f491928bd43] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalCo >> de+0x1b)[0x7f49191f39cb] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyRun_StringF >> lags+0x8f)[0x7f4919210e6f] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyRun_SimpleS >> tringFlags+0x3b)[0x7f4919211eab] >> /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(Py_Main+0x7c7 >> )[0x7f4919278d57] >> /usr/local/bin/vtkpython(main+0x527)[0x40200c] >> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f49196e8830] >> /usr/local/bin/vtkpython(_start+0x29)[0x401989] >> ======= Memory map: ======== >> 00400000-00404000 r-xp 00000000 08:35 32780695 >> /usr/local/bin/vtkpython >> 00603000-00604000 r--p 00003000 08:35 32780695 >> /usr/local/bin/vtkpython >> 00604000-00605000 rw-p 00004000 08:35 32780695 >> /usr/local/bin/vtkpython >> 01d85000-06252000 rw-p 00000000 00:00 0 >> [heap] >> 7f4896b0a000-7f4898205000 rw-p 00000000 00:00 0 >> 7f489f640000-7f489f680000 rw-p 00000000 00:00 0 >> 7f489fb00000-7f489fb40000 rw-p 00000000 00:00 0 >> 7f48a4000000-7f48a4229000 rw-p 00000000 00:00 0 >> 7f48a4229000-7f48a8000000 ---p 00000000 00:00 0 >> 7f48a8000000-7f48a9ce4000 rw-p 00000000 00:00 0 >> 7f48a9ce4000-7f48ac000000 ---p 00000000 00:00 0 >> 7f48ac000000-7f48adca1000 rw-p 00000000 00:00 0 >> 7f48adca1000-7f48b0000000 ---p 00000000 00:00 0 >> 7f48b2365000-7f48b23a5000 rw-p 00000000 00:00 0 >> 7f48b23a5000-7f48b23a8000 r-xp 00000000 08:35 32510071 >> /usr/lib/python3.5/lib-dynload/_multiprocessing.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b23a8000-7f48b25a7000 ---p 00003000 08:35 32510071 >> /usr/lib/python3.5/lib-dynload/_multiprocessing.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b25a7000-7f48b25a8000 r--p 00002000 08:35 32510071 >> /usr/lib/python3.5/lib-dynload/_multiprocessing.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b25a8000-7f48b25a9000 rw-p 00003000 08:35 32510071 >> /usr/lib/python3.5/lib-dynload/_multiprocessing.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b25a9000-7f48b2629000 rw-p 00000000 00:00 0 >> 7f48b5efd000-7f48b5f3d000 rw-p 00000000 00:00 0 >> 7f48b61bd000-7f48b61fd000 rw-p 00000000 00:00 0 >> 7f48b62bd000-7f48b661f000 rw-p 00000000 00:00 0 >> 7f48b661f000-7f48b6649000 r-xp 00000000 08:35 32514684 >> /usr/lib/python3/dist-packages/matplotlib/_path.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b6649000-7f48b6849000 ---p 0002a000 08:35 32514684 >> /usr/lib/python3/dist-packages/matplotlib/_path.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b6849000-7f48b684a000 r--p 0002a000 08:35 32514684 >> /usr/lib/python3/dist-packages/matplotlib/_path.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b684a000-7f48b684b000 rw-p 0002b000 08:35 32514684 >> /usr/lib/python3/dist-packages/matplotlib/_path.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b684b000-7f48b68cc000 rw-p 00000000 00:00 0 >> 7f48b68cc000-7f48b68dd000 r-xp 00000000 08:35 32510070 >> /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so >> 7f48b68dd000-7f48b6adc000 ---p 00011000 08:35 32510070 >> /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so >> 7f48b6adc000-7f48b6add000 r--p 00010000 08:35 32510070 >> /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so >> 7f48b6add000-7f48b6ade000 rw-p 00011000 08:35 32510070 >> /usr/lib/python3.5/lib-dynload/_json.cpython-35m-x86_64-linux-gnu.so >> 7f48b6ade000-7f48b6b3c000 r-xp 00000000 08:35 2101571 >> /lib/x86_64-linux-gnu/libssl.so.1.0.0 >> 7f48b6b3c000-7f48b6d3c000 ---p 0005e000 08:35 2101571 >> /lib/x86_64-linux-gnu/libssl.so.1.0.0 >> 7f48b6d3c000-7f48b6d40000 r--p 0005e000 08:35 2101571 >> /lib/x86_64-linux-gnu/libssl.so.1.0.0 >> 7f48b6d40000-7f48b6d47000 rw-p 00062000 08:35 2101571 >> /lib/x86_64-linux-gnu/libssl.so.1.0.0 >> 7f48b6d47000-7f48b6d5e000 r-xp 00000000 08:35 32507025 >> /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so >> 7f48b6d5e000-7f48b6f5e000 ---p 00017000 08:35 32507025 >> /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so >> 7f48b6f5e000-7f48b6f5f000 r--p 00017000 08:35 32507025 >> /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so >> 7f48b6f5f000-7f48b6f64000 rw-p 00018000 08:35 32507025 >> /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so >> 7f48b6f64000-7f48b71a4000 rw-p 00000000 00:00 0 >> 7f48b71a4000-7f48b71a5000 r-xp 00000000 08:35 32507023 >> /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so >> 7f48b71a5000-7f48b73a4000 ---p 00001000 08:35 32507023 >> /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so >> 7f48b73a4000-7f48b73a5000 r--p 00000000 08:35 32507023 >> /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so >> 7f48b73a5000-7f48b73a6000 rw-p 00001000 08:35 32507023 >> /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so >> 7f48b73a6000-7f48b74e6000 rw-p 00000000 00:00 0 >> 7f48b74e6000-7f48b74f5000 r-xp 00000000 08:35 38939108 >> /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so >> 7f48b74f5000-7f48b76f5000 ---p 0000f000 08:35 38939108 >> /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so >> 7f48b76f5000-7f48b76f6000 r--p 0000f000 08:35 38939108 >> /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so >> 7f48b76f6000-7f48b76f9000 rw-p 00010000 08:35 38939108 >> /usr/lib/python3/dist-packages/h5py/h5l.cpython-35m-x86_64-linux-gnu.so >> 7f48b76f9000-7f48b770a000 r-xp 00000000 08:35 38939111 >> /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so >> 7f48b770a000-7f48b7909000 ---p 00011000 08:35 38939111 >> /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so >> 7f48b7909000-7f48b790a000 r--p 00010000 08:35 38939111 >> /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so >> 7f48b790a000-7f48b790d000 rw-p 00011000 08:35 38939111 >> /usr/lib/python3/dist-packages/h5py/h5o.cpython-35m-x86_64-linux-gnu.so >> 7f48b790d000-7f48b794e000 rw-p 00000000 00:00 0 >> 7f48b794e000-7f48b7952000 r-xp 00000000 08:35 38939144 >> /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so >> 7f48b7952000-7f48b7b51000 ---p 00004000 08:35 38939144 >> /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so >> 7f48b7b51000-7f48b7b52000 r--p 00003000 08:35 38939144 >> /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so >> 7f48b7b52000-7f48b7b53000 rw-p 00004000 08:35 38939144 >> /usr/lib/python3/dist-packages/h5py/h5fd.cpython-35m-x86_64-linux-gnu.so >> 7f48b7b53000-7f48b7b5e000 r-xp 00000000 08:35 38939143 >> /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so >> 7f48b7b5e000-7f48b7d5d000 ---p 0000b000 08:35 38939143 >> /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so >> 7f48b7d5d000-7f48b7d5e000 r--p 0000a000 08:35 38939143 >> /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so >> 7f48b7d5e000-7f48b7d60000 rw-p 0000b000 08:35 38939143 >> /usr/lib/python3/dist-packages/h5py/h5i.cpython-35m-x86_64-linux-gnu.so >> 7f48b7d60000-7f48b7d76000 r-xp 00000000 08:35 38939145 >> /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so >> 7f48b7d76000-7f48b7f75000 ---p 00016000 08:35 38939145 >> /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so >> 7f48b7f75000-7f48b7f76000 r--p 00015000 08:35 38939145 >> /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so >> 7f48b7f76000-7f48b7f79000 rw-p 00016000 08:35 38939145 >> /usr/lib/python3/dist-packages/h5py/h5g.cpython-35m-x86_64-linux-gnu.so >> 7f48b7f79000-7f48b7f8e000 r-xp 00000000 08:35 38939142 >> /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so >> 7f48b7f8e000-7f48b818d000 ---p 00015000 08:35 38939142 >> /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so >> 7f48b818d000-7f48b818e000 r--p 00014000 08:35 38939142 >> /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so >> 7f48b818e000-7f48b8191000 rw-p 00015000 08:35 38939142 >> /usr/lib/python3/dist-packages/h5py/h5f.cpython-35m-x86_64-linux-gnu.so >> 7f48b8191000-7f48b8192000 rw-p 00000000 00:00 0 >> 7f48b8192000-7f48b819f000 r-xp 00000000 08:35 38939101 >> /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so >> 7f48b819f000-7f48b839e000 ---p 0000d000 08:35 38939101 >> /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so >> 7f48b839e000-7f48b839f000 r--p 0000c000 08:35 38939101 >> /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so >> 7f48b839f000-7f48b83a1000 rw-p 0000d000 08:35 38939101 >> /usr/lib/python3/dist-packages/h5py/h5ds.cpython-35m-x86_64-linux-gnu.so >> 7f48b83a1000-7f48b83b5000 r-xp 00000000 08:35 38939149 >> /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so >> 7f48b83b5000-7f48b85b4000 ---p 00014000 08:35 38939149 >> /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so >> 7f48b85b4000-7f48b85b5000 r--p 00013000 08:35 38939149 >> /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so >> 7f48b85b5000-7f48b85b8000 rw-p 00014000 08:35 38939149 >> /usr/lib/python3/dist-packages/h5py/h5d.cpython-35m-x86_64-linux-gnu.so >> 7f48b85b8000-7f48b85bf000 r-xp 00000000 08:35 38939102 >> /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_ >> 64-linux-gnu.so >> 7f48b85bf000-7f48b87bf000 ---p 00007000 08:35 38939102 >> /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_ >> 64-linux-gnu.so >> 7f48b87bf000-7f48b87c0000 r--p 00007000 08:35 38939102 >> /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_ >> 64-linux-gnu.so >> 7f48b87c0000-7f48b87c1000 rw-p 00008000 08:35 38939102 >> /usr/lib/python3/dist-packages/h5py/_proxy.cpython-35m-x86_ >> 64-linux-gnu.so >> 7f48b87c1000-7f48b87cb000 r-xp 00000000 08:35 38939164 >> /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so >> 7f48b87cb000-7f48b89ca000 ---p 0000a000 08:35 38939164 >> /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so >> 7f48b89ca000-7f48b89cb000 r--p 00009000 08:35 38939164 >> /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so >> 7f48b89cb000-7f48b89cc000 rw-p 0000a000 08:35 38939164 >> /usr/lib/python3/dist-packages/h5py/h5ac.cpython-35m-x86_64-linux-gnu.so >> 7f48b89cc000-7f48b89f4000 r-xp 00000000 08:35 38939163 >> /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so >> 7f48b89f4000-7f48b8bf3000 ---p 00028000 08:35 38939163 >> /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so >> 7f48b8bf3000-7f48b8bf4000 r--p 00027000 08:35 38939163 >> /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so >> 7f48b8bf4000-7f48b8bfc000 rw-p 00028000 08:35 38939163 >> /usr/lib/python3/dist-packages/h5py/h5p.cpython-35m-x86_64-linux-gnu.so >> 7f48b8bfc000-7f48b8bfd000 rw-p 00000000 00:00 0 >> 7f48b8bfd000-7f48b8c11000 r-xp 00000000 08:35 38939099 >> /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so >> 7f48b8c11000-7f48b8e10000 ---p 00014000 08:35 38939099 >> /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so >> 7f48b8e10000-7f48b8e11000 r--p 00013000 08:35 38939099 >> /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so >> 7f48b8e11000-7f48b8e15000 rw-p 00014000 08:35 38939099 >> /usr/lib/python3/dist-packages/h5py/h5s.cpython-35m-x86_64-linux-gnu.so >> 7f48b8e15000-7f48b8e2b000 r-xp 00000000 08:35 38939165 >> /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so >> 7f48b8e2b000-7f48b902a000 ---p 00016000 08:35 38939165 >> /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so >> 7f48b902a000-7f48b902b000 r--p 00015000 08:35 38939165 >> /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so >> 7f48b902b000-7f48b902e000 rw-p 00016000 08:35 38939165 >> /usr/lib/python3/dist-packages/h5py/h5a.cpython-35m-x86_64-linux-gnu.so >> 7f48b902e000-7f48b902f000 rw-p 00000000 00:00 0 >> 7f48b902f000-7f48b9036000 r-xp 00000000 08:35 38939109 >> /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so >> 7f48b9036000-7f48b9235000 ---p 00007000 08:35 38939109 >> /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so >> 7f48b9235000-7f48b9236000 r--p 00006000 08:35 38939109 >> /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so >> 7f48b9236000-7f48b9238000 rw-p 00007000 08:35 38939109 >> /usr/lib/python3/dist-packages/h5py/h5z.cpython-35m-x86_64-linux-gnu.so >> 7f48b9238000-7f48b9249000 r-xp 00000000 08:35 38939098 >> /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so >> 7f48b9249000-7f48b9448000 ---p 00011000 08:35 38939098 >> /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so >> 7f48b9448000-7f48b9449000 r--p 00010000 08:35 38939098 >> /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so >> 7f48b9449000-7f48b944b000 rw-p 00011000 08:35 38939098 >> /usr/lib/python3/dist-packages/h5py/h5.cpython-35m-x86_64-linux-gnu.so >> 7f48b944b000-7f48b944c000 rw-p 00000000 00:00 0 >> 7f48b944c000-7f48b9455000 r-xp 00000000 08:35 38939150 >> /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so >> 7f48b9455000-7f48b9654000 ---p 00009000 08:35 38939150 >> /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so >> 7f48b9654000-7f48b9655000 r--p 00008000 08:35 38939150 >> /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so >> 7f48b9655000-7f48b9656000 rw-p 00009000 08:35 38939150 >> /usr/lib/python3/dist-packages/h5py/utils.cpython-35m-x86_64-linux-gnu.so >> 7f48b9656000-7f48b9696000 rw-p 00000000 00:00 0 >> 7f48b9696000-7f48b96d9000 r-xp 00000000 08:35 38939100 >> /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so >> 7f48b96d9000-7f48b98d8000 ---p 00043000 08:35 38939100 >> /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so >> 7f48b98d8000-7f48b98d9000 r--p 00042000 08:35 38939100 >> /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so >> 7f48b98d9000-7f48b98e3000 rw-p 00043000 08:35 38939100 >> /usr/lib/python3/dist-packages/h5py/h5t.cpython-35m-x86_64-linux-gnu.so >> 7f48b98e3000-7f48b9901000 r-xp 00000000 08:35 32248272 >> /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 >> 7f48b9901000-7f48b9b00000 ---p 0001e000 08:35 32248272 >> /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 >> 7f48b9b00000-7f48b9b01000 r--p 0001d000 08:35 32248272 >> /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 >> 7f48b9b01000-7f48b9b02000 rw-p 0001e000 08:35 32248272 >> /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 >> 7f48b9b02000-7f48b9b03000 rw-p 00000000 00:00 0 >> 7f48b9b03000-7f48b9b2b000 r-xp 00000000 08:35 38939110 >> /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so >> 7f48b9b2b000-7f48b9d2a000 ---p 00028000 08:35 38939110 >> /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so >> 7f48b9d2a000-7f48b9d2b000 r--p 00027000 08:35 38939110 >> /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so >> 7f48b9d2b000-7f48b9d2d000 rw-p 00028000 08:35 38939110 >> /usr/lib/python3/dist-packages/h5py/defs.cpython-35m-x86_64-linux-gnu.so >> 7f48b9d2d000-7f48b9d43000 r-xp 00000000 08:35 38939146 >> /usr/lib/python3/dist-packages/h5py/_objects.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b9d43000-7f48b9f42000 ---p 00016000 08:35 38939146 >> /usr/lib/python3/dist-packages/h5py/_objects.cpython-35m- >> x86_64-linux-gnu.so >> 7f48b9f42000-7f48b9f43000 r--p 00015000 08:35 38939146 >> /usr/lib/python3/dist-packages/h5py/_objects.cpython-35m-x86_64-linux-gnu.soAborted >> (core dumped) >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 seb.an at icloud.com Fri Oct 20 04:48:33 2017 From: seb.an at icloud.com (sebastian_a) Date: Fri, 20 Oct 2017 01:48:33 -0700 (MST) Subject: [vtkusers] triangle subdivision from subset of triangles In-Reply-To: References: Message-ID: <1508489313152-0.post@n5.nabble.com> Hi Kurt, I tried it using the following solution. Unfortunately the vtkAppendPolyData filter in the end produces non-manifold edges as it just adds both meshes together without combining the edges on each border. Also it is not a super clean solution using a set for the IDs. ids = set() selectedPolyData = vtk.vtkPolyData() selectedPolyData.DeepCopy(originalPolyData) selectedPolyData.BuildLinks() unselectedPolyData = vtk.vtkPolyData() unselectedPolyData.DeepCopy(originalPolyData) unselectedPolyData.BuildLinks() for c in xrange(originalPolyData.GetNumberOfCells()): cell = originalPolyData.GetCell(c) if c in ids: unselectedPolyData.DeleteCell(c) else: selectedPolyData.DeleteCell(c) selectedPolyData.RemoveDeletedCells() unselectedPolyData.RemoveDeletedCells() # subdivide or do whatever with selectedPolyData append = vtk.vtkAppendPolyData() append.AddInputData(selectedPolyData) append.AddInputData(unselectedPolyData) append.Update() originalPolyData = append.GetOutput() - Sebastian -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Fri Oct 20 08:54:14 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 20 Oct 2017 08:54:14 -0400 Subject: [vtkusers] Adding Implicit Functions To Renderer? In-Reply-To: <1508480380434-0.post@n5.nabble.com> References: <1508480380434-0.post@n5.nabble.com> Message-ID: If your goal is to actually view a vtkImplicitFunction, you'll first need to give it to a vtkImplicitModeller that computes a volume with the signed distance from the object the implicit function represents. Then you'll need to apply a vtkContourFilter to it to extract a surface. Add this surface to a mapper, assign the mapper to an actor, and you are done. If your goal is to just view a plane, you can generate one with vtkPlaneSource, connect its output to a mapper, and then assign the mapper to an actor. HTH, Cory On Fri, Oct 20, 2017 at 2:19 AM, Andaharoo wrote: > Pretty simple question. But I couldn't find anything googling. How can I > add > vtkImplicitFunctions as actors. For instance, I want to add a vtkPlane as > an > actor to the renderer. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Oct 20 08:57:49 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 20 Oct 2017 08:57:49 -0400 Subject: [vtkusers] DICOM pixel value is strange In-Reply-To: <1508483186051-0.post@n5.nabble.com> References: <1508483186051-0.post@n5.nabble.com> Message-ID: It looks like you are casting the array pointer to a double array. Are your values actually stored in doubles? Your expected range of [0, 255] suggests they would actually be stored as unsigned chars, so first try to change your static_cast(image->GetScalarPointer(ijk)); to static_cast(image->GetScalarPointer(ijk)); Hope that helps, Cory On Fri, Oct 20, 2017 at 3:06 AM, arwtyxouymz wrote: > Hi, > > I wrote the code to pick the DICOM pixel value, but pixel value is strange. > My code is below: > > ``` > vtkSmartPointer image = reader->GetOutput(); > > int ijk[3]; > double pcoords[3]; > > for (vtkIdType id = 0; id < image->GetNumberOfPoints(); ++id) { > int check = image->ComputeStructuredCoordinates( > image->GetPoint(id), > ijk, pcoords); > cout << "ID: " << id << ", "; > cout << "ijk: " << "(" << ijk[0] << ", " << ijk[1] << ", " << > ijk[2] > << "), "; > auto *pixel = static_cast(image->GetScalarPointer(ijk)); > cout << "Pixel: " << *pixel << endl; > } > ``` > > I supposed *pixel value is in the range 0 ~ 255, but actual output is like > -2.06898e+289. > Why? > Moreover, *pixel max value is 1.98914e-289, and sometimes *pixel is nan. > It's strange!!! > > Can you help me? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrin_hartwig at gmx.de Fri Oct 20 09:07:10 2017 From: katrin_hartwig at gmx.de (Katrin Hartwig) Date: Fri, 20 Oct 2017 15:07:10 +0200 Subject: [vtkusers] VTK-JS: How to get Position of actor In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From briend at cyceron.fr Fri Oct 20 09:57:44 2017 From: briend at cyceron.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCUklFTkQ=?=) Date: Fri, 20 Oct 2017 15:57:44 +0200 Subject: [vtkusers] about vtkDijkstraGraphGeodesicPath In-Reply-To: References: <1294093b-b1d2-12f7-c38a-56b55db8e021@cyceron.fr> Message-ID: Thanks Yoshimi, really. All your advice are very useful. Best, Le 20/10/2017 ? 07:29, kenichiro yoshimi a ?crit?: > Hello Frederic, > > vtkSCurveSpline seems to be capable of calculating the coordinate at > the midpoint of the geodesic path by an interpolating spline. > > --- > import vtk > import math > > cylinder= vtk.vtkSphereSource() > cylinder.SetCenter(0.0, 0.0, 0.0) > cylinder.SetRadius(0.5) > > points = vtk.vtkPoints() > > vIds = [4, 12, 23, 28] > > p0 = [0]*3 > p1 = [0]*3 > dist = 0.0 > for n in range(len(vIds)-1): > v0 = vIds[n] > v1 = vIds[n+1] > > dijkstra = vtk.vtkDijkstraGraphGeodesicPath() > dijkstra.SetInputConnection(cylinder.GetOutputPort()) > dijkstra.SetStartVertex(v0) > dijkstra.SetEndVertex(v1) > dijkstra.Update() > > pts = dijkstra.GetOutput().GetPoints() > end = n for ptId in range(pts.GetNumberOfPoints()-1, end, -1): > pts.GetPoint(ptId, p0) > points.InsertNextPoint(p0) > > for ptId in range(pts.GetNumberOfPoints()-1): > pts.GetPoint(ptId, p0) > pts.GetPoint(ptId+1, p1) > #print(math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1))) > dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) > > print('length: ' + str(dist)) > > xSpline = vtk.vtkSCurveSpline() > ySpline = vtk.vtkSCurveSpline() > zSpline = vtk.vtkSCurveSpline() > > spline = vtk.vtkParametricSpline() > spline.ParameterizeByLengthOn() > spline.SetXSpline(xSpline) > spline.SetYSpline(ySpline) > spline.SetZSpline(zSpline) > spline.SetPoints(points) > > functionSource = vtk.vtkParametricFunctionSource() > functionSource.SetParametricFunction(spline) > functionSource.Update() > > u = [0.5,0,0] > midpoint = [0]*3 > du = [0]*9 > spline.Evaluate(u, midpoint, du) > print('midpoint: ') > print(midpoint) > --- > > Thanks > > 2017-10-20 0:42 GMT+09:00 Fr?d?ric BRIEND : >> Last question Yoshimi (or others), >> >> With your script*, is-there a way to extract the point (in x,y,z or vertex >> value) where dist/2 (the half of the total geodesic distance)? >> >> Thanks for your kindness, >> >> Frederic >> >> * >> >> >> import vtk >> import math >> >> cylinder= vtk.vtkSphereSource() >> cylinder.SetCenter(0.0, 0.0, 0.0) >> cylinder.SetRadius(0.5) >> >> appendFilter = vtk.vtkAppendFilter() >> appendFilter.MergePointsOn() >> >> vIds = [4, 12, 23, 28] >> >> p0 = [0,0,0] >> p1 = [0,0,0] >> dist = 0.0 >> for n in range(len(vIds)-1): >> v0 = vIds[n] >> v1 = vIds[n+1] >> >> dijkstra = vtk.vtkDijkstraGraphGeodesicPath() >> dijkstra.SetInputConnection(cylinder.GetOutputPort()) >> dijkstra.SetStartVertex(v0) >> dijkstra.SetEndVertex(v1) >> dijkstra.Update() >> >> pts = dijkstra.GetOutput().GetPoints() >> for ptId in range(pts.GetNumberOfPoints()-1): >> pts.GetPoint(ptId, p0) >> pts.GetPoint(ptId+1, p1) >> print(math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1))) >> dist += math.sqrt(vtk.vtkMath.Distance2BetweenPoints(p0, p1)) >> >> appendFilter.AddInputConnection(dijkstra.GetOutput()) >> >> print(dist) >> >> appendFilter.Update() >> -- FredericBriend PhD Candidate Universit? de Caen Normandie Laboratoire Imagerie et Strat?gies Th?rapeutiques de la Schizophr?nie (ISTS, EA 7466) GIP CYCERON, Caen 14000, France Tel +33 2 31 47 01 56 Email : briend at cyceron.fr http://www.ists.cyceron.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Fri Oct 20 15:39:02 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 20 Oct 2017 19:39:02 +0000 Subject: [vtkusers] VTK-JS: How to get Position of actor In-Reply-To: References: Message-ID: Then I believe your dataset is not valid. How did you build it? On Fri, Oct 20, 2017 at 1:07 PM, Katrin Hartwig wrote: > Hi Sebastian and Logan, > > thank you a lot for your help and i apologize for my late answer! > Unfortunately I still could not solve the problem. I tried both > suggestions: > With *actor*.getCenter() I get the default-values (0,0,0) for each actor. > So I tried to get the information of the dataset as you suggested: > > dataset = mapper.getInputData(); > bounds = dataset.getBounds(); > > By doing so I get the following error massage: > * "getBounds called on an array with components of 1"* > > The output of getBounds remains default because of the error. > > As I could not find any solutions yet, I would be grateful for any help! > > Thank you > Katrin > > *Gesendet:* Montag, 18. September 2017 um 16:38 Uhr > *Von:* "Sebastien Jourdain" > *An:* "Katrin Hartwig" > *Cc:* vtkusers > *Betreff:* Re: [vtkusers] VTK-JS: How to get Position of actor > Hi Katrin, > > The actor position only describe the relative position to the data, that's > why by default they are always (0,0,0). > Which means its your source or dataset that has the information about the > position that you are looking for. > > For example to find the bounds of a rendered dataset you can do as follow. > > dataset = mapper.getInputData(); > bounds = dataset.getBounds(); > > // bounds is an array as follow: > // [ minX, maxX, minY, maxY, minZ, maxZ] > > Hope that helps, > > Otherwise you can learn more on the basic concepts behind VTK here: > https://www.vtk.org/vtk-users-guide/ > > Seb > > On Mon, Sep 18, 2017 at 7:31 AM, Katrin Hartwig > wrote: >> >> Dear all, >> >> I am using a visualization of several actors with VTK-js. Unfortunately, >> when using *actor.getPosition() *I always get [0,0,0] as a result, no >> matter which actor I checked, although they appear on different positions >> in my rendering window. >> How can I get the real positions or centers of the different actors? >> >> As I am completely new to VTK-js and I could not find any solutions to my >> problem, any help would be great! >> >> Thank you >> Katrin >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/ >> opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.chen at gmail.com Fri Oct 20 19:07:59 2017 From: elvis.chen at gmail.com (Elvis Chen) Date: Fri, 20 Oct 2017 19:07:59 -0400 Subject: [vtkusers] polyline and appendpolydata problem Message-ID: hi all, I am working on a 3D surface reconstruction problem. Think of a 3D laser scanner, where I have multiple sets of 3D points (1 set per laser scan line). I would like to visualize them as a set of polylines, 1 polyline per scan line. I wrote the following code to read these data from 2 files. One file is a set of 3D points, the other is a text file indicating the number of points per scan line. I then create 1 polyline per scan line, and append them together using vtkappendpolydata. I then wrote the results into a .vtk file. However, visualizing the .vtk file suggests that the beginning of the nth scan line is connected to the end of the (n-1)th scan line. How do I create a set of the disconnected polylines? any help is very much appreciated, My codes are as following: #include #include #include #include #include #include #include #include int main ( int argc, char *argv[]) { ifstream indexFile(argv[1]); ifstream pointFile(argv[2]); int num; double x, y, z; vtkSmartPointer< vtkAppendPolyData > append = vtkSmartPointer< vtkAppendPolyData >::New(); while (indexFile >> num) { vtkSmartPointer< vtkPoints > points = vtkSmartPointer< vtkPoints >::New(); vtkSmartPointer< vtkPolyLine > polyline = vtkSmartPointer< vtkPolyLine >::New(); polyline->GetPointIds()->SetNumberOfIds(num); for (unsigned int i = 0; i < (unsigned int)num; i++) { pointFile >> x >> y >> z; points->InsertNextPoint(x, y, z); polyline->GetPointIds()->SetId(i, i); } vtkSmartPointer< vtkCellArray > cells = vtkSmartPointer< vtkCellArray >::New(); cells->InsertNextCell(polyline); vtkSmartPointer< vtkPolyData > polyData = vtkSmartPointer< vtkPolyData >::New(); polyData->SetPoints(points); polyData->SetLines(cells); polyData->Modified(); append->AddInputData(polyData); append->Modified(); } indexFile.close(); pointFile.close(); vtkSmartPointer< vtkPolyDataWriter > writer = vtkSmartPointer< vtkPolyDataWriter >::New(); writer->SetFileName("test.vtk"); writer->SetInputConnection(append->GetOutputPort()); writer->Write(); return (0); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From arw.tyx-ouy_mz at ezweb.ne.jp Fri Oct 20 20:49:20 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Fri, 20 Oct 2017 17:49:20 -0700 (MST) Subject: [vtkusers] DICOM pixel value is strange In-Reply-To: References: <1508483186051-0.post@n5.nabble.com> Message-ID: <1508546960231-0.post@n5.nabble.com> Thank you for your help, Cory! I tried to do static_cast(image->GetScalarPointer(ijk)); but it doesn't work well..... My dicom image's PixelRepresentation is 1, so i also tried to do static_cast(image->GetScalarPointer(ijk)); but it also doesn't work well. Why??? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Sat Oct 21 00:41:18 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sat, 21 Oct 2017 13:41:18 +0900 Subject: [vtkusers] polyline and appendpolydata problem In-Reply-To: References: Message-ID: Hi I tested your code with the following input files as a trial, however the problem didn't occur. ---indexFile--- 3 3 --------------- ---pointFile--- 0.0 0.0 0.0 0.0 1.0 0.0 0.0 2.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 1.0 2.0 0.0 --------------- I think you need to firstly check the validity of the input file format. Thanks a lot 2017-10-21 8:07 GMT+09:00 Elvis Chen : > hi all, > > I am working on a 3D surface reconstruction problem. Think of a 3D laser > scanner, where I have multiple sets of 3D points (1 set per laser scan > line). I would like to visualize them as a set of polylines, 1 polyline per > scan line. > > I wrote the following code to read these data from 2 files. One file is a > set of 3D points, the other is a text file indicating the number of points > per scan line. I then create 1 polyline per scan line, and append them > together using vtkappendpolydata. I then wrote the results into a .vtk file. > > However, visualizing the .vtk file suggests that the beginning of the nth > scan line is connected to the end of the (n-1)th scan line. How do I create > a set of the disconnected polylines? > > any help is very much appreciated, > > My codes are as following: > > #include > #include > #include > #include > #include > #include > #include > #include > > int main ( int argc, char *argv[]) > { > > ifstream indexFile(argv[1]); > ifstream pointFile(argv[2]); > int num; > double x, y, z; > vtkSmartPointer< vtkAppendPolyData > append = > vtkSmartPointer< vtkAppendPolyData >::New(); > > while (indexFile >> num) > { > vtkSmartPointer< vtkPoints > points = > vtkSmartPointer< vtkPoints >::New(); > vtkSmartPointer< vtkPolyLine > polyline = > vtkSmartPointer< vtkPolyLine >::New(); > > polyline->GetPointIds()->SetNumberOfIds(num); > for (unsigned int i = 0; i < (unsigned int)num; i++) > { > pointFile >> x >> y >> z; > points->InsertNextPoint(x, y, z); > polyline->GetPointIds()->SetId(i, i); > } > > vtkSmartPointer< vtkCellArray > cells = > vtkSmartPointer< vtkCellArray >::New(); > cells->InsertNextCell(polyline); > vtkSmartPointer< vtkPolyData > polyData = > vtkSmartPointer< vtkPolyData >::New(); > polyData->SetPoints(points); > polyData->SetLines(cells); > polyData->Modified(); > > append->AddInputData(polyData); > append->Modified(); > } > indexFile.close(); > pointFile.close(); > > vtkSmartPointer< vtkPolyDataWriter > writer = > vtkSmartPointer< vtkPolyDataWriter >::New(); > writer->SetFileName("test.vtk"); > writer->SetInputConnection(append->GetOutputPort()); > writer->Write(); > > > return (0); > } > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 arw.tyx-ouy_mz at ezweb.ne.jp Sat Oct 21 07:42:01 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Sat, 21 Oct 2017 04:42:01 -0700 (MST) Subject: [vtkusers] My interactor style doesn't work Message-ID: <1508586121400-0.post@n5.nabble.com> Hi, I'm trying to create my style subclass of vtkInteractorStyleImage. I want to callback click event and mouse move event. I referred to this example to display my dicom image, https://lorensen.github.io/VTKExamples/site/Cxx/IO/ReadDICOM/ and referred to this to create my style class. https://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/MarkKeypoints DICOM image appear, but my mouse event does not work. Following my code: class MyStyle : public vtkInteractorStyleImage { public: static MyStyle* New() { return nullptr; } vtkTypeMacro(MyStyle, vtkInteractorStyleImage); void OnLeftButtonDown() override { std::cout << "Left Button Clicked!" << std::endl; vtkInteractorStyleImage::OnLeftButtonDown(); } void OnMouseMove() override { std::cout << "Mouse Moving!" << std::endl; vtkInteractorStyleImage::OnMouseMove(); } }; int main(int argc, char** argv) { // Verify input arguments if ( argc != 2 ) { std::cout << "Usage: " << argv[0] << " Filename(.img)" << std::endl; return EXIT_FAILURE; } std::string inputFilename = argv[1]; vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(inputFilename.c_str()); reader->Update(); vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(reader->GetOutputPort()); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkSmartPointer style = vtkSmartPointer::New(); renderWindowInteractor->SetInteractorStyle( style ); imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->Render(); imageViewer->GetRenderer()->ResetCamera(); imageViewer->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } How change my code? please help me! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Sat Oct 21 08:36:00 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sat, 21 Oct 2017 21:36:00 +0900 Subject: [vtkusers] My interactor style doesn't work In-Reply-To: <1508586121400-0.post@n5.nabble.com> References: <1508586121400-0.post@n5.nabble.com> Message-ID: Hello, It seems to work to change as follows: #include #include #include #include #include #include #include #include class MyStyle : public vtkInteractorStyleImage { public: static MyStyle* New(); vtkTypeMacro(MyStyle, vtkInteractorStyleImage); void OnLeftButtonDown() override { std::cout << "Left Button Clicked!" << std::endl; vtkInteractorStyleImage::OnLeftButtonDown(); } void OnMouseMove() override { std::cout << "Mouse Moving!" << std::endl; vtkInteractorStyleImage::OnMouseMove(); } }; vtkStandardNewMacro(MyStyle); int main(int argc, char* argv[]) { // Verify input arguments if ( argc != 2 ) { std::cout << "Usage: " << argv[0] << " Filename(.img)" << std::endl; return EXIT_FAILURE; } std::string inputFilename = argv[1]; // Read all the DICOM files in the specified directory. vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(inputFilename.c_str()); reader->Update(); // Visualize vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(reader->GetOutputPort()); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkSmartPointer style = vtkSmartPointer::New(); imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->Render(); imageViewer->GetRenderer()->ResetCamera(); imageViewer->Render(); renderWindowInteractor->SetInteractorStyle(style); style->SetDefaultRenderer(imageViewer->GetRenderer()); style->SetCurrentRenderer(imageViewer->GetRenderer()); renderWindowInteractor->Start(); return EXIT_SUCCESS; } Hope that helps you. 2017-10-21 20:42 GMT+09:00 arwtyxouymz : > Hi, > > I'm trying to create my style subclass of vtkInteractorStyleImage. > I want to callback click event and mouse move event. > > I referred to this example to display my dicom image, > https://lorensen.github.io/VTKExamples/site/Cxx/IO/ReadDICOM/ > > and referred to this to create my style class. > https://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/MarkKeypoints > > DICOM image appear, but my mouse event does not work. > Following my code: > > class MyStyle : public vtkInteractorStyleImage { > public: > static MyStyle* New() { > return nullptr; > } > vtkTypeMacro(MyStyle, vtkInteractorStyleImage); > > void OnLeftButtonDown() override { > std::cout << "Left Button Clicked!" << std::endl; > vtkInteractorStyleImage::OnLeftButtonDown(); > } > > void OnMouseMove() override { > std::cout << "Mouse Moving!" << std::endl; > vtkInteractorStyleImage::OnMouseMove(); > } > > }; > > > int main(int argc, char** argv) { > // Verify input arguments > if ( argc != 2 ) > { > std::cout << "Usage: " << argv[0] > << " Filename(.img)" << std::endl; > return EXIT_FAILURE; > } > std::string inputFilename = argv[1]; > > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName(inputFilename.c_str()); > reader->Update(); > > vtkSmartPointer imageViewer = > vtkSmartPointer::New(); > imageViewer->SetInputConnection(reader->GetOutputPort()); > > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > vtkSmartPointer style = vtkSmartPointer::New(); > renderWindowInteractor->SetInteractorStyle( style ); > > imageViewer->SetupInteractor(renderWindowInteractor); > imageViewer->Render(); > imageViewer->GetRenderer()->ResetCamera(); > imageViewer->Render(); > > renderWindowInteractor->Start(); > > > return EXIT_SUCCESS; > > } > > > How change my code? > please help me! > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 arw.tyx-ouy_mz at ezweb.ne.jp Sat Oct 21 09:03:50 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Sat, 21 Oct 2017 06:03:50 -0700 (MST) Subject: [vtkusers] My interactor style doesn't work In-Reply-To: References: <1508586121400-0.post@n5.nabble.com> Message-ID: <1508591030321-0.post@n5.nabble.com> Thank you kenchiro! It worked! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From arw.tyx-ouy_mz at ezweb.ne.jp Sun Oct 22 08:00:59 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Sun, 22 Oct 2017 05:00:59 -0700 (MST) Subject: [vtkusers] Point Pick on vtkContextView Message-ID: <1508673659618-0.post@n5.nabble.com> Hi, I want to point pick on vtkContextView by mouse moving. Concretely, I refer to this example https://lorensen.github.io/VTKExamples/site/Cxx/Plotting/LinePlot/ and I want to pick up x value at mouse pointer from the figure in this example. I think I should use vtkContextInteractorStyle and vtkPropPicker classes, but I don't know how i should do coding. Can you help me? please. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From elvis.chen at gmail.com Sun Oct 22 13:11:48 2017 From: elvis.chen at gmail.com (Elvis Chen) Date: Sun, 22 Oct 2017 13:11:48 -0400 Subject: [vtkusers] polyline and appendpolydata problem In-Reply-To: References: Message-ID: You are right. The data files I was given was bad. Thanks for going through the trouble, On 21 Oct 2017 12:41 a.m., "kenichiro yoshimi" wrote: > Hi > > I tested your code with the following input files as a trial, however > the problem didn't occur. > ---indexFile--- > 3 > 3 > --------------- > ---pointFile--- > 0.0 0.0 0.0 > 0.0 1.0 0.0 > 0.0 2.0 0.0 > 1.0 0.0 0.0 > 1.0 1.0 0.0 > 1.0 2.0 0.0 > --------------- > > I think you need to firstly check the validity of the input file format. > > Thanks a lot > > 2017-10-21 8:07 GMT+09:00 Elvis Chen : > > hi all, > > > > I am working on a 3D surface reconstruction problem. Think of a 3D laser > > scanner, where I have multiple sets of 3D points (1 set per laser scan > > line). I would like to visualize them as a set of polylines, 1 polyline > per > > scan line. > > > > I wrote the following code to read these data from 2 files. One file is a > > set of 3D points, the other is a text file indicating the number of > points > > per scan line. I then create 1 polyline per scan line, and append them > > together using vtkappendpolydata. I then wrote the results into a .vtk > file. > > > > However, visualizing the .vtk file suggests that the beginning of the nth > > scan line is connected to the end of the (n-1)th scan line. How do I > create > > a set of the disconnected polylines? > > > > any help is very much appreciated, > > > > My codes are as following: > > > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > > int main ( int argc, char *argv[]) > > { > > > > ifstream indexFile(argv[1]); > > ifstream pointFile(argv[2]); > > int num; > > double x, y, z; > > vtkSmartPointer< vtkAppendPolyData > append = > > vtkSmartPointer< vtkAppendPolyData >::New(); > > > > while (indexFile >> num) > > { > > vtkSmartPointer< vtkPoints > points = > > vtkSmartPointer< vtkPoints >::New(); > > vtkSmartPointer< vtkPolyLine > polyline = > > vtkSmartPointer< vtkPolyLine >::New(); > > > > polyline->GetPointIds()->SetNumberOfIds(num); > > for (unsigned int i = 0; i < (unsigned int)num; i++) > > { > > pointFile >> x >> y >> z; > > points->InsertNextPoint(x, y, z); > > polyline->GetPointIds()->SetId(i, i); > > } > > > > vtkSmartPointer< vtkCellArray > cells = > > vtkSmartPointer< vtkCellArray >::New(); > > cells->InsertNextCell(polyline); > > vtkSmartPointer< vtkPolyData > polyData = > > vtkSmartPointer< vtkPolyData >::New(); > > polyData->SetPoints(points); > > polyData->SetLines(cells); > > polyData->Modified(); > > > > append->AddInputData(polyData); > > append->Modified(); > > } > > indexFile.close(); > > pointFile.close(); > > > > vtkSmartPointer< vtkPolyDataWriter > writer = > > vtkSmartPointer< vtkPolyDataWriter >::New(); > > writer->SetFileName("test.vtk"); > > writer->SetInputConnection(append->GetOutputPort()); > > writer->Write(); > > > > > > return (0); > > } > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 katrin_hartwig at gmx.de Mon Oct 23 06:50:44 2017 From: katrin_hartwig at gmx.de (Katrin Hartwig) Date: Mon, 23 Oct 2017 12:50:44 +0200 Subject: [vtkusers] VTK-JS: How to get Position of actor In-Reply-To: References: Message-ID: <0b8ae5f2-9d2f-fa03-474a-59827360ae74@gmx.de> Hi Sebastien, I stored the data as vtk data and used the vtkDataConverter which seemed to work fine. When I run the code, every actor appears exactly at the right place. So I guess the information in the vtk data must be correct (without ever using any function like "setPosition"). Though I do not understand why I cannot retrieve the information of their positions in the code. Here is how I read my data files, it is a function I found in the documentation: function loadSegment(string, actor, renderer, i){ const reader = vtkHttpDataSetReader.newInstance({ fetchGzip: true }); reader.setUrl(string).then(() => { reader.loadData().then(() => { renderer.resetCamera(); renderWindow.render(); }); }); const mapper = vtkMapper.newInstance(); mapper.setInputConnection(reader.getOutputPort()); actor.setMapper(mapper); renderer.addActor(actor); } Any ideas what could be wrong? Thank you for your help! Am 20.10.2017 um 21:39 schrieb Sebastien Jourdain: > Then I believe your dataset is not valid. How did you build it? > > > On Fri, Oct 20, 2017 at 1:07 PM, Katrin Hartwig > wrote: > > Hi Sebastian and Logan, > thank you a lot for your help and i apologize for my late answer! > Unfortunately I still could not solve the problem. I tried both > suggestions: > With *actor*.getCenter() I get the default-values (0,0,0) for each > actor. So I tried to get the information of the dataset as you > suggested: > dataset = mapper.getInputData(); > bounds = dataset.getBounds(); > By doing so I get the following error massage: > * "getBounds called on an array with components of 1"* > The output of getBounds remains default because of the error. > As I could not find any solutions yet, I would be grateful for any > help! > Thank you > Katrin > *Gesendet:* Montag, 18. September 2017 um 16:38 Uhr > *Von:* "Sebastien Jourdain" > > *An:* "Katrin Hartwig" > > *Cc:* vtkusers > > *Betreff:* Re: [vtkusers] VTK-JS: How to get Position of actor > Hi Katrin, > The actor position only describe the relative position to the > data, that's why by default they are always (0,0,0). > Which means its your source or dataset that has the information > about the position that you are looking for. > For example to find the bounds of a rendered dataset you can do as > follow. > dataset = mapper.getInputData(); > bounds = dataset.getBounds(); > // bounds is an array as follow: > // [ minX, maxX, minY, maxY, minZ, maxZ] > Hope that helps, > Otherwise you can learn more on the basic concepts behind VTK > here: https://www.vtk.org/vtk-users-guide/ > > Seb > On Mon, Sep 18, 2017 at 7:31 AM, Katrin Hartwig > > wrote: > > Dear all, > I am using a visualization of several actors with VTK-js. > Unfortunately, when using /actor.getPosition() /I always get > [0,0,0] as a result, no matter which actor I checked, although > they appear on different positions in my rendering window. > How can I get the real positions or centers of the different > actors? > As I am completely new to VTK-js and I could not find any > solutions to my problem, any help would be great! > Thank you > Katrin > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 arw.tyx-ouy_mz at ezweb.ne.jp Mon Oct 23 08:10:28 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Mon, 23 Oct 2017 05:10:28 -0700 (MST) Subject: [vtkusers] value picking from popup box Message-ID: <1508760628117-0.post@n5.nabble.com> Hi, I have a problem with value picking from vtkChartXY popup box. https://lorensen.github.io/VTKExamples/site/Cxx/Plotting/LinePlot/ In this example code, hovering mouse over the point, the rectangle box will appear and it contains the x, y values at the point like this image. I want to get these x, y values. How should i do? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From andrew.slaughter at inl.gov Mon Oct 23 10:40:57 2017 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Mon, 23 Oct 2017 08:40:57 -0600 Subject: [vtkusers] Plane clip individual cells Message-ID: I have an unstructured Mesh (read via vtkExodusIIReader) and for a known set of cells of that mesh I need to use a plane to clip the individual cell (I have an origin and normal for each cell for which this needs to be done). Can someone please point me in the correct direction to accomplish this task? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Mon Oct 23 14:29:45 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 23 Oct 2017 14:29:45 -0400 Subject: [vtkusers] VTK-JS: How to get Position of actor In-Reply-To: <0b8ae5f2-9d2f-fa03-474a-59827360ae74@gmx.de> References: <0b8ae5f2-9d2f-fa03-474a-59827360ae74@gmx.de> Message-ID: Ok the issue is related to the vtkDataConverter that does not properly define the number of component to 3 for points. You can edit the generated json to fix that. This will fix the getBounds() call. I'm going to fix the vtkDataConverter code. On Mon, Oct 23, 2017 at 6:50 AM, Katrin Hartwig wrote: > Hi Sebastien, > I stored the data as vtk data and used the vtkDataConverter which seemed > to work fine. When I run the code, every actor appears exactly at the right > place. So I guess the information in the vtk data must be correct (without > ever using any function like "setPosition"). Though I do not understand why > I cannot retrieve the information of their positions in the code. > > Here is how I read my data files, it is a function I found in the > documentation: > > function loadSegment(string, actor, renderer, i){ > const reader = vtkHttpDataSetReader.newInstance({ fetchGzip: true }); > reader.setUrl(string).then(() => { > reader.loadData().then(() => { > renderer.resetCamera(); > renderWindow.render(); > }); > }); > const mapper = vtkMapper.newInstance(); > mapper.setInputConnection(reader.getOutputPort()); > actor.setMapper(mapper); > renderer.addActor(actor); > } > > Any ideas what could be wrong? > > Thank you for your help! > > Am 20.10.2017 um 21:39 schrieb Sebastien Jourdain: > > Then I believe your dataset is not valid. How did you build it? > > > On Fri, Oct 20, 2017 at 1:07 PM, Katrin Hartwig > wrote: > >> Hi Sebastian and Logan, >> >> thank you a lot for your help and i apologize for my late answer! >> Unfortunately I still could not solve the problem. I tried both >> suggestions: >> With *actor*.getCenter() I get the default-values (0,0,0) for each >> actor. So I tried to get the information of the dataset as you suggested: >> >> dataset = mapper.getInputData(); >> bounds = dataset.getBounds(); >> >> By doing so I get the following error massage: >> * "getBounds called on an array with components of 1"* >> >> The output of getBounds remains default because of the error. >> >> As I could not find any solutions yet, I would be grateful for any help! >> >> Thank you >> Katrin >> >> *Gesendet:* Montag, 18. September 2017 um 16:38 Uhr >> *Von:* "Sebastien Jourdain" >> *An:* "Katrin Hartwig" >> *Cc:* vtkusers >> *Betreff:* Re: [vtkusers] VTK-JS: How to get Position of actor >> Hi Katrin, >> >> The actor position only describe the relative position to the data, >> that's why by default they are always (0,0,0). >> Which means its your source or dataset that has the information about the >> position that you are looking for. >> >> For example to find the bounds of a rendered dataset you can do as follow. >> >> dataset = mapper.getInputData(); >> bounds = dataset.getBounds(); >> >> // bounds is an array as follow: >> // [ minX, maxX, minY, maxY, minZ, maxZ] >> >> Hope that helps, >> >> Otherwise you can learn more on the basic concepts behind VTK here: >> https://www.vtk.org/vtk-users-guide/ >> >> Seb >> >> On Mon, Sep 18, 2017 at 7:31 AM, Katrin Hartwig >> wrote: >>> >>> Dear all, >>> >>> I am using a visualization of several actors with VTK-js. Unfortunately, >>> when using *actor.getPosition() *I always get [0,0,0] as a result, no >>> matter which actor I checked, although they appear on different positions >>> in my rendering window. >>> How can I get the real positions or centers of the different actors? >>> >>> As I am completely new to VTK-js and I could not find any solutions to >>> my problem, any help would be great! >>> >>> Thank you >>> Katrin >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 Mon Oct 23 14:32:01 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 23 Oct 2017 14:32:01 -0400 Subject: [vtkusers] VTK-JS: How to get Position of actor In-Reply-To: References: <0b8ae5f2-9d2f-fa03-474a-59827360ae74@gmx.de> Message-ID: Hum, looking at the code it seems that information should be properly set. https://github.com/Kitware/vtk-js/blob/master/Utilities/DataGenerator/vtk-data-converter.py#L182 Are you using an older version? On Mon, Oct 23, 2017 at 2:29 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > Ok the issue is related to the vtkDataConverter that does not properly > define the number of component to 3 for points. > You can edit the generated json to fix that. This will fix the getBounds() > call. > > I'm going to fix the vtkDataConverter code. > > On Mon, Oct 23, 2017 at 6:50 AM, Katrin Hartwig > wrote: > >> Hi Sebastien, >> I stored the data as vtk data and used the vtkDataConverter which seemed >> to work fine. When I run the code, every actor appears exactly at the right >> place. So I guess the information in the vtk data must be correct (without >> ever using any function like "setPosition"). Though I do not understand why >> I cannot retrieve the information of their positions in the code. >> >> Here is how I read my data files, it is a function I found in the >> documentation: >> >> function loadSegment(string, actor, renderer, i){ >> const reader = vtkHttpDataSetReader.newInstance({ fetchGzip: true }); >> reader.setUrl(string).then(() => { >> reader.loadData().then(() => { >> renderer.resetCamera(); >> renderWindow.render(); >> }); >> }); >> const mapper = vtkMapper.newInstance(); >> mapper.setInputConnection(reader.getOutputPort()); >> actor.setMapper(mapper); >> renderer.addActor(actor); >> } >> >> Any ideas what could be wrong? >> >> Thank you for your help! >> >> Am 20.10.2017 um 21:39 schrieb Sebastien Jourdain: >> >> Then I believe your dataset is not valid. How did you build it? >> >> >> On Fri, Oct 20, 2017 at 1:07 PM, Katrin Hartwig >> wrote: >> >>> Hi Sebastian and Logan, >>> >>> thank you a lot for your help and i apologize for my late answer! >>> Unfortunately I still could not solve the problem. I tried both >>> suggestions: >>> With *actor*.getCenter() I get the default-values (0,0,0) for each >>> actor. So I tried to get the information of the dataset as you suggested: >>> >>> dataset = mapper.getInputData(); >>> bounds = dataset.getBounds(); >>> >>> By doing so I get the following error massage: >>> * "getBounds called on an array with components of 1"* >>> >>> The output of getBounds remains default because of the error. >>> >>> As I could not find any solutions yet, I would be grateful for any help! >>> >>> Thank you >>> Katrin >>> >>> *Gesendet:* Montag, 18. September 2017 um 16:38 Uhr >>> *Von:* "Sebastien Jourdain" >>> *An:* "Katrin Hartwig" >>> *Cc:* vtkusers >>> *Betreff:* Re: [vtkusers] VTK-JS: How to get Position of actor >>> Hi Katrin, >>> >>> The actor position only describe the relative position to the data, >>> that's why by default they are always (0,0,0). >>> Which means its your source or dataset that has the information about >>> the position that you are looking for. >>> >>> For example to find the bounds of a rendered dataset you can do as >>> follow. >>> >>> dataset = mapper.getInputData(); >>> bounds = dataset.getBounds(); >>> >>> // bounds is an array as follow: >>> // [ minX, maxX, minY, maxY, minZ, maxZ] >>> >>> Hope that helps, >>> >>> Otherwise you can learn more on the basic concepts behind VTK here: >>> https://www.vtk.org/vtk-users-guide/ >>> >>> Seb >>> >>> On Mon, Sep 18, 2017 at 7:31 AM, Katrin Hartwig >>> wrote: >>>> >>>> Dear all, >>>> >>>> I am using a visualization of several actors with VTK-js. >>>> Unfortunately, when using *actor.getPosition() *I always get [0,0,0] >>>> as a result, no matter which actor I checked, although they appear on >>>> different positions in my rendering window. >>>> How can I get the real positions or centers of the different actors? >>>> >>>> As I am completely new to VTK-js and I could not find any solutions to >>>> my problem, any help would be great! >>>> >>>> Thank you >>>> Katrin >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> 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 Andx_roo at live.com Mon Oct 23 19:54:55 2017 From: Andx_roo at live.com (Andaharoo) Date: Mon, 23 Oct 2017 16:54:55 -0700 (MST) Subject: [vtkusers] Adding Implicit Functions To Renderer? In-Reply-To: References: <1508480380434-0.post@n5.nabble.com> Message-ID: <1508802895590-0.post@n5.nabble.com> Yeah but I can't connect vtkPlane and vtkPlaneSource for effortless updating. I'd need to make some filter to connect the two. I was hoping there was some easy way to connect them. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Mon Oct 23 20:04:58 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 23 Oct 2017 20:04:58 -0400 Subject: [vtkusers] Adding Implicit Functions To Renderer? In-Reply-To: <1508802895590-0.post@n5.nabble.com> References: <1508480380434-0.post@n5.nabble.com> <1508802895590-0.post@n5.nabble.com> Message-ID: You can add an observer to your vtkPlane that listens to Modified events and updates the vtkPlaneSource parameters with the parameters from the vtkPlane. It's not effortless, but not too much work, either. Cory On Mon, Oct 23, 2017 at 7:54 PM, Andaharoo wrote: > Yeah but I can't connect vtkPlane and vtkPlaneSource for effortless > updating. > I'd need to make some filter to connect the two. I was hoping there was > some > easy way to connect them. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Tue Oct 24 02:54:59 2017 From: doug at beachmailing.com (scotsman60) Date: Mon, 23 Oct 2017 23:54:59 -0700 (MST) Subject: [vtkusers] The vtkSweptSurface patent has expired - is it/will it be available in vtk again? Message-ID: <1508828099352-0.post@n5.nabble.com> Hello, I'm interested in using the functionality described in the vtkSweptSurface class. This class was dropped around V5.4 because it was patented I believe, however I think the patent has now expired. Is there any way to get this back into VTK? Thanx in advance, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From katrin_hartwig at gmx.de Tue Oct 24 04:34:34 2017 From: katrin_hartwig at gmx.de (Katrin Hartwig) Date: Tue, 24 Oct 2017 10:34:34 +0200 Subject: [vtkusers] VTK-JS: How to get Position of actor In-Reply-To: References: <0b8ae5f2-9d2f-fa03-474a-59827360ae74@gmx.de> Message-ID: An HTML attachment was scrubbed... URL: From tj.corona at kitware.com Tue Oct 24 09:00:37 2017 From: tj.corona at kitware.com (TJ Corona) Date: Tue, 24 Oct 2017 09:00:37 -0400 Subject: [vtkusers] The vtkSweptSurface patent has expired - is it/will it be available in vtk again? In-Reply-To: <1508828099352-0.post@n5.nabble.com> References: <1508828099352-0.post@n5.nabble.com> Message-ID: <77406991-0CAC-47B2-A57B-A37278DB4625@kitware.com> Hello Doug, The latest source I can find for this class is from VTK v4.4.2: https://gitlab.kitware.com/vtk/vtk/blob/v4.4.2/Patented/vtkSweptSurface.h https://gitlab.kitware.com/vtk/vtk/blob/v4.4.2/Patented/vtkSweptSurface.cxx If the patent has expired for this class, I?d be happy to review a merge request that brings this class back into VTK. Sincerely, T.J. Thomas J. Corona, Ph.D. Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4443 > On Oct 24, 2017, at 2:54 AM, scotsman60 wrote: > > Hello, > > I'm interested in using the functionality described in the vtkSweptSurface > class. This class was dropped around V5.4 because it was patented I believe, > however I think the patent has now expired. > > Is there any way to get this back into VTK? > > Thanx in advance, > > Doug > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 jayavardhanravi at outlook.com Tue Oct 24 11:01:32 2017 From: jayavardhanravi at outlook.com (Jay) Date: Tue, 24 Oct 2017 08:01:32 -0700 (MST) Subject: [vtkusers] Actors disappear from render Message-ID: <1508857292238-0.post@n5.nabble.com> The actors from the render window disappear after rendering for few hours. The actors disappear randomly. Memory consumption remains the same. The sample pseudo program: vtkSmartPointer object = vtkSmartPointer::New(); niCallBack->cvar= &cAvar; cAvar->renderInteractor->AddObserver(vtkCommand::TimerEvent, className); cAvar->renderInteractor->CreateRepeatingTimer(1); cAvar->renderInteractor->Start(); // observer class - implemented the /virtual void Execute(vtkObject *caller, unsigned long eventId, void * vtkNotUsed(callData))/ method virtual void Execute(vtkObject *caller, unsigned long eventId, void * vtkNotUsed(callData)) { UpdateActors(); // Modified() method not called on each actor cAvar->renderWindow->Render(); } This process updates the render for few hours and later doesn't reneder few parts Any suggestions or ideas to solve this would be helpful. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sebastien.jourdain at kitware.com Tue Oct 24 11:24:29 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 24 Oct 2017 09:24:29 -0600 Subject: [vtkusers] VTK-JS: How to get Position of actor In-Reply-To: References: <0b8ae5f2-9d2f-fa03-474a-59827360ae74@gmx.de> Message-ID: Then fix the json file that describe your dataset and make sure the points are defined with a numberOfComponent of 3 like here: https://github.com/Kitware/vtk-js/blob/master/Data/cow.vtp/index.json#L27 On Tue, Oct 24, 2017 at 2:34 AM, Katrin Hartwig wrote: > I checked the version, it is the same. > > *Gesendet:* Montag, 23. Oktober 2017 um 20:32 Uhr > > *Von:* "Sebastien Jourdain" > *An:* "Katrin Hartwig" > *Cc:* vtkusers > *Betreff:* Re: [vtkusers] VTK-JS: How to get Position of actor > Hum, looking at the code it seems that information should be properly set. > > https://github.com/Kitware/vtk-js/blob/master/Utilities/ > DataGenerator/vtk-data-converter.py#L182 > > Are you using an older version? > > On Mon, Oct 23, 2017 at 2:29 PM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: >> >> Ok the issue is related to the vtkDataConverter that does not properly >> define the number of component to 3 for points. >> You can edit the generated json to fix that. This will fix the >> getBounds() call. >> >> I'm going to fix the vtkDataConverter code. >> >> On Mon, Oct 23, 2017 at 6:50 AM, Katrin Hartwig >> wrote: >>> >>> Hi Sebastien, >>> I stored the data as vtk data and used the vtkDataConverter which seemed >>> to work fine. When I run the code, every actor appears exactly at the right >>> place. So I guess the information in the vtk data must be correct (without >>> ever using any function like "setPosition"). Though I do not understand why >>> I cannot retrieve the information of their positions in the code. >>> >>> Here is how I read my data files, it is a function I found in the >>> documentation: >>> >>> function loadSegment(string, actor, renderer, i){ >>> const reader = vtkHttpDataSetReader.newInstance({ fetchGzip: true >>> }); >>> reader.setUrl(string).then(() => { >>> reader.loadData().then(() => { >>> renderer.resetCamera(); >>> renderWindow.render(); >>> }); >>> }); >>> const mapper = vtkMapper.newInstance(); >>> mapper.setInputConnection(reader.getOutputPort()); >>> actor.setMapper(mapper); >>> renderer.addActor(actor); >>> } >>> >>> Any ideas what could be wrong? >>> >>> Thank you for your help! >>> >>> Am 20.10.2017 um 21:39 schrieb Sebastien Jourdain: >>> >>> Then I believe your dataset is not valid. How did you build it? >>> >>> >>> On Fri, Oct 20, 2017 at 1:07 PM, Katrin Hartwig >>> wrote: >>>> >>>> Hi Sebastian and Logan, >>>> >>>> thank you a lot for your help and i apologize for my late answer! >>>> Unfortunately I still could not solve the problem. I tried both >>>> suggestions: >>>> With *actor*.getCenter() I get the default-values (0,0,0) for each >>>> actor. So I tried to get the information of the dataset as you suggested: >>>> >>>> dataset = mapper.getInputData(); >>>> bounds = dataset.getBounds(); >>>> >>>> By doing so I get the following error massage: >>>> * "getBounds called on an array with components of 1"* >>>> >>>> The output of getBounds remains default because of the error. >>>> >>>> As I could not find any solutions yet, I would be grateful for any help! >>>> >>>> Thank you >>>> Katrin >>>> >>>> *Gesendet:* Montag, 18. September 2017 um 16:38 Uhr >>>> *Von:* "Sebastien Jourdain" >>>> *An:* "Katrin Hartwig" >>>> *Cc:* vtkusers >>>> *Betreff:* Re: [vtkusers] VTK-JS: How to get Position of actor >>>> Hi Katrin, >>>> >>>> The actor position only describe the relative position to the data, >>>> that's why by default they are always (0,0,0). >>>> Which means its your source or dataset that has the information about >>>> the position that you are looking for. >>>> >>>> For example to find the bounds of a rendered dataset you can do as >>>> follow. >>>> >>>> dataset = mapper.getInputData(); >>>> bounds = dataset.getBounds(); >>>> >>>> // bounds is an array as follow: >>>> // [ minX, maxX, minY, maxY, minZ, maxZ] >>>> >>>> Hope that helps, >>>> >>>> Otherwise you can learn more on the basic concepts behind VTK here: >>>> https://www.vtk.org/vtk-users-guide/ >>>> >>>> Seb >>>> >>>> On Mon, Sep 18, 2017 at 7:31 AM, Katrin Hartwig >>>> wrote: >>>>> >>>>> Dear all, >>>>> >>>>> I am using a visualization of several actors with VTK-js. >>>>> Unfortunately, when using *actor.getPosition() *I always get [0,0,0] >>>>> as a result, no matter which actor I checked, although they appear on >>>>> different positions in my rendering window. >>>>> How can I get the real positions or centers of the different actors? >>>>> >>>>> As I am completely new to VTK-js and I could not find any solutions to >>>>> my problem, any help would be great! >>>>> >>>>> Thank you >>>>> Katrin >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at http://www.kitware.com/ >>>>> opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> >>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Oct 24 12:14:51 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 24 Oct 2017 12:14:51 -0400 Subject: [vtkusers] anyone using vtkHyperOctree? Message-ID: I would like to deprecate and remove this class. I believe vtkHyperOctree was the forerunner to vtkHyperTreeGrid. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Tue Oct 24 13:09:48 2017 From: doug at beachmailing.com (scotsman60) Date: Tue, 24 Oct 2017 10:09:48 -0700 (MST) Subject: [vtkusers] The vtkSweptSurface patent has expired - is it/will it be available in vtk again? In-Reply-To: <1508828099352-0.post@n5.nabble.com> References: <1508828099352-0.post@n5.nabble.com> Message-ID: <1508864988200-0.post@n5.nabble.com> Tom, "If the patent has expired for this class, I?d be happy to review a merge request that brings this class back into VTK." Is a merge request something I can do? (I'm not very familiar with vtk processes....) By the way - I'm ASSUMING the patent has expired since it was registered '95 or '96 and I beleiev patents have a 20 year life. Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tj.corona at kitware.com Tue Oct 24 13:13:18 2017 From: tj.corona at kitware.com (TJ Corona) Date: Tue, 24 Oct 2017 13:13:18 -0400 Subject: [vtkusers] The vtkSweptSurface patent has expired - is it/will it be available in vtk again? In-Reply-To: <1508864988200-0.post@n5.nabble.com> References: <1508828099352-0.post@n5.nabble.com> <1508864988200-0.post@n5.nabble.com> Message-ID: <4D86134F-7517-4741-A3E4-EA60A484F84B@kitware.com> > Is a merge request something I can do? (I'm not very familiar with vtk > processes?.) We encourage merge requests! Welcome to the team! Details on how to contribute to vtk can be found here . Thomas J. Corona, Ph.D. Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4443 > On Oct 24, 2017, at 1:09 PM, scotsman60 wrote: > > Tom, > > "If the patent has expired for this class, I?d be happy to review a merge > request that brings this class back into VTK." > > Is a merge request something I can do? (I'm not very familiar with vtk > processes....) > > By the way - I'm ASSUMING the patent has expired since it was registered '95 > or '96 and I beleiev patents have a 20 year life. > > > Doug > > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 doug at beachmailing.com Tue Oct 24 13:58:16 2017 From: doug at beachmailing.com (scotsman60) Date: Tue, 24 Oct 2017 10:58:16 -0700 (MST) Subject: [vtkusers] The vtkSweptSurface patent has expired - is it/will it be available in vtk again? In-Reply-To: <1508828099352-0.post@n5.nabble.com> References: <1508828099352-0.post@n5.nabble.com> Message-ID: <1508867896090-0.post@n5.nabble.com> Tom, Ahhh..... you're suggesting I do the merge and then request that it be accepted. I was thinking that I could make the request and someone else would do the integration and I could just use the method......... OK - I'll look into doing this. It'll be a stretch timewise, but it's a fair proposal. Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From stephen.langer at nist.gov Tue Oct 24 14:12:48 2017 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Tue, 24 Oct 2017 18:12:48 +0000 Subject: [vtkusers] vtk and gtk on macOS Message-ID: <49FDD20F-0AFF-4475-B314-20C78E20EEA9@nist.gov> Hi -- Is there a simple way to get vtk to work inside a gtk+2 program on macOS? If there isn't a simple way, is there a difficult one? I'm trying to get a program that uses gtk+2 and vtk to work with a modern version of vtk -- I'm upgrading from 5.10.1 to 7.1.1 or 8.0.1. On Linux, the following code creates a vtk render window and a gtk widget containing it: vtkRenderWindow *render_win = vtkRenderWindow::New(); GtkWidget *drawing_area = gtk_drawing_area_new(); Display *disp = GDK_DISPLAY(); render_win->SetDisplayId(disp); followed eventually by XID wid = GDK_WINDOW_XID(drawing_area->window); render_win->SetWindowId(wid); after receiving the gtk "realize" signal on the drawing_area. On macOS, I'd like to use the Cocoa version of gtk+2 and vtkCocoaRenderWindow, but I can't figure out how to embed the render window into a gtk widget. All the examples I've found on-line aren't really applicable. GtkGLExt might be applicable, but it doesn't look like it's being maintained. An alternative would be to use X11, but native Mac OpenGL doesn't understand X11, so I tried installing mesa from macports , rebuilding vtk with VTK_USE_X instead of VTK_USE_COCOA, and linking to /opt/local/lib instead of /System/Library/Frameworks/OpenGL.framework. Then I can use the same code as on Linux, but vtk complains about the context not supporting OpenGL 3.2, and then crashes: ERROR: In /Users/langer/UTIL/VTK/VTK-7.1.1/Rendering/OpenGL2/vtkTextureObject.cxx, line 440 vtkTextureObject (0x7f9eafdb1690): failed at glGenTextures 1 OpenGL errors detected 0 : (1280) Invalid enum Thanks, Steve From marceloduartetrevisani at gmail.com Tue Oct 24 14:54:39 2017 From: marceloduartetrevisani at gmail.com (Marcelo Duarte Trevisani) Date: Tue, 24 Oct 2017 16:54:39 -0200 Subject: [vtkusers] VTK observer for vtkDataArray objects Message-ID: Hello folks, I was just wondering if there is a way to set an observer for a vtkDataArray. I want to set a observer for a vtkDoubleArray (for example) and when the object change it will call a function in python. Does anyone know a way to do this? -- Marcelo Duarte Trevisani "Success is walking from failure to failure with no loss of enthusiasm." Winston Churchill -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Oct 24 14:56:16 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 24 Oct 2017 12:56:16 -0600 Subject: [vtkusers] vtk and gtk on macOS In-Reply-To: <49FDD20F-0AFF-4475-B314-20C78E20EEA9@nist.gov> References: <49FDD20F-0AFF-4475-B314-20C78E20EEA9@nist.gov> Message-ID: Hi Steve, Here is some code that I use to bind a VTK window to a QWidget. My guess is that something similar should work with GTK. I have been using this on OS X with vtkCocoaRenderWindow. void BindRenderWindow(vtkRenderWindow *window, QWidget *widget) { // Unmap the window if it is already mapped somewhere else. if (window->GetMapped()) { window->Finalize(); } // Create the connection window->SetWindowId(reinterpret_cast(widget->winId())); // Note that we must call the superclass SetSize()/SetPosition() // (we just want to set the member variables, with no side-effects) window->vtkRenderWindow::SetSize(widget->width(), widget->height()); window->vtkRenderWindow::SetPosition(widget->x(), widget->y()); // Prepare for rendering if (widget->isVisible()) { window->Start(); } // Call SetSize() again, to synchronize the window to the widget window->SetSize(widget->width(), widget->height()); } Some further notes: 1) I disable Qt's paint engine, so that Qt itself doesn't draw in the window. GTK may be similar. 2) You probably will not need GtkGLExt (for Qt, I didn't have to use QGLWidget). - David On Tue, Oct 24, 2017 at 12:12 PM, Langer, Stephen A. (Fed) < stephen.langer at nist.gov> wrote: > Hi -- > > Is there a simple way to get vtk to work inside a gtk+2 program on macOS? > If there isn't a simple way, is there a difficult one? > > I'm trying to get a program that uses gtk+2 and vtk to work with a modern > version of vtk -- I'm upgrading from 5.10.1 to 7.1.1 or 8.0.1. On Linux, > the following code creates a vtk render window and a gtk widget containing > it: > vtkRenderWindow *render_win = vtkRenderWindow::New(); > GtkWidget *drawing_area = gtk_drawing_area_new(); > Display *disp = GDK_DISPLAY(); > render_win->SetDisplayId(disp); > followed eventually by > XID wid = GDK_WINDOW_XID(drawing_area->window); > render_win->SetWindowId(wid); > after receiving the gtk "realize" signal on the drawing_area. > > On macOS, I'd like to use the Cocoa version of gtk+2 and > vtkCocoaRenderWindow, but I can't figure out how to embed the render window > into a gtk widget. All the examples I've found on-line aren't really > applicable. > > GtkGLExt might be applicable, but it doesn't look like it's being > maintained. > > An alternative would be to use X11, but native Mac OpenGL doesn't > understand X11, so I tried installing mesa from macports , rebuilding vtk > with VTK_USE_X instead of VTK_USE_COCOA, and linking to /opt/local/lib > instead of /System/Library/Frameworks/OpenGL.framework. Then I can use > the same code as on Linux, but vtk complains about the context not > supporting OpenGL 3.2, and then crashes: > ERROR: In /Users/langer/UTIL/VTK/VTK-7.1.1/Rendering/OpenGL2/vtkTextureObject.cxx, > line 440 > vtkTextureObject (0x7f9eafdb1690): failed at glGenTextures 1 OpenGL > errors detected > 0 : (1280) Invalid enum > > Thanks, > Steve > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Oct 24 15:14:30 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 24 Oct 2017 12:14:30 -0700 Subject: [vtkusers] VTK observer for vtkDataArray objects In-Reply-To: References: Message-ID: Use AddObserver(vtkCommand::ModifiedEvent On Tue, Oct 24, 2017 at 11:54 AM, Marcelo Duarte Trevisani wrote: > Hello folks, > > I was just wondering if there is a way to set an observer for a > vtkDataArray. I want to set a observer for a vtkDoubleArray (for example) > and when the object change it will call a function in python. Does anyone > know a way to do this? > > -- > Marcelo Duarte Trevisani > > "Success is walking from failure to failure with no loss of enthusiasm." > Winston Churchill > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 DLRdave at aol.com Tue Oct 24 15:26:41 2017 From: DLRdave at aol.com (David Cole) Date: Tue, 24 Oct 2017 15:26:41 -0400 Subject: [vtkusers] Actors disappear from render In-Reply-To: <1508857292238-0.post@n5.nabble.com> References: <1508857292238-0.post@n5.nabble.com> Message-ID: Is this the 32-bit modified counter overflow problem? What version of VTK? David > On Oct 24, 2017, at 11:01 AM, Jay wrote: > > The actors from the render window disappear after rendering for few hours. > The actors disappear randomly. Memory consumption remains the same. > > The sample pseudo program: > > vtkSmartPointer object = > vtkSmartPointer::New(); > niCallBack->cvar= &cAvar; > cAvar->renderInteractor->AddObserver(vtkCommand::TimerEvent, className); > cAvar->renderInteractor->CreateRepeatingTimer(1); > cAvar->renderInteractor->Start(); > > // observer class - implemented the /virtual void Execute(vtkObject *caller, > unsigned long eventId, void * vtkNotUsed(callData))/ method > > virtual void Execute(vtkObject *caller, unsigned long eventId, void * > vtkNotUsed(callData)) > { > UpdateActors(); // Modified() method not called on each actor > cAvar->renderWindow->Render(); > } > > This process updates the render for few hours and later doesn't reneder few > parts > > Any suggestions or ideas to solve this would be helpful. > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 jayavardhanravi at outlook.com Tue Oct 24 17:16:03 2017 From: jayavardhanravi at outlook.com (Jay) Date: Tue, 24 Oct 2017 14:16:03 -0700 (MST) Subject: [vtkusers] Actors disappear from render In-Reply-To: References: <1508857292238-0.post@n5.nabble.com> Message-ID: <1508879763785-0.post@n5.nabble.com> I am using the VTK version 7.1 I am not aware and have no idea about "Is this the 32-bit modified counter overflow problem" issue. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jayavardhanravi at outlook.com Tue Oct 24 17:44:34 2017 From: jayavardhanravi at outlook.com (Jay) Date: Tue, 24 Oct 2017 14:44:34 -0700 (MST) Subject: [vtkusers] Actors disappear from render In-Reply-To: References: <1508857292238-0.post@n5.nabble.com> Message-ID: <1508881474439-0.post@n5.nabble.com> Is this the issue that you were talking about "https://gitlab.kitware.com/vtk/vtk/issues/16769". -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From marceloduartetrevisani at gmail.com Tue Oct 24 18:45:44 2017 From: marceloduartetrevisani at gmail.com (Marcelo Duarte Trevisani) Date: Tue, 24 Oct 2017 20:45:44 -0200 Subject: [vtkusers] VTK observer for vtkDataArray objects In-Reply-To: References: Message-ID: I tried to use AddObserver(vtkCommand::ModifiedEvent, ...) but when I add a value into the vtkDataArray the observer doesn't work, I have to explicit call the method Modified(), there is another way to do data? I just want to call a function after the vtkDataArray is modified like when I insert a value or remove it. Thanks in advance. On Tue, Oct 24, 2017 at 5:14 PM, Bill Lorensen wrote: > Use > > AddObserver(vtkCommand::ModifiedEvent > > On Tue, Oct 24, 2017 at 11:54 AM, Marcelo Duarte Trevisani > wrote: > > Hello folks, > > > > I was just wondering if there is a way to set an observer for a > > vtkDataArray. I want to set a observer for a vtkDoubleArray (for example) > > and when the object change it will call a function in python. Does anyone > > know a way to do this? > > > > -- > > Marcelo Duarte Trevisani > > > > "Success is walking from failure to failure with no loss of enthusiasm." > > Winston Churchill > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 > -- Marcelo Duarte Trevisani "Success is walking from failure to failure with no loss of enthusiasm." Winston Churchill -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Oct 24 19:16:33 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 24 Oct 2017 16:16:33 -0700 Subject: [vtkusers] VTK observer for vtkDataArray objects In-Reply-To: References: Message-ID: I recall that the data arrays do not change the modified time because of efficiency. You can explicitly call Modified each time you add a value. On Tue, Oct 24, 2017 at 3:45 PM, Marcelo Duarte Trevisani wrote: > I tried to use > AddObserver(vtkCommand::ModifiedEvent, ...) > > but when I add a value into the vtkDataArray the observer doesn't work, I > have to explicit call the method Modified(), there is another way to do > data? I just want to call a function after the vtkDataArray is modified like > when I insert a value or remove it. > > Thanks in advance. > > > On Tue, Oct 24, 2017 at 5:14 PM, Bill Lorensen > wrote: >> >> Use >> >> AddObserver(vtkCommand::ModifiedEvent >> >> On Tue, Oct 24, 2017 at 11:54 AM, Marcelo Duarte Trevisani >> wrote: >> > Hello folks, >> > >> > I was just wondering if there is a way to set an observer for a >> > vtkDataArray. I want to set a observer for a vtkDoubleArray (for >> > example) >> > and when the object change it will call a function in python. Does >> > anyone >> > know a way to do this? >> > >> > -- >> > Marcelo Duarte Trevisani >> > >> > "Success is walking from failure to failure with no loss of enthusiasm." >> > Winston Churchill >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > 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 > > > > > -- > Marcelo Duarte Trevisani > > "Success is walking from failure to failure with no loss of enthusiasm." > Winston Churchill -- Unpaid intern in BillsBasement at noware dot com From DLRdave at aol.com Tue Oct 24 19:48:15 2017 From: DLRdave at aol.com (David Cole) Date: Tue, 24 Oct 2017 19:48:15 -0400 Subject: [vtkusers] Actors disappear from render In-Reply-To: <1508881474439-0.post@n5.nabble.com> References: <1508857292238-0.post@n5.nabble.com> <1508881474439-0.post@n5.nabble.com> Message-ID: Yes, that?s the one. If the version of VTK you are using pre-dates that fix, it seems likely to be the culprit here. Hopefully you can update VTK to a build which includes the fix, and the problem should go away. HTH, David C. David > On Oct 24, 2017, at 5:44 PM, Jay wrote: > > Is this the issue that you were talking about > "https://gitlab.kitware.com/vtk/vtk/issues/16769". > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 natorenvliet at gmail.com Wed Oct 25 06:59:01 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Wed, 25 Oct 2017 06:59:01 -0400 Subject: [vtkusers] transform filters and axes Message-ID: Hi, I'm plotting some data via a 2d rectilinear grid reader. I am applying a transform to the reader output which scales the data via vtkTransform.Scale. I also have a vtkCubeAxesActor which is not scaling. I am wondering, do I need to set up a separate transform for vtkCubeAxesActor, or can I pipeline output from the already instantiated transform. In either case I am unsure as to how to make the connection. I am also wondering if there is a max height/width scaling option I can feed to the scaling transform so the plot and axes take up all the available space in its window. Thanks, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From yujie_job at 163.com Wed Oct 25 22:35:12 2017 From: yujie_job at 163.com (yujie_job at 163.com) Date: Wed, 25 Oct 2017 19:35:12 -0700 (MST) Subject: [vtkusers] vtkHardwareSelector select wrong points! Message-ID: <1508985312247-0.post@n5.nabble.com> Hello everyone, Recently, I am developping interactive selection function in render view base on VTK. In order to select visible cells and points, I choosed vtkHardwareSelector after I run this example * "VTK/Examples/Cxx/Filtering/ExtractVisibleCells"* . In my program, vtkHardwareSelector works very well for selecting visible cells. But when it comes to selecting points, something wrong happened, as showing in below pictures, the points that are not in select zone are choosed. Then, I test this function in ParaView(v5.1.2 windows 64 bit) as Paraview also uses vtkHardwareSelector to select visible cells and points. but when selecting points, the same wrong results are showing in below pictures. testPolyOut.vtp the test file I used is also attached. I have searched the mail list, but I can not find any valuable information about this problem. Could anybody know hows to solve this proble give me some help? Thanks very much! Best wishes, Jie -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cjwant at gmail.com Thu Oct 26 01:07:44 2017 From: cjwant at gmail.com (Chris Want) Date: Wed, 25 Oct 2017 23:07:44 -0600 Subject: [vtkusers] Tessellations of 3D mathematical shapes Message-ID: Hi all, I wrote a Python script that applies a collection of mathematical tilings to user-defined 2D manifolds: https://github.com/cwant/tessagon I originally wrote it for Blender, but since very little of the code is Blender-specific, I also added an 'adaptor' to the script to generate VtkPolyData. Check it out if you're into that sort of thing! Regards, Chris From sebastien247 at gmail.com Thu Oct 26 05:08:22 2017 From: sebastien247 at gmail.com (sebastien247) Date: Thu, 26 Oct 2017 02:08:22 -0700 (MST) Subject: [vtkusers] Update an Actor by adding dynamically set of points and vertices Message-ID: <1509008902667-0.post@n5.nabble.com> Hi, I want update my vtkPolyData by updating vtkPoints and vtkCellArray. I arrive to do this just for one point by one point. but I want add a set of points. This next code is my test to add points one by one (is working): And this is my tentative to add set of points (doesn't work): -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Andrew at Ryonic.io Thu Oct 26 05:11:36 2017 From: Andrew at Ryonic.io (Andrew) Date: Thu, 26 Oct 2017 02:11:36 -0700 (MST) Subject: [vtkusers] Dynamically Add and Render Points using vtkPolyData In-Reply-To: <1508391026744-0.post@n5.nabble.com> References: <1508391026744-0.post@n5.nabble.com> Message-ID: <1509009096678-0.post@n5.nabble.com> Does Anyone have a more efficient solution? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bengt at ctech.com Wed Oct 25 18:06:10 2017 From: bengt at ctech.com (bengt at ctech.com) Date: Wed, 25 Oct 2017 15:06:10 -0700 Subject: [vtkusers] vtkAppendFilter not handling lookup tables Message-ID: Hi! Take a look at the following code, why is the lookup table resulting from a merge not copied? Number of inputs added doesn't seem to matter.? Is that intentional or is it an oversight? Thanks! vtkSmartPointer points = vtkSmartPointer::New(); points->SetNumberOfPoints(3); points->SetPoint(0, 0.0, 0.0, 0.0); points->SetPoint(1, 1.0, 0.0, 0.0); points->SetPoint(2, 0.5, 1, 0.0); vtkIdType cellIds[3] = { 0, 1, 2 }; vtkSmartPointer cells = vtkSmartPointer::New(); cells->InsertNextCell(3, cellIds); vtkSmartPointer lut = vtkSmartPointer::New(); lut->SetRange(0, 1); vtkSmartPointer testPointData = vtkSmartPointer::New(); testPointData->SetName("TestPointData"); testPointData->SetLookupTable(lut); testPointData->InsertNextValue(0); testPointData->InsertNextValue(1); testPointData->InsertNextValue(2); ? ?? assert(ugrid->GetCellData()->GetArray("TestCellData") != nullptr); assert(ugrid->GetCellData()->GetArray("TestCellData")->GetLookupTable() != nullptr); vtkSmartPointer ugrid = vtkSmartPointer::New(); ugrid->SetPoints(points); ugrid->SetCells(VTK_TRIANGLE, cells); ugrid->GetPointData()->AddArray(testPointData); vtkSmartPointer append = vtkSmartPointer::New(); append->AddInputData(ugrid); append->Update(); vtkUnstructuredGrid* outgrid = append->GetOutput(); assert(outgrid->GetNumberOfCells() == 1); assert(outgrid->GetNumberOfPoints() == 3); assert(outgrid->GetPointData()->GetNumberOfArrays() == 1); assert(outgrid->GetPointData()->GetArray("TestPointData") != nullptr); vtkLookupTable* outLut = outgrid->GetLookupTable(); ? ?? -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Thu Oct 26 08:31:09 2017 From: aron.helser at kitware.com (Aron Helser) Date: Thu, 26 Oct 2017 08:31:09 -0400 Subject: [vtkusers] Dynamically Add and Render Points using vtkPolyData In-Reply-To: <1509009096678-0.post@n5.nabble.com> References: <1508391026744-0.post@n5.nabble.com> <1509009096678-0.post@n5.nabble.com> Message-ID: Hi Andrew - One potentially easy thing is to use the newest VTK release - performance often improves between releases. I see one noob mistake :) ImmediateModeRenderingOn() doesn't do anything with current VTK - everything is shader-based. I can see that you are dynamically changing the size of the entire dataset, to add a small number (~360) of points. I would definitely consider dividing the points up into batches, so that you are adding points to a much smaller set. I mean several vtkPoints() and vtkCellArray() instead of one. I believe you might also be able to pre-allocate the expected size of the set, but I'm not sure how to do that? Regards, Aron On Thu, Oct 26, 2017 at 5:11 AM, Andrew wrote: > Does Anyone have a more efficient solution? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 26 09:23:22 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 26 Oct 2017 09:23:22 -0400 Subject: [vtkusers] Update an Actor by adding dynamically set of points and vertices In-Reply-To: <1509008902667-0.post@n5.nabble.com> References: <1509008902667-0.post@n5.nabble.com> Message-ID: Hi, What I assume were code samples you meant to include in your message apparently were not included. - Cory On Thu, Oct 26, 2017 at 5:08 AM, sebastien247 wrote: > Hi, > > I want update my vtkPolyData by updating vtkPoints and vtkCellArray. I > arrive to do this just for one point by one point. but I want add a set of > points. > > This next code is my test to add points one by one (is working): > > > > And this is my tentative to add set of points (doesn't work): > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arw.tyx-ouy_mz at ezweb.ne.jp Thu Oct 26 10:41:56 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Thu, 26 Oct 2017 07:41:56 -0700 (MST) Subject: [vtkusers] SetInteractorStyle() occurs error Message-ID: <1509028916931-0.post@n5.nabble.com> Hi, I use VTK-8.0.0 and I'm setting vtkContextInteractorStyle. But I have a problem, vtkSmartPointer style = vtkSmartPointer::New(); contextView->GetInteractor()->SetInteractorStyle(style); this code has error at SetInteractorStyle(style). Other interactor style classes doesn't occur error. Why only in my case has error? And how should i change my code? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From laurachenlc at 163.com Thu Oct 26 21:19:43 2017 From: laurachenlc at 163.com (LauraLC) Date: Thu, 26 Oct 2017 18:19:43 -0700 (MST) Subject: [vtkusers] MakeCurrent error with multiple renderwindows and vtkPropPicker Message-ID: <1509067183207-0.post@n5.nabble.com> Hi, I have add the same actor into 2 qvtkWidget, and for the renderwindow of one qvtkWidget, I add an InteractorStyle with vtkPropPicker; now the problem is: if I click the actor in the first qvtkWidget, and then click it in another qvtkWidget, then click in the first qvtkWidget again, the error pops up: --------------- ERROR: In C:\Activiz\VTK7.1\Rendering\OpenGL\vtkWin32OpenGLRenderWindow.cxx, line 248 vtkWin32OpenGLRenderWindow (000002A17C00FD20): Attempting to call MakeCurrent for a different window than the one doing the picking, this can causes crashes and/or bad pick results ----------------- is there any body know what's the problem and how to handle it? Thanks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From laurachenlc at 163.com Fri Oct 27 00:05:19 2017 From: laurachenlc at 163.com (laurachenlc) Date: Fri, 27 Oct 2017 12:05:19 +0800 (CST) Subject: [vtkusers] MakeCurrent error with multiple renderwindows and vtkPropPicker In-Reply-To: <1509067183207-0.post@n5.nabble.com> References: <1509067183207-0.post@n5.nabble.com> Message-ID: <2118f4c5.a47d.15f5c017066.Coremail.laurachenlc@163.com> and the attached is my project on this problem. At 2017-10-27 09:19:43, "LauraLC" wrote: >Hi, > >I have add the same actor into 2 qvtkWidget, and for the renderwindow of >one qvtkWidget, I add an InteractorStyle with vtkPropPicker; >now the problem is: if I click the actor in the first qvtkWidget, and then >click it in another qvtkWidget, then click in the first qvtkWidget again, >the error pops up: >--------------- >ERROR: In C:\Activiz\VTK7.1\Rendering\OpenGL\vtkWin32OpenGLRenderWindow.cxx, >line 248 >vtkWin32OpenGLRenderWindow (000002A17C00FD20): Attempting to call >MakeCurrent for a different window than the one doing the picking, this can >causes crashes and/or bad pick results >----------------- > >is there any body know what's the problem and how to handle it? > >Thanks > > > >-- >Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >_______________________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > >Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > >Search the list archives at: http://markmail.org/search/?q=vtkusers > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MakeCurrentError.zip Type: application/x-zip-compressed Size: 9079 bytes Desc: not available URL: From Andrew at Ryonic.io Fri Oct 27 01:19:23 2017 From: Andrew at Ryonic.io (Andrew) Date: Thu, 26 Oct 2017 22:19:23 -0700 (MST) Subject: [vtkusers] Dynamically Add and Render Points using vtkPolyData In-Reply-To: References: <1508391026744-0.post@n5.nabble.com> <1509009096678-0.post@n5.nabble.com> Message-ID: <1509081563596-0.post@n5.nabble.com> Thanks Aron, I will try and use SetPoint for my point insertion, When You say break it up into Pieces do you mean have multiple Polydata actors and Mapper? as they reach their respective "max size" make a new one and add it to the scene?? My newest attempt uses Pieces that are added onto make 1 large poly data using The vtkAppendPolyData with its Mapper and actor. I can see the renderWindow is an openGL window and my GPU does get utilized but, like I mentioned, as the set grows its the render event that takes longer and longer not that addition of a point 360 points (2ms) Regards Andrew -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From 836856733 at qq.com Fri Oct 27 07:28:04 2017 From: 836856733 at qq.com (DJQ) Date: Fri, 27 Oct 2017 04:28:04 -0700 (MST) Subject: [vtkusers] Problem with vtkImageReslice Message-ID: <1509103684904-0.post@n5.nabble.com> vtkSmartPointer resliceFilter = vtkSmartPointer::New(); resliceFilter->SetInputData(m_spVtkImageData); resliceFilter->SetOutputSpacing(resliceSpacing,resliceSpacing,resliceSpacing); resliceFilter->SetOutputSpacing(0.4,0.4,0.4); //resliceFilter->SetOutputSpacing(0.2,0.2,0.2); resliceFilter->SetSlabModeToMean(); resliceFilter->SetSlabNumberOfSlices(1); resliceFilter->SetInterpolationModeToCubic(); resliceFilter->Update(); m_spVtkImageData=resliceFilter->GetOutput(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From 836856733 at qq.com Fri Oct 27 07:38:29 2017 From: 836856733 at qq.com (DJQ) Date: Fri, 27 Oct 2017 04:38:29 -0700 (MST) Subject: [vtkusers] Problems with vtkImageReslice Message-ID: <1509104309431-0.post@n5.nabble.com> vtkSmartPointer resliceFilter = vtkSmartPointer::New(); resliceFilter->SetInputData(m_spVtkImageData); resliceFilter->SetOutputSpacing(resliceSpacing,resliceSpacing,resliceSpacing); resliceFilter->SetOutputSpacing(0.4,0.4,0.4); resliceFilter->SetSlabModeToMean(); resliceFilter->SetSlabNumberOfSlices(1); resliceFilter->SetInterpolationModeToCubic(); resliceFilter->Update(); m_spVtkImageData=resliceFilter->GetOutput(); I want to reslice the m_spVtkImageData to make it isotropic, as 0.4*0.4*0.4. However, when I use MIP to show this resliced image, it suggests that there must be some problems. What's wrong with that? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Fri Oct 27 08:28:59 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 27 Oct 2017 08:28:59 -0400 Subject: [vtkusers] MakeCurrent error with multiple renderwindows and vtkPropPicker In-Reply-To: <2118f4c5.a47d.15f5c017066.Coremail.laurachenlc@163.com> References: <1509067183207-0.post@n5.nabble.com> <2118f4c5.a47d.15f5c017066.Coremail.laurachenlc@163.com> Message-ID: You cannot share actors across renderwindows right now. On Fri, Oct 27, 2017 at 12:05 AM, laurachenlc wrote: > and the attached is my project on this problem. > > > > > > At 2017-10-27 09:19:43, "LauraLC" wrote: > >Hi, > > > >I have add the same actor into 2 qvtkWidget, and for the renderwindow of > >one qvtkWidget, I add an InteractorStyle with vtkPropPicker; > >now the problem is: if I click the actor in the first qvtkWidget, and then > >click it in another qvtkWidget, then click in the first qvtkWidget again, > >the error pops up: > >--------------- > >ERROR: In C:\Activiz\VTK7.1\Rendering\OpenGL\vtkWin32OpenGLRenderWindow.cxx, > >line 248 > >vtkWin32OpenGLRenderWindow (000002A17C00FD20): Attempting to call > >MakeCurrent for a different window than the one doing the picking, this can > >causes crashes and/or bad pick results > >----------------- > > > >is there any body know what's the problem and how to handle it? > > > >Thanks > > > > > > > >-- > >Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > >_______________________________________________ > >Powered by www.kitware.com > > > >Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > > >Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > > >Search the list archives at: http://markmail.org/search/?q=vtkusers > > > >Follow this link to subscribe/unsubscribe: > >http://public.kitware.com/mailman/listinfo/vtkusers > > > > ?????|30???????????1/4?MUJI????2017??????????????34.9?>> > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien247 at gmail.com Fri Oct 27 09:12:31 2017 From: sebastien247 at gmail.com (sebastien247) Date: Fri, 27 Oct 2017 06:12:31 -0700 (MST) Subject: [vtkusers] Update an Actor by adding dynamically set of points and vertices In-Reply-To: References: <1509008902667-0.post@n5.nabble.com> Message-ID: <1509109951093-0.post@n5.nabble.com> My post have been edited and now it's a duplicate of this post : http://vtk.1045678.n5.nabble.com/Dynamically-Add-and-Render-Points-using-vtkPolyData-td5745289.html -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sebastien247 at gmail.com Fri Oct 27 09:16:33 2017 From: sebastien247 at gmail.com (sebastien247) Date: Fri, 27 Oct 2017 06:16:33 -0700 (MST) Subject: [vtkusers] Dynamically Add and Render Points using vtkPolyData In-Reply-To: <1508391026744-0.post@n5.nabble.com> References: <1508391026744-0.post@n5.nabble.com> Message-ID: <1509110193246-0.post@n5.nabble.com> Hi Andrew, I encounter the same problem. So I try to display my point cloud with raw opengl. But this is not displayed. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Fri Oct 27 09:21:18 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 27 Oct 2017 07:21:18 -0600 Subject: [vtkusers] Problems with vtkImageReslice In-Reply-To: <1509104309431-0.post@n5.nabble.com> References: <1509104309431-0.post@n5.nabble.com> Message-ID: It looks like an integer overflow problem. Perhaps the data is "unsigned short" but was read as "short"? Just in case the Cubic interpolation is causing overflow (since cubic interpolation has undershoots/overshoots), try linear interpolation: resliceFilter->SetSlabModeToMaximum(); resliceFilter->SetSlabNumberOfSlices(3); resliceFilter->SetInterpolationModeToLinear(); - David On Fri, Oct 27, 2017 at 5:38 AM, DJQ <836856733 at qq.com> wrote: > vtkSmartPointer resliceFilter = > vtkSmartPointer::New(); > resliceFilter->SetInputData(m_spVtkImageData); > resliceFilter->SetOutputSpacing(resliceSpacing,resliceSpacing, > resliceSpacing); > resliceFilter->SetOutputSpacing(0.4,0.4,0.4); > resliceFilter->SetSlabModeToMean(); > resliceFilter->SetSlabNumberOfSlices(1); > resliceFilter->SetInterpolationModeToCubic(); > resliceFilter->Update(); > > m_spVtkImageData=resliceFilter->GetOutput(); > > I want to reslice the m_spVtkImageData to make it isotropic, as > 0.4*0.4*0.4. > However, when I use MIP to show this resliced image, it suggests that there > must be some problems. What's wrong with that? > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Fri Oct 27 10:21:33 2017 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Fri, 27 Oct 2017 10:21:33 -0400 Subject: [vtkusers] Dynamically Add and Render Points using vtkPolyData In-Reply-To: <1509081563596-0.post@n5.nabble.com> References: <1508391026744-0.post@n5.nabble.com> <1509009096678-0.post@n5.nabble.com> <1509081563596-0.post@n5.nabble.com> Message-ID: Hi Andrew, Typically 'break it up into pieces' means create multiple vtkPolyDatas and put them into a vtkMultiBlockDataSet. With your current solution using vtkAppendPolyData, the entire points list has to be recomputed every time you add more to the vtkAppendPolyData and then that new list has to be uploaded to the GPU for rendering (this also probably deallocates the old one and allocates a new buffer with the new size too). You could break it up into many vtkPolyDatas and have an actor and mapper for each of them, but typically it is more efficient to put them in a vtkMultiBlockDataSet and use the vtkCompositePolyDataMapper2 to render them all at once (that said I'm not sure about performance in this case where you are modifying it, others on the list may know more about the implementation and how it will perform). HTH, Shawn On Fri, Oct 27, 2017 at 1:19 AM, Andrew wrote: > Thanks Aron, > > I will try and use SetPoint for my point insertion, > > When You say break it up into Pieces do you mean have multiple Polydata > actors and Mapper? as they reach their respective "max size" make a new one > and add it to the scene?? My newest attempt uses Pieces that are added onto > make 1 large poly data using The vtkAppendPolyData with its Mapper and > actor. > > I can see the renderWindow is an openGL window and my GPU does get utilized > but, like I mentioned, as the set grows its the render event that takes > longer and longer not that addition of a point 360 points (2ms) > > Regards Andrew > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Oct 27 10:35:58 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 27 Oct 2017 10:35:58 -0400 Subject: [vtkusers] MakeCurrent error with multiple renderwindows and vtkPropPicker In-Reply-To: <18712283.122eb.15f5e3ea4f5.Coremail.laurachenlc@163.com> References: <1509067183207-0.post@n5.nabble.com> <2118f4c5.a47d.15f5c017066.Coremail.laurachenlc@163.com> <18712283.122eb.15f5e3ea4f5.Coremail.laurachenlc@163.com> Message-ID: Right now duplicate the actor and mapper. You can use the same polydata input just not the same actor/texture/mapper. In the future we plan to change this so that multiple render windows can share contexts (and actors/mappers/etc) but it is still in development. On Fri, Oct 27, 2017 at 10:31 AM, laurachenlc wrote: > thanks Martin, but if I want to show the same data in multiple > renderwindows, how should I do normally ? > > > At 2017-10-27 20:28:59, "Ken Martin" wrote: > > You cannot share actors across renderwindows right now. > > On Fri, Oct 27, 2017 at 12:05 AM, laurachenlc wrote: > >> and the attached is my project on this problem. >> >> >> >> >> >> At 2017-10-27 09:19:43, "LauraLC" wrote: >> >Hi, >> > >> >I have add the same actor into 2 qvtkWidget, and for the renderwindow of >> >one qvtkWidget, I add an InteractorStyle with vtkPropPicker; >> >now the problem is: if I click the actor in the first qvtkWidget, and then >> >click it in another qvtkWidget, then click in the first qvtkWidget again, >> >the error pops up: >> >--------------- >> >ERROR: In C:\Activiz\VTK7.1\Rendering\OpenGL\vtkWin32OpenGLRenderWindow.cxx, >> >line 248 >> >vtkWin32OpenGLRenderWindow (000002A17C00FD20): Attempting to call >> >MakeCurrent for a different window than the one doing the picking, this can >> >causes crashes and/or bad pick results >> >----------------- >> > >> >is there any body know what's the problem and how to handle it? >> > >> >Thanks >> > >> > >> > >> >-- >> >Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >> >_______________________________________________ >> >Powered by www.kitware.com >> > >> >Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> > >> >Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> > >> >Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> >Follow this link to subscribe/unsubscribe: >> >http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> ?????|30???????????1/4?MUJI????2017??????????????34.9?>> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > > Clifton Park NY 12065 > > > 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. > > > > ??????????????????????13?/??????75?3?>> > > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurachenlc at 163.com Fri Oct 27 10:31:24 2017 From: laurachenlc at 163.com (laurachenlc) Date: Fri, 27 Oct 2017 22:31:24 +0800 (CST) Subject: [vtkusers] MakeCurrent error with multiple renderwindows and vtkPropPicker In-Reply-To: References: <1509067183207-0.post@n5.nabble.com> <2118f4c5.a47d.15f5c017066.Coremail.laurachenlc@163.com> Message-ID: <18712283.122eb.15f5e3ea4f5.Coremail.laurachenlc@163.com> thanks Martin, but if I want to show the same data in multiple renderwindows, how should I do normally ? At 2017-10-27 20:28:59, "Ken Martin" wrote: You cannot share actors across renderwindows right now. On Fri, Oct 27, 2017 at 12:05 AM, laurachenlc wrote: and the attached is my project on this problem. At 2017-10-27 09:19:43, "LauraLC" wrote: >Hi, > >I have add the same actor into 2 qvtkWidget, and for the renderwindow of >one qvtkWidget, I add an InteractorStyle with vtkPropPicker; >now the problem is: if I click the actor in the first qvtkWidget, and then >click it in another qvtkWidget, then click in the first qvtkWidget again, >the error pops up: >--------------- >ERROR: In C:\Activiz\VTK7.1\Rendering\OpenGL\vtkWin32OpenGLRenderWindow.cxx, >line 248 >vtkWin32OpenGLRenderWindow (000002A17C00FD20): Attempting to call >MakeCurrent for a different window than the one doing the picking, this can >causes crashes and/or bad pick results >----------------- > >is there any body know what's the problem and how to handle it? > >Thanks > > > >-- >Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >_______________________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > >Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > >Search the list archives at: http://markmail.org/search/?q=vtkusers > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers ?????|30???????????1/4?MUJI????2017??????????????34.9?>> _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Fri Oct 27 11:58:44 2017 From: ilindsay at insigniamedical.co.uk (ianl) Date: Fri, 27 Oct 2017 08:58:44 -0700 (MST) Subject: [vtkusers] Shadow support on volume rendering In-Reply-To: References: <1472744794523-5740094.post@n5.nabble.com> <1472803169307-5740103.post@n5.nabble.com> <7002df66-ddbd-071b-79bc-272a98a799ce@insigniamedical.co.uk> Message-ID: <1509119924385-0.post@n5.nabble.com> Hi David, I have finally got some time to have a quick revisit of this (was that really a year ago!). Long story short, I simply can't seem to get it to do anything. I have tried inserting an OSPRayPass into the renderer (following the pattern in the OSPRay tests), and I have also tried using vtkOSPRayVolumeMapper directly instead of vtkSmartVolumeMapper. I should note that the pipeline I am testing with works fine with the GPU based renderer. I am using the latest OSPRay and embree builds from their respective websites on Windows and VTK 8.0.1 built using VS 2017. As far as I can see, I am getting a std::runtime_error exception in vtkOSPRayRendererNode.cxx, line 432: OSPData lightArray = ospNewData(this->Lights.size(), OSP_OBJECT, (this->Lights.size()?&this->Lights[0]:NULL), 0); The Lights array looks fine in the debugger with one entry as expected. Are there any gotchas you know of that are likely to cause this? I am a bit stuck presently. Thanks Ian -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dave.demarle at kitware.com Fri Oct 27 12:17:49 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 27 Oct 2017 12:17:49 -0400 Subject: [vtkusers] Shadow support on volume rendering In-Reply-To: <1509119924385-0.post@n5.nabble.com> References: <1472744794523-5740094.post@n5.nabble.com> <1472803169307-5740103.post@n5.nabble.com> <7002df66-ddbd-071b-79bc-272a98a799ce@insigniamedical.co.uk> <1509119924385-0.post@n5.nabble.com> Message-ID: > > using vtkOSPRayVolumeMapper directly instead of vtkSmartVolumeMapper To get volumetric shadows everything in the renderer has to be rendered by ospray (i.e. just stick an OSPRay pass into your renderer and let it take over). The osprayvolumemapper option (both directly and within smartvolumemapper) makes ospray responsible for rendering only that one volume within and otherwise openGL rendered scene. It won't produce shadows on the GL rendered data. It should otherwise work though, and without seeing your code I can't guess from what you posted what is going wrong. Try running the ospray related tests in your VTK build (ctest -R OSPRay) to diagnose the setup further. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Oct 27, 2017 at 11:58 AM, ianl wrote: > Hi David, > > I have finally got some time to have a quick revisit of this (was that > really a year ago!). > > Long story short, I simply can't seem to get it to do anything. I have > tried > inserting an OSPRayPass into the renderer (following the pattern in the > OSPRay tests), and I have also tried using vtkOSPRayVolumeMapper directly > instead of vtkSmartVolumeMapper. I should note that the pipeline I am > testing with works fine with the GPU based renderer. > > I am using the latest OSPRay and embree builds from their respective > websites on Windows and VTK 8.0.1 built using VS 2017. > > As far as I can see, I am getting a std::runtime_error exception in > vtkOSPRayRendererNode.cxx, line 432: > > OSPData lightArray = ospNewData(this->Lights.size(), OSP_OBJECT, > (this->Lights.size()?&this->Lights[0]:NULL), 0); > > The Lights array looks fine in the debugger with one entry as expected. > > Are there any gotchas you know of that are likely to cause this? I am a bit > stuck presently. > > Thanks > Ian > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Fri Oct 27 12:28:08 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 27 Oct 2017 12:28:08 -0400 Subject: [vtkusers] Shadow support on volume rendering In-Reply-To: References: <1472744794523-5740094.post@n5.nabble.com> <1472803169307-5740103.post@n5.nabble.com> <7002df66-ddbd-071b-79bc-272a98a799ce@insigniamedical.co.uk> <1509119924385-0.post@n5.nabble.com> Message-ID: Another note - if your data is unstructured grid, neither ospray volume rendering path will display anything unless you resample to image data. That limitation will be removed in the next couple of days as OSPRay 1.4 now has support for unstructured grid volume rendering. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Oct 27, 2017 at 12:17 PM, David E DeMarle wrote: > using vtkOSPRayVolumeMapper directly instead of vtkSmartVolumeMapper > > > To get volumetric shadows everything in the renderer has to be rendered by > ospray (i.e. just stick an OSPRay pass into your renderer and let it take > over). > > The osprayvolumemapper option (both directly and within smartvolumemapper) > makes ospray responsible for rendering only that one volume within and > otherwise openGL rendered scene. It won't produce shadows on the GL > rendered data. It should otherwise work though, and without seeing your > code I can't guess from what you posted what is going wrong. Try running > the ospray related tests in your VTK build (ctest -R OSPRay) to diagnose > the setup further. > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 <(518)%20881-4909> > > On Fri, Oct 27, 2017 at 11:58 AM, ianl > wrote: > >> Hi David, >> >> I have finally got some time to have a quick revisit of this (was that >> really a year ago!). >> >> Long story short, I simply can't seem to get it to do anything. I have >> tried >> inserting an OSPRayPass into the renderer (following the pattern in the >> OSPRay tests), and I have also tried using vtkOSPRayVolumeMapper directly >> instead of vtkSmartVolumeMapper. I should note that the pipeline I am >> testing with works fine with the GPU based renderer. >> >> I am using the latest OSPRay and embree builds from their respective >> websites on Windows and VTK 8.0.1 built using VS 2017. >> >> As far as I can see, I am getting a std::runtime_error exception in >> vtkOSPRayRendererNode.cxx, line 432: >> >> OSPData lightArray = ospNewData(this->Lights.size(), OSP_OBJECT, >> (this->Lights.size()?&this->Lights[0]:NULL), 0); >> >> The Lights array looks fine in the debugger with one entry as expected. >> >> Are there any gotchas you know of that are likely to cause this? I am a >> bit >> stuck presently. >> >> Thanks >> Ian >> >> >> >> >> -- >> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 sur.chiranjib at gmail.com Fri Oct 27 14:21:00 2017 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Fri, 27 Oct 2017 23:51:00 +0530 Subject: [vtkusers] Solidify vtkPolyData In-Reply-To: <1507156428979-0.post@n5.nabble.com> References: <1507156428979-0.post@n5.nabble.com> Message-ID: Hi, have you tried playing with ISOvalue? This discussion thread might help you : https://stackoverflow.com/questions/43682388/thick-surface-with-vtk I also vote for having such a filter embedded in VTK. This will be simply great.. I am wondering, if something like this exists in ParaView (posting this thread to PV mailing list too) Thanks and regards, Chiranjib On Thu, Oct 5, 2017 at 4:03 AM, sebastian_a wrote: > Hello everyone, > > does vtk include a similar filter or is there a method like the Solidify > Modifier in Blender ( link > modifiers/generate/solidify.html> > )? > > Basically I have a non watertight vtkPolyData containing faces which I want > to solidify by adding opposite faces on their backs. > > Thanks a lot, Sebastian > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 alican1812 at hotmail.com Fri Oct 27 19:55:32 2017 From: alican1812 at hotmail.com (alican) Date: Fri, 27 Oct 2017 16:55:32 -0700 (MST) Subject: [vtkusers] Why can't I warp vtkCubeSource ?| Message-ID: <1509148532114-0.post@n5.nabble.com> I need to apply kind of "pinch" to vtkCubeSource, to make it look like half cylinder. I have thought to use warpScalar for that, however, no matter what I try I just can't get it working. The cube remains exactly as it was. Can anybody spot a problem in my code? Thanks, AC void warpTest() { vtkSmartPointer cubeSource = vtkSmartPointer::New(); cubeSource->SetXLength(50); cubeSource->SetYLength(10); cubeSource->SetZLength(1); cubeSource->SetCenter(0,0,0); cubeSource->Update(); vtkPolyData* polydata = cubeSource->GetOutput(); vtkSmartPointer scalars = vtkSmartPointer::New(); polydata->GetPointData()->SetScalars(scalars); int numOfPoints = polydata->GetNumberOfPoints(); scalars->SetNumberOfTuples(numOfPoints); for (vtkIdType i = 0; i < numOfPoints ; ++i) { scalars->SetTuple1(i, 200); } vtkSmartPointer normalGenerator = vtkSmartPointer::New(); normalGenerator->SetInputData(polydata); normalGenerator->ComputePointNormalsOn(); normalGenerator->ComputeCellNormalsOff(); normalGenerator->Update(); vtkSmartPointer warpScalar = vtkSmartPointer::New(); warpScalar->SetInputData(normalGenerator->GetOutput()); warpScalar->SetScaleFactor(1); // use the scalars themselves warpScalar->Update(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(warpScalar->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->GetProperty()->SetColor(1.0, 1.0, 0.0); actor->SetMapper(mapper); vtkSmartPointer smapper = vtkSmartPointer::New(); smapper->SetInputData(polydata); vtkSmartPointer sactor = vtkSmartPointer::New(); sactor->GetProperty()->SetColor(1.0, 0.0, 1.0); sactor->SetMapper(smapper); // Visualize getRenderer()->AddActor(actor); getRenderer()->AddActor(sactor); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From alican1812 at hotmail.com Sun Oct 29 07:01:40 2017 From: alican1812 at hotmail.com (alican) Date: Sun, 29 Oct 2017 04:01:40 -0700 (MST) Subject: [vtkusers] How can I set bounds for vtkLinearExtrusionFilter Message-ID: <1509274900848-0.post@n5.nabble.com> I need to implement the free hand mesh cutting in VTK. I implemented it using a custom cutting filter, derived from vtkPolyDataAlgorithm. This filter gets the points drawn by user, projects them on a plane, and uses the resulting vtkPolyData to create a vtkLinearExtrusionFilter. It works pretty good on simple meshes like a cube or a sphere, but if the mesh is a table, for ex., when I try to cut one leg, all legs are cut, because the extruding object is endless, and I don't know how to limit it to one leg only. So the question is: how can I set bounds for vtkLinearExtrusionFilter? There is a lot of code involved, I can post any fragment of it per request, or upload it somewhere and add the link if the need be. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From xuzhijing008 at 163.com Mon Oct 30 03:50:48 2017 From: xuzhijing008 at 163.com (Jane) Date: Mon, 30 Oct 2017 00:50:48 -0700 (MST) Subject: [vtkusers] plod 3d reader question In-Reply-To: <4B0488CC.3020808@ftml.net> References: <4B0488CC.3020808@ftml.net> Message-ID: <1509349848111-0.post@n5.nabble.com> Hello, I am facing the same problem about using the ColorByArrayComponent, which always default the first array source even if I changed the array source name. So, did you solve this problem and may you tell me how to do? Thank you very much in advance! Jane -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Mon Oct 30 10:10:52 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 30 Oct 2017 10:10:52 -0400 Subject: [vtkusers] Why can't I warp vtkCubeSource ?| In-Reply-To: <1509148532114-0.post@n5.nabble.com> References: <1509148532114-0.post@n5.nabble.com> Message-ID: To fundamentally change the shape from a cube, you'll need to discretize the cube to have more than just the 6 faces that define the initial cube. First, triangulate the cube with vtkTriangleFilter, then use vtkLinearSubdivisionFilter to add triangles. You should have better luck. HTH, Cory On Fri, Oct 27, 2017 at 7:55 PM, alican wrote: > I need to apply kind of "pinch" to vtkCubeSource, to make it look like > half > cylinder. I have thought to use warpScalar for that, however, no matter > what > I try I just can't get it working. The cube remains exactly as it was. > > Can anybody spot a problem in my code? Thanks, > AC > > void warpTest() > { > vtkSmartPointer cubeSource = > vtkSmartPointer::New(); > cubeSource->SetXLength(50); > cubeSource->SetYLength(10); > cubeSource->SetZLength(1); > cubeSource->SetCenter(0,0,0); > cubeSource->Update(); > vtkPolyData* polydata = cubeSource->GetOutput(); > > vtkSmartPointer scalars = > vtkSmartPointer::New(); > polydata->GetPointData()->SetScalars(scalars); > int numOfPoints = polydata->GetNumberOfPoints(); > scalars->SetNumberOfTuples(numOfPoints); > for (vtkIdType i = 0; i < numOfPoints ; ++i) > { > scalars->SetTuple1(i, 200); > } > > vtkSmartPointer normalGenerator = > vtkSmartPointer::New(); > normalGenerator->SetInputData(polydata); > normalGenerator->ComputePointNormalsOn(); > normalGenerator->ComputeCellNormalsOff(); > normalGenerator->Update(); > > vtkSmartPointer warpScalar = > vtkSmartPointer::New(); > warpScalar->SetInputData(normalGenerator->GetOutput()); > warpScalar->SetScaleFactor(1); // use the scalars themselves > warpScalar->Update(); > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(warpScalar->GetOutputPort()); > > vtkSmartPointer actor = vtkSmartPointer:: > New(); > actor->GetProperty()->SetColor(1.0, 1.0, 0.0); > actor->SetMapper(mapper); > > vtkSmartPointer smapper = > vtkSmartPointer::New(); > smapper->SetInputData(polydata); > > vtkSmartPointer sactor = vtkSmartPointer:: > New(); > sactor->GetProperty()->SetColor(1.0, 0.0, 1.0); > sactor->SetMapper(smapper); > > // Visualize > getRenderer()->AddActor(actor); > getRenderer()->AddActor(sactor); > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinofifa at gmail.com Mon Oct 30 11:41:38 2017 From: dinofifa at gmail.com (dinofifa) Date: Mon, 30 Oct 2017 23:41:38 +0800 Subject: [vtkusers] OpenGL issue in installing VTK @AWS Windows Server Message-ID: Hey guys, I just install an AWS EC2 instance running on Windows Server 2016 with Tesla K80. While trying to install VTK through Github, I find out the Open GL library is missing and preventing me to complete the installation. After I install the OpenGL, I still cannot access its library as the Nvidia CUDA driver is taking the control. Can anyone help me to resolve this issue? Or should I just launch another EC2 instance without the GPU instance? Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Mon Oct 30 11:54:27 2017 From: alican1812 at hotmail.com (alican) Date: Mon, 30 Oct 2017 08:54:27 -0700 (MST) Subject: [vtkusers] Why can't I warp vtkCubeSource ?| In-Reply-To: References: Message-ID: <1509378867551-0.post@n5.nabble.com> Thanks a lot, I will give it a try. I have already figured out the triangulation part, but weren't aware of the need to apply vtkLinearSubdivisionFilter . -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From baljci at hotmail.com Mon Oct 30 12:54:38 2017 From: baljci at hotmail.com (Boris Basic) Date: Mon, 30 Oct 2017 16:54:38 +0000 Subject: [vtkusers] Issues using QVTKOpenGLWidget Message-ID: Hi, I'm currently porting an existing finite element mesh analysis application from VTK 7.0 to VTK 8.x (actually the last master to be ready for the upcoming 8.1 version). But when switching to the new QVTKOpenGLWidget, I encountered too issues, one relatively minor, the other pretty annoying. The first and biggest problem is selection, both using vtkHardwareSelector from surface selection, and the vtkRenderedAreaPicker for frustum selection. The vtkHardwareSelector sometimes simply fails to select the points properly, whereas it always worked with the previous QVTKWidget. Unfortunately, it's very random, and I can't manage to get a working example showing the issue on each selection. For the vtkRenderedAreaPicker, the problem is that the render window becomes black while the picker is working. The second and minor issue, the first I encountered, concerns a transparency problem with the new widget rendering. Lines seems to blend with the background. I opened an issue here for that one: https://gitlab.kitware.com/vtk/vtk/issues/17154. It's not as important as the selection bug, but it was the first issue I saw. It is only visible when multisampling is enabled. Boris -------------- next part -------------- An HTML attachment was scrubbed... URL: From madsmh at gmail.com Mon Oct 30 13:33:34 2017 From: madsmh at gmail.com (Mads Munch Hansen) Date: Mon, 30 Oct 2017 18:33:34 +0100 Subject: [vtkusers] Rendering scales on the order of the solar-system Message-ID: <1509384814.2392.3.camel@gmail.com> I have asked before about using VTK to render a solar-system simulation. I came across this answer https://stackoverflow.com/questions/28014922/is-it-possible-to-make-rea listic-n-body-solar-system-simulation-in-matter-of-siz The accepted answer talks about rendering multiple frustums and combining z-buffering and -sorting. Is this possible to do in VTK? and if so, how would one go about it? Regards, Mads. From xuzhijing008 at 163.com Mon Oct 30 21:53:20 2017 From: xuzhijing008 at 163.com (Jane) Date: Mon, 30 Oct 2017 18:53:20 -0700 (MST) Subject: [vtkusers] plod 3d reader question In-Reply-To: <1509349848111-0.post@n5.nabble.com> References: <4B0488CC.3020808@ftml.net> <1509349848111-0.post@n5.nabble.com> Message-ID: <1509414800097-0.post@n5.nabble.com> I knew how to solve this problem, add the code "reader->SetReadAllScalars(1);" before "reader->Update();", then I can color the actor with other scalar data arrays. Good luck for you guys! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chandan.yeshwanth at siemens.com Tue Oct 31 04:39:10 2017 From: chandan.yeshwanth at siemens.com (Yeshwanth, Chandan) Date: Tue, 31 Oct 2017 08:39:10 +0000 Subject: [vtkusers] Example for vtkProjectedTexture usage Message-ID: Hi, Can someone please provide an example for the usage of the vtkProjectedTexture class (https://www.vtk.org/doc/nightly/html/classvtkProjectedTexture.html)? My problem: I have a pattern image in PNG format that I want to project onto a 3D object. I believe this is the right class to use. If this not the right class to use, can you please point me to the appropriate class? Thanks, Chandan -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Tue Oct 31 05:14:58 2017 From: alican1812 at hotmail.com (alican) Date: Tue, 31 Oct 2017 02:14:58 -0700 (MST) Subject: [vtkusers] vtkAxesTransformWidget uses In-Reply-To: <1467940510065-5739169.post@n5.nabble.com> References: <1401981497431-5727345.post@n5.nabble.com> <1467940510065-5739169.post@n5.nabble.com> Message-ID: <1509441298379-0.post@n5.nabble.com> I have had exactly the same problem with this code: vtkRenderer* renderer = vtkRenderer::New(); renderer->SetBackground(0.0, 0.0, 0.0); vtkRenderWindow* renderWindow = vtkRenderWindow::New(); renderWindow->AddRenderer(renderer); vtkRenderWindowInteractor* renderWindowInteractor = vtkRenderWindowInteractor::New(); renderWindowInteractor->SetRenderWindow(renderWindow); vtkConeSource* coneSource = vtkConeSource::New(); coneSource->Update(); vtkPolyDataMapper* coneMapper = vtkPolyDataMapper::New(); coneMapper->SetInputConnection(coneSource->GetOutputPort()); vtkActor* coneActor = vtkActor::New(); coneActor->SetMapper(coneMapper); coneActor->GetProperty()->SetColor(1, 1, 0); renderer->AddActor(coneActor); vtkInteractorStyleTrackballCamera* style = vtkInteractorStyleTrackballCamera::New(); renderWindowInteractor->SetInteractorStyle(style); vtkAxesTransformRepresentation* representation = vtkAxesTransformRepresentation::New(); vtkAxesTransformWidget* transformWidget = vtkAxesTransformWidget::New(); transformWidget->SetInteractor(renderWindowInteractor); transformWidget->SetRepresentation(representation); transformWidget->On(); renderer->ResetCamera(); renderWindow->Render(); renderWindowInteractor->Start(); However, if I move *transformWidget->On()* to be the last line, after *renderWindowInteractor->Start() * the problem disappears. Looks like a bug to me, as it makes the widget pretty useless. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From 836856733 at qq.com Tue Oct 31 05:38:52 2017 From: 836856733 at qq.com (DJQ) Date: Tue, 31 Oct 2017 02:38:52 -0700 (MST) Subject: [vtkusers] Problems with vtkImageReslice In-Reply-To: References: <1509104309431-0.post@n5.nabble.com> Message-ID: <1509442732934-0.post@n5.nabble.com> Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From wangq1979 at outlook.com Tue Oct 31 08:11:52 2017 From: wangq1979 at outlook.com (Wang Q) Date: Tue, 31 Oct 2017 12:11:52 +0000 Subject: [vtkusers] Init in VTK 8.0 Message-ID: Hello there, I upgraded VTK from 6.3 to 8.0, and tried to execute some legacy code implemented on 6.3. However, after setting up the project include and lib dirs in VS2015, it threw some errors like: Severity Code Description Project File Line Suppression State Error LNK2001 unresolved external symbol "void __cdecl vtkRenderingOpenGL_AutoInit_Construct(void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) test_vtk D:\develop\C++\projects\test_vtk\test_vtk\test_vtk\Vis3D3Phase_WithPipe.obj 1 My code starts like: #pragma #include VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); VTK_MODULE_INIT(vtkRenderingFreeType); #include "vtkSmartPointer.h" #include "vtkImageData.h" It seems libs are not recognised, but I did update all relating parameters in VS project properties. In addition, I tried the example of vtkShadows, but unfortunately it said unresolved header file "vtkFrameBufferObject.h". Any tips would be appreciated! Cheers, Chiang -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Tue Oct 31 11:51:50 2017 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Tue, 31 Oct 2017 11:51:50 -0400 Subject: [vtkusers] Init in VTK 8.0 In-Reply-To: References: Message-ID: Hi Chiang, VTK's default rendering implementation changed from VTK 6 to VTK 7, so the library names you need changed. The OpenGL backend worked with OpenGL 1.1(or 1.2?), and the newer OpenGL2 backend uses OpenGL 3.2. The default changed to OpenGL2 in VTK 7.0 and so you need to update the names of the libraries you are using from vtkRenderingOpenGL and vtkRenderingVolumeOpenGL to vtkRenderingOpenGL2 and vtkRenderingVolumeOpenGL2. There is a script you can run in the VTK source tree (Utilities/Scripts/WhatModulesVTK.py) to figure out what modules you need to use. I'd run that script and see what you get since I'm not sure if anything else you use has changed. HTH, Shawn On Tue, Oct 31, 2017 at 8:11 AM, Wang Q wrote: > Hello there, > > I upgraded VTK from 6.3 to 8.0, and tried to execute some legacy code > implemented on 6.3. However, after setting up the project include and lib > dirs in VS2015, it threw some errors like: > > Severity Code Description Project File Line Suppression State > Error LNK2001 unresolved external symbol "void __cdecl > vtkRenderingOpenGL_AutoInit_Construct(void)" > (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) test_vtk > D:\develop\C++\projects\test_vtk\test_vtk\test_vtk\ > Vis3D3Phase_WithPipe.obj 1 > > My code starts like: > #pragma > > #include > VTK_MODULE_INIT(vtkInteractionStyle); > VTK_MODULE_INIT(vtkRenderingOpenGL); > VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); > VTK_MODULE_INIT(vtkRenderingFreeType); > > #include "vtkSmartPointer.h" > #include "vtkImageData.h" > > It seems libs are not recognised, but I did update all relating parameters > in VS project properties. > > > In addition, I tried the example of vtkShadows, but unfortunately it said > unresolved header file "vtkFrameBufferObject.h". > > Any tips would be appreciated! > > Cheers, > > Chiang > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Tue Oct 31 12:05:34 2017 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 31 Oct 2017 09:05:34 -0700 (MST) Subject: [vtkusers] Shadow support on volume rendering In-Reply-To: References: <1472744794523-5740094.post@n5.nabble.com> <1472803169307-5740103.post@n5.nabble.com> <7002df66-ddbd-071b-79bc-272a98a799ce@insigniamedical.co.uk> <1509119924385-0.post@n5.nabble.com> Message-ID: <1509465934854-0.post@n5.nabble.com> The data I am using is straightforward 16 bit signed CT data, no unstructured grids. I believe I saw that support for this had been added recently to OSPRay. I have put the following code in to add the render pass (rendererToAddTo is a vtkRenderer): vtkSmartPointer osprayPass = vtkSmartPointer::New(); rendererToAddTo->SetPass(osprayPass.GetPointer()); With this commented out, the volume renders fine with the GPU renderer, so I am fairly sure the rest of the pipeline is ok. With these lines in place, I get the same exception when the light array is created. Unfortunately, I am testing this in an existing class hierarchy, so giving you the pipeline code may be a bit tricky as the code is in various places. The light is just the default one (follow camera?) that vtk adds automatically. I have managed to run the tests as you asked in your previous message and all seems fine (rendered images appear) until the final two. These look to 'half render' an urn with a grey rectangle below. The output is as follows: D:\Build\VTK\VTK 8.0.1 VS2017\VTK64OSPRay>"D:\Program Files\CMake\bin\ctest.exe" -R OSPRay -C Debug Test project D:/Build/VTK/VTK 8.0.1 VS2017/VTK64OSPRay Start 1042: vtkRenderingOSPRay-HeaderTest 1/29 Test #1042: vtkRenderingOSPRay-HeaderTest ................................ ..... Passed 0.20 sec Start 1043: vtkRenderingOSPRayCxx-TestOSPRayCompositePolyDataMapper2 2/29 Test #1043: vtkRenderingOSPRayCxx-TestOSPRayCompositePolyDataMapper2 ..... ..... Passed 2.50 sec Start 1044: vtkRenderingOSPRayCxx-TestOSPRayDynamicObject 3/29 Test #1044: vtkRenderingOSPRayCxx-TestOSPRayDynamicObject ................ ..... Passed 2.02 sec Start 1045: vtkRenderingOSPRayCxx-TestOSPRayDynamicScene 4/29 Test #1045: vtkRenderingOSPRayCxx-TestOSPRayDynamicScene ................. ..... Passed 7.59 sec Start 1046: vtkRenderingOSPRayCxx-TestOSPRayImplicits 5/29 Test #1046: vtkRenderingOSPRayCxx-TestOSPRayImplicits .................... ..... Passed 1.01 sec Start 1047: vtkRenderingOSPRayCxx-TestOSPRayLayers 6/29 Test #1047: vtkRenderingOSPRayCxx-TestOSPRayLayers ....................... ..... Passed 0.83 sec Start 1048: vtkRenderingOSPRayCxx-TestOSPRayLights 7/29 Test #1048: vtkRenderingOSPRayCxx-TestOSPRayLights ....................... ..... Passed 1.89 sec Start 1049: vtkRenderingOSPRayCxx-TestOSPRayMultiBlock 8/29 Test #1049: vtkRenderingOSPRayCxx-TestOSPRayMultiBlock ................... ..... Passed 1.64 sec Start 1050: vtkRenderingOSPRayCxx-TestOSPRayMultiBlockPartialArrayFieldDat a 9/29 Test #1050: vtkRenderingOSPRayCxx-TestOSPRayMultiBlockPartialArrayFieldDat a ... Passed 0.89 sec Start 1051: vtkRenderingOSPRayCxx-TestOSPRayOrthographic 10/29 Test #1051: vtkRenderingOSPRayCxx-TestOSPRayOrthographic ................. ..... Passed 1.89 sec Start 1052: vtkRenderingOSPRayCxx-TestOSPRayPass 11/29 Test #1052: vtkRenderingOSPRayCxx-TestOSPRayPass ......................... ..... Passed 1.99 sec Start 1053: vtkRenderingOSPRayCxx-TestOSPRayRenderMesh 12/29 Test #1053: vtkRenderingOSPRayCxx-TestOSPRayRenderMesh ................... ..... Passed 1.30 sec Start 1054: vtkRenderingOSPRayCxx-TestOSPRayRendererType 13/29 Test #1054: vtkRenderingOSPRayCxx-TestOSPRayRendererType ................. ..... Passed 4.19 sec Start 1055: vtkRenderingOSPRayCxx-TestOSPRayScalarBar 14/29 Test #1055: vtkRenderingOSPRayCxx-TestOSPRayScalarBar .................... ..... Passed 1.07 sec Start 1056: vtkRenderingOSPRayCxx-TestOSPRayTime 15/29 Test #1056: vtkRenderingOSPRayCxx-TestOSPRayTime ......................... ..... Passed 1.18 sec Start 1057: vtkRenderingOSPRayCxx-TestOSPRayWindow 16/29 Test #1057: vtkRenderingOSPRayCxx-TestOSPRayWindow ....................... ..... Passed 0.79 sec Start 1058: vtkRenderingOSPRayCxx-TestGPURayCastCameraInside 17/29 Test #1058: vtkRenderingOSPRayCxx-TestGPURayCastCameraInside ............. ..... Passed 12.82 sec Start 1059: vtkRenderingOSPRayCxx-TestGPURayCastCellData 18/29 Test #1059: vtkRenderingOSPRayCxx-TestGPURayCastCellData ................. ..... Passed 1.86 sec Start 1060: vtkRenderingOSPRayCxx-TestGPURayCastCameraInsideSmallSpacing 19/29 Test #1060: vtkRenderingOSPRayCxx-TestGPURayCastCameraInsideSmallSpacing . ..... Passed 18.90 sec Start 1061: vtkRenderingOSPRayCxx-TestGPURayCastMapperBenchmark 20/29 Test #1061: vtkRenderingOSPRayCxx-TestGPURayCastMapperBenchmark .......... ..... Passed 13.99 sec Start 1062: vtkRenderingOSPRayCxx-TestGPURayCastMapperSampleDistance 21/29 Test #1062: vtkRenderingOSPRayCxx-TestGPURayCastMapperSampleDistance ..... ..... Passed 2.82 sec Start 1063: vtkRenderingOSPRayCxx-TestGPURayCastPerspectiveParallel 22/29 Test #1063: vtkRenderingOSPRayCxx-TestGPURayCastPerspectiveParallel ...... ..... Passed 1.31 sec Start 1064: vtkRenderingOSPRayCxx-TestGPURayCastVolumeLightKit 23/29 Test #1064: vtkRenderingOSPRayCxx-TestGPURayCastVolumeLightKit ........... ..... Passed 1.08 sec Start 1065: vtkRenderingOSPRayCxx-TestGPURayCastVolumePolyData 24/29 Test #1065: vtkRenderingOSPRayCxx-TestGPURayCastVolumePolyData ........... ..... Passed 1.04 sec Start 1066: vtkRenderingOSPRayCxx-TestGPURayCastVolumeScale 25/29 Test #1066: vtkRenderingOSPRayCxx-TestGPURayCastVolumeScale .............. ..... Passed 1.28 sec Start 1067: vtkRenderingOSPRayCxx-TestGPURayCastVolumeUpdate 26/29 Test #1067: vtkRenderingOSPRayCxx-TestGPURayCastVolumeUpdate ............. ..... Passed 5.80 sec Start 1068: vtkRenderingOSPRayCxx-TestGPUVolumeRayCastMapper 27/29 Test #1068: vtkRenderingOSPRayCxx-TestGPUVolumeRayCastMapper ............. ..... Passed 48.46 sec Start 1069: vtkRenderingOSPRayCxx-TestOSPRayVolumeRenderer 28/29 Test #1069: vtkRenderingOSPRayCxx-TestOSPRayVolumeRenderer ............... .....***Failed 3.18 sec Start 1070: vtkRenderingOSPRayCxx-TestSmartVolumeMapper 29/29 Test #1070: vtkRenderingOSPRayCxx-TestSmartVolumeMapper .................. .....***Failed 3.41 sec 93% tests passed, 2 tests failed out of 29 Label Time Summary: vtkRenderingOSPRay = 146.91 sec (29 tests) Total Test time (real) = 147.49 sec The following tests FAILED: 1069 - vtkRenderingOSPRayCxx-TestOSPRayVolumeRenderer (Failed) 1070 - vtkRenderingOSPRayCxx-TestSmartVolumeMapper (Failed) Errors while running CTest -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Tue Oct 31 12:14:33 2017 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 31 Oct 2017 12:14:33 -0400 Subject: [vtkusers] Rendering scales on the order of the solar-system In-Reply-To: <1509384814.2392.3.camel@gmail.com> References: <1509384814.2392.3.camel@gmail.com> Message-ID: I believe VTK can handle this but there are pitfalls if you want to have huge distances combined with small scale local details. Basically create two renderers on top of each other render the large scale first in one then the small scale second on the other with SetTransparent(1). If your large scale data goes in front of your small scale then it gets trickier as you would need to use the zbuffer from the large scale as a texture with a modified shader in the small scale. The details of which would not be a short email. On Mon, Oct 30, 2017 at 1:33 PM, Mads Munch Hansen wrote: > I have asked before about using VTK to render a solar-system > simulation. I came across this answer > > https://stackoverflow.com/questions/28014922/is-it-possible-to-make-rea > listic-n-body-solar-system-simulation-in-matter-of-siz > > The accepted answer talks about rendering multiple frustums and > combining z-buffering and -sorting. Is this possible to do in VTK? and > if so, how would one go about it? > > Regards, Mads. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangq1979 at outlook.com Tue Oct 31 12:26:47 2017 From: wangq1979 at outlook.com (Wang Q) Date: Tue, 31 Oct 2017 16:26:47 +0000 Subject: [vtkusers] =?gb2312?b?tPC4tDogIEluaXQgaW4gVlRLIDguMA==?= In-Reply-To: References: , Message-ID: Hello Shawn, Your tips really help! But I cannot find the script under the dir as you mentioned. I wonder it has been moved to somewhere else in VTK 8. Best wishes, Chiang ________________________________ ???: Shawn Waldon ????: 2017?10?31? 15:51 ???: Wang Q ??: vtkusers at vtk.org ??: Re: [vtkusers] Init in VTK 8.0 Hi Chiang, VTK's default rendering implementation changed from VTK 6 to VTK 7, so the library names you need changed. The OpenGL backend worked with OpenGL 1.1(or 1.2?), and the newer OpenGL2 backend uses OpenGL 3.2. The default changed to OpenGL2 in VTK 7.0 and so you need to update the names of the libraries you are using from vtkRenderingOpenGL and vtkRenderingVolumeOpenGL to vtkRenderingOpenGL2 and vtkRenderingVolumeOpenGL2. There is a script you can run in the VTK source tree (Utilities/Scripts/WhatModulesVTK.py) to figure out what modules you need to use. I'd run that script and see what you get since I'm not sure if anything else you use has changed. HTH, Shawn On Tue, Oct 31, 2017 at 8:11 AM, Wang Q > wrote: Hello there, I upgraded VTK from 6.3 to 8.0, and tried to execute some legacy code implemented on 6.3. However, after setting up the project include and lib dirs in VS2015, it threw some errors like: Severity Code Description Project File Line Suppression State Error LNK2001 unresolved external symbol "void __cdecl vtkRenderingOpenGL_AutoInit_Construct(void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) test_vtk D:\develop\C++\projects\test_vtk\test_vtk\test_vtk\Vis3D3Phase_WithPipe.obj 1 My code starts like: #pragma #include VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); VTK_MODULE_INIT(vtkRenderingFreeType); #include "vtkSmartPointer.h" #include "vtkImageData.h" It seems libs are not recognised, but I did update all relating parameters in VS project properties. In addition, I tried the example of vtkShadows, but unfortunately it said unresolved header file "vtkFrameBufferObject.h". Any tips would be appreciated! Cheers, Chiang _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Tue Oct 31 13:05:01 2017 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 31 Oct 2017 10:05:01 -0700 (MST) Subject: [vtkusers] Shadow support on volume rendering In-Reply-To: <1509465934854-0.post@n5.nabble.com> References: <1472803169307-5740103.post@n5.nabble.com> <7002df66-ddbd-071b-79bc-272a98a799ce@insigniamedical.co.uk> <1509119924385-0.post@n5.nabble.com> <1509465934854-0.post@n5.nabble.com> Message-ID: <1509469501231-0.post@n5.nabble.com> Ok, Looks like the light creation exception was a red herring. This was due to a rogue old opsray dll in my debug directory (presumably from an earlier attempt at getting this working). I have removed this and verified that the correct dlls are getting loaded with Depends. I am still seeing a black image, but now no exception or debug output. Are there any areas I could look at to try to get to the bottom of this? Am I right in expecting the LUTs, etc that I am using for the GPU render pathway to function in the same way for OSPRay (just with ray traced results rather than ray casting)? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From shawn.waldon at kitware.com Tue Oct 31 13:16:06 2017 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Tue, 31 Oct 2017 13:16:06 -0400 Subject: [vtkusers] =?utf-8?b?562U5aSNOiAgSW5pdCBpbiBWVEsgOC4w?= In-Reply-To: References: Message-ID: Hi Chiang, Oops. It is in Utilities/Maintenance/WhatModulesVTK.py Shawn On Tue, Oct 31, 2017 at 12:26 PM, Wang Q wrote: > Hello Shawn, > > Your tips really help! But I cannot find the script under the dir as you > mentioned. I wonder it has been moved to somewhere else in VTK 8. > > Best wishes, > > Chiang > > ------------------------------ > *???:* Shawn Waldon > *????:* 2017?10?31? 15:51 > *???:* Wang Q > *??:* vtkusers at vtk.org > *??:* Re: [vtkusers] Init in VTK 8.0 > > Hi Chiang, > > VTK's default rendering implementation changed from VTK 6 to VTK 7, so the > library names you need changed. The OpenGL backend worked with OpenGL > 1.1(or 1.2?), and the newer OpenGL2 backend uses OpenGL 3.2. The default > changed to OpenGL2 in VTK 7.0 and so you need to update the names of the > libraries you are using from vtkRenderingOpenGL and > vtkRenderingVolumeOpenGL to vtkRenderingOpenGL2 and > vtkRenderingVolumeOpenGL2. There is a script you can run in the VTK source > tree (Utilities/Scripts/WhatModulesVTK.py) to figure out what modules you > need to use. I'd run that script and see what you get since I'm not sure > if anything else you use has changed. > > HTH, > Shawn > > On Tue, Oct 31, 2017 at 8:11 AM, Wang Q wrote: > > Hello there, > > I upgraded VTK from 6.3 to 8.0, and tried to execute some legacy code > implemented on 6.3. However, after setting up the project include and lib > dirs in VS2015, it threw some errors like: > > Severity Code Description Project File Line Suppression State > Error LNK2001 unresolved external symbol "void __cdecl > vtkRenderingOpenGL_AutoInit_Construct(void)" > (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) test_vtk > D:\develop\C++\projects\test_vtk\test_vtk\test_vtk\Vis3D3Pha > se_WithPipe.obj 1 > > My code starts like: > #pragma > > #include > VTK_MODULE_INIT(vtkInteractionStyle); > VTK_MODULE_INIT(vtkRenderingOpenGL); > VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); > VTK_MODULE_INIT(vtkRenderingFreeType); > > #include "vtkSmartPointer.h" > #include "vtkImageData.h" > > It seems libs are not recognised, but I did update all relating parameters > in VS project properties. > > > In addition, I tried the example of vtkShadows, but unfortunately it said > unresolved header file "vtkFrameBufferObject.h". > > Any tips would be appreciated! > > Cheers, > > Chiang > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangq1979 at outlook.com Tue Oct 31 16:38:30 2017 From: wangq1979 at outlook.com (Wang Q) Date: Tue, 31 Oct 2017 20:38:30 +0000 Subject: [vtkusers] =?gb2312?b?tPC4tDogtPC4tDogIEluaXQgaW4gVlRLIDguMA==?= In-Reply-To: References: , Message-ID: Thanks Shawn! Cheers, Chiang ________________________________ ???: Shawn Waldon ????: 2017?10?31? 17:16 ???: Wang Q ??: vtkusers at vtk.org ??: Re: ??: [vtkusers] Init in VTK 8.0 Hi Chiang, Oops. It is in Utilities/Maintenance/WhatModulesVTK.py Shawn On Tue, Oct 31, 2017 at 12:26 PM, Wang Q > wrote: Hello Shawn, Your tips really help! But I cannot find the script under the dir as you mentioned. I wonder it has been moved to somewhere else in VTK 8. Best wishes, Chiang ________________________________ ???: Shawn Waldon > ????: 2017?10?31? 15:51 ???: Wang Q ??: vtkusers at vtk.org ??: Re: [vtkusers] Init in VTK 8.0 Hi Chiang, VTK's default rendering implementation changed from VTK 6 to VTK 7, so the library names you need changed. The OpenGL backend worked with OpenGL 1.1(or 1.2?), and the newer OpenGL2 backend uses OpenGL 3.2. The default changed to OpenGL2 in VTK 7.0 and so you need to update the names of the libraries you are using from vtkRenderingOpenGL and vtkRenderingVolumeOpenGL to vtkRenderingOpenGL2 and vtkRenderingVolumeOpenGL2. There is a script you can run in the VTK source tree (Utilities/Scripts/WhatModulesVTK.py) to figure out what modules you need to use. I'd run that script and see what you get since I'm not sure if anything else you use has changed. HTH, Shawn On Tue, Oct 31, 2017 at 8:11 AM, Wang Q > wrote: Hello there, I upgraded VTK from 6.3 to 8.0, and tried to execute some legacy code implemented on 6.3. However, after setting up the project include and lib dirs in VS2015, it threw some errors like: Severity Code Description Project File Line Suppression State Error LNK2001 unresolved external symbol "void __cdecl vtkRenderingOpenGL_AutoInit_Construct(void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) test_vtk D:\develop\C++\projects\test_vtk\test_vtk\test_vtk\Vis3D3Phase_WithPipe.obj 1 My code starts like: #pragma #include VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); VTK_MODULE_INIT(vtkRenderingFreeType); #include "vtkSmartPointer.h" #include "vtkImageData.h" It seems libs are not recognised, but I did update all relating parameters in VS project properties. In addition, I tried the example of vtkShadows, but unfortunately it said unresolved header file "vtkFrameBufferObject.h". Any tips would be appreciated! Cheers, Chiang _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 bartolomei-luca at virgilio.it Tue Oct 31 18:12:37 2017 From: bartolomei-luca at virgilio.it (bartolomei-luca at virgilio.it) Date: Tue, 31 Oct 2017 23:12:37 +0100 (CET) Subject: [vtkusers] R: Re: QVTKWidget in QT GUI freezes other QWidgets Message-ID: <2092576104.17789861509487957599.JavaMail.httpd@fep-webmail-04> Hello everyone, some updates about the solution to the problem.I have managed to upgrade my CMake to version 3.10 and I successfully built VTK 8.0.1. However, in the last few days I have been facing a new problem. When I try to include QVTKOpenGLWidget I get the following error: "Cannot locate QOpenGLWidget.h" I have seen on the web that other people had the same problem, but despite my efforts I did not succeeded in solving it. I am using Qt 3.4.2 based on Qt 5.5.0, so there should not be any problem, since in the QOpenGLWidget has been introduced in Qt 5.4.0. Do you have any idea why this happens? Could the error be in the CMakeFile.txt of my project or should I look into the build configuration of my Qtcreator? I hope I am not too off-topic, but solving this problem could be useful for other people (and all these problems are somehow connected). Thanks a lot for the help.Best,Luca ----Messaggio originale---- Da: "Alessandro Volz" Data: 18-ott-2017 14.55 A: "bartolomei-luca at virgilio.it" Cc: "Shawn Waldon", "Sankhesh Jhaveri", "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets Luca, I haven't looked into your problem/thread in detail, but I have one suggestion that might come useful: are you maybe at some point doing things in a secondary thread, and somehow passing data to your widget from this thread?It has happened to me in the past, and the GUI would temporarily switch to drawing in black or not updating any more.If you are using background threads, look into this.Best,AlessandroOn Oct 17, 2017, at 5:23 PM, bartolomei-luca at virgilio.it wrote:Thanks to everyone for the inputs.I will try to include the QVTKOpenGLWidget in my project. I will let you know if I succeed in doing that and if this solve the issue. at Shawn -> About the Cmake: I can successfully build VTK 8.0 and use it in QT if I use a newer version of cmake (currently, the default cmake version for my system is 3.2.2). The problem is that I cannot build my project with VTK 8.0 using ROS. So the problem is not Cmake itself, but the version ROS uses for building (too "old" for VTK 8.0). I will try also to fix this.For the moment, thanks to all. I will let you know in case of success/failure.Best,Luca ----Messaggio originale---- Da: "Shawn Waldon" Data: 17-ott-2017 16.18 A: "Sankhesh Jhaveri" Cc: "bartolomei-luca at virgilio.it", "Elvis Stansvik", "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets When one of the projects I work on first started using Qt5 with VTK we had similar problems. Embedding a QVTKWidget in a Qt5 Tab or Scroll widget or using it alongside other OpenGL-based widgets in Qt5 can cause these kinds of issues and this was the motivation for creating the QVTKOpenGLWidget. The QVTKOpenGLWidget correctly lets Qt manage the OpenGL context rather than hacking it in with window system calls. You could try grabbing the QVTKOpenGLWidget code from VTK 8.0.0 and copying it into your project as a temporary solution (I'm not sure if it relies on any features added between 7.1 and 8.0).You said upgrading CMake was blocking you from using more recent VTK? The CMake developers try really hard to be backwards compatible. Have you reported the issues you are having to them? I know they try their best to handle compatibility issues that are reported.HTH,ShawnOn Tue, Oct 17, 2017 at 10:03 AM, Sankhesh Jhaveri wrote:How are you initializing the QVTKWidget?One other thing to test would be to try removing the QTabWidget and showing both the QVTKWidget and QWidget in the same central widget side-by-side. Finally, you could see if the setup works fine with Qt4.I am not sure how you would put a GLUT window inside a QWidget. But if you have can do that, you could try the vtkExternalOpenGLRenderWindow. See TestGLUTRenderWindow.cxx for an example. ?On Tue, Oct 17, 2017 at 9:24 AM bartolomei-luca at virgilio.it wrote:Hello Sankhesh,thanks a lot for the reply.Let's say the GUI "pipeline" is as I explained to Elvis. Then:At the moment the two widgets are under the central widget (a QWidget). They are in two different tabs of a QTabWidget. I tried to move the QVTKWidget out of its tab but no luck. I have also noted another thing. If I show at the same time the QWidget and the QVTKWidget, the QVTKWidget works fine, but the QWidget freeze. That's why I thought that it could be an OpenGL context issue.What do you mean by "replacing ROS widget with a simple button"? In any case, I can make QVTKWidget work, but no success with the QWidget. It just freeze on the last view.Unfortunately, QVTKOpenGLWidget is available only for VTK 8.0 and higher. I am using VTK 7.1 and I cannot upgrade to 8.0 because of the cmake that is installed on my laptop. I cannot upgrade the cmake version due to some compatibility issues with ROS. I will get in a lot of trouble if I try to do that. Is there a way to use glut or vtkOpenGLRenderer (available in vtk 7.1)?Thanks a lot again for the help.Best,Luca ----Messaggio originale---- Da: "Sankhesh Jhaveri" Data: 17-ott-2017 14.21 A: "Elvis Stansvik", "bartolomei-luca at virgilio.it" Cc: "VTK Users" Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets Hi Luca, Do the QWidget and QVTKWidget overlap at all or are they separated by some QFrame border, etc. ? If they are not overlapping, it means they are not sharing the OpenGL context. Have you tried replacing the ROS widget with a simple button to see if the QVTKWidget works properly? Lastly, the QVTKWidget is known to have rendering issues with Qt5. Try using the QVTKOpenGLWidget to see if anything changes. Best,Sankhesh ?On Tue, Oct 17, 2017 at 3:29 AM Elvis Stansvik wrote:2017-10-17 9:22 GMT+02:00 bartolomei-luca at virgilio.it : > Hello Elvis, > > thanks for your reply. > I don't have the gui avaiable right now; I will send a picture as soon as I > can. > > To answer your question: yes, if I remove the QVTKWidget and replace it with > QWidget everything works. The problems occur only when the QVTKWidget is > present. > > The GUI is built to work in this way: > 1) start showing stuff on the QWidget; > 2) After a while, the QVTKWidget shows some other stuff. > > The QWidget is showing some interactive scene and it uses a library > ("librviz" - for ROS users) based on Ogre and OpenGL. Could the problem > happen because the QVTKWidget interfere with the already existing OpenGL > context? I don't know, but it sounds like it's possible. I think there are other people on this list who knows much more about OpenGL and how VTK uses it than I do, so I'll let those answer that. Elvis > I don't know if this is the cause, because it is sufficient to have the > QVTKWidget on the Gui to make the QWidget freeze. > > Anyway, I have looked at this example: > https://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT > but no luck so far. Maybe is a problem of drivers (I have an Nvidia GeForce > GTX 950M on Ubuntu 14.04 LTS). > > Best, > Luca > > > ----Messaggio originale---- > Da: "Elvis Stansvik" > Data: 17-ott-2017 8.36 > A: > Cc: "VTK Users" > Ogg: Re: [vtkusers] QVTKWidget in QT GUI freezes other QWidgets > > > Den 13 okt. 2017 12:08 em skrev "bartolomei-luca at virgilio.it" > : > > Hello everyone! > > I have a problem with the QT GUI I am creating. Basically, I have an > interactive QWidget, a QVTKWidget and a "Quit" button. > > When I launch my app, I can interact with the QWidget without any problem (I > have a 3D interactive scene, where I can zoom and rotate). > However, as soon as the QVTKWidget becomes "active" (i.e. some function in > my code start using it or if I click on it), both the QWidget and the > QVTKWidget freeze. The app keeps on working, since the "Quit" button works > as it should. > > If I have a GUI with either the QWidget or the QVTKWidget (only one of them) > everything works fine. The problem is if I try to include both of them at > the same time. > > Do you have any idea why this happens? > > > I don't have any immediate ideas. It would really help to see a small > example where the problem occurs. > > Does it work if you put two of your QWidgets in the application. I mean, if > you remove the QVTKWidget and put another one of your QWidget where it was? > > Elvis > > > Thanks a lot for you help. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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.comVisit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.htmlPlease keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQSearch the list archives at: http://markmail.org/search/?q=vtkusersFollow this link to subscribe/unsubscribe:http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: