From paulo.r.m.carvalho at gmail.com Mon Apr 1 06:43:07 2019 From: paulo.r.m.carvalho at gmail.com (Paulo Carvalho) Date: Mon, 1 Apr 2019 07:43:07 -0300 Subject: [vtkusers] Any way to use GPU to make faster performance? In-Reply-To: References: <1553887844749-0.post@n5.nabble.com> Message-ID: Hello, First, make sure all your graphics drivers are up-to-date. Also, check support for the features used by you program in your graphics card itself. It is a good practice in your code to query feature support before using them. Attempt to used an unsupported feature will either result in a crash due to unhandled error or a default implementation in software (results in severe performance penalty). If you're a CUDA developer, you can take a look at this: https://devblogs.nvidia.com/how-query-device-properties-and-handle-errors-cuda-cc/ It's 7 years old, but worth reading. Other API have similar feature query and error handling calls. good luck, Paulo Em dom, 31 de mar de 2019 ?s 16:46, Chiranjib Sur escreveu: > Please post the full error and the log with more details. > > Thanks and regards, > Chiranjib > > > On Sat, Mar 30, 2019 at 1:00 AM Shrabani Ghosh > wrote: > >> Hi, >> >> I am using VTK for simplex. When I am using a large data set, I am >> getting a >> runtime error. Is it possible to use GPU to make it faster? >> >> >> >> -- >> 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: >> https://vtk.org/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: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From will.schroeder at kitware.com Tue Apr 2 11:21:35 2019 From: will.schroeder at kitware.com (Will Schroeder) Date: Tue, 2 Apr 2019 11:21:35 -0400 Subject: [vtkusers] VTK Hackathon April 18, 2019 Message-ID: Please see the VTK Discourse list to follow the excitement and make topic suggestions: https://discourse.vtk.org/t/vtk-hackathon/662 "Recently some stars have aligned and we?d like to hold a VTK hackathon on April 18, 2019. We will begin at 9:00am EDT and run through early afternoon. We will reserve a conference room(s) at various Kitware offices (so non-Kitware VTK contributors can join in person) as well as sharing a video link. "At this point let?s identify a theme for the hackathon. Obviously just getting together in person or via video is great, but there are a lot of outstanding issues that could benefit from some extra focus. Please suggest some potential topics and we?ll select something based on community interest. -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.musy at gmail.com Sat Apr 6 18:17:09 2019 From: marco.musy at gmail.com (mmusy) Date: Sat, 6 Apr 2019 15:17:09 -0700 (MST) Subject: [vtkusers] VTK for visualizing 3D Networks In-Reply-To: <1552749643365-0.post@n5.nabble.com> References: <1552226456737-0.post@n5.nabble.com> <1552683357223-0.post@n5.nabble.com> <1552749643365-0.post@n5.nabble.com> Message-ID: <1554589029139-0.post@n5.nabble.com> Hi you can check out these two examples which make use of vtkplotter: https://github.com/marcomusy/vtkplotter/blob/master/examples/basic/tube.py (tubes of varying size and colors) and https://github.com/marcomusy/vtkplotter/blob/master/examples/basic/manyspheres.py (large nr of spheres of varying size and colors) you can convert easily scalrs to color arrays etc.. using vtkplotter methods will not prevent you from using any of the existing vtk standard features, hope that helps -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tavares at fe.up.pt Sun Apr 7 11:56:46 2019 From: tavares at fe.up.pt (=?utf-8?Q?=22Jo=C3=A3o_Manuel_R=2E_S=2E_Tavares=22?=) Date: Sun, 7 Apr 2019 16:56:46 +0100 Subject: [vtkusers] VipIMAGE 2019 Porto, Portugal - CALL FOR CONTRIBUTIONS (deadline postponed) References: <2BA32829-0F0F-42F4-8CF0-C56E341A4917@fe.up.pt> Message-ID: <0AB342FB-5507-4026-A13E-39C4E94D02F6@fe.up.pt> ----------------------------------------------------------------------------------------------------------- VII ECCOMAS Thematic Conference VipIMAGE 2019 www.fe.up.pt/vipimage October 16-18, 2019, Porto, Portugal Chairs: Jo?o Manuel R. S. Tavares & Renato Natal Jorge, Universidade do Porto ----------------------------------------------------------------------------------------------------------- Dear Colleague, We are pleased to announce the International Conference VipIMAGE 2019 - VII ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING (www.fe.up.pt/vipimage) to be held in October 16-18, 2019, in Axis Vermar Conference & Beach Hotel, Porto, Portugal. Possible Topics (but not limited to) - Signal and Image Processing - Computational Vision - Medical Imaging - Physics of Medical Imaging - Tracking and Analysis of Movement - Simulation and Modeling - Image Acquisition - Industrial Applications - Shape Reconstruction - Segmentation, Matching, Simulation - Data Interpolation, Registration, Acquisition and Compression - 3D Vision - Machine Learning, Deep Learning and Big Data - Virtual Reality - Visual Inspection - Software Development for Image Processing and Analysis - Computer Aided Diagnosis, Surgery, Therapy, and Treatment - Computational Bioimaging and Visualization - Telemedicine Systems and Applications Invited Lecturers - Aur?lio Campilho, Universidade do Porto, Portugal - Danail Stoyanov, University College London, UK - Daniela Iacoviello, Sapienza University of Rome, Italy - Jo?o Paulo Papa, Universidade Estadual de S?o Paulo, Brazil - Jos Vander Sloten, KU Leven, Belgium - Wafa Skalli, Arts et M?tiers ParisTech, France Thematic Sessions Proposals to organize Thematic Sessions under the auspicious of VipIMAGE 2019 are welcome. Proposals for Thematic Sessions should be submitted by email to the conference co-chairs (tavares at fe.up.pt, rnatal at fe.up.pt). Accepted Thematic Sessions - Cardiovascular, Cerebrovascular and Orthopaedic diseases: Imaging and Modelling - Advances and Imaging Challenges in Micro and Nanofluidics - Intersection between Image Processing and Machine Learning in Biomedical Applications - Direct Digital Fabrication in Medicine: from digital data to physical models - Computer Simulations and Visualization Applied to Tissue Engineering - Parameterization of Reconstructed Organ Models - Computational vision and image processing applied to Dentistry - Network Neuroscience Publications Proceedings: The proceedings book will be published by Springer under the book series "Lecture Notes in Computational Vision and Biomechanics" indexed by Elsevier Scopus. Journal Publication: A dedicated special issue of the Taylor & Francis international journal "Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization" indexed in Scopus, DBLP and Clarivate Analytics Emerging Sources Index will be published with extended versions of the best works presented in the conference. Springer Book: A book with invited works from the ones presented in the conference will be organized for publishing by Springer. Important Dates - Deadline for Extended Abstracts: April 30, 2019 - Authors Notification: May 15, 2019 - Deadline for Papers (non-mandatory): June 15, 2019 We are looking forward to see you in Porto in October, 2019, Jo?o Manuel R. S. Tavares Renato Natal Jorge (VipIMAGE 2019 co-chairs) For further details, please, have a look in the conference website at: www.fe.up.pt/vipimage, the Facebook page at: www.facebook.com/ECCOMASVipIMAGE, or join the LinkedIn group at: www.linkedin.com/groups/4752820. From andrewkeeling at hotmail.com Mon Apr 8 06:07:03 2019 From: andrewkeeling at hotmail.com (andyjk) Date: Mon, 8 Apr 2019 03:07:03 -0700 (MST) Subject: [vtkusers] Correctly apply camera matrix In-Reply-To: References: <1531728818177-0.post@n5.nabble.com> <1531759562160-0.post@n5.nabble.com> Message-ID: <1554718023774-0.post@n5.nabble.com> Hi I would like to do something similar to the above - ie save the view of the camera (based on user manipulation) then be able to re-apply the 4x4 extrinsic camera matrix elsewhere. I know that I can save the View Up, ViewPlaneNormal, Position etc and that these correctly represent the current camera position. However, how can I then transform these into an R|T camera matrix, such that R|T [wx wy wz] brings the world coordinates (wx,wy,wz) into the camera coordinate frame ? It certainly seems that vtkCamera->GetModelTransformMatrix() is bugged and doesn't work, because the upper 3x3 is not orthogonal and so is not a rotation matrix. I could set up columns 2 and 3 of the R|T matrix using ViewUp and ViewPlaneNormal, but if I just calculate the cross-product for filling in column 1, I presumably risk 'x' facing the wrong way ? Also, I am fairly sure that T of R|T is not simply vtkCamera->GetPosition() (as it is the inverse transform?) so I'm not sure how to populate column 4 of R|T. Am I misunderstanding vtkCamera->GetModelTransformMatrix() ? I was hoping this is what it is for ? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From andrewkeeling at hotmail.com Mon Apr 8 06:59:11 2019 From: andrewkeeling at hotmail.com (andyjk) Date: Mon, 8 Apr 2019 03:59:11 -0700 (MST) Subject: [vtkusers] Correctly apply camera matrix In-Reply-To: <1554718023774-0.post@n5.nabble.com> References: <1531728818177-0.post@n5.nabble.com> <1531759562160-0.post@n5.nabble.com> <1554718023774-0.post@n5.nabble.com> Message-ID: <1554721151612-0.post@n5.nabble.com> Looking deeper - in PerspectiveTransform.cxx we have a function to create the matrix from a set of view directions. It looks like vtk does just take the cross-product of Y-Z to get the X-direction. However, my confusion is now that the code below stores the rotated X,Y,Z axes along rows. I thought that it is the *columns* of a rotation matrix that set its basis ? Can anyone help explain? void vtkPerspectiveTransform::SetupCamera(const double position[3], const double focalPoint[3], const double viewUp[3]) { double matrix[4][4]; vtkMatrix4x4::Identity(*matrix); // the view directions correspond to the rows of the rotation matrix, // so we'll make the connection explicit double *viewSideways = matrix[0]; double *orthoViewUp = matrix[1]; double *viewPlaneNormal = matrix[2]; // set the view plane normal from the view vector viewPlaneNormal[0] = position[0] - focalPoint[0]; viewPlaneNormal[1] = position[1] - focalPoint[1]; viewPlaneNormal[2] = position[2] - focalPoint[2]; vtkMath::Normalize(viewPlaneNormal); // orthogonalize viewUp and compute viewSideways vtkMath::Cross(viewUp,viewPlaneNormal,viewSideways); vtkMath::Normalize(viewSideways); vtkMath::Cross(viewPlaneNormal,viewSideways,orthoViewUp); // translate by the vector from the position to the origin double delta[4]; delta[0] = -position[0]; delta[1] = -position[1]; delta[2] = -position[2]; delta[3] = 0.0; // yes, this should be zero, not one vtkMatrix4x4::MultiplyPoint(*matrix,delta,delta); matrix[0][3] = delta[0]; matrix[1][3] = delta[1]; matrix[2][3] = delta[2]; // apply the transformation this->Concatenate(*matrix); } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mathieu.westphal at kitware.com Mon Apr 8 08:13:53 2019 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Mon, 8 Apr 2019 14:13:53 +0200 Subject: [vtkusers] VTK Hackathon April 18, 2019 In-Reply-To: References: Message-ID: Hi All, Some location specific informations about the VTK Hackathon: French Kitware office, in Lyon , welcome anybody willing to contribute to a VTK Hackathon on April 18 afternoon, starting 2pm. To be able to come on-site, please register using this link : https://docs.google.com/forms/d/e/1FAIpQLSfHK-I7dwvjrI2HZZ4lntfK1J3RljagVIAO9WLnij6K7CpE6A/viewform?usp=sf_link Le bureau fran?ais de Kitware, ? Lyon, accueille tous ceux qui voudrait contribuer ? un Hackathon VTK le 18 avril, apr?s-midi, ? partir de 14 h. Afin de pouvoir y acc?der, merci de vous enregistrer avec ce lien : https://docs.google.com/forms/d/e/1FAIpQLSfHK-I7dwvjrI2HZZ4lntfK1J3RljagVIAO9WLnij6K7CpE6A/viewform?usp=sf_link Mathieu Westphal On Tue, Apr 2, 2019 at 5:21 PM Will Schroeder via vtkusers wrote: > Please see the VTK Discourse list to follow the excitement and make topic > suggestions: > > https://discourse.vtk.org/t/vtk-hackathon/662 > > "Recently some stars have aligned and we?d like to hold a VTK hackathon > on April 18, 2019. We will begin at 9:00am EDT and run through early > afternoon. We will reserve a conference room(s) at various Kitware offices > (so non-Kitware VTK contributors can join in person) as well as sharing a > video link. > > "At this point let?s identify a theme for the hackathon. Obviously just > getting together in person or via video is great, but there are a lot of > outstanding issues that could benefit from some extra focus. Please suggest > some potential topics and we?ll select something based on community > interest. > > -- > William J. Schroeder, PhD > Kitware, Inc. - Building the World's Technical Computing Software > 28 Corporate Drive > Clifton Park, NY 12065 > will.schroeder at kitware.com > http://www.kitware.com > (518) 881-4902 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From raven.reisch at tum.de Mon Apr 8 12:09:13 2019 From: raven.reisch at tum.de (flywideincode) Date: Mon, 8 Apr 2019 09:09:13 -0700 (MST) Subject: [vtkusers] no pointID in polydata with PointPicker Message-ID: <1554739753004-0.post@n5.nabble.com> Hi everybody, I'm using vtk in order to visualize some data of a data cloud via vtkpolydata. When using pointPicker, I get the position of the pick, but unfortunately I always receive a -1 for the pointID with getPointID. I also cannot the Interactor()->Start() as it causes the error "QVTKInteractor cannot control the event loop". (the polydata are visualized in a widget, which is part of a qtcreater window). Does anybody has an idea, why this happens? Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From renaud.lebrun at umontpellier.fr Tue Apr 9 04:32:49 2019 From: renaud.lebrun at umontpellier.fr (Renaud Lebrun) Date: Tue, 9 Apr 2019 10:32:49 +0200 Subject: [vtkusers] vtkVolumeProperty shade on : light orientation issue when user matrix has been modified Message-ID: <8853b611-f784-1dbb-3402-321abc95b6ef@umontpellier.fr> Dear Vtk Users, I have a question regarding volume mapper shading related with light orientation. I develop a VTK based application? ( https://github.com/morphomuseum/MorphoDig ), in which I use 3D rendering of a 3D volume with the vtkVolumeProperty shade option set to on. I instantiated 1 (and only 1) light which I expect to follow the camera: vtkSmartPointer light = vtkSmartPointer::New(); ?light->SetLightTypeToCameraLight(); ?this->getRenderer()->AddLight(light); However, when I change the user matrix of the vtkVolume object, it seems that the way the shading is computed is done *before* the user matrix of the volume is used to move the 3D volume in space (see image attached). If I understand things correctly, the user matrix of the volume should be taken into account before the shading is achieved, but it seems not to be the case. * * *See image attached : * _Top line:_ on the left, I have set a camera "front" light, and the shading of the object appears as I expect.? On the left, I applied a 180? rotation of the object (the camera) and it seems that the light comes from the back side, which is unexpected. _Bottom line:_ when rendering vtkPolyData objects, however, the direction of a "camera" light works: the user matrix is applied before the light direction and after being rotated 180?, the light seems to come from the front side as well. Or maybe there is something I do not get here? Many thanks in advance for your answer, Best regards, Renaud -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Light_issue.jpg Type: image/jpeg Size: 137701 bytes Desc: not available URL: From srbn.ghosh99 at gmail.com Tue Apr 9 11:22:28 2019 From: srbn.ghosh99 at gmail.com (Shrabani Ghosh) Date: Tue, 9 Apr 2019 08:22:28 -0700 (MST) Subject: [vtkusers] Any way to use GPU to make faster performance? In-Reply-To: References: <1553887844749-0.post@n5.nabble.com> Message-ID: <1554823348479-0.post@n5.nabble.com> Thank you very much for your response. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From srbn.ghosh99 at gmail.com Tue Apr 9 11:23:24 2019 From: srbn.ghosh99 at gmail.com (Shrabani Ghosh) Date: Tue, 9 Apr 2019 08:23:24 -0700 (MST) Subject: [vtkusers] Anyway to save memory location of cells of a mesh? Message-ID: <1554823404585-0.post@n5.nabble.com> Hi all! I am using VTK to process meshes. In one case of my program, cell ids of the mesh have to be changed. But I need to use a particular cell later on. Is that possible to save the memory location of a cell instead of cell id to reuse it on the next iteration? Any comments and suggestion will be appreciated Thanks and cheers Shrabani Ghosh -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Tue Apr 9 11:33:01 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 9 Apr 2019 11:33:01 -0400 Subject: [vtkusers] Anyway to save memory location of cells of a mesh? In-Reply-To: <1554823404585-0.post@n5.nabble.com> References: <1554823404585-0.post@n5.nabble.com> Message-ID: Hi, Would you mind posting your question to https://discourse.vtk.org? Community support for VTK has transitioned to that forum, and you are more likely to get an answer there. Thanks, Cory On Tue, Apr 9, 2019 at 11:23 AM Shrabani Ghosh wrote: > Hi all! > > I am using VTK to process meshes. In one case of my program, cell ids of > the > mesh have to be changed. But I need to use a particular cell later on. Is > that possible to save the memory location of a cell instead of cell id to > reuse it on the next iteration? > > Any comments and suggestion will be appreciated > Thanks and cheers > Shrabani Ghosh > > > > -- > 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: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From af89salah at gmail.com Tue Apr 9 13:39:39 2019 From: af89salah at gmail.com (Afnan) Date: Tue, 9 Apr 2019 10:39:39 -0700 (MST) Subject: [vtkusers] Iso-surface cellset Message-ID: <1554831579279-0.post@n5.nabble.com> Hi; can anyone give me a help on how to construct a set that contain all the cells that an iso-surface passes through. it could be silly but I am not familiar with VTK yet! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From esmeralda.ruiz at alma3d.com Wed Apr 10 05:24:57 2019 From: esmeralda.ruiz at alma3d.com (zandarina) Date: Wed, 10 Apr 2019 02:24:57 -0700 (MST) Subject: [vtkusers] how to represent a 2d spline instead of a 3d one Message-ID: <1554888297089-0.post@n5.nabble.com> Dear all, I need to represent a spline widget in 2d. Because when i show the axial slices with the vtkResliceImageViewer in MPR (with slices) i can get painted in each slice the spline, and i do not have to create an observer to check if the slice has changed to re-render the spline and update z. Is there any way to keep the widget in each slice? Any idea? Thank you -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Wed Apr 10 09:21:57 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 10 Apr 2019 09:21:57 -0400 Subject: [vtkusers] how to represent a 2d spline instead of a 3d one In-Reply-To: <1554888297089-0.post@n5.nabble.com> References: <1554888297089-0.post@n5.nabble.com> Message-ID: Hi, Would you mind posting your question to https://discourse.vtk.org? Community support for VTK has transitioned to that forum, and you are more likely to get an answer there. Thanks, Cory On Wed, Apr 10, 2019 at 5:25 AM zandarina wrote: > Dear all, > > I need to represent a spline widget in 2d. Because when i show the axial > slices with the vtkResliceImageViewer in MPR (with slices) i can get > painted > in each slice the spline, and i do not have to create an observer to check > if the slice has changed to re-render the spline and update z. Is there any > way to keep the widget in each slice? > > Any idea? > > Thank you > > > > -- > 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: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From T.Choudhary at hull.ac.uk Thu Apr 11 14:04:47 2019 From: T.Choudhary at hull.ac.uk (Tarun Choudhary) Date: Thu, 11 Apr 2019 18:04:47 +0000 Subject: [vtkusers] Convert multiple Polydata to a single vtkMetaImage file Message-ID: <93DD9982DE68574696BB7D6E8315A9201CE828A9@MAIL-EX-03P10.adir.hull.ac.uk> Dear VTK Users, I am new to VTK and I was hoping if I could get some suggestions / advice from your VTK expertise. Actually, I am trying to create a *.mhd & *.raw from *.stl data which I am able to only if there is only one stl file but in case of more than one STL files I cant. My aim is to collect polydata from each stl files in an array and put them together in to one single *.mhd & *raw file. Could you please help me on how to convert more than one stl files in to on a single *.mhd & *raw file. Thanks in advance :) ! Kind Regards, Tarun Choudhary Research Software Developer Department of Engineering University of Hull -------------- next part -------------- An HTML attachment was scrubbed... URL: From marefin at uwo.ca Fri Apr 12 22:36:54 2019 From: marefin at uwo.ca (Arefin Shamsil) Date: Fri, 12 Apr 2019 22:36:54 -0400 Subject: [vtkusers] Convert vtkImageData to vtkAlgorithmOutput type Message-ID: Hi, I am trying to combine a vtkImageData image and its transform using vtkTransformPolyDataFilter. Here is my setup vtkSmartPointer imagePose = itkSmartPointer::New(); imagePose->SetInputConnection(image); // image is of vtkImageData ----- error is here imagePose->SetTransform(imageTransform); Problem is SetInputConnection is not accepting vtkImageData type, it only accepts vtkAlgorithmOutput type. I am not really sure what to do here. Online search has not been of much help. Is there any way to do it? -------------- next part -------------- An HTML attachment was scrubbed... URL: From petr.2006 at centrum.cz Sun Apr 14 11:30:45 2019 From: petr.2006 at centrum.cz (Petr Vokac) Date: Sun, 14 Apr 2019 08:30:45 -0700 (MST) Subject: [vtkusers] hemispherical cap with hole at the bottom Message-ID: <1555255845578-0.post@n5.nabble.com> I am trying to create hemispherical cap using two spheres, clipping them by plane - it works, and clipping them by cylinder - it does not work as it leaves two surfaces unconnected, why? python script: #!/usr/bin/env python import vtk sphere = vtk.vtkSphereSource() sphere.SetRadius(10.0) spherei = vtk.vtkSphereSource() spherei.SetRadius(8.0) sphereir=vtk.vtkReverseSense() sphereir.SetInputConnection(spherei.GetOutputPort()) ext=vtk.vtkAppendPolyData() ext.AddInputConnection(sphere.GetOutputPort()) ext.AddInputConnection(sphereir.GetOutputPort()) plane = vtk.vtkPlane() plane.SetOrigin([0.0,0.0,0.0]) plane.SetNormal([0.0,-1.0,0.0]) clipclose=vtk.vtkClipClosedSurface() pc = vtk.vtkPlaneCollection() pc.AddItem(plane) clipclose.SetClippingPlanes(pc) clipclose.SetInputConnection(ext.GetOutputPort()) cyl = vtk.vtkCylinder() cyl.SetCenter(0,0,0) cyl.SetRadius(5.0) ib = vtk.vtkImplicitBoolean() ib.AddFunction(cyl) clipper = vtk.vtkClipPolyData() clipper.SetInputConnection(clipclose.GetOutputPort()) clipper.SetClipFunction(ib) clipper.GenerateClippedOutputOn() mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(clipper.GetOutputPort()) actor = vtk.vtkActor() actor.SetMapper(mapper) ren = vtk.vtkRenderer() ren.AddActor(actor) ren.ResetCamera() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.Initialize() renWin.Render() iren.Start() -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Sun Apr 14 17:06:17 2019 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 14 Apr 2019 15:06:17 -0600 Subject: [vtkusers] hemispherical cap with hole at the bottom In-Reply-To: <1555255845578-0.post@n5.nabble.com> References: <1555255845578-0.post@n5.nabble.com> Message-ID: Hi Petr, Unfortunately, vtkClipPolyData doesn't close off the surface after clipping. It wasn't designed to do that. In fact, closing things off after clipping is a rather difficult problem. I recommend that you take another approach. Your cap is rotationally symmetric, right? Try the rotational extrusion filter: https://vtk.org/doc/nightly/html/classvtkRotationalExtrusionFilter.html All you need to do is generate a cross-section of your cap, i.e. an arc. Just do this by writing a couple "for" loops in python to build the arc using sin() and cos(), make a polyline and stuff it in a vtkPolyData. For example, https://lorensen.github.io/VTKExamples/site/Python/GeometricObjects/PolyLine1/ Once you have your cross-section, pass it through vtkRotationalExtrusionFilter to generate the shape. David On Sun, Apr 14, 2019 at 9:30 AM Petr Vokac wrote: > I am trying to create hemispherical cap using two spheres, clipping them by > plane - it works, and clipping them by cylinder - it does not work as it > leaves two surfaces unconnected, why? > > python script: > > #!/usr/bin/env python > > import vtk > sphere = vtk.vtkSphereSource() > sphere.SetRadius(10.0) > > spherei = vtk.vtkSphereSource() > spherei.SetRadius(8.0) > > sphereir=vtk.vtkReverseSense() > sphereir.SetInputConnection(spherei.GetOutputPort()) > > ext=vtk.vtkAppendPolyData() > ext.AddInputConnection(sphere.GetOutputPort()) > ext.AddInputConnection(sphereir.GetOutputPort()) > > plane = vtk.vtkPlane() > plane.SetOrigin([0.0,0.0,0.0]) > plane.SetNormal([0.0,-1.0,0.0]) > > clipclose=vtk.vtkClipClosedSurface() > pc = vtk.vtkPlaneCollection() > pc.AddItem(plane) > clipclose.SetClippingPlanes(pc) > clipclose.SetInputConnection(ext.GetOutputPort()) > > cyl = vtk.vtkCylinder() > cyl.SetCenter(0,0,0) > cyl.SetRadius(5.0) > ib = vtk.vtkImplicitBoolean() > ib.AddFunction(cyl) > > clipper = vtk.vtkClipPolyData() > clipper.SetInputConnection(clipclose.GetOutputPort()) > clipper.SetClipFunction(ib) > clipper.GenerateClippedOutputOn() > > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputConnection(clipper.GetOutputPort()) > > actor = vtk.vtkActor() > actor.SetMapper(mapper) > > ren = vtk.vtkRenderer() > ren.AddActor(actor) > ren.ResetCamera() > > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren) > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > > iren.Initialize() > renWin.Render() > iren.Start() > > > > > > > -- > 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: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hwlee at dentium.com Mon Apr 15 06:52:58 2019 From: hwlee at dentium.com (David) Date: Mon, 15 Apr 2019 03:52:58 -0700 (MST) Subject: [vtkusers] vtkDistancePolyDataFilter: What is the unit after measure difference distance? Message-ID: <1555325578898-0.post@n5.nabble.com> vtkDistancePolyDataFilter: What is the unit after measure difference distance? I would like know the unit for the measure. I guess that is mm (millimeter) of cm (centimeter). -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Mon Apr 15 09:30:28 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 15 Apr 2019 09:30:28 -0400 Subject: [vtkusers] vtkDistancePolyDataFilter: What is the unit after measure difference distance? In-Reply-To: <1555325578898-0.post@n5.nabble.com> References: <1555325578898-0.post@n5.nabble.com> Message-ID: Physical distance in whatever units your polydata are in. VTK does not use a particular unit of measurement such as mm or cm. By the way, please post future questions to discourse.vtk.org, the new community support forum for VTK. This mailing list will be deactivated in the near future. Best, Cory On Mon, Apr 15, 2019 at 6:53 AM David wrote: > vtkDistancePolyDataFilter: What is the unit after measure difference > distance? > > I would like know the unit for the measure. > I guess that is mm (millimeter) of cm (centimeter). > > > > > > > -- > 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: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.weatherly at gmail.com Mon Apr 15 17:04:37 2019 From: k.weatherly at gmail.com (graphicsmonkey) Date: Mon, 15 Apr 2019 14:04:37 -0700 (MST) Subject: [vtkusers] Shadows Message-ID: <1555362277815-0.post@n5.nabble.com> I'm trying to get shadows to work with no luck yet. I added the following code based on some of the examples but i'm not seeing anything change. Is there something missing? Many thanks. auto shadows = vtkSmartPointer::New(); auto seq = vtkSmartPointer::New(); auto passes = vtkSmartPointer::New(); passes->AddItem ( shadows->GetShadowMapBakerPass() ); passes->AddItem ( shadows ); seq->SetPasses ( passes ); auto cameraP = vtkSmartPointer::New(); cameraP->SetDelegatePass ( seq ); m_renderer->SetPass ( cameraP ); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From k.weatherly at gmail.com Mon Apr 15 20:11:52 2019 From: k.weatherly at gmail.com (graphicsmonkey) Date: Mon, 15 Apr 2019 17:11:52 -0700 (MST) Subject: [vtkusers] Custom shaders Message-ID: <1555373512616-0.post@n5.nabble.com> Hi VTK experts, Trying to get my head around converting some old OpenGL shaders to work with VTK and i'm confused as to where certain values come from in some of the examples ( E.g. Rendering/OpenGL2/Testing/Cxx/TestUserShader.cxx ) The test shader makes use of variables like normalMC, normatMatrix Etc. but i cannot see where they are defined? If there a list of these variables somewhere. For example; attribute vec3 normalMC uniform mat3 normalMatrix varying vec3 normalVCVSOutput Many thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Mon Apr 15 20:41:01 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 15 Apr 2019 20:41:01 -0400 Subject: [vtkusers] Convert multiple Polydata to a single vtkMetaImage file In-Reply-To: <93DD9982DE68574696BB7D6E8315A9201CE828A9@MAIL-EX-03P10.adir.hull.ac.uk> References: <93DD9982DE68574696BB7D6E8315A9201CE828A9@MAIL-EX-03P10.adir.hull.ac.uk> Message-ID: Hi, Would you mind posting your question to https://discourse.vtk.org? Community support for VTK has transitioned to that forum, and you are more likely to get an answer there. Thanks, Cory On Thu, Apr 11, 2019 at 2:16 PM Tarun Choudhary wrote: > Dear VTK Users, > > > > I am new to VTK and I was hoping if I could get some suggestions / advice > from your VTK expertise. > > > > Actually, I am trying to create a *.mhd & *.raw from *.stl data which I am > able to only if there is only one stl file but in case of more than one STL > files I cant. > > My aim is to collect polydata from each stl files in an array and put them > together in to one single *.mhd & *raw file. > > > > Could you please help me on how to convert more than one stl files in to > on a single *.mhd & *raw file. > > > > Thanks in advance J ! > > > > Kind Regards, > > > > *Tarun Choudhary* > > Research Software Developer > > Department of Engineering > > University of Hull > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.weatherly at gmail.com Mon Apr 15 21:38:08 2019 From: k.weatherly at gmail.com (graphicsmonkey) Date: Mon, 15 Apr 2019 18:38:08 -0700 (MST) Subject: [vtkusers] Custom shaders In-Reply-To: <1555373512616-0.post@n5.nabble.com> References: <1555373512616-0.post@n5.nabble.com> Message-ID: <1555378688897-0.post@n5.nabble.com> Okay so looking through the Vtk code a bit i see that that shaders are generated via the vtkShaderProgram::Substitute command. Is there some documentation for this or do we have to go through the source code to work out what's going on? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Mon Apr 15 21:52:21 2019 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 15 Apr 2019 18:52:21 -0700 Subject: [vtkusers] Custom shaders In-Reply-To: <1555378688897-0.post@n5.nabble.com> References: <1555373512616-0.post@n5.nabble.com> <1555378688897-0.post@n5.nabble.com> Message-ID: Would you mind posting your question to https://discourse.vtk.org? Community support for VTK has transitioned to that forum, and you are more likely to get an answer there. That said, the variables defined depend on which shader you are starting with. For example, if you are overriding btkOpelGLPolyDataMapper then search the source for SetUniform. Also, the VTKExampleProject has a number of custom shaders... https://lorensen.github.io/VTKExamples/site/Cxx/Shaders/BozoShader/ https://lorensen.github.io/VTKExamples/site/Cxx/Shaders/ColorByNormal https://lorensen.github.io/VTKExamples/site/Cxx/Shaders/CubeMap https://lorensen.github.io/VTKExamples/site/Cxx/Shaders/MarbleShader/ https://lorensen.github.io/VTKExamples/site/Cxx/Shaders/SpatterShader https://lorensen.github.io/VTKExamples/site/Cxx/Shaders/SphereMap On Mon, Apr 15, 2019 at 6:38 PM graphicsmonkey wrote: > > Okay so looking through the Vtk code a bit i see that that shaders are > generated via the vtkShaderProgram::Substitute command. Is there some > documentation for this or do we have to go through the source code to work > out what's going on? > > > > > -- > 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: > https://vtk.org/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com From andrew.amaclean at gmail.com Tue Apr 16 01:38:55 2019 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Tue, 16 Apr 2019 15:38:55 +1000 Subject: [vtkusers] =?utf-8?q?=E2=80=8BRe=3A_hemispherical_cap_with_hole_?= =?utf-8?q?at_the_bottom_=28David_Gobbi=29?= In-Reply-To: References: Message-ID: Here is a quick example to illustrate what David said, I'll add this and a C++ version to VTKExamples. Petr, you should consider using [VTK Discourse](https://discourse.vtk.org/) instead of this site. ############################################## #!/usr/bin/env python import math import vtk def get_program_parameters(): import argparse description = '' epilogue = ''' ''' parser = argparse.ArgumentParser(description=description, epilog=epilogue, formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('angle', default=90, type=float, nargs='?', help='The arc of the sphere, an angle in degrees from +y in the +x direction.') parser.add_argument('step', default=1, type=float, nargs='?', help='The step angle in degrees.') parser.add_argument('radius', default=1, type=float, nargs='?', help='The radius of the sphere.') parser.add_argument('-c', '--closed', action='store_true', help='Add a closed cap.') args = parser.parse_args() return args.angle, args.step, args.radius, args.closed def main(): angle, step, radius, closed = get_program_parameters() angle = math.radians(angle) step = math.radians(step) precision = 1.0e-6 start = math.radians(90) pts = list() # Do the curved line theta = 0.0 while theta <= angle: x = radius * math.cos(start - theta) z = radius * math.sin(-start + theta) if abs(x) < precision: x = 0 if abs(z) < precision: z = 0 pts.append((x, 0, z)) theta += step if closed: # Drop a perpendicular from the last point to the x-axis last_point = pts[-1] num_pts = 10 interval = float(num_pts) / radius if last_point[0] > precision: for i in range(1, num_pts): x = last_point[0] - i / interval z = last_point[2] if abs(x) < precision: x = 0 if abs(z) < precision: z = 0 pts.append((x, 0, z)) if pts[-1][0] > precision: pts.append((0, 0, z)) # Setup points and lines points = vtk.vtkPoints() lines = vtk.vtkCellArray() for pt in pts: pt_id = points.InsertNextPoint(pt) for i in range(0, len(pts) - 1): line = vtk.vtkLine() line.GetPointIds().SetId(0, i) line.GetPointIds().SetId(1, i + 1) lines.InsertNextCell(line) polydata = vtk.vtkPolyData() polydata.SetPoints(points) polydata.SetLines(lines) # Extrude the profile to make the capped sphere. # extrude = vtk.vtkRotationalExtrusionFilter() extrude.SetInputData(polydata) extrude.SetResolution(60) # Visualize colors = vtk.vtkNamedColors() mapper = vtk.vtkPolyDataMapper() # To see the line # mapper.SetInputData(polydata) # To see the surface mapper.SetInputConnection(extrude.GetOutputPort()) actor = vtk.vtkActor() actor.SetMapper(mapper) actor.GetProperty().SetLineWidth(4) actor.GetProperty().SetColor(colors.GetColor3d('Cornsilk')) ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.AddActor(actor) ren.SetBackground(colors.GetColor3d('DarkGreen')) ren.ResetCamera() ren.GetActiveCamera().Azimuth(0) ren.GetActiveCamera().Elevation(60) ren.ResetCameraClippingRange() renWin.SetSize(600, 600) renWin.Render() renWin.SetWindowName('CappedSphere') iren.Start() if __name__ == '__main__': main() ############################################## > > ---------- Forwarded message ---------- > From: David Gobbi > To: VTK Users > Cc: > Bcc: > Date: Sun, 14 Apr 2019 15:06:17 -0600 > Subject: Re: [vtkusers] hemispherical cap with hole at the bottom > Hi Petr, > > Unfortunately, vtkClipPolyData doesn't close off the surface after > clipping. It wasn't designed to do that. In fact, closing things off > after clipping is a rather difficult problem. > > I recommend that you take another approach. Your cap is rotationally > symmetric, right? Try the rotational extrusion filter: > https://vtk.org/doc/nightly/html/classvtkRotationalExtrusionFilter.html > > All you need to do is generate a cross-section of your cap, i.e. an arc. > Just do this by writing a couple "for" loops in python to build the arc > using sin() and cos(), make a polyline and stuff it in a vtkPolyData. For > example, > https://lorensen.github.io/VTKExamples/site/Python/GeometricObjects/PolyLine1/ > > Once you have your cross-section, pass it through > vtkRotationalExtrusionFilter to generate the shape. > > David > > On Sun, Apr 14, 2019 at 9:30 AM Petr Vokac wrote: > >> I am trying to create hemispherical cap using two spheres, clipping them >> by >> plane - it works, and clipping them by cylinder - it does not work as it >> leaves two surfaces unconnected, why? >> >> python script: >> >> #!/usr/bin/env python >> >> import vtk >> sphere = vtk.vtkSphereSource() >> sphere.SetRadius(10.0) >> >> spherei = vtk.vtkSphereSource() >> spherei.SetRadius(8.0) >> >> sphereir=vtk.vtkReverseSense() >> sphereir.SetInputConnection(spherei.GetOutputPort()) >> >> ext=vtk.vtkAppendPolyData() >> ext.AddInputConnection(sphere.GetOutputPort()) >> ext.AddInputConnection(sphereir.GetOutputPort()) >> >> plane = vtk.vtkPlane() >> plane.SetOrigin([0.0,0.0,0.0]) >> plane.SetNormal([0.0,-1.0,0.0]) >> >> clipclose=vtk.vtkClipClosedSurface() >> pc = vtk.vtkPlaneCollection() >> pc.AddItem(plane) >> clipclose.SetClippingPlanes(pc) >> clipclose.SetInputConnection(ext.GetOutputPort()) >> >> cyl = vtk.vtkCylinder() >> cyl.SetCenter(0,0,0) >> cyl.SetRadius(5.0) >> ib = vtk.vtkImplicitBoolean() >> ib.AddFunction(cyl) >> >> clipper = vtk.vtkClipPolyData() >> clipper.SetInputConnection(clipclose.GetOutputPort()) >> clipper.SetClipFunction(ib) >> clipper.GenerateClippedOutputOn() >> >> mapper = vtk.vtkPolyDataMapper() >> mapper.SetInputConnection(clipper.GetOutputPort()) >> >> actor = vtk.vtkActor() >> actor.SetMapper(mapper) >> >> ren = vtk.vtkRenderer() >> ren.AddActor(actor) >> ren.ResetCamera() >> >> renWin = vtk.vtkRenderWindow() >> renWin.AddRenderer(ren) >> iren = vtk.vtkRenderWindowInteractor() >> iren.SetRenderWindow(renWin) >> >> iren.Initialize() >> renWin.Render() >> iren.Start() >> >> >> >> >> >> >> -- >> 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: >> https://vtk.org/mailman/listinfo/vtkusers >> > > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mozendi at gmail.com Tue Apr 16 07:59:38 2019 From: mozendi at gmail.com (mozendi) Date: Tue, 16 Apr 2019 04:59:38 -0700 (MST) Subject: [vtkusers] Help about VTK_DATA_ROOT (python) Message-ID: <1555415978724-0.post@n5.nabble.com> Dear VTK Users, Recently I installed python version of the VTK. I am trying to run the script (https://github.com/Kitware/VTK/blob/master/IO/Geometry/Testing/Python/ParticleReader.py) for my project. In my project, I am trying to visualize points (TEZ_INCII.xyz) with their intensity value which varies between 0-1. However, I do not know how to set up *reader.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/Particles.raw")* . I tried to set the file name as *reader.SetFileName("TEZ_INCII.xyz")* ,where TEZ_INCII.xyz is the point cloud file, but the render window shows up and then disappears suddenly. I printed the VTK_DATA_ROOT and I got *../../../../VTKData*. I searched the folder VTKData in my computer but it does not exist. In all other script examples that input any file, the VTK_DATA_ROOT is used. If I can fix this issue, I will be able to modify examples for my own files. Can you please help me about this issue? I am looking forward to hearing from you Regards Mustafa -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From k.weatherly at gmail.com Tue Apr 16 15:06:21 2019 From: k.weatherly at gmail.com (graphicsmonkey) Date: Tue, 16 Apr 2019 12:06:21 -0700 (MST) Subject: [vtkusers] Custom shaders In-Reply-To: References: <1555373512616-0.post@n5.nabble.com> <1555378688897-0.post@n5.nabble.com> Message-ID: <1555441581411-0.post@n5.nabble.com> Okay thank you Bill -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mdrahos at aurisrobotics.com Wed Apr 17 16:27:43 2019 From: mdrahos at aurisrobotics.com (Miroslav Drahos) Date: Wed, 17 Apr 2019 20:27:43 +0000 Subject: [vtkusers] DICOM orientation test data Message-ID: Hello VTK users, does anyone know where I can get my hands on a scan of a phantom with L/R A/P I/S markers in different orientations? I am trying to test the DICOM import and visualization with different orientations (HFS/FFS, ImageOrientationPatient, z-ordering) to make the viewer visualize the image correctly. I couldn't find anything online... Thank you! Miro -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihouxing0710 at gmail.com Wed Apr 17 21:16:30 2019 From: lihouxing0710 at gmail.com (Xing Li) Date: Thu, 18 Apr 2019 09:16:30 +0800 Subject: [vtkusers] Convert vtkImageData to vtkAlgorithmOutput type In-Reply-To: References: Message-ID: use vtkImageReslice instead of vtkTransformPolyDataFilter Arefin Shamsil ?2019?4?13??? ??10:37??? > Hi, > I am trying to combine a vtkImageData image and its transform > using vtkTransformPolyDataFilter. Here is my setup > > vtkSmartPointer imagePose = > itkSmartPointer::New(); > > imagePose->SetInputConnection(image); // image is of vtkImageData ----- > error is here > imagePose->SetTransform(imageTransform); > > Problem is SetInputConnection is not accepting vtkImageData type, it only > accepts vtkAlgorithmOutput type. > > I am not really sure what to do here. Online search has not been of much > help. Is there any way to do it? > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t1449768199 at gmail.com Thu Apr 18 09:41:34 2019 From: t1449768199 at gmail.com (stargazerrrrr) Date: Thu, 18 Apr 2019 06:41:34 -0700 (MST) Subject: [vtkusers] How can i use the vtkStreamtracer to generate a streamline with my unstructured grid data(vtu) Message-ID: <1555594894270-0.post@n5.nabble.com> I`m using VTK to visualize data coming from xflow in vtu. When I use the Paraview, it can generate the right streamline, but when I use the VTK to visualize my data, it only displays the outline and the airplane model. There is no streamline being generated. This is my code: //The background color vtkSmartPointer namedColors = vtkSmartPointer::New(); //The AirplaneModel file std::string meshfilename = "K:/Project/VTKproject/Airplane_Process/data/Mesh.vtp"; vtkSmartPointer meshreader = vtkSmartPointer::New(); meshreader->SetFileName(meshfilename.c_str()); meshreader->Update(); //The data file std::string datafilename ="K:/Project/VTKproject/Airplane_Process/data/data.vtu"; vtkSmartPointer datareader = vtkSmartPointer::New(); datareader->SetFileName(datafilename.c_str()); datareader->Update(); //The seed points vtkSmartPointer seeds = vtkSmartPointer::New(); seeds->SetCenter(0,0,0); seeds->SetRadius(0.05); seeds->SetNumberOfPoints(100); //streamline generate vtkSmartPointer streamline = vtkSmartPointer::New(); datareader->Update(); streamline->SetInputConnection(datareader->GetOutputPort()); streamline->SetSourceConnection(seeds->GetOutputPort()); //streamline->SetIntegrationStepUnit(vtkStreamTracer::CELL_LENGTH_UNIT); streamline->SetMaximumPropagation(500); streamline->SetMaximumIntegrationStep(0.1); streamline->SetMinimumIntegrationStep(0.01); streamline->SetInitialIntegrationStep(0.05); //streamline->SetIntegrationStepUnit(vtkStreamTracer::CELL_LENGTH_UNIT); streamline->SetIntegrationDirectionToBoth(); streamline->SetIntegratorTypeToRungeKutta45(); streamline->Update(); vtkSmartPointer streamLineMapper = vtkSmartPointer::New(); streamLineMapper->SetInputConnection(streamline->GetOutputPort()); vtkSmartPointer streamLineActor = vtkSmartPointer::New(); streamLineActor->SetMapper(streamLineMapper); //outlinefilter vtkSmartPointer outline =vtkSmartPointer::New(); outline->SetInputConnection(datareader->GetOutputPort()); vtkSmartPointer outlineMapper =vtkSmartPointer::New(); outlineMapper->SetInputConnection(outline->GetOutputPort()); vtkSmartPointer outlineActor =vtkSmartPointer::New(); outlineActor->SetMapper(outlineMapper); outlineActor->GetProperty()->SetColor(0,0,0); // vtkSmartPointer meshmapper = vtkSmartPointer::New(); meshmapper->SetInputConnection(meshreader->GetOutputPort()); vtkSmartPointer meshactor = vtkSmartPointer::New(); meshactor->SetMapper(meshmapper); //rendering vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(meshactor); renderer->AddActor(outlineActor); renderer->AddActor(streamLineActor); //renderer->AddActor(actor); renderer->SetBackground(namedColors->GetColor3d("Cadet").GetData()); //window vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); //interaction vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); vtkSmartPointer style = vtkSmartPointer::New(); renderWindowInteractor->SetInteractorStyle(style); renderWindowInteractor->Initialize(); renderWindow->SetSize(300, 300); renderWindow->Render(); renderWindowInteractor->Start(); This is the result in paraview: This is the result of my code: Is there any problem in my code? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Thu Apr 18 11:59:53 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 18 Apr 2019 11:59:53 -0400 Subject: [vtkusers] How can i use the vtkStreamtracer to generate a streamline with my unstructured grid data(vtu) In-Reply-To: <1555594894270-0.post@n5.nabble.com> References: <1555594894270-0.post@n5.nabble.com> Message-ID: Hi, Would you mind posting your question to https://discourse.vtk.org? Community support for VTK has transitioned to that forum, and you are more likely to get an answer there. Thanks, Cory On Thu, Apr 18, 2019 at 9:41 AM stargazerrrrr wrote: > I`m using VTK to visualize data coming from xflow in vtu. When I use the > Paraview, it can generate the right streamline, but when I use the VTK to > visualize my data, it only displays the outline and the airplane model. > There is no streamline being generated. > This is my code: > //The background color > vtkSmartPointer namedColors = > vtkSmartPointer::New(); > > //The AirplaneModel file > std::string meshfilename = > "K:/Project/VTKproject/Airplane_Process/data/Mesh.vtp"; > vtkSmartPointer meshreader = > vtkSmartPointer::New(); > meshreader->SetFileName(meshfilename.c_str()); > meshreader->Update(); > > //The data file > std::string datafilename > ="K:/Project/VTKproject/Airplane_Process/data/data.vtu"; > vtkSmartPointer datareader = > vtkSmartPointer::New(); > datareader->SetFileName(datafilename.c_str()); > datareader->Update(); > > //The seed points > vtkSmartPointer seeds = > vtkSmartPointer::New(); > seeds->SetCenter(0,0,0); > seeds->SetRadius(0.05); > seeds->SetNumberOfPoints(100); > > > //streamline generate > > vtkSmartPointer streamline = > vtkSmartPointer::New(); > datareader->Update(); > streamline->SetInputConnection(datareader->GetOutputPort()); > streamline->SetSourceConnection(seeds->GetOutputPort()); > //streamline->SetIntegrationStepUnit(vtkStreamTracer::CELL_LENGTH_UNIT); > streamline->SetMaximumPropagation(500); > streamline->SetMaximumIntegrationStep(0.1); > streamline->SetMinimumIntegrationStep(0.01); > streamline->SetInitialIntegrationStep(0.05); > //streamline->SetIntegrationStepUnit(vtkStreamTracer::CELL_LENGTH_UNIT); > streamline->SetIntegrationDirectionToBoth(); > streamline->SetIntegratorTypeToRungeKutta45(); > streamline->Update(); > > vtkSmartPointer streamLineMapper = > vtkSmartPointer::New(); > streamLineMapper->SetInputConnection(streamline->GetOutputPort()); > > vtkSmartPointer streamLineActor = > vtkSmartPointer::New(); > streamLineActor->SetMapper(streamLineMapper); > > //outlinefilter > vtkSmartPointer outline > =vtkSmartPointer::New(); > outline->SetInputConnection(datareader->GetOutputPort()); > > vtkSmartPointer outlineMapper > =vtkSmartPointer::New(); > outlineMapper->SetInputConnection(outline->GetOutputPort()); > > vtkSmartPointer outlineActor =vtkSmartPointer::New(); > outlineActor->SetMapper(outlineMapper); > outlineActor->GetProperty()->SetColor(0,0,0); > > // > vtkSmartPointer meshmapper = > vtkSmartPointer::New(); > meshmapper->SetInputConnection(meshreader->GetOutputPort()); > > vtkSmartPointer meshactor = vtkSmartPointer::New(); > meshactor->SetMapper(meshmapper); > > //rendering > vtkSmartPointer renderer = > vtkSmartPointer::New(); > renderer->AddActor(meshactor); > renderer->AddActor(outlineActor); > renderer->AddActor(streamLineActor); > //renderer->AddActor(actor); > renderer->SetBackground(namedColors->GetColor3d("Cadet").GetData()); > //window > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > > //interaction > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > vtkSmartPointer style = > vtkSmartPointer::New(); > renderWindowInteractor->SetInteractorStyle(style); > renderWindowInteractor->Initialize(); > renderWindow->SetSize(300, 300); > renderWindow->Render(); > renderWindowInteractor->Start(); > > This is the result in paraview: > > This is the result of my code: > < > http://vtk.1045678.n5.nabble.com/file/t342734/%E6%88%91%E7%9A%84%E6%95%88%E6%9E%9C.png> > > > Is there any problem in my code? > > > > -- > 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: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From noe.murr at outlook.com Fri Apr 19 14:23:27 2019 From: noe.murr at outlook.com (=?iso-8859-15?Q?No=E8_Murr?=) Date: Fri, 19 Apr 2019 18:23:27 +0000 Subject: [vtkusers] Problems with vtkRenderWindowInteractor on macOS using Cocoa Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi all, I'm learning VTK reading the book VTKTextBook. I've tried to execute the Cone example at link: https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Cone/ When I run it I've got a strange behavior that is difficult to explain with words, but you can see it in the gif at the following link: https://imgur.com/lJigYGu The code that I have used is a little different from the code of the example but both of them give the same problem. you can see the code of my .cpp file here: https://pastebin.com/36pkAGhA and my CMakeLists.txt here: https://pastebin.com/cBHEYJXS Where is the problem? -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEES921qlQvNnzEf1kr6OqU5iTJIskFAly6Eh0ACgkQ6OqU5iTJ Isn1eRAArKZNaPfF9uFh5RErhlKM0Y+Ql3PSAmbGWq9Z3mkBKDonV1QKJT8XKHiF YISKiL1KSskrTnJQf0k0kCp1RnXNwNkwT7uk2te8C5Q4py0qg8QoRt22qJa8Dr69 csUdWG7NokLDCkcgal93W2ePyIWV211gDzbaUS9BvD8CSH9XLPvlhIJTjgfda1LB B5Zqd67EILPT5ZSZ1/A4mUmhzYof1/X+jnjIIz80Q+bNKwuTsYPe92aYnndwrqQm mMyiDBdVzpFWZLLlv1JoSllUlI2R1XVcsEf0CoVFDhGfsvoOEqtaBLOVV530r5/S nEqV0P9UqfbJevN/U1lizxRtQ5t2SppUcEhpQmIa/gXsLIUoAGL9pe63dJbIfcjN owesrblbhuEnginCXyTtjmNCZ8I84YpXNlePXmgaSK6FPnuXkdl7i3xpm5fXVXlP BbA7KU2KIuCnran4JeBCj6rzNl5D09exoa9QWxWKU7qoWbFvx7q1w9CSE+aDNu4I 29j6Dw1IMTGJDPOIqW2GMaJguuCouKaVsuqy7UIvahRuQQcaYcpNMANAsnLmXB1t Fh9Oc5+pUKFIiTmGJhC0ub6Ha1N1S+WejWDrtrj5LUmb4TwIaI/M5BpuWI3NZuM6 eSsceyEgeHQhY2ShFGf26CaWPvrokL9OMAWFd3XHYtirZKBRPyo= =RNN6 -----END PGP SIGNATURE----- From blackswords at hotmail.fr Tue Apr 23 10:56:11 2019 From: blackswords at hotmail.fr (BenjaminN13) Date: Tue, 23 Apr 2019 07:56:11 -0700 (MST) Subject: [vtkusers] Is augmented reality with the OpenVR module possible? Message-ID: <1556031371756-0.post@n5.nabble.com> Hello,While looking for a high level framework to create some simple virtual reality applications, I stumbled upon the OpenVR module of VTK. It looks very promising but since I have an HTC Vive Pro with two front cameras, I was wondering if it was possible to overlay virtual objects on top of the video feed to create an augmented reality app. From what I can read here , it seems that it's a single camera rendering the scene from the two points of view so I don't know if it is feasible to set a different background image for each eye. If it's possible, can you give me some pointers on how can I achieve this?Thanks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Apr 23 10:57:19 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 23 Apr 2019 10:57:19 -0400 Subject: [vtkusers] Is augmented reality with the OpenVR module possible? In-Reply-To: <1556031371756-0.post@n5.nabble.com> References: <1556031371756-0.post@n5.nabble.com> Message-ID: Hi, Could you post your question to https://discourse.vtk.org? Community support for VTK has transitioned to that forum, and you are more likely to get an answer there. Thanks, Cory On Tue, Apr 23, 2019 at 10:56 AM BenjaminN13 wrote: > Hello, While looking for a high level framework to create some simple > virtual reality applications, I stumbled upon the OpenVR module of VTK. It > looks very promising but since I have an HTC Vive Pro with two front > cameras, I was wondering if it was possible to overlay virtual objects on > top of the video feed to create an augmented reality app. From what I can > read here > , it > seems that it's a single camera rendering the scene from the two points of > view so I don't know if it is feasible to set a different background image > for each eye. If it's possible, can you give me some pointers on how can I > achieve this? Thanks > ------------------------------ > Sent from the VTK - Users mailing list archive > at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kgg124 at naver.com Tue Apr 23 23:47:32 2019 From: kgg124 at naver.com (kgg124) Date: Tue, 23 Apr 2019 20:47:32 -0700 (MST) Subject: [vtkusers] How to move the Point Cloud Data to vtkRenderWindow? Message-ID: <1556077652112-0.post@n5.nabble.com> Hi all! I have a 3D Scanner product and can get Point Cloud data by using it. And I have succeeded in moving the Point Cloud data to OpenCV Viz3d. Now, I'm trying to test with vtkRenderWindow. My code is as below : vtkSmartPointer points = vtkSmartPointer::New(); int column; for (int row = 0; row < h; ++row) { //The stPCD is my structure that includes x,y,z points data. //imageRawData is buffer address. pcd = reinterpret_cast(imageRawData); for (column = 0; column < w; ++column) { if (!isnan((*pcd).z)) { points->InsertNextPoint(pcd->x, pcd->y, pcd->z); } ++pcd; } imageRawData += line; } vtkSmartPointer pPolyData = vtkSmartPointer::New(); pPolyData->SetPoints(points); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputData(pPolyData); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(actor); renderer->SetBackground(.1, .2, .3); renderer->ResetCamera(); m_vtkWindow->AddRenderer(renderer); m_vtkWindow->Render(); But it doesn't work. Could you please give me an advise or link, sample code? Thank you :) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sean at rogue-research.com Wed Apr 24 13:20:35 2019 From: sean at rogue-research.com (Sean McBride) Date: Wed, 24 Apr 2019 13:20:35 -0400 Subject: [vtkusers] OpenVR vtkCocoaOpenGLRenderWindow.h In-Reply-To: References: <171D15DA-36B3-4BB0-8A93-580A78C3EF83@hw.ac.uk> <20190214000255.830969929@mail.rogue-research.com> Message-ID: <20190424172035.792668654@mail.rogue-research.com> On Thu, 14 Feb 2019 00:11:03 +0000, Lim, Theodore said: >Much appreciated, Sean. > >I?ve tried vtkCocoaRenderWindow.h but it kicked up a fuss. Will explore >further. Theo, I made this patch: Sean From dobashisuguru at gmail.com Thu Apr 25 03:52:55 2019 From: dobashisuguru at gmail.com (sdobashi) Date: Thu, 25 Apr 2019 00:52:55 -0700 (MST) Subject: [vtkusers] vtkChartXY: line looks coarser as the number of plot points increases Message-ID: <1556178775808-0.post@n5.nabble.com> Hello, VTK users I have trouble regarding vtkChartXY. A line becomes coarser as the number of plot points increases (for example, from 100 to 1000000). I attached the images to illustrate this behavior, as well as the cord example. I used VTK 8.2.0, build with -DVTK_RENDERING_BACKEND:STRING="OpenGL2" option. I want to prevent the line looks coarse even when the number of plot points grows like 1000000. Is there a way to achieve this? I would appreciate any help. Thank you in advance. Here is the code: #include #include #include #include #include #include #include #include #include #include int main(int, char**) { auto table = vtkSmartPointer::New(); auto arrX = vtkSmartPointer::New(); arrX->SetName("X Axis"); table->AddColumn(arrX); auto arrC = vtkSmartPointer::New(); arrC->SetName("Cosine"); table->AddColumn(arrC); //const auto numPoints = 100; // OK const auto numPoints = 1000000; // NG (looks coarse) const float inc = 3.14 / numPoints; table->SetNumberOfRows(numPoints); for (auto i = 0; i < numPoints; ++i) { table->SetValue(i, 0, i * inc); table->SetValue(i, 1, cos(i * inc)); } auto view = vtkSmartPointer::New(); view->GetRenderer()->SetBackground(1.0, 1.0, 1.0); view->GetRenderWindow()->SetSize(800, 600); auto chart = vtkSmartPointer::New(); view->GetScene()->AddItem(chart); auto line = chart->AddPlot(vtkChart::LINE); line->SetInputData(table, 0, 1); line->SetColor(255, 0, 0, 255); line->SetWidth(10.0); view->GetRenderWindow()->Render(); view->GetInteractor()->Initialize(); view->GetInteractor()->Start(); } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From hwlee at dentium.com Mon Apr 29 19:24:06 2019 From: hwlee at dentium.com (David) Date: Mon, 29 Apr 2019 16:24:06 -0700 (MST) Subject: [vtkusers] Hello. I got problem on the geometry for vtk. Message-ID: <1556580246979-0.post@n5.nabble.com> Hello. I got problem on the geometry for vtk. I did Volume rendering my CT by using vtkSmartVolumeMapper , and did Modeling on same CT by using vtkMarchingCubes. But the Geometry of between Volume rendering and Modeling is different. I attach the picture for the different Geometry. Why did it occur? In addition, how can I match the geometry? I cannot keep going, now. Could you help me? Thank you~~ -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From andrewkeeling at hotmail.com Tue Apr 30 04:26:57 2019 From: andrewkeeling at hotmail.com (andyjk) Date: Tue, 30 Apr 2019 01:26:57 -0700 (MST) Subject: [vtkusers] scenepicker not working Message-ID: <1556612817879-0.post@n5.nabble.com> I am trying to pick using scene picker but it doesn't seem to find a cell or vertex, while proppicker does. How do I extract a pick position from scene picker? (Or even just a picked cell) Minimal example below: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Execute application. int main(int, char *[]) { vtkSmartPointer sphereSource = vtkSmartPointer::New(); sphereSource->Update(); // Create a polydata object vtkPolyData* polydata = sphereSource->GetOutput(); // Create a mapper vtkSmartPointer mapper = vtkSmartPointer::New(); #if VTK_MAJOR_VERSION <= 5 mapper->SetInput(polydata); #else mapper->SetInputData(polydata); #endif // Create an actor vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); std::cout << "Actor address: " << actor << std::endl; // A renderer and render window vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->SetStencilCapable(1); // Needed for point picking on scene picker renderWindow->AddRenderer(renderer); // An interactor vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); // Here comes the scene picker stuff. [ Just 2 lines ] vtkScenePicker * scenepicker = vtkScenePicker::New(); scenepicker->SetRenderer(renderer); scenepicker->EnableVertexPickingOn(); // Add the actors to the scene renderer->AddActor(actor); renderer->SetBackground(0, 0, 1); // Render and interact renderWindow->Render(); renderWindowInteractor->Initialize(); // Now the picking stuff.................................................... int e[2] = { 175, 215 }; // Pick from this location using standard prop picker (this works fine) vtkSmartPointer picker = vtkSmartPointer::New(); picker->Pick(e[0], e[1], 0, renderer); double* pos = picker->GetPickPosition(); std::cout << "Pick position (world coordinates) is: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl; // Pick using scene picker (this fails) vtkIdType vertexId = scenepicker->GetVertexId(e); vtkIdType cellId = scenepicker->GetCellId(e); std::cout << "Scene pick vertex Id " << vertexId << std::endl; std::cout << "Scene pick cell Id " << cellId << std::endl; double world_point[3]; if (vertexId != -1) { polydata->GetPoint(vertexId, world_point); std::cout << "Scene pick position is : " << world_point[0] << " " << world_point[1] << " " << world_point[2] << std::endl;; } renderWindowInteractor->Start(); return EXIT_SUCCESS; } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html