From charles.kind at bristol.ac.uk Fri Dec 1 05:09:58 2017 From: charles.kind at bristol.ac.uk (Charles Kind) Date: Fri, 1 Dec 2017 03:09:58 -0700 (MST) Subject: [vtkusers] Translate all VTK glyphs individually in large dataset In-Reply-To: References: Message-ID: <1512122998644-0.post@n5.nabble.com> What is needed here is a Warp Vector. As the displacements have already been calculated as mtrans these can then be applied to the point set in order to warp it to the new configuration. The point set is the origin points for the glyphs. Below is a section of code from below the subsample grid. #Cast data into PolyData format for warping pd = vtk.vtkPolyData() pd.SetPoints(extract.GetOutput().GetPoints()) pd.GetPointData().SetVectors(extract.GetOutput().GetPointData().GetAbstractArray(2)) #Warp vector origins warpVector = vtk.vtkWarpVector() warpVector.SetInputData(pd) warpVector.SetScaleFactor(1e-07) warpVector.Update() #Cast warped points and original vectors into PolyData for rendering warped = vtk.vtkPolyData() warped.SetPoints(warpVector.GetOutput().GetPoints()) warped.GetPointData().SetVectors(extract.GetOutput().GetPointData().GetAbstractArray(1)) arrowSource = vtk.vtkArrowSource() glyph3D = vtk.vtkGlyph3D() glyph3D.SetSourceConnection(arrowSource.GetOutputPort()) glyph3D.SetVectorModeToUseVector() glyph3D.SetInputData(warped) glyph3D.SetScaleFactor(1e-07) glyph3D.Update() -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From agatakrason at gmail.com Fri Dec 1 06:32:17 2017 From: agatakrason at gmail.com (=?UTF-8?Q?Agata_Kraso=C5=84?=) Date: Fri, 1 Dec 2017 12:32:17 +0100 Subject: [vtkusers] How to calculate DICE on mesh ? Message-ID: Hello, I would like to calculate dice coefficient between two meshes. Could it be possible to do it in VTK or iTK ? I would appreciate for any help or advice. Best regards, Agata -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Dec 1 08:47:20 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 1 Dec 2017 08:47:20 -0500 Subject: [vtkusers] How to calculate DICE on mesh ? In-Reply-To: References: Message-ID: Agata, I believe ITK may help you do this. I'm not aware of anything in VTK that does it. Thanks, Cory On Fri, Dec 1, 2017 at 6:32 AM, Agata Kraso? wrote: > Hello, > > I would like to calculate dice coefficient between two meshes. > Could it be possible to do it in VTK or iTK ? > > > I would appreciate for any help or advice. > > > > Best regards, > Agata > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From coyarzunlaura at googlemail.com Fri Dec 1 10:01:07 2017 From: coyarzunlaura at googlemail.com (Cristina Oyarzun) Date: Fri, 1 Dec 2017 16:01:07 +0100 Subject: [vtkusers] VTK-JS: How to visualize numbers In-Reply-To: References: Message-ID: Hello Sebastian, I am trying to adapt the example to my current problem. I have a render window with 4 renderers. Each renderer has several actors and some of them should get labels next to them. My plan now is to create a vtkPointSet, and set this as inputData to the vtkPixelSpaceCallbackMapper. Is this correct? My problem right now is that when I try to set a point in a vtkPoints the vtkPoints remains empty. Do you have any idea what the problem could be? Just to test I simplified the problem to this: var Points = vtkPoints.newInstance(); Points.setPoint(0, 13, 10, 50); console.log("Points", Points.getNumberOfPoints()); And I get always 0. Thank you!! Cristina On Wed, Nov 29, 2017 at 6:59 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > The example you mention is the right approach for what you are looking for. > > The reason why you don't need vtkFollowers+vtkTextActors, is that we have > a 2D layer on top of the 3D for which it is trivial to render text that is > always facing the camera. ;-) > And we have a mechanism that can convert a set of location in the 3D world > into the screen space so those label could be printed. > > Let us know if you the example is not enough to get you started. > > Seb > > On Wed, Nov 29, 2017 at 10:51 AM, Cristina Oyarzun via vtkusers < > vtkusers at vtk.org> wrote: > >> Hello, >> >> I would like to visualize some numbers next to my actors. I saw an >> example (Spheres and Labels) where a canvas is created for this purpose. I >> remember doing this using vtkFollowers in the past. Is there currently some >> easy way to do this with vtk-js? I mean something similar to vtkFollowers >> or vtkTextActors? >> >> Thank you! >> Cristina >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 Fri Dec 1 10:20:17 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 1 Dec 2017 08:20:17 -0700 Subject: [vtkusers] VTK-JS: How to visualize numbers In-Reply-To: References: Message-ID: Hi Cristina, You should fill the points in a static manner using the typed array like below: var nbPoints = 10; var coords = new Float32Array(nbPoints * 3); coords[0] = x0; coords[1] = y0; coords[2] = z0; [...] coords[3*n+0] = xn; coords[3*n+1] = yn; coords[3*n+2] = zn; var polydata = vtkPolyData.newInstance(); polydata.getPoints().setData(coords, 3); Otherwise your approach with vtkPixelSpaceCallbackMapper seems correct. Seb On Fri, Dec 1, 2017 at 8:01 AM, Cristina Oyarzun < coyarzunlaura at googlemail.com> wrote: > Hello Sebastian, > > I am trying to adapt the example to my current problem. I have a render > window with 4 renderers. Each renderer has several actors and some of them > should get labels next to them. > > My plan now is to create a vtkPointSet, and set this as inputData to the > vtkPixelSpaceCallbackMapper. Is this correct? > > My problem right now is that when I try to set a point in a vtkPoints the > vtkPoints remains empty. Do you have any idea what the problem could be? > Just to test I simplified the problem to this: > > var Points = vtkPoints.newInstance(); > Points.setPoint(0, 13, 10, 50); > console.log("Points", Points.getNumberOfPoints()); > > And I get always 0. > > Thank you!! > Cristina > > > On Wed, Nov 29, 2017 at 6:59 PM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> The example you mention is the right approach for what you are looking >> for. >> >> The reason why you don't need vtkFollowers+vtkTextActors, is that we >> have a 2D layer on top of the 3D for which it is trivial to render text >> that is always facing the camera. ;-) >> And we have a mechanism that can convert a set of location in the 3D >> world into the screen space so those label could be printed. >> >> Let us know if you the example is not enough to get you started. >> >> Seb >> >> On Wed, Nov 29, 2017 at 10:51 AM, Cristina Oyarzun via vtkusers < >> vtkusers at vtk.org> wrote: >> >>> Hello, >>> >>> I would like to visualize some numbers next to my actors. I saw an >>> example (Spheres and Labels) where a canvas is created for this purpose. I >>> remember doing this using vtkFollowers in the past. Is there currently some >>> easy way to do this with vtk-js? I mean something similar to vtkFollowers >>> or vtkTextActors? >>> >>> Thank you! >>> Cristina >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 amine.aboufirass at gmail.com Fri Dec 1 10:45:27 2017 From: amine.aboufirass at gmail.com (Amine Aboufirass) Date: Fri, 1 Dec 2017 16:45:27 +0100 Subject: [vtkusers] ExtractByLocation Message-ID: Hello, I am trying to figure out how to select the closest neighboring points to a list of coordinates using the vtk library. I have a simple point data set in the Unstructured Grid Format. The dataset contains one attribute named the 'point_id' which is just enumerating the points starting from 1 instead of 0. The raw text from the ASCII file is attached in testScalar.vtk below. I have also written a script in python which I thought would function as follows: INPUT: 1. List of tuples containing world coordinates [(X1,Y1,Z1),(X2,Y2,Z2)] 2. name of attribute to extract as a string. in this case "point_id" OUTPUT: 1. List of floating point values of the attribute for the selected points This does work to a certain degree, for instance when I do : ExtractByLocation('testScalar.vtk', [(5.999,0,0)], 'point_id') I do indeed get back the following: array([ 2.], dtype=float32) So point_id 2 is the closest point to the coordinates I have specified. However, as soon as I get a bit too far from one of the points, the function starts returning an empty list. For instance: ExtractByLocation('testScalar.vtk', [(5.888,0,0)], 'point_id') Returns array([], dtype=float32) I found out that the cut off point is 5.89-5.90. If I plugin 5.9 I get the point, if I plugin 5.89 I get back an empty list. According to the object reference ( https://www.vtk.org/doc/nightly/html/classvtkSelectionNode.html#aa7b54148c40adf4f5019b8ad3e160535a97d8505c922b2a25c5d2755607d3cbb6 ) LOCATIONS is supposed to select the points near the supplied world coordinates. Is there an option or something that selects the nearest point PERIOD? i.e using a simple distance formula? I would like to never get back an empty list but always get back a list of the closest point to the supplied coordinates. Kind Regards, Amine -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- import vtk from vtk.util.numpy_support import vtk_to_numpy import os def ExtractByLocation(FileName, Locations, DataType): #where Locations MUST be a list of XYZ tuples, e.g [(0,0.2,0.0),(0,0.4,0.0),(0,0.5,0.0),(0,0.6,0.0)] reader = vtk.vtkUnstructuredGridReader() reader.SetFileName(FileName) if 'Scalar' in FileName: reader.SetScalarsName(DataType) elif 'Tensor' in FileName: reader.SetTensorsName(DataType) elif 'Vector' in FileName: reader.SetVectorsName(DataType) reader.Update() SelectionList = vtk.vtkDoubleArray() SelectionList.SetNumberOfComponents(3) #dimension of the components for Location in Locations: SelectionList.InsertNextTuple(Location) SelectionNode = vtk.vtkSelectionNode() SelectionNode.SetFieldType(vtk.vtkSelectionNode.POINT) SelectionNode.SetContentType(vtk.vtkSelectionNode.LOCATIONS) SelectionNode.SetSelectionList(SelectionList) Selection = vtk.vtkSelection() Selection.AddNode(SelectionNode) ExtractSelection = vtk.vtkExtractSelection() ExtractSelection.SetInputConnection(0, reader.GetOutputPort()) ExtractSelection.SetInputData(1,Selection) ExtractSelection.Update() Selected = vtk.vtkUnstructuredGrid() Selected.ShallowCopy(ExtractSelection.GetOutput()) PointData = Selected.GetPointData() if 'Scalar' in FileName: Data = vtk_to_numpy(PointData.GetScalars()) elif 'Tensor' in FileName: Data = vtk_to_numpy(PointData.GetTensors()) elif 'Vector' in FileName: Data = vtk_to_numpy(PointData.GetVectors()) return Data -------------- next part -------------- A non-text attachment was scrubbed... Name: testScalar.vtk Type: application/octet-stream Size: 231 bytes Desc: not available URL: From irocks0922 at gmail.com Sun Dec 3 03:43:45 2017 From: irocks0922 at gmail.com (eclipse) Date: Sun, 3 Dec 2017 17:43:45 +0900 Subject: [vtkusers] vtkfollower makes renderer slow when zoom-in Message-ID: Dear VTKusers I am trying to add vtkfollower to vtkrenderer for indicating the chosen point. textured vtkfollower is represented correctly, but in the renderer, if I look closer (camera comes closer to polydata) it's getting really slow(frame drop) then, if I move camera far from model its rendering performance is going back to normal. and the boundary of image turned into black. I did not set the edge line or something might be related. here is the code. why is this situation happening? Did I something in a wrong way? m_SourceFromQrc = vtkSmartPointer::New(); m_SourceFromQrc->SetQImage(&m_qimageFromQrc); m_SourceFromQrc->Update(); m_spVTKTexture = vtkSmartPointer::New(); m_spVTKTexture->SetInputConnection(m_SourceFromQrc->GetOutputPort()); m_spVTKTexture->Update(); m_spVTKPlane = vtkSmartPointer::New(); m_spVTKPlane->SetNormal(0.0, 0.0, 1.0); m_spVTKTextureMappedPlane = vtkSmartPointer::New(); m_spVTKTextureMappedPlane->SetInputConnection(m_spVTKPlane->GetOutputPort()); m_planeDataMapper = vtkSmartPointer::New(); m_planeDataMapper->SetInputConnection(m_spVTKTextureMappedPlane->GetOutputPort()); double followerOriginPoint[3] = { 0.0 }; followerOriginPoint[1] = -1 / 2.0; m_follower = vtkSmartPointer< vtkFollower>::New(); m_follower->SetOrigin(followerOriginPoint); m_follower->SetPosition( pos[0] - followerOriginPoint[0], pos[1] - followerOriginPoint[1], pos[2] - followerOriginPoint[2]); m_follower->SetScale(6); m_follower->SetMapper(m_planeDataMapper); m_follower->SetTexture(m_spVTKTexture); m_follower->SetCamera(getRenderer(m_rendererType)->GetActiveCamera()); m_follower->VisibilityOn(); m_follower->ForceOpaqueOff(); getRenderer(m_rendererType)->AddActor(m_follower); I appreciate you in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmooney3uwyo at gmail.com Sun Dec 3 14:39:06 2017 From: pmooney3uwyo at gmail.com (Paul Mooney) Date: Sun, 3 Dec 2017 12:39:06 -0700 Subject: [vtkusers] VTK in a Python Container Message-ID: Hello, Is it possible to use VTK within a Python Container such as a Kaggle Kernel or an Azure Notebook? I am trying to perform a data visualization task within a Kaggle Kernel Python Docker that does indeed have VTK installed but I end up with the following error: "TripWireError: Python VTK is not installed". Is it possible to use VTK within a Python Container such as a Kaggle Kernel or an Azure Notebook? Thanks, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Sun Dec 3 18:00:22 2017 From: doug at beachmailing.com (scotsman60) Date: Sun, 3 Dec 2017 16:00:22 -0700 (MST) Subject: [vtkusers] Cannot recover user defined vtkInformation from vtkUnstructuredGrid Message-ID: <1512342022215-0.post@n5.nabble.com> Hello!! I'm using the Python API to vtk and I'm unable to import custom vtkInformation from a vtkUnstructuredGrid. First of all I'm associating custom information to CellData in a vtkUnstructuredGrid using the following code - where self.mesh is the vtkUnstructuredGrid #Add the information keys info = densityScalars.GetInformation() # First the Quantity type quantity_key = keys.MakeKey(vtk.vtkInformationStringKey, "Quantity", "1") quantity_key.Set(info, "Topology Density") #Now the Increment number increment_key = keys.MakeKey(vtk.vtkInformationIntegerKey, "Increment", "2") increment_key.Set(info, increment) #Add the array to the mesh self.mesh.GetCellData().AddArray(densityScalars) Later I save the vtkUnstructuredGrid using vtkUnstructuredGridWriter, then Import it into a new Python session (Basically my program uses the vtkUnstructuredGrid as its persistence mechanism.........) When I read the grid using vtkUnstructuredGridReader I get a whole bunch of warnings from vtk Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 vtkUnstructuredGridReader (00000000044D7520): Could not locate key 2::Increment. Is the module in which it is defined linked? Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 vtkUnstructuredGridReader (00000000044D7520): Ignoring line in INFORMATION block: DATA 1 Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 vtkUnstructuredGridReader (00000000044D7520): Could not locate key 2::Increment. Is the module in which it is defined linked? Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 vtkUnstructuredGridReader (00000000044D7520): Ignoring line in INFORMATION block: DATA 2 Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 vtkUnstructuredGridReader (00000000044D7520): Could not locate key 1::Quantity. Is the module in which it is defined linked? Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 vtkUnstructuredGridReader (00000000044D7520): Ignoring line in INFORMATION block: DATA Topology%20Density Any ideas on what's going on here? Thanks in advance, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Sun Dec 3 19:19:00 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 3 Dec 2017 17:19:00 -0700 Subject: [vtkusers] Cannot recover user defined vtkInformation from vtkUnstructuredGrid In-Reply-To: <1512342022215-0.post@n5.nabble.com> References: <1512342022215-0.post@n5.nabble.com> Message-ID: Before you load the data, re-make the keys so that VTK will register them as valid keys: quantity_key = keys.MakeKey(vtk.vtkInformationStringKey, "Quantity", "1") increment_key = keys.MakeKey(vtk.vtkInformationIntegerKey, "Increment", "2") # the keys are defined now, so you should be able to load the data On Sun, Dec 3, 2017 at 4:00 PM, scotsman60 wrote: > Hello!! > > I'm using the Python API to vtk and I'm unable to import custom > vtkInformation from a vtkUnstructuredGrid. > > First of all I'm associating custom information to CellData in a > vtkUnstructuredGrid using the following code - where self.mesh is the > vtkUnstructuredGrid > > #Add the information keys > info = densityScalars.GetInformation() > > # First the Quantity type > quantity_key = keys.MakeKey(vtk.vtkInformationStringKey, "Quantity", > "1") > quantity_key.Set(info, "Topology Density") > > #Now the Increment number > increment_key = keys.MakeKey(vtk.vtkInformationIntegerKey, > "Increment", > "2") > increment_key.Set(info, increment) > > > #Add the array to the mesh > self.mesh.GetCellData().AddArray(densityScalars) > > > Later I save the vtkUnstructuredGrid using vtkUnstructuredGridWriter, then > Import it into a new Python session (Basically my program uses the > vtkUnstructuredGrid as its persistence mechanism.........) > > When I read the grid using vtkUnstructuredGridReader I get a whole bunch of > warnings from vtk > > Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 > vtkUnstructuredGridReader (00000000044D7520): Could not locate key > 2::Increment. Is the module > in which it is defined linked? > > Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 > vtkUnstructuredGridReader (00000000044D7520): Ignoring line in > INFORMATION block: DATA 1 > > Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 > vtkUnstructuredGridReader (00000000044D7520): Could not locate key > 2::Increment. Is the module > in which it is defined linked? > > Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 > vtkUnstructuredGridReader (00000000044D7520): Ignoring line in > INFORMATION block: DATA 2 > > Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 > vtkUnstructuredGridReader (00000000044D7520): Could not locate key > 1::Quantity. Is the module in > which it is defined linked? > > Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 > vtkUnstructuredGridReader (00000000044D7520): Ignoring line in > INFORMATION block: DATA > Topology%20Density > > > Any ideas on what's going on here? > > Thanks in advance, > > Doug > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Sun Dec 3 20:06:04 2017 From: doug at beachmailing.com (scotsman60) Date: Sun, 3 Dec 2017 18:06:04 -0700 (MST) Subject: [vtkusers] Cannot recover user defined vtkInformation from vtkUnstructuredGrid In-Reply-To: References: <1512342022215-0.post@n5.nabble.com> Message-ID: <1512349564139-0.post@n5.nabble.com> David, Thanks for this suggestion - unfortunately it doesn't seem to work. I have never found recreating a key with exactly the same parameters to work and (I think there's a post on here about this). I always introspect the vtkInformation object, get the keys and then use the keys recovered form the vtkInformation to get the values, info = self.mesh.GetCellData().GetArray(i).GetInformation() info_iterator = vtk.vtkInformationIterator() info_iterator.SetInformation(info) info_iterator.InitTraversal () key = info_iterator.GetCurrentKey() quantity= info.Get(key) David Gobbi wrote > Before you load the data, re-make the keys so that VTK will register them > as valid keys: > > quantity_key = keys.MakeKey(vtk.vtkInformationStringKey, "Quantity", "1") > increment_key = keys.MakeKey(vtk.vtkInformationIntegerKey, "Increment", > "2") > # the keys are defined now, so you should be able to load the data > > > On Sun, Dec 3, 2017 at 4:00 PM, scotsman60 < > doug@ > > wrote: > >> Hello!! >> >> I'm using the Python API to vtk and I'm unable to import custom >> vtkInformation from a vtkUnstructuredGrid. >> >> First of all I'm associating custom information to CellData in a >> vtkUnstructuredGrid using the following code - where self.mesh is the >> vtkUnstructuredGrid >> >> #Add the information keys >> info = densityScalars.GetInformation() >> >> # First the Quantity type >> quantity_key = keys.MakeKey(vtk.vtkInformationStringKey, "Quantity", >> "1") >> quantity_key.Set(info, "Topology Density") >> >> #Now the Increment number >> increment_key = keys.MakeKey(vtk.vtkInformationIntegerKey, >> "Increment", >> "2") >> increment_key.Set(info, increment) >> >> >> #Add the array to the mesh >> self.mesh.GetCellData().AddArray(densityScalars) >> >> >> Later I save the vtkUnstructuredGrid using vtkUnstructuredGridWriter, >> then >> Import it into a new Python session (Basically my program uses the >> vtkUnstructuredGrid as its persistence mechanism.........) >> >> When I read the grid using vtkUnstructuredGridReader I get a whole bunch >> of >> warnings from vtk >> >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 >> vtkUnstructuredGridReader (00000000044D7520): Could not locate key >> 2::Increment. Is the module >> in which it is defined linked? >> >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 >> vtkUnstructuredGridReader (00000000044D7520): Ignoring line in >> INFORMATION block: DATA 1 >> >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 >> vtkUnstructuredGridReader (00000000044D7520): Could not locate key >> 2::Increment. Is the module >> in which it is defined linked? >> >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 >> vtkUnstructuredGridReader (00000000044D7520): Ignoring line in >> INFORMATION block: DATA 2 >> >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 >> vtkUnstructuredGridReader (00000000044D7520): Could not locate key >> 1::Quantity. Is the module in >> which it is defined linked? >> >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 >> vtkUnstructuredGridReader (00000000044D7520): Ignoring line in >> INFORMATION block: DATA >> Topology%20Density >> >> >> Any ideas on what's going on here? >> >> Thanks in advance, >> >> Doug >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Sun Dec 3 20:18:54 2017 From: doug at beachmailing.com (scotsman60) Date: Sun, 3 Dec 2017 18:18:54 -0700 (MST) Subject: [vtkusers] Does vtkXMLUnstructuredGridWriter not support export Array vtkInformation Message-ID: <1512350334636-0.post@n5.nabble.com> Hello!! I'm trying to use user defined keys on the vtkInformation object associated with vtkArrays. I was unable to persist and later recover this information when I was using the vtkUnstructuredGridWriter and Readers so I figured I'd try the XML versions of these IO classes (I saw an error message at one point calling the original readers "Legacy" readers so figured the newer ones would be better) As far as I can see though, the vtkXMLUnstructuredGridWriter does NOT export any of the vtkInformation from the vtkArrays that are associated with the vtkUnstructuredGrid. When I look at the ASCII version of the file I can see the array data but there is no sign of any of the vtkInformation (When I look at the ASCII version generated by the non XML writer I can see at least some sign of the information) Is there any way to include the vtkInformation when I persist the grid? Are there alternative strategies for persisting array information between sessions? I'm basically using the vktUnstructuredGrid as the persistence mechanism for my program and if I can't keep everything I need inside this structure I need to figure out an alternative persistence mechanism) Tanks in advance, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Sun Dec 3 20:52:33 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 3 Dec 2017 18:52:33 -0700 Subject: [vtkusers] Cannot recover user defined vtkInformation from vtkUnstructuredGrid In-Reply-To: <1512349564139-0.post@n5.nabble.com> References: <1512342022215-0.post@n5.nabble.com> <1512349564139-0.post@n5.nabble.com> Message-ID: A key can only be constructed once per session (i.e. once per program execution). So it seems that you should be able to make a module that defines your keys, or use vtkInformationKeyLookup.Find(name, location) to verify that the key doesn't already exist before you create it. On Sun, Dec 3, 2017 at 6:06 PM, scotsman60 wrote: > David, > > Thanks for this suggestion - unfortunately it doesn't seem to work. > > I have never found recreating a key with exactly the same parameters to > work > and (I think there's a post on here about this). I always introspect the > vtkInformation object, get the keys and then use the keys recovered form > the > vtkInformation to get the values, > > info = self.mesh.GetCellData(). > GetArray(i).GetInformation() > > info_iterator = vtk.vtkInformationIterator() > info_iterator.SetInformation(info) > info_iterator.InitTraversal () > > key = info_iterator.GetCurrentKey() > > quantity= info.Get(key) > > > > David Gobbi wrote > > Before you load the data, re-make the keys so that VTK will register them > > as valid keys: > > > > quantity_key = keys.MakeKey(vtk.vtkInformationStringKey, "Quantity", > "1") > > increment_key = keys.MakeKey(vtk.vtkInformationIntegerKey, "Increment", > > "2") > > # the keys are defined now, so you should be able to load the data > > > > > > On Sun, Dec 3, 2017 at 4:00 PM, scotsman60 < > > > doug@ > > > > wrote: > > > >> Hello!! > >> > >> I'm using the Python API to vtk and I'm unable to import custom > >> vtkInformation from a vtkUnstructuredGrid. > >> > >> First of all I'm associating custom information to CellData in a > >> vtkUnstructuredGrid using the following code - where self.mesh is the > >> vtkUnstructuredGrid > >> > >> #Add the information keys > >> info = densityScalars.GetInformation() > >> > >> # First the Quantity type > >> quantity_key = keys.MakeKey(vtk.vtkInformationStringKey, > "Quantity", > >> "1") > >> quantity_key.Set(info, "Topology Density") > >> > >> #Now the Increment number > >> increment_key = keys.MakeKey(vtk.vtkInformationIntegerKey, > >> "Increment", > >> "2") > >> increment_key.Set(info, increment) > >> > >> > >> #Add the array to the mesh > >> self.mesh.GetCellData().AddArray(densityScalars) > >> > >> > >> Later I save the vtkUnstructuredGrid using vtkUnstructuredGridWriter, > >> then > >> Import it into a new Python session (Basically my program uses the > >> vtkUnstructuredGrid as its persistence mechanism.........) > >> > >> When I read the grid using vtkUnstructuredGridReader I get a whole bunch > >> of > >> warnings from vtk > >> > >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 > >> vtkUnstructuredGridReader (00000000044D7520): Could not locate key > >> 2::Increment. Is the module > >> in which it is defined linked? > >> > >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 > >> vtkUnstructuredGridReader (00000000044D7520): Ignoring line in > >> INFORMATION block: DATA 1 > >> > >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 > >> vtkUnstructuredGridReader (00000000044D7520): Could not locate key > >> 2::Increment. Is the module > >> in which it is defined linked? > >> > >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 > >> vtkUnstructuredGridReader (00000000044D7520): Ignoring line in > >> INFORMATION block: DATA 2 > >> > >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2668 > >> vtkUnstructuredGridReader (00000000044D7520): Could not locate key > >> 1::Quantity. Is the module in > >> which it is defined linked? > >> > >> Warning: In ..\IO\Legacy\vtkDataReader.cxx, line 2907 > >> vtkUnstructuredGridReader (00000000044D7520): Ignoring line in > >> INFORMATION block: DATA > >> Topology%20Density > >> > >> > >> Any ideas on what's going on here? > >> > >> Thanks in advance, > >> > >> Doug > >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Mon Dec 4 05:22:09 2017 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Mon, 4 Dec 2017 11:22:09 +0100 Subject: [vtkusers] How to calculate DICE on mesh ? In-Reply-To: References: Message-ID: Hi Agata, following Cory's comment, you may want to look into this IJ article: http://www.insight-journal.org/browse/publication/707 Or the itk::SimilarityIndexImageFilter class [1], or the SimpleITK "Segmentation Evaluation" notebook [2]. Now, these work on image pixels, not meshes. If no other alternative is suggested, you could create your solid model/image from your mesh using VTK/ITK, and then use ITK for your purpose. HTH, JON HAITZ [1] https://itk.org/Doxygen/html/classitk_1_1SimilarityIndexImageFilter.html [2] http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/Python_html/34_Segmentation_Evaluation.html -- On 1 December 2017 at 14:47, Cory Quammen wrote: > Agata, > > I believe ITK may help you do this. I'm not aware of anything in VTK > that does it. > > Thanks, > Cory > > On Fri, Dec 1, 2017 at 6:32 AM, Agata Kraso? wrote: >> Hello, >> >> I would like to calculate dice coefficient between two meshes. >> Could it be possible to do it in VTK or iTK ? >> >> >> I would appreciate for any help or advice. >> >> >> >> Best regards, >> Agata >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From satwik.k8 at gmail.com Mon Dec 4 05:25:26 2017 From: satwik.k8 at gmail.com (satwik k) Date: Mon, 4 Dec 2017 15:55:26 +0530 Subject: [vtkusers] CT Gantry Tilt correction In-Reply-To: References: <1511763162567-0.post@n5.nabble.com> <1512019783167-0.post@n5.nabble.com> Message-ID: Thanx David. It helped me a lot. Now it is taking less than 2 sec. Regards, Satwik K On Thu, Nov 30, 2017 at 10:38 PM, David Gobbi wrote: > The time will be proportional to the number of slices in the volume. > > I've pushed a change to github so that you can call the following method > to speed things up: > > rectify->SetInterpolationModeToLinear(); > > Linear interpolation will be at least 10 times faster than sinc > interpolation. > Just grab the latest master branch and this method will be available. > > When I have some time, I'll dig into the sinc interpolation code to speed > it up. > Right now it's just using vtkImageReslice and a 3D sinc kernel, but CT > rectification really only needs a one-dimensional kernel. > > - David > > > > On Thu, Nov 30, 2017 at 8:24 AM, satwik k wrote: > >> Last time when I used this API.. By mistake added in loop.. so it was >> taking more time... But now I moved it some where else method.. Now it is >> taking around 10sec... My doubt is, for 144 images.. it is taking this much >> extra time.. wht if have 1000images..? >> >> will it take same time or more? >> >> >> Regards, >> Satwik k >> >> On Nov 30, 2017 19:31, "David Gobbi" wrote: >> >>> Hi Satwik, >>> >>> I tested a 512x512x144 volume on my laptop, and it took 15 seconds. >>> So, no, that's not very fast. The class uses a windowed sinc >>> interpolator, >>> which is computationally expensive. I could add an option to use linear >>> interpolation. With linear interpolation it only takes 1 second. >>> >>> - David >>> >>> >>> On Wed, Nov 29, 2017 at 10:29 PM, Satwik wrote: >>> >>>> Hi, >>>> >>>> Dimensions of my volume is (512, 512, 144). >>>> >>>> ///My Code/// >>>> vtkDICOMCTRectifier* m_rectify = vtkDICOMCTRectifier::New(); >>>> m_rectify->SetEnableSMP(true); >>>> m_rectify->SetVolumeMatrix(d->m_initOrient); //passing orientation >>>> matrix >>>> m_rectify->SetInputData(d->m_imageData); //passing image data >>>> m_rectify->Update(); >>>> >>>> Regards, >>>> Satwik K. >>>> >>>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Mon Dec 4 10:21:10 2017 From: kor1581 at gmail.com (ran) Date: Mon, 4 Dec 2017 08:21:10 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer Irregular bounding borders while changing window level/width Message-ID: <1512400870435-0.post@n5.nabble.com> Hello, I'm using vtkResliceImageViewer to display DICOM images. But the images displayed in vtkResliceImageViewer shows different than vtkImageViewer2 even though the Reslice mode is set to RESLICE_AXIS_ALIGNED. So i set vtkResliceImageViewer :: GetLookupTable()->SetRange(0,1); then the problem solved. But current issue is, boundary of the image region while changing window level/width is irregular while SetRange(0,1); For my specific application, I need to use vtkResliceImageViewer instead of vtkImageViewer2. So, h ow vtkResliceImageViewer can achieve same behavior of vtkImageImageViewer2 in case of window level and width. I have attached screen shot of vtkResliceImageViewer and vtkImageViewer2 to highlight the diffrence . Please help to solve -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rickfrank at me.com Mon Dec 4 23:56:22 2017 From: rickfrank at me.com (Richard Frank) Date: Mon, 04 Dec 2017 23:56:22 -0500 Subject: [vtkusers] vnl quaternion question Message-ID: <000001d36d85$677ba230$3672e690$@me.com> Hi, I can rotation a point as below, but how to simply get back the original point? vnl_vector_fixed pt = {0,1,0}; vnl_vector_fixed axis = {0,0,1}; vnl_quaternion q = vnl_quaternion(axis,45 * M_PI / 180.0); auto rotPt = q * pt * q.conjugate(); // how to invert? Auto unRotPt = q.inverse() * rotPt; // doesn't seem to work Thanks Rick -------------- next part -------------- An HTML attachment was scrubbed... URL: From arw.tyx-ouy_mz at ezweb.ne.jp Tue Dec 5 01:38:14 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Mon, 4 Dec 2017 23:38:14 -0700 (MST) Subject: [vtkusers] How to create vtkPolyDataObject from coordinates Message-ID: <1512455894159-0.post@n5.nabble.com> Hi, I have two problems. Firstly, I have a set of coordinates, and I want to convert the set to vtkPolyData. Secondly, after the converting, I want to calculate the normals at each points in vtkPolyData. I think my second problem can be solved by using vtkPolyDataNormals, but my set of coordinates is very complex, so I'm worry about the normals are calculated correctly. I attach the example of my set. I want to convert the red part to vtkPolyData, and I have the coordinates of red part. How should i do? please help me! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From landinghere at 163.com Tue Dec 5 02:44:30 2017 From: landinghere at 163.com (landings) Date: Tue, 5 Dec 2017 00:44:30 -0700 (MST) Subject: [vtkusers] What is the best way to pass additional data to downstream? Message-ID: <1512459870631-0.post@n5.nabble.com> Hi, I have some additional information (actually a 4 x 4 matrix, or potentially more data) and want it pass through the pipeline. I have written my own reader who will offer an unstructured grid along with additional information, and my own writer who will receive filtered geometries with intact additional information. The filters in between are unpredictable. But they should not affect this information. What is the best way to do this? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From arw.tyx-ouy_mz at ezweb.ne.jp Tue Dec 5 05:09:08 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Tue, 5 Dec 2017 03:09:08 -0700 (MST) Subject: [vtkusers] Dicom Series Sagittal Display Message-ID: <1512468548288-0.post@n5.nabble.com> Hi, I have Dicom series, and I tried to do this example . Now i want to display my dicom series sagittal. How should i do? please help me! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Tue Dec 5 05:57:15 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 5 Dec 2017 05:57:15 -0500 Subject: [vtkusers] What is the best way to pass additional data to downstream? In-Reply-To: <1512459870631-0.post@n5.nabble.com> References: <1512459870631-0.post@n5.nabble.com> Message-ID: You can use vtkFieldData. See: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/FieldData/ Here is an example that saves a vtkCamera's parameters in field data: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/FieldData/ Bill On Tue, Dec 5, 2017 at 2:44 AM, landings wrote: > Hi, I have some additional information (actually a 4 x 4 matrix, or > potentially more data) and want it pass through the pipeline. > > I have written my own reader who will offer an unstructured grid along with > additional information, and my own writer who will receive filtered > geometries with intact additional information. > > The filters in between are unpredictable. But they should not affect this > information. > > What is the best way to do this? > > > > -- > 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 coyarzunlaura at googlemail.com Tue Dec 5 08:04:20 2017 From: coyarzunlaura at googlemail.com (Cristina Oyarzun) Date: Tue, 5 Dec 2017 14:04:20 +0100 Subject: [vtkusers] VTK-JS: How to visualize numbers In-Reply-To: References: Message-ID: Hello Sebastian, first of all sorry for asking so many questions and thank you for your help. I am trying to create 4 Render windows as you suggested. If I understood it correctly I can change the distribution of the render windows in the DOM element using "div" elements and changing their style. Is this correct? Apparently I can only set a container to vtkOpenGLRenderWindow and not to vtkRenderWindow. On the other side when I change the container for the openglRenderWindow I seem to have two times all my actors and renderers... Do I really need both vtkOpenGLRenderWindow and vtkRenderWindow? How can I ensure that the 4 RenderWindows will always cover the full screen as it was the case by using one vtkFullScreenRenderWindow and 4 renderer? Thank you!! Cristina On Mon, Dec 4, 2017 at 4:34 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > I've created an issue here: https://github.com/Kitware/vtk-js/issues/445 > > On Mon, Dec 4, 2017 at 8:31 AM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> Hi Cristina, >> >> The current implementation is probably not aware of renderers that are >> not taking the full size of the renderWindow. >> I guess for now, you can create 4 renderWindows inside your DOM element >> to recreate the split you were looking for with your renderers. >> >> Hope that make sense, >> >> Seb >> >> PS: In the meantime, we will try to add support for multi-renderer inside >> the vtkPixelSpaceCallbackMapper >> >> On Mon, Dec 4, 2017 at 5:10 AM, Cristina Oyarzun < >> coyarzunlaura at googlemail.com> wrote: >> >>> Hello Sebastian, >>> >>> thank you very much for your help. I was now able to visualize the >>> labels. Their relative location is correct, but they do not appear in the >>> correct renderer. They actually appear in a white "renderer" (the canvas I >>> guess?), below my render window. >>> >>> How can I show the labels in a concrete renderer? As I mentioned I have >>> four of them, and I need to show different labels in each one of them. >>> >>> Thank you!! >>> Cristina >>> >>> On Fri, Dec 1, 2017 at 4:20 PM, Sebastien Jourdain < >>> sebastien.jourdain at kitware.com> wrote: >>> >>>> Hi Cristina, >>>> >>>> You should fill the points in a static manner using the typed array >>>> like below: >>>> >>>> var nbPoints = 10; >>>> var coords = new Float32Array(nbPoints * 3); >>>> >>>> coords[0] = x0; >>>> coords[1] = y0; >>>> coords[2] = z0; >>>> [...] >>>> coords[3*n+0] = xn; >>>> coords[3*n+1] = yn; >>>> coords[3*n+2] = zn; >>>> >>>> var polydata = vtkPolyData.newInstance(); >>>> polydata.getPoints().setData(coords, 3); >>>> >>>> Otherwise your approach with vtkPixelSpaceCallbackMapper seems correct. >>>> >>>> Seb >>>> >>>> On Fri, Dec 1, 2017 at 8:01 AM, Cristina Oyarzun < >>>> coyarzunlaura at googlemail.com> wrote: >>>> >>>>> Hello Sebastian, >>>>> >>>>> I am trying to adapt the example to my current problem. I have a >>>>> render window with 4 renderers. Each renderer has several actors and some >>>>> of them should get labels next to them. >>>>> >>>>> My plan now is to create a vtkPointSet, and set this as inputData to >>>>> the vtkPixelSpaceCallbackMapper. Is this correct? >>>>> >>>>> My problem right now is that when I try to set a point in a vtkPoints >>>>> the vtkPoints remains empty. Do you have any idea what the problem could >>>>> be? Just to test I simplified the problem to this: >>>>> >>>>> var Points = vtkPoints.newInstance(); >>>>> Points.setPoint(0, 13, 10, 50); >>>>> console.log("Points", Points.getNumberOfPoints()); >>>>> >>>>> And I get always 0. >>>>> >>>>> Thank you!! >>>>> Cristina >>>>> >>>>> >>>>> On Wed, Nov 29, 2017 at 6:59 PM, Sebastien Jourdain < >>>>> sebastien.jourdain at kitware.com> wrote: >>>>> >>>>>> The example you mention is the right approach for what you are >>>>>> looking for. >>>>>> >>>>>> The reason why you don't need vtkFollowers+vtkTextActors, is that we >>>>>> have a 2D layer on top of the 3D for which it is trivial to render text >>>>>> that is always facing the camera. ;-) >>>>>> And we have a mechanism that can convert a set of location in the 3D >>>>>> world into the screen space so those label could be printed. >>>>>> >>>>>> Let us know if you the example is not enough to get you started. >>>>>> >>>>>> Seb >>>>>> >>>>>> On Wed, Nov 29, 2017 at 10:51 AM, Cristina Oyarzun via vtkusers < >>>>>> vtkusers at vtk.org> wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I would like to visualize some numbers next to my actors. I saw an >>>>>>> example (Spheres and Labels) where a canvas is created for this purpose. I >>>>>>> remember doing this using vtkFollowers in the past. Is there currently some >>>>>>> easy way to do this with vtk-js? I mean something similar to vtkFollowers >>>>>>> or vtkTextActors? >>>>>>> >>>>>>> Thank you! >>>>>>> Cristina >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> 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 aron.helser at kitware.com Tue Dec 5 08:10:21 2017 From: aron.helser at kitware.com (Aron Helser) Date: Tue, 5 Dec 2017 08:10:21 -0500 Subject: [vtkusers] vnl quaternion question In-Reply-To: <000001d36d85$677ba230$3672e690$@me.com> References: <000001d36d85$677ba230$3672e690$@me.com> Message-ID: Auto invQ = q.inverse(); Auto unRotPt = invQ * rotPt * invQ.conjugate(); that ought to work.... On Mon, Dec 4, 2017 at 11:56 PM, Richard Frank wrote: > Hi, > > > > I can rotation a point as below, but how to simply get back the original > point? > > > > > > > > vnl_vector_fixed pt = {0,1,0}; > > > > vnl_vector_fixed axis = {0,0,1}; > > > > vnl_quaternion q = vnl_quaternion(axis,45 * M_PI / 180.0); > > > > auto rotPt = q * pt * q.conjugate(); > > > > > > // how to invert? > > > > Auto unRotPt = q.inverse() * rotPt; // doesn?t seem to work > > > > > > > > Thanks > > > > > > Rick > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 rickfrank at me.com Tue Dec 5 08:13:04 2017 From: rickfrank at me.com (Richard Frank) Date: Tue, 05 Dec 2017 08:13:04 -0500 Subject: [vtkusers] vnl quaternion question In-Reply-To: References: <000001d36d85$677ba230$3672e690$@me.com> Message-ID: <04C935DA-B8FF-4FA7-A278-DA5F73B8D419@me.com> I was just at this moment thinking the same thing! Thanks! I?ll check. Rick Sent from my iPad > On Dec 5, 2017, at 8:10 AM, Aron Helser wrote: > > Auto invQ = q.inverse(); > Auto unRotPt = invQ * rotPt * invQ.conjugate(); > > that ought to work.... > >> On Mon, Dec 4, 2017 at 11:56 PM, Richard Frank wrote: >> Hi, >> >> >> >> I can rotation a point as below, but how to simply get back the original point? >> >> >> >> >> >> >> >> vnl_vector_fixed pt = {0,1,0}; >> >> >> >> vnl_vector_fixed axis = {0,0,1}; >> >> >> >> vnl_quaternion q = vnl_quaternion(axis,45 * M_PI / 180.0); >> >> >> >> auto rotPt = q * pt * q.conjugate(); >> >> >> >> >> >> // how to invert? >> >> >> >> Auto unRotPt = q.inverse() * rotPt; // doesn?t seem to work >> >> >> >> >> >> >> >> Thanks >> >> >> >> >> >> Rick >> >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 Tue Dec 5 10:11:12 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 5 Dec 2017 08:11:12 -0700 Subject: [vtkusers] VTK-JS: How to visualize numbers In-Reply-To: References: Message-ID: You understood correctly and you can create 4 x vtkFullScreenRenderWindow but you will have to provide them with the DOM elements you want them to be embedded into like the example below: [...]
[...] const rootContainer = document.querySelector('.js-root-container'); const topLeft = vtkFullScreenRenderWindow.newInstance({ rootContainer, containerStyle: { position: 'absolute', left: '0', top: '0', width: '50%', height: '50%' }}); const topRight = vtkFullScreenRenderWindow.newInstance({ rootContainer, containerStyle: { position: 'absolute', right: '0', top: '0', width: '50%', height: '50%' }}); const bottomLeft = vtkFullScreenRenderWindow.newInstance({ rootContainer, containerStyle: { position: 'absolute', left: '0', bottom: '0', width: '50%', height: '50%' }}); const bottomRight = vtkFullScreenRenderWindow.newInstance({ rootContainer, containerStyle: { position: 'absolute', right: '0', bottom: '0', width: '50%', height: '50%' }}); Seb On Tue, Dec 5, 2017 at 6:04 AM, Cristina Oyarzun < coyarzunlaura at googlemail.com> wrote: > Hello Sebastian, > > first of all sorry for asking so many questions and thank you for your > help. I am trying to create 4 Render windows as you suggested. If I > understood it correctly I can change the distribution of the render windows > in the DOM element using "div" elements and changing their style. Is this > correct? Apparently I can only set a container to vtkOpenGLRenderWindow and > not to vtkRenderWindow. On the other side when I change the container for > the openglRenderWindow I seem to have two times all my actors and > renderers... Do I really need both vtkOpenGLRenderWindow and > vtkRenderWindow? > > How can I ensure that the 4 RenderWindows will always cover the full > screen as it was the case by using one vtkFullScreenRenderWindow and 4 > renderer? > > Thank you!! > Cristina > > > On Mon, Dec 4, 2017 at 4:34 PM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> I've created an issue here: https://github.com/Kitware/vtk-js/issues/445 >> >> On Mon, Dec 4, 2017 at 8:31 AM, Sebastien Jourdain < >> sebastien.jourdain at kitware.com> wrote: >> >>> Hi Cristina, >>> >>> The current implementation is probably not aware of renderers that are >>> not taking the full size of the renderWindow. >>> I guess for now, you can create 4 renderWindows inside your DOM element >>> to recreate the split you were looking for with your renderers. >>> >>> Hope that make sense, >>> >>> Seb >>> >>> PS: In the meantime, we will try to add support for multi-renderer >>> inside the vtkPixelSpaceCallbackMapper >>> >>> On Mon, Dec 4, 2017 at 5:10 AM, Cristina Oyarzun < >>> coyarzunlaura at googlemail.com> wrote: >>> >>>> Hello Sebastian, >>>> >>>> thank you very much for your help. I was now able to visualize the >>>> labels. Their relative location is correct, but they do not appear in the >>>> correct renderer. They actually appear in a white "renderer" (the canvas I >>>> guess?), below my render window. >>>> >>>> How can I show the labels in a concrete renderer? As I mentioned I have >>>> four of them, and I need to show different labels in each one of them. >>>> >>>> Thank you!! >>>> Cristina >>>> >>>> On Fri, Dec 1, 2017 at 4:20 PM, Sebastien Jourdain < >>>> sebastien.jourdain at kitware.com> wrote: >>>> >>>>> Hi Cristina, >>>>> >>>>> You should fill the points in a static manner using the typed array >>>>> like below: >>>>> >>>>> var nbPoints = 10; >>>>> var coords = new Float32Array(nbPoints * 3); >>>>> >>>>> coords[0] = x0; >>>>> coords[1] = y0; >>>>> coords[2] = z0; >>>>> [...] >>>>> coords[3*n+0] = xn; >>>>> coords[3*n+1] = yn; >>>>> coords[3*n+2] = zn; >>>>> >>>>> var polydata = vtkPolyData.newInstance(); >>>>> polydata.getPoints().setData(coords, 3); >>>>> >>>>> Otherwise your approach with vtkPixelSpaceCallbackMapper seems >>>>> correct. >>>>> >>>>> Seb >>>>> >>>>> On Fri, Dec 1, 2017 at 8:01 AM, Cristina Oyarzun < >>>>> coyarzunlaura at googlemail.com> wrote: >>>>> >>>>>> Hello Sebastian, >>>>>> >>>>>> I am trying to adapt the example to my current problem. I have a >>>>>> render window with 4 renderers. Each renderer has several actors and some >>>>>> of them should get labels next to them. >>>>>> >>>>>> My plan now is to create a vtkPointSet, and set this as inputData to >>>>>> the vtkPixelSpaceCallbackMapper. Is this correct? >>>>>> >>>>>> My problem right now is that when I try to set a point in a vtkPoints >>>>>> the vtkPoints remains empty. Do you have any idea what the problem could >>>>>> be? Just to test I simplified the problem to this: >>>>>> >>>>>> var Points = vtkPoints.newInstance(); >>>>>> Points.setPoint(0, 13, 10, 50); >>>>>> console.log("Points", Points.getNumberOfPoints()); >>>>>> >>>>>> And I get always 0. >>>>>> >>>>>> Thank you!! >>>>>> Cristina >>>>>> >>>>>> >>>>>> On Wed, Nov 29, 2017 at 6:59 PM, Sebastien Jourdain < >>>>>> sebastien.jourdain at kitware.com> wrote: >>>>>> >>>>>>> The example you mention is the right approach for what you are >>>>>>> looking for. >>>>>>> >>>>>>> The reason why you don't need vtkFollowers+vtkTextActors, is that >>>>>>> we have a 2D layer on top of the 3D for which it is trivial to render text >>>>>>> that is always facing the camera. ;-) >>>>>>> And we have a mechanism that can convert a set of location in the 3D >>>>>>> world into the screen space so those label could be printed. >>>>>>> >>>>>>> Let us know if you the example is not enough to get you started. >>>>>>> >>>>>>> Seb >>>>>>> >>>>>>> On Wed, Nov 29, 2017 at 10:51 AM, Cristina Oyarzun via vtkusers < >>>>>>> vtkusers at vtk.org> wrote: >>>>>>> >>>>>>>> Hello, >>>>>>>> >>>>>>>> I would like to visualize some numbers next to my actors. I saw an >>>>>>>> example (Spheres and Labels) where a canvas is created for this purpose. I >>>>>>>> remember doing this using vtkFollowers in the past. Is there currently some >>>>>>>> easy way to do this with vtk-js? I mean something similar to vtkFollowers >>>>>>>> or vtkTextActors? >>>>>>>> >>>>>>>> Thank you! >>>>>>>> Cristina >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.vitali1 at unibg.it Tue Dec 5 13:27:18 2017 From: andrea.vitali1 at unibg.it (PhD Andrea Vitali) Date: Tue, 5 Dec 2017 11:27:18 -0700 (MST) Subject: [vtkusers] Shaders for VTK Message-ID: <1512498438665-0.post@n5.nabble.com> Dear All, Which is the best way to use shaders in VTK? I need to add several vertex attributes to the existent ones. I'm using vtkOpenGLPolyDataMapper as the starting point, but I'm not able to understand how to use shaders as usually done by classic OpenGL. Are there any examples of tutorials about it? Thank you in advance, Andrea -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sankhesh.jhaveri at kitware.com Tue Dec 5 13:38:40 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 05 Dec 2017 18:38:40 +0000 Subject: [vtkusers] Shaders for VTK In-Reply-To: <1512498438665-0.post@n5.nabble.com> References: <1512498438665-0.post@n5.nabble.com> Message-ID: Hi, VTK generates shaders at runtime and there are hooks in place that allow you to modify the generated shader code. Take a look a https://www.vtk.org/Wiki/Shaders_In_VTK for some information. There are some tests that exercise this functionality - TestUserShader - TestUserShader2 - TestGPURayCastUserShader - TestGPURayCastUserShader2 Hope this helps. Best, Sankhesh ? On Tue, Dec 5, 2017 at 1:27 PM PhD Andrea Vitali wrote: > Dear All, > > Which is the best way to use shaders in VTK? > > I need to add several vertex attributes to the existent ones. I'm using > vtkOpenGLPolyDataMapper as the starting point, but I'm not able to > understand how to use shaders as usually done by classic OpenGL. > > Are there any examples of tutorials about it? > > Thank you in advance, > > Andrea > > > > -- > 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 > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Tue Dec 5 16:12:50 2017 From: alican1812 at hotmail.com (alican) Date: Tue, 5 Dec 2017 14:12:50 -0700 (MST) Subject: [vtkusers] Why vtkContourFilter makes symmetric polydata asymetric? Message-ID: <1512508370999-0.post@n5.nabble.com> *myPolydata* is fully symmetric, *boundaryPoly *is still so, but cf->GetOutput() is not. Why? vtkSmartPointer featureEdges = vtkSmartPointer::New(); featureEdges->SetInputData(*myPolydata*); featureEdges->BoundaryEdgesOn(); featureEdges->FeatureEdgesOff(); featureEdges->ManifoldEdgesOn(); featureEdges->NonManifoldEdgesOff(); featureEdges->Update(); vtkSmartPointer boundaryStrips = vtkSmartPointer::New(); boundaryStrips->SetInputConnection(featureEdges->GetOutputPort()); boundaryStrips->SetJoinContiguousSegments(1); boundaryStrips->Update(); // Change the polylines into polygons vtkSmartPointer boundaryPoly = vtkSmartPointer::New(); boundaryPoly->SetPoints(boundaryStrips->GetOutput()->GetPoints()); boundaryPoly->SetPolys(boundaryStrips->GetOutput()->GetLines()); vtkSmartPointer surf = vtkSmartPointer::New(); surf->SetInputData(*boundaryPoly*); surf->Update(); vtkSmartPointer cf = vtkSmartPointer::New(); cf->SetInputConnection(surf->GetOutputPort()); cf->SetValue(0, 0.1); cf->Update(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Tue Dec 5 16:49:43 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 5 Dec 2017 16:49:43 -0500 Subject: [vtkusers] Why vtkContourFilter makes symmetric polydata asymetric? In-Reply-To: <1512508370999-0.post@n5.nabble.com> References: <1512508370999-0.post@n5.nabble.com> Message-ID: What about surf? On Dec 5, 2017 4:13 PM, "alican" wrote: > *myPolydata* is fully symmetric, *boundaryPoly *is still so, but > cf->GetOutput() is not. Why? > > vtkSmartPointer featureEdges = > vtkSmartPointer::New(); > featureEdges->SetInputData(*myPolydata*); > featureEdges->BoundaryEdgesOn(); > featureEdges->FeatureEdgesOff(); > featureEdges->ManifoldEdgesOn(); > featureEdges->NonManifoldEdgesOff(); > featureEdges->Update(); > > vtkSmartPointer boundaryStrips = > vtkSmartPointer::New(); > boundaryStrips->SetInputConnection(featureEdges->GetOutputPort()); > boundaryStrips->SetJoinContiguousSegments(1); > boundaryStrips->Update(); > > // Change the polylines into polygons > vtkSmartPointer boundaryPoly = > vtkSmartPointer::New(); > boundaryPoly->SetPoints(boundaryStrips->GetOutput()->GetPoints()); > boundaryPoly->SetPolys(boundaryStrips->GetOutput()->GetLines()); > > vtkSmartPointer surf = > vtkSmartPointer::New(); > surf->SetInputData(*boundaryPoly*); > surf->Update(); > > vtkSmartPointer cf = > vtkSmartPointer::New(); > cf->SetInputConnection(surf->GetOutputPort()); > cf->SetValue(0, 0.1); > cf->Update(); > > > > > -- > 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 Tue Dec 5 17:00:32 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 5 Dec 2017 17:00:32 -0500 Subject: [vtkusers] announce: vtk 8.1.0.rc2 is ready to try Message-ID: Hi folks, VTK 8.1.0.rc2 is up on the downloads site and tagged in git. Please give it a try and report any problems that you find to us via the gitlab issue tracker with an "8.1" milestone tag. Developers, use the same tag to let us know of any fixes that you want integrated to the release branch in time for 8.1.0 final in a few weeks time. If nothing major comes up, this will be retagged as 8.1.0 final. We expect the next release, VTK 9.0.0, to be out in a few short months. The biggest reason for rc2 is that in it we have deprecated Tcl. The entire set of changes over rc1 are as follows. $ git shortlog v8.1.0.rc1..v8.1.0.rc2 Ben Boeckel (2): tcl: deprecate for 8.1 Merge topic 'deprecate-tcl' into release David E. DeMarle (2): Merge branch 'upstream-tiff' into release Merge topic 'bump-tiff' into release Forrest Li (2): Remove legacy classes from ParallelGeometry Remove vtkPUnstructuredGridGhostDataGenerator from docs Julien Finet (2): Fix crash in transforms when doing DeepCopy after Identity Merge topic 'fix-transform-identity' into release Ken Martin (1): Merge topic 'remove_deprecated_from_filters' into release Sankhesh Jhaveri (4): Provide access to the shader program in UpdateShaderEvent callback Added test that demonstrates ability to set shader uniforms from python Invoke UpdateShaderEvent from volume mapper Merge topic 'expose_shader_api_release' into release Sean McBride (2): Fixed, again, a slightly incorrect assert Merge topic 'release-lut-assert' into release Tiff Upstream (1): tiff 2017-12-05 (818c6fed) 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 alican1812 at hotmail.com Wed Dec 6 03:56:07 2017 From: alican1812 at hotmail.com (alican) Date: Wed, 6 Dec 2017 01:56:07 -0700 (MST) Subject: [vtkusers] Why vtkContourFilter makes symmetric polydata asymetric? In-Reply-To: References: <1512508370999-0.post@n5.nabble.com> Message-ID: <1512550567618-0.post@n5.nabble.com> Sorry for my ignorance, but how can I visualize vtkSurfaceReconstructionFilter's output without adding more filters? Thanks. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From hel.schumacher at fz-juelich.de Wed Dec 6 04:53:31 2017 From: hel.schumacher at fz-juelich.de (Schumacher, Helmut) Date: Wed, 6 Dec 2017 09:53:31 +0000 Subject: [vtkusers] Install and use sample data Message-ID: <012701d36e78$1316f980$3944ec80$@fz-juelich.de> Can anybody explain how to install the sample data from VTK download area And how to use it for my own examples? Thanks in advance Dr. Helmut Schumacher Juelich Supercomputing Centre Institute for Advanced Simulation Forschungszentrum Juelich GmbH 52425 Juelich, Germany Phone: +49-2461-61-2482 Fax: +49-2461-61-6656 WWW: http://www.fz-juelich.de/jsc/ ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Wed Dec 6 08:48:55 2017 From: andy.bauer at kitware.com (Andy Bauer) Date: Wed, 6 Dec 2017 08:48:55 -0500 Subject: [vtkusers] Why vtkContourFilter makes symmetric polydata asymetric? In-Reply-To: <1512550567618-0.post@n5.nabble.com> References: <1512508370999-0.post@n5.nabble.com> <1512550567618-0.post@n5.nabble.com> Message-ID: You could write out the data and then view it in something like ParaView to check the results. On Wed, Dec 6, 2017 at 3:56 AM, alican wrote: > Sorry for my ignorance, but how can I visualize > vtkSurfaceReconstructionFilter's output without adding more filters? > 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: From cory.quammen at kitware.com Wed Dec 6 09:13:53 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 6 Dec 2017 09:13:53 -0500 Subject: [vtkusers] Install and use sample data In-Reply-To: <012701d36e78$1316f980$3944ec80$@fz-juelich.de> References: <012701d36e78$1316f980$3944ec80$@fz-juelich.de> Message-ID: On Wed, Dec 6, 2017 at 4:53 AM, Schumacher, Helmut wrote: > Can anybody explain how to install the sample data from VTK download area The data files at http://www.vtk.org/files/release/8.1/VTKData-8.1.0.rc2.zip are just in a zip file you can place anywhere on your file system. > And how to use it for my own examples? When you unzip the data files, just set the file paths in your examples to the data directory. HTH, Cory > > > Thanks in advance > > > > Dr. Helmut Schumacher > > > > Juelich Supercomputing Centre > > Institute for Advanced Simulation > > Forschungszentrum Juelich GmbH > > 52425 Juelich, Germany > > Phone: +49-2461-61-2482 > > Fax: +49-2461-61-6656 > > WWW: http://www.fz-juelich.de/jsc/ > > > > > > ------------------------------------------------------------------------------------------------ > ------------------------------------------------------------------------------------------------ > Forschungszentrum Juelich GmbH > 52425 Juelich > Sitz der Gesellschaft: Juelich > Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > Prof. Dr. Sebastian M. Schmidt > ------------------------------------------------------------------------------------------------ > ------------------------------------------------------------------------------------------------ > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From noeska.smit at gmail.com Wed Dec 6 12:06:04 2017 From: noeska.smit at gmail.com (Noeska Smit) Date: Wed, 6 Dec 2017 10:06:04 -0700 (MST) Subject: [vtkusers] Shaders for VTK In-Reply-To: <1512498438665-0.post@n5.nabble.com> References: <1512498438665-0.post@n5.nabble.com> Message-ID: <1512579964601-0.post@n5.nabble.com> Dear Andrea, PhD Andrea Vitali wrote > Which is the best way to use shaders in VTK? > > I need to add several vertex attributes to the existent ones. I'm using > vtkOpenGLPolyDataMapper as the starting point, but I'm not able to > understand how to use shaders as usually done by classic OpenGL. > > Are there any examples of tutorials about it? I wrote a blog post a while ago on how to do it with the 'old' OpenGL backend: http://noeskasmit.com/shaders-vtk-cel-shaded-skull-example-100-lines-python-code/ . Hope this helps! Kind regards, Noeska Smit -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Wed Dec 6 12:12:42 2017 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 6 Dec 2017 12:12:42 -0500 Subject: [vtkusers] Windows Mixed Reality Message-ID: Just a FYI, I just had a chance to test out a new Windows Mixed Reality headset and it seems to work well with VTK and ParaView through the SteamVR driver. I was testing the new Dell Visor headset and controller. The controllers show up properly and the controls map to reasonable settings. Tracking was surprisingly good. -- 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 cory.quammen at kitware.com Wed Dec 6 15:35:33 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 6 Dec 2017 15:35:33 -0500 Subject: [vtkusers] Install and use sample data In-Reply-To: <001101d36ea6$3b06e350$b114a9f0$@fz-juelich.de> References: <012701d36e78$1316f980$3944ec80$@fz-juelich.de> <001101d36ea6$3b06e350$b114a9f0$@fz-juelich.de> Message-ID: Ah, yes, I should have remembered the contents in that directory. The ExternalData directory is an object store where the file names are the MD5 hashes of the data files. It's not human-friendly to access directly - it is meant for the VTK testing framework. To use the test data, you can look under VTK/Testing/Data for the file that interests you (conveniently available for browsing online at [1]). The data files in this directory have been replaced with text files with the same name as the data file but including the .md5 suffix. If you open up one of these files with a text editor, you will see one line of text, the MD5 hash of the data file stored in it. This hash is the name of the file in the ExternalData/MD5 directory. You can either point your example to the MD5 file directly, or you can copy the file with the MD5 hash for a name somewhere else and rename it. Alternatively, you can build VTK with BUILD_TESTING on. In the VTK build directory, navigate to ExternalData/Testing/Data. This contains a directory with symbolic links named with the original data file names and pointing to the corresponding file in the .ExternalData/MD5 directory created as part of the build process (note: you do not need to download the aforementioned zip file to get the data if you are building VTK, it is downloaded as needed). HTH, Cory [1] https://www.vtk.org/gitweb?p=VTK.git;a=tree;f=Testing/Data;h=44fba308d8dd9d6ad4c90867273bff3e14fd54aa;hb=HEAD On Wed, Dec 6, 2017 at 10:23 AM, Dr. Helmut Schumacher wrote: > Sorry, but same as the zipped data on the download-website I get a directory "ExternalData" with a directory "MD5" with strange content > > Dr. Helmut Schumacher > > Juelich Supercomputing Centre > Institute for Advanced Simulation > Forschungszentrum Juelich GmbH > 52425 Juelich, Germany > Phone: +49-2461-61-2482 > Fax: +49-2461-61-6656 > WWW: http://www.fz-juelich.de/jsc/ > > -----Urspr?ngliche Nachricht----- > Von: Cory Quammen [mailto:cory.quammen at kitware.com] > Gesendet: Mittwoch, 6. Dezember 2017 15:14 > An: Schumacher, Helmut > Cc: vtkusers at vtk.org > Betreff: Re: [vtkusers] Install and use sample data > > On Wed, Dec 6, 2017 at 4:53 AM, Schumacher, Helmut wrote: >> Can anybody explain how to install the sample data from VTK download >> area > > The data files at > http://www.vtk.org/files/release/8.1/VTKData-8.1.0.rc2.zip are just in a zip file you can place anywhere on your file system. > >> And how to use it for my own examples? > > When you unzip the data files, just set the file paths in your examples to the data directory. > > HTH, > Cory > >> >> >> Thanks in advance >> >> >> >> Dr. Helmut Schumacher >> >> >> >> Juelich Supercomputing Centre >> >> Institute for Advanced Simulation >> >> Forschungszentrum Juelich GmbH >> >> 52425 Juelich, Germany >> >> Phone: +49-2461-61-2482 >> >> Fax: +49-2461-61-6656 >> >> WWW: http://www.fz-juelich.de/jsc/ >> >> >> >> >> >> ---------------------------------------------------------------------- >> -------------------------- >> ---------------------------------------------------------------------- >> -------------------------- >> Forschungszentrum Juelich GmbH >> 52425 Juelich >> Sitz der Gesellschaft: Juelich >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, >> Prof. Dr. Sebastian M. Schmidt >> ---------------------------------------------------------------------- >> -------------------------- >> ---------------------------------------------------------------------- >> -------------------------- >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From seun at rogue-research.com Wed Dec 6 16:52:52 2017 From: seun at rogue-research.com (Seun Odutola) Date: Wed, 6 Dec 2017 16:52:52 -0500 Subject: [vtkusers] Unused points resulting from vtkStripper. Message-ID: <0828820A-EAD9-4740-B5B4-D5B6D8C1ECC3@rogue-research.com> Hi everyone, I?ve got a situation where I have the output of a vtkContourFilter (polydata) connected to a vtkStripper; the stripper in return generates a poly data as its output which on closer inspection contains a single unused point. Is this customary for the stripper to have lose ends (unconnected points) or what could possibly be the reason behind this? Regards, Seun. From cory.quammen at kitware.com Wed Dec 6 17:09:37 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 6 Dec 2017 17:09:37 -0500 Subject: [vtkusers] Size of labels in vtkScalarBarActor In-Reply-To: <1511973750330-0.post@n5.nabble.com> References: <1511967090568-0.post@n5.nabble.com> <1511969891441-0.post@n5.nabble.com> <1511973750330-0.post@n5.nabble.com> Message-ID: Hi Miguel, I'm not sure what the problem is with the information available so far. If you can provide a small self-contained program that exhibits the crash and a CMakeLists.txt file to aid me in compiling it, I can take a deeper look. Thanks, Cory On Wed, Nov 29, 2017 at 11:42 AM, Miguel wrote: > Thank you Cory. > Unfortunately I cannot retrieve anything. The only way I have of debuging is > by printing messages. > > So, by printing values, what I can say is that the viewport looks like it > has no issues, and that the error comes from: > returnValue = this->ActorDelegate->RenderOverlay(viewport); > > I am using VTK 8.0.1 under windows 10. visual studio 2013. > > Best regards > > > > > > -- > 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. From stn.gupta.pankaj at gmail.com Wed Dec 6 22:03:07 2017 From: stn.gupta.pankaj at gmail.com (stn.gupta.pankaj) Date: Wed, 6 Dec 2017 20:03:07 -0700 (MST) Subject: [vtkusers] trace the vtkline Message-ID: <1512615787031-0.post@n5.nabble.com> Hi, I am displaying dicom file in vtkRenderWindow. I create 3D Lines using vtkLine and then create actor from vtkLine. Now my task is to trace the vtkLine and get all the points from where my vtkLine is passing in 3D. Thanks in Advance. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jose.de.paula at live.com Thu Dec 7 10:55:50 2017 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 7 Dec 2017 08:55:50 -0700 (MST) Subject: [vtkusers] Interception or Subtract of two polyDatas Message-ID: <1512662150004-0.post@n5.nabble.com> Good afternoon guys, I'm trying to pick up the interception between two polydatas, a cube and a sphere. I tried using vtkBooleanOperationPolyDataFilter and vtkIntersectionPolyDataFilter but the output of the two is empty. the code for vtkIntersectionPolyDataFilter: auto cubeSource = vtkSmartPointer::New(); cubeSource->SetXLength(size[0]); cubeSource->SetYLength(size[1]); cubeSource->SetZLength(size[2]); cubeSource->Update(); auto sphereSource = vtkSmartPointer::New(); sphereSource->SetRadius(20); sphereSource->Update(); auto intersectionPolyDataFilter = vtkSmartPointer::New(); intersectionPolyDataFilter->SetInputConnection(0, cubeSource->GetOutputPort()); intersectionPolyDataFilter->SetInputConnection(1, sphereSource->GetOutputPort()); intersectionPolyDataFilter->Update(); But when I using two sphere the output is working. vtkBooleanOperationPolyDataFilter and vtkIntersectionPolyDataFilter don't work for the cube? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Thu Dec 7 11:00:12 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 7 Dec 2017 11:00:12 -0500 Subject: [vtkusers] Interception or Subtract of two polyDatas In-Reply-To: <1512662150004-0.post@n5.nabble.com> References: <1512662150004-0.post@n5.nabble.com> Message-ID: The vtkCubeSource produces quads for the faces, but these filters require triangle input. You should be getting a warning with a message to that effect. The solution is to place a vtkTriangleFilter after the vtkCubeSource but fore the vtkBooleanOperationPolyDataFilter or vtkIntersectionPolyDataFilter. HTH, Cory On Thu, Dec 7, 2017 at 10:55 AM, Jose Barreto wrote: > Good afternoon guys, > > I'm trying to pick up the interception between two polydatas, a cube and a > sphere. > > I tried using vtkBooleanOperationPolyDataFilter and > vtkIntersectionPolyDataFilter > but the output of the two is empty. > > the code for vtkIntersectionPolyDataFilter: > > auto cubeSource = vtkSmartPointer::New(); > cubeSource->SetXLength(size[0]); > cubeSource->SetYLength(size[1]); > cubeSource->SetZLength(size[2]); > cubeSource->Update(); > > auto sphereSource = vtkSmartPointer::New(); > sphereSource->SetRadius(20); > sphereSource->Update(); > > > auto intersectionPolyDataFilter = > vtkSmartPointer::New(); > intersectionPolyDataFilter->SetInputConnection(0, > cubeSource->GetOutputPort()); > intersectionPolyDataFilter->SetInputConnection(1, > sphereSource->GetOutputPort()); > intersectionPolyDataFilter->Update(); > > > But when I using two sphere the output is working. > vtkBooleanOperationPolyDataFilter and vtkIntersectionPolyDataFilter don't > work for the cube? > > > > > > -- > 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. From jose.de.paula at live.com Thu Dec 7 11:05:00 2017 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 7 Dec 2017 09:05:00 -0700 (MST) Subject: [vtkusers] =?utf-8?q?Intercepta=C3=A7=C3=A3o_ou_subtrair_de_dois_?= =?utf-8?q?polyDatas?= In-Reply-To: References: <1512662150004-0.post@n5.nabble.com> Message-ID: <1512662700677-0.post@n5.nabble.com> Yes! It worked. It was with the vtk warnings disabled. Thank you! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jose.de.paula at live.com Thu Dec 7 13:41:33 2017 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 7 Dec 2017 11:41:33 -0700 (MST) Subject: [vtkusers] =?utf-8?q?Intercepta=C3=A7=C3=A3o_ou_subtrair_de_dois_?= =?utf-8?q?polyDatas?= In-Reply-To: References: <1512662150004-0.post@n5.nabble.com> Message-ID: <1512672093980-0.post@n5.nabble.com> Does the algorithm only run when objects are touching the edges? When my sphere is inside my cube the algorithm returns nothing. But when the sphere touches the edges of the cube it processes. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tossin at gmail.com Thu Dec 7 13:48:17 2017 From: tossin at gmail.com (Evan Kao) Date: Thu, 7 Dec 2017 10:48:17 -0800 Subject: [vtkusers] vtkCutter equivalent that doesn't automatically triangulate? Message-ID: Hello all, Is there a "slicing" filter like vtkCutter that keeps the original cells without triangulation? I know for clipping filters, vtkTableBasedClipDataSet keeps the original cell connectivity for unclipped cells without tetrahedralization like vtkClipDataSet does. Is there an equivalent for slicing? If not, are there any ways to recover the original connectivity after slicing? Thanks for your time, Evan Kao -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Dec 7 13:57:34 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 7 Dec 2017 13:57:34 -0500 Subject: [vtkusers] =?utf-8?q?Intercepta=C3=A7=C3=A3o_ou_subtrair_de_dois_?= =?utf-8?q?polyDatas?= In-Reply-To: <1512672093980-0.post@n5.nabble.com> References: <1512662150004-0.post@n5.nabble.com> <1512672093980-0.post@n5.nabble.com> Message-ID: Yes, a requirement is that the objects intersect. It might not be too hard to make it work in some cases where the geometries do not intersect, but currently that is a requirement of the filter. On Thu, Dec 7, 2017 at 1:41 PM, Jose Barreto wrote: > Does the algorithm only run when objects are touching the edges? > > When my sphere is inside my cube the algorithm returns nothing. But when the > sphere touches the edges of the cube it processes. > > > > -- > 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. From bill.lorensen at gmail.com Thu Dec 7 14:37:05 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 Dec 2017 14:37:05 -0500 Subject: [vtkusers] vtkCutter equivalent that doesn't automatically triangulate? In-Reply-To: References: Message-ID: vtkClipPolyData See https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/ClipSphereCylinder/ Bill On Thu, Dec 7, 2017 at 1:48 PM, Evan Kao wrote: > Hello all, > > Is there a "slicing" filter like vtkCutter that keeps the original cells > without triangulation? I know for clipping filters, > vtkTableBasedClipDataSet keeps the original cell connectivity for unclipped > cells without tetrahedralization like vtkClipDataSet does. Is there an > equivalent for slicing? > > If not, are there any ways to recover the original connectivity after > slicing? > > Thanks for your time, > Evan Kao > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 jose.de.paula at live.com Thu Dec 7 15:08:33 2017 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 7 Dec 2017 13:08:33 -0700 (MST) Subject: [vtkusers] Apagar uma imagem de entrada na MPR e Volume Message-ID: <1512677313181-0.post@n5.nabble.com> Good afternoon guys,How can I make an eraser for interaction in an MPR? Deleting directly in the input image?I have a screen with an MPR (vtkResliceImageViewer) and a volume.The image input is the same for both.I want the user to use the mouse to move over in MPR and delete these pixels in the input image, so that it has an effect on both the MPR and the volume(3D).I was using ImageRegionIteratorWithIndex to get the pixels and exchange the values,but the way I'm using is not working. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Thu Dec 7 15:09:47 2017 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 7 Dec 2017 13:09:47 -0700 (MST) Subject: [vtkusers] Erasing input image on MPR and Volume Message-ID: <1512677387084-0.post@n5.nabble.com> Good afternoon guys,How can I make an eraser for interaction in an MPR? Deleting directly in the input image?I have a screen with an MPR (vtkResliceImageViewer) and a volume.The image input is the same for both.I want the user to use the mouse to move over in MPR and delete these pixels in the input image, so that it has an effect on both the MPR and the volume(3D).I was using ImageRegionIteratorWithIndex to get the pixels and exchange the values,but the way I'm using is not working. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Thu Dec 7 15:16:36 2017 From: alican1812 at hotmail.com (alican) Date: Thu, 7 Dec 2017 13:16:36 -0700 (MST) Subject: [vtkusers] Why vtkContourFilter makes symmetric polydata asymetric? In-Reply-To: References: <1512508370999-0.post@n5.nabble.com> <1512550567618-0.post@n5.nabble.com> Message-ID: <1512677796947-0.post@n5.nabble.com> Looks like it is indeed vtkSurfaceReconstructionFilter. Why could it be? I have tried it on a couple of different meshes and the symmetry is always lost even if slightly. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From alican1812 at hotmail.com Thu Dec 7 15:23:35 2017 From: alican1812 at hotmail.com (alican) Date: Thu, 7 Dec 2017 13:23:35 -0700 (MST) Subject: [vtkusers] How to add a new point to existing(!) vtkPolydata. Cannot find an answer! Message-ID: <1512678215670-0.post@n5.nabble.com> I have looked into docs and examples, I have read a lot on this forum, there are options to delete points or cells, to replace a point or a cell, but no option to add. I know how to add point to a new polydata. I figured out that I can add a point to a new polydata and then use vtkAppendFilter. But it seems too complicate for so simple a task. So what should I do if I want to add a point or cell to existing polydata? Isn't there a simpler way? If it is a dumb question and I am missing something obvious, I am sorry. AC -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From andy.bauer at kitware.com Thu Dec 7 16:07:43 2017 From: andy.bauer at kitware.com (Andy Bauer) Date: Thu, 7 Dec 2017 16:07:43 -0500 Subject: [vtkusers] How to add a new point to existing(!) vtkPolydata. Cannot find an answer! In-Reply-To: <1512678215670-0.post@n5.nabble.com> References: <1512678215670-0.post@n5.nabble.com> Message-ID: Hi AC, >From a vtkPolyData (or any vtkPointSet) you'll want get the polydata's vtkPoints object through GetPoints() and on that object you can call InsertNextPoint(). To insert another cell into a polydata use the InsertNextCell() method on vtkPolyData. Keep in mind that for the VTK pipeline though that it's expected that filters do NOT modify their inputs. On Thu, Dec 7, 2017 at 3:23 PM, alican wrote: > I have looked into docs and examples, I have read a lot on this forum, > there > are options to delete points or cells, to replace a point or a cell, but no > option to add. I know how to add point to a new polydata. > I figured out that I can add a point to a new polydata and then use > vtkAppendFilter. > But it seems too complicate for so simple a task. > > So what should I do if I want to add a point or cell to existing polydata? > Isn't there a simpler way? > > If it is a dumb question and I am missing something obvious, I am sorry. > AC > > > > -- > 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 stephen.langer at nist.gov Thu Dec 7 16:51:04 2017 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Thu, 7 Dec 2017 21:51:04 +0000 Subject: [vtkusers] Antialiasing questions on 8.1.0.rc2 Message-ID: Hi -- I'm trying out 8.1.0.rc2 and it says that antialiasing with vtkRenderWindow::SetAAFrames is deprecated, so I tried using SetMultiSamples instead. If I set a non-trivial number of samples before the first call to Render, it works, but if I change the the number of samples and call Render again, it has no effect. Is this expected? Do I have to do something else to get the sampling to change? This is using vtkCocoaRenderWindow. Is there a different substitute for SetAAFrames? SetMultiSamples also has no effect on a Linux VM where I'm using vtkXOpenGLRenderWindow. I'm guessing that's because the VM has no hardware graphics acceleration. Is there a non-deprecated replacement for SetAAFrames that doesn't rely on hardware? Thanks. -- Steve From alican1812 at hotmail.com Thu Dec 7 18:12:53 2017 From: alican1812 at hotmail.com (alican) Date: Thu, 7 Dec 2017 16:12:53 -0700 (MST) Subject: [vtkusers] How to add a new point to existing(!) vtkPolydata. Cannot find an answer! In-Reply-To: References: <1512678215670-0.post@n5.nabble.com> Message-ID: <1512688373503-0.post@n5.nabble.com> Thanks Andy, Obvious, as I was suspecting. Sometimes more work hours doesn't mean more work done. Sorry again for polluting the forum. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From andy.bauer at kitware.com Thu Dec 7 18:45:05 2017 From: andy.bauer at kitware.com (Andy Bauer) Date: Thu, 7 Dec 2017 18:45:05 -0500 Subject: [vtkusers] How to add a new point to existing(!) vtkPolydata. Cannot find an answer! In-Reply-To: <1512688373503-0.post@n5.nabble.com> References: <1512678215670-0.post@n5.nabble.com> <1512688373503-0.post@n5.nabble.com> Message-ID: Glad to help. I think your question was very appropriate for the VTK users mailing list -- easy once you see it but possibly a bit hard to find without knowing exactly what you're looking for. On Thu, Dec 7, 2017 at 6:12 PM, alican wrote: > Thanks Andy, > Obvious, as I was suspecting. > Sometimes more work hours doesn't mean more work done. Sorry again for > polluting the forum. > > > > -- > 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 tossin at gmail.com Thu Dec 7 19:58:31 2017 From: tossin at gmail.com (Evan Kao) Date: Thu, 7 Dec 2017 16:58:31 -0800 Subject: [vtkusers] vtkCutter equivalent that doesn't automatically triangulate? In-Reply-To: References: Message-ID: Thanks for the quick reply. I think it's a little different from I what I want to do though, which is to specifically slice a vtkUnstructuredGrid to get 2D cross sections. - Evan Kao On Thu, Dec 7, 2017 at 11:37 AM, Bill Lorensen wrote: > vtkClipPolyData > > See > https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/ > ClipSphereCylinder/ > > Bill > > On Thu, Dec 7, 2017 at 1:48 PM, Evan Kao wrote: > > Hello all, > > > > Is there a "slicing" filter like vtkCutter that keeps the original cells > > without triangulation? I know for clipping filters, > > vtkTableBasedClipDataSet keeps the original cell connectivity for > unclipped > > cells without tetrahedralization like vtkClipDataSet does. Is there an > > equivalent for slicing? > > > > If not, are there any ways to recover the original connectivity after > > slicing? > > > > Thanks for your time, > > Evan Kao > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 bill.lorensen at gmail.com Thu Dec 7 20:07:50 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 Dec 2017 20:07:50 -0500 Subject: [vtkusers] vtkCutter equivalent that doesn't automatically triangulate? In-Reply-To: References: Message-ID: What cells are in your UnstructuredGrid? On Thu, Dec 7, 2017 at 7:58 PM, Evan Kao wrote: > Thanks for the quick reply. I think it's a little different from I what I > want to do though, which is to specifically slice a vtkUnstructuredGrid to > get 2D cross sections. > > - Evan Kao > > On Thu, Dec 7, 2017 at 11:37 AM, Bill Lorensen > wrote: >> >> vtkClipPolyData >> >> See >> >> https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/ClipSphereCylinder/ >> >> Bill >> >> On Thu, Dec 7, 2017 at 1:48 PM, Evan Kao wrote: >> > Hello all, >> > >> > Is there a "slicing" filter like vtkCutter that keeps the original cells >> > without triangulation? I know for clipping filters, >> > vtkTableBasedClipDataSet keeps the original cell connectivity for >> > unclipped >> > cells without tetrahedralization like vtkClipDataSet does. Is there an >> > equivalent for slicing? >> > >> > If not, are there any ways to recover the original connectivity after >> > slicing? >> > >> > Thanks for your time, >> > Evan Kao >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Thu Dec 7 20:08:52 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 Dec 2017 20:08:52 -0500 Subject: [vtkusers] vtkCutter equivalent that doesn't automatically triangulate? In-Reply-To: References: Message-ID: You could probe the unstructured grid with a vtkPlaneSource. On Thu, Dec 7, 2017 at 8:07 PM, Bill Lorensen wrote: > What cells are in your UnstructuredGrid? > > > On Thu, Dec 7, 2017 at 7:58 PM, Evan Kao wrote: >> Thanks for the quick reply. I think it's a little different from I what I >> want to do though, which is to specifically slice a vtkUnstructuredGrid to >> get 2D cross sections. >> >> - Evan Kao >> >> On Thu, Dec 7, 2017 at 11:37 AM, Bill Lorensen >> wrote: >>> >>> vtkClipPolyData >>> >>> See >>> >>> https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/ClipSphereCylinder/ >>> >>> Bill >>> >>> On Thu, Dec 7, 2017 at 1:48 PM, Evan Kao wrote: >>> > Hello all, >>> > >>> > Is there a "slicing" filter like vtkCutter that keeps the original cells >>> > without triangulation? I know for clipping filters, >>> > vtkTableBasedClipDataSet keeps the original cell connectivity for >>> > unclipped >>> > cells without tetrahedralization like vtkClipDataSet does. Is there an >>> > equivalent for slicing? >>> > >>> > If not, are there any ways to recover the original connectivity after >>> > slicing? >>> > >>> > Thanks for your time, >>> > Evan Kao >>> > >>> > _______________________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Please keep messages on-topic and check the VTK FAQ at: >>> > http://www.vtk.org/Wiki/VTK_FAQ >>> > >>> > Search the list archives at: http://markmail.org/search/?q=vtkusers >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/vtkusers >>> > >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >> >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From amine.aboufirass at gmail.com Fri Dec 8 02:43:12 2017 From: amine.aboufirass at gmail.com (Amine Aboufirass) Date: Fri, 8 Dec 2017 08:43:12 +0100 Subject: [vtkusers] Getting 0 response for all my questions Message-ID: Hello, In the last month or so, I have sent over 4 detailed messages with legitimate queries on vtk functionality to the vtk users mailing list, the vtk developers mailing list and also the kitware support line. The kitware support always either 1) refer me back to the mailing lists or 2) propose paid support. I am getting no support from the users/developers mailing list. Some of the questions I hve been sending include the following: - subject: ExtractByLocation (sent on 01-Dec-2017) - subject: write unstructured grid vtk file to query-able database format (sent in 11-Nov-2017) - subject: trying to extract points by location (sent in 11-Nov-2017) - subject: Extracting selection from UnstructuredGridDataset using python (sent in 16-Nov-2017) I believe my questions are appropriate for the mailing list and I do not understand why they are not getting any response. I have also checked the mailing list options to make sure I am not blocking responses and I don't think I am. Is vtk an open source tool? or does one need to be part of some special community to receive support for basic functionality which comes with the free package? Thanks for your consideration and look forward to hearing from you. Regards, Amine -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Fri Dec 8 03:30:14 2017 From: nztoddler at yahoo.com (Todd) Date: Fri, 08 Dec 2017 21:30:14 +1300 Subject: [vtkusers] [vtk-developers] Getting 0 response for all my questions In-Reply-To: Message-ID: <0855cf13-11a4-427d-82df-943f20db3a86@email.android.com> An HTML attachment was scrubbed... URL: From pkorir at ebi.ac.uk Fri Dec 8 04:18:27 2017 From: pkorir at ebi.ac.uk (Paul Korir) Date: Fri, 8 Dec 2017 09:18:27 +0000 Subject: [vtkusers] [vtk-developers] Getting 0 response for all my questions In-Reply-To: <0855cf13-11a4-427d-82df-943f20db3a86@email.android.com> References: <0855cf13-11a4-427d-82df-943f20db3a86@email.android.com> Message-ID: Dear Amine, While Todd's response is logically correct, I think it is heartless and undermines the whole point of an open source community. I can understand your disappointment that you have not received any response. It might even be because, as Todd stated, that your queries are too broad. However, I think with a bit more info you can put yourself if a better position by going through the examples in the now freely available documentation which is of a very high standard. It seems to me that within the documentation you can find good enough hints to your questions to solve them or ultimately frame them in a way that invites more responses. Don't despair. Keep at it. For every heartless comment there will be some that spur you on to keep going. Best wishes, Paul K. Korir, PhD Scientific Programmer EMBL-EBI 01223494422 On 08/12/2017 08:30, Todd via vtkusers wrote: > Hi Amine > > Since it is a mailing list and not a support service, no one is > obliged to respond at all. > > I would suppose your questions are too general. > > > On 8 Dec 2017 8:43 p.m., Amine Aboufirass > wrote: > > Hello, > > In the last month or so, I have sent over 4 detailed messages with > legitimate queries on vtk functionality to the vtk users mailing > list, the vtk developers mailing list and also the kitware support > line. The kitware support always either 1)? refer me back to the > mailing lists or 2) propose paid support. I am getting no support > from the users/developers mailing list. > > Some of the questions I hve been sending include the following: > > * subject: ExtractByLocation (sent on 01-Dec-2017) > * subject: write unstructured grid vtk file to query-able > database format (sent in 11-Nov-2017) > * subject: trying to extract points by location (sent in > 11-Nov-2017) > * ?subject: Extracting selection from UnstructuredGridDataset > using python (sent in 16-Nov-2017) > > I believe my questions are appropriate for the mailing list and I > do not understand why they are not getting any response. I have > also checked the mailing list options to make sure I am not > blocking responses and I don't think I am. > > Is vtk an open source tool? or does one need to be part of some > special community to receive support for basic functionality which > comes with the free package? > > Thanks for your consideration and look forward to hearing from you. > > Regards, > > Amine > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 nztoddler at yahoo.com Fri Dec 8 04:56:50 2017 From: nztoddler at yahoo.com (Todd) Date: Fri, 08 Dec 2017 22:56:50 +1300 Subject: [vtkusers] [vtk-developers] Getting 0 response for all my questions In-Reply-To: Message-ID: <7d368890-8fcf-41c8-b6ec-a74a571b0a3d@email.android.com> An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Dec 8 06:12:39 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 8 Dec 2017 06:12:39 -0500 Subject: [vtkusers] [vtk-developers] Getting 0 response for all my questions In-Reply-To: <7d368890-8fcf-41c8-b6ec-a74a571b0a3d@email.android.com> References: <7d368890-8fcf-41c8-b6ec-a74a571b0a3d@email.android.com> Message-ID: Also, almost of the examples in the VTK Book have been translated to C++ and Python. The C++ examples are here: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ he VTKExamples has hundreds for examples, mainly C++ and Python. https://lorensen.github.io/VTKExamples/site/Cxx/ Enjoy, Bill On Fri, Dec 8, 2017 at 4:56 AM, Todd via vtkusers wrote: > Hi Paul > > My response was not intended to be heartless. I was merely pointing out that > people on the mailing list may simply ignore questions which are not > specific and that is what appears to be happening. I made no judgment on > whether that was reasonable. > > On 8 Dec 2017 10:18 p.m., Paul Korir wrote: > > Dear Amine, > > While Todd's response is logically correct, I think it is heartless and > undermines the whole point of an open source community. > > I can understand your disappointment that you have not received any > response. It might even be because, as Todd stated, that your queries are > too broad. However, I think with a bit more info you can put yourself if a > better position by going through the examples in the now freely available > documentation which is of a very high standard. It seems to me that within > the documentation you can find good enough hints to your questions to solve > them or ultimately frame them in a way that invites more responses. > > Don't despair. Keep at it. For every heartless comment there will be some > that spur you on to keep going. > > Best wishes, > > Paul K. Korir, PhD > Scientific Programmer > EMBL-EBI > 01223494422 > > On 08/12/2017 08:30, Todd via vtkusers wrote: > > Hi Amine > > Since it is a mailing list and not a support service, no one is obliged to > respond at all. > > I would suppose your questions are too general. > > > On 8 Dec 2017 8:43 p.m., Amine Aboufirass > wrote: > > Hello, > > In the last month or so, I have sent over 4 detailed messages with > legitimate queries on vtk functionality to the vtk users mailing list, the > vtk developers mailing list and also the kitware support line. The kitware > support always either 1) refer me back to the mailing lists or 2) propose > paid support. I am getting no support from the users/developers mailing > list. > > Some of the questions I hve been sending include the following: > > subject: ExtractByLocation (sent on 01-Dec-2017) > subject: write unstructured grid vtk file to query-able database format > (sent in 11-Nov-2017) > subject: trying to extract points by location (sent in 11-Nov-2017) > subject: Extracting selection from UnstructuredGridDataset using python > (sent in 16-Nov-2017) > > I believe my questions are appropriate for the mailing list and I do not > understand why they are not getting any response. I have also checked the > mailing list options to make sure I am not blocking responses and I don't > think I am. > > Is vtk an open source tool? or does one need to be part of some special > community to receive support for basic functionality which comes with the > free package? > > Thanks for your consideration and look forward to hearing from you. > > Regards, > > Amine > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From amine.aboufirass at gmail.com Fri Dec 8 07:11:35 2017 From: amine.aboufirass at gmail.com (Amine Aboufirass) Date: Fri, 8 Dec 2017 13:11:35 +0100 Subject: [vtkusers] [vtk-developers] Getting 0 response for all my questions In-Reply-To: References: <7d368890-8fcf-41c8-b6ec-a74a571b0a3d@email.android.com> Message-ID: Hi All, Thanks for your responses. I do make good use of the documentation. Let's see how far I can get. Regards, Amine On Fri, Dec 8, 2017 at 12:12 PM, Bill Lorensen wrote: > Also, almost of the examples in the VTK Book have been translated to > C++ and Python. The C++ examples are here: > https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ > > he VTKExamples has hundreds for examples, mainly C++ and Python. > https://lorensen.github.io/VTKExamples/site/Cxx/ > > Enjoy, > > Bill > > On Fri, Dec 8, 2017 at 4:56 AM, Todd via vtkusers > wrote: > > Hi Paul > > > > My response was not intended to be heartless. I was merely pointing out > that > > people on the mailing list may simply ignore questions which are not > > specific and that is what appears to be happening. I made no judgment on > > whether that was reasonable. > > > > On 8 Dec 2017 10:18 p.m., Paul Korir wrote: > > > > Dear Amine, > > > > While Todd's response is logically correct, I think it is heartless and > > undermines the whole point of an open source community. > > > > I can understand your disappointment that you have not received any > > response. It might even be because, as Todd stated, that your queries are > > too broad. However, I think with a bit more info you can put yourself if > a > > better position by going through the examples in the now freely available > > documentation which is of a very high standard. It seems to me that > within > > the documentation you can find good enough hints to your questions to > solve > > them or ultimately frame them in a way that invites more responses. > > > > Don't despair. Keep at it. For every heartless comment there will be some > > that spur you on to keep going. > > > > Best wishes, > > > > Paul K. Korir, PhD > > Scientific Programmer > > EMBL-EBI > > 01223494422 > > > > On 08/12/2017 08:30, Todd via vtkusers wrote: > > > > Hi Amine > > > > Since it is a mailing list and not a support service, no one is obliged > to > > respond at all. > > > > I would suppose your questions are too general. > > > > > > On 8 Dec 2017 8:43 p.m., Amine Aboufirass > > wrote: > > > > Hello, > > > > In the last month or so, I have sent over 4 detailed messages with > > legitimate queries on vtk functionality to the vtk users mailing list, > the > > vtk developers mailing list and also the kitware support line. The > kitware > > support always either 1) refer me back to the mailing lists or 2) > propose > > paid support. I am getting no support from the users/developers mailing > > list. > > > > Some of the questions I hve been sending include the following: > > > > subject: ExtractByLocation (sent on 01-Dec-2017) > > subject: write unstructured grid vtk file to query-able database format > > (sent in 11-Nov-2017) > > subject: trying to extract points by location (sent in 11-Nov-2017) > > subject: Extracting selection from UnstructuredGridDataset using python > > (sent in 16-Nov-2017) > > > > I believe my questions are appropriate for the mailing list and I do not > > understand why they are not getting any response. I have also checked the > > mailing list options to make sure I am not blocking responses and I don't > > think I am. > > > > Is vtk an open source tool? or does one need to be part of some special > > community to receive support for basic functionality which comes with the > > free package? > > > > Thanks for your consideration and look forward to hearing from you. > > > > Regards, > > > > Amine > > > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 ken.martin at kitware.com Fri Dec 8 08:54:42 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 8 Dec 2017 08:54:42 -0500 Subject: [vtkusers] Antialiasing questions on 8.1.0.rc2 In-Reply-To: References: Message-ID: See this post https://blog.kitware.com/new-fxaa-anti-aliasing-option-in-paraviewvtk/ which talks about using FXAA in Paraview, but the support is built into VTK via https://www.vtk.org/doc/nightly/html/classvtkRenderer.html#a3f46ed85e17e5e297e6c3b02be07ebba Other options include SSAA an example of which is shown here https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/Testing/Cxx/TestSSAAPass.cxx Both should be faster than the old AAFrames approach. FXAA will be very fast, almost free, SSAA will be slower than FXAA and depends on its settings, as it is a more brute force approach,. But even SSAA should be faster than the old AA frames approach. Thanks! Ken On Thu, Dec 7, 2017 at 4:51 PM, Langer, Stephen A. (Fed) < stephen.langer at nist.gov> wrote: > Hi -- > > I'm trying out 8.1.0.rc2 and it says that antialiasing with > vtkRenderWindow::SetAAFrames is deprecated, so I tried using > SetMultiSamples instead. If I set a non-trivial number of samples before > the first call to Render, it works, but if I change the the number of > samples and call Render again, it has no effect. Is this expected? Do I > have to do something else to get the sampling to change? This is using > vtkCocoaRenderWindow. > > Is there a different substitute for SetAAFrames? SetMultiSamples also has > no effect on a Linux VM where I'm using vtkXOpenGLRenderWindow. I'm > guessing that's because the VM has no hardware graphics acceleration. Is > there a non-deprecated replacement for SetAAFrames that doesn't rely on > hardware? > > 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 > -- 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 beatrix.schober at gmail.com Fri Dec 8 09:34:07 2017 From: beatrix.schober at gmail.com (Beatrix Schober) Date: Fri, 8 Dec 2017 15:34:07 +0100 Subject: [vtkusers] vtkLookupTable reacts to rotating actor Message-ID: Hi, I am wondering how to solve following problem: I have vtkPolyData (with x, y, z values, whereas z values as grayvalue defines the "height") and use the vtkLookupTable to display the points in colors (heatmap). If I rotate or translate the actor with the mouse, the data does not change, but the lookup table is not correct any more. The same issue with calling scale on the actor. I also thought about changing the z value of vtkPolyData after scaling, but still I do not know, how to handle the rotation or translation of the actor with the mouse... How can I adapt the lookup table, which should fit the scale then? Thank you very much for your hints! -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Dec 8 09:44:11 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 8 Dec 2017 09:44:11 -0500 Subject: [vtkusers] write unstructured grid vtk file to query-able database format In-Reply-To: References: Message-ID: Amine, I don't believe there is anything in VTK to do what you are seeking. You are right that the database connectivity is mainly for querying an existing database. However, you *might* be able to write queries that write to the database with statements such as 'INSERT INTO table_name (col1, col2, ...) VALUES (val1, val2, ...)'. I haven't tried it, though, so caveat emptor. You'll have to set up the database tables beforehand in some way to store the points, which you might be able to do with SQL 'create table' statements, and then iterate through the points and add them into the database. With all that work, however, you might be better off just iterating through the points and extracting the data with Python directly. Are you familiar with the numpy interface to VTK? If you use are experienced with numpy, that might be the best way to select points and process the numeric data at those points. See the blog post starting at https://blog.kitware.com/improved-vtk-numpy-integration/ for more details on this interface. HTH, Cory On Fri, Nov 17, 2017 at 3:40 PM, Amine Aboufirass wrote: > Hello, > > I would like to find out if there is a way to write unstructured grid vtk > files containing scalar, tensor or vector data to any standard database > format. This could be SQLite, JSON or XML for example. > > The reason for this is that I would like to conduct queries on the data > contained in the vtk file. I have no need to create new geometries or select > by frustum for example. I need only basic SQL select-where type > functionality where I can query and extract numerical data based on simple > conditions. > > I saw that the vtk file contains some SQL readiness but as far as I can tell > the tools are mainly to connect to an SQL database and extract data from it. > I seek to go the other way, namely to start with an unstructured grid vtk > dataset and write that into a database. > > The following examples look promising > > https://lorensen.github.io/VTKExamples/site/Cxx/Databases/SQL/MySQL/CreateDatabase/ > https://lorensen.github.io/VTKExamples/site/Cxx/Databases/SQL/MySQL/WriteToDatabase/ > > But I have no C++ background and use mainly Python. Furthermore I'm not sure > if the above applies for Unstructured grid data. > > Could anyone please enlighten me on this? > > Thanks, > > Amine > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From cory.quammen at kitware.com Fri Dec 8 10:07:19 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 8 Dec 2017 10:07:19 -0500 Subject: [vtkusers] [vtk-developers] Getting 0 response for all my questions In-Reply-To: References: <7d368890-8fcf-41c8-b6ec-a74a571b0a3d@email.android.com> Message-ID: Amine, People on the email list do our best to respond to questions as we have time and based on our expertise in certain parts of the very large VTK library, but unfortunately, we can't get to all of them. I would guess that most people who use VTK are not that familiar with the selection infrastructure you are trying to use, hence, to respond with cogent information might take someone a good amount of time. I saw your questions, but didn't know the answers off the top of my head, so I couldn't respond. The same is most likely true of other readers of this list. If detailed questions don't get a response, you might also have luck asking a brief, high-level question. It seems you are trying to query points based on their location. You might ask "how do I select points in VTK meshes to extract information about those points?" That's a bit easier to answer because different people on the list can chime in with how they do it, either through Numpy, the selection mechanism, or just iterating over points using Python. Finally, members of a healthy mailing list both ask and answer questions. If you see questions on the mailing list that you know the answer to, please feel free to answer them. That builds goodwill, and more practically may free up other VTK community members to answer your questions. I hope that helps, Cory On Fri, Dec 8, 2017 at 7:11 AM, Amine Aboufirass wrote: > Hi All, > > Thanks for your responses. I do make good use of the documentation. Let's > see how far I can get. > > Regards, > > Amine > > > > > On Fri, Dec 8, 2017 at 12:12 PM, Bill Lorensen > wrote: >> >> Also, almost of the examples in the VTK Book have been translated to >> C++ and Python. The C++ examples are here: >> https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ >> >> he VTKExamples has hundreds for examples, mainly C++ and Python. >> https://lorensen.github.io/VTKExamples/site/Cxx/ >> >> Enjoy, >> >> Bill >> >> On Fri, Dec 8, 2017 at 4:56 AM, Todd via vtkusers >> wrote: >> > Hi Paul >> > >> > My response was not intended to be heartless. I was merely pointing out >> > that >> > people on the mailing list may simply ignore questions which are not >> > specific and that is what appears to be happening. I made no judgment on >> > whether that was reasonable. >> > >> > On 8 Dec 2017 10:18 p.m., Paul Korir wrote: >> > >> > Dear Amine, >> > >> > While Todd's response is logically correct, I think it is heartless and >> > undermines the whole point of an open source community. >> > >> > I can understand your disappointment that you have not received any >> > response. It might even be because, as Todd stated, that your queries >> > are >> > too broad. However, I think with a bit more info you can put yourself if >> > a >> > better position by going through the examples in the now freely >> > available >> > documentation which is of a very high standard. It seems to me that >> > within >> > the documentation you can find good enough hints to your questions to >> > solve >> > them or ultimately frame them in a way that invites more responses. >> > >> > Don't despair. Keep at it. For every heartless comment there will be >> > some >> > that spur you on to keep going. >> > >> > Best wishes, >> > >> > Paul K. Korir, PhD >> > Scientific Programmer >> > EMBL-EBI >> > 01223494422 >> > >> > On 08/12/2017 08:30, Todd via vtkusers wrote: >> > >> > Hi Amine >> > >> > Since it is a mailing list and not a support service, no one is obliged >> > to >> > respond at all. >> > >> > I would suppose your questions are too general. >> > >> > >> > On 8 Dec 2017 8:43 p.m., Amine Aboufirass >> > wrote: >> > >> > Hello, >> > >> > In the last month or so, I have sent over 4 detailed messages with >> > legitimate queries on vtk functionality to the vtk users mailing list, >> > the >> > vtk developers mailing list and also the kitware support line. The >> > kitware >> > support always either 1) refer me back to the mailing lists or 2) >> > propose >> > paid support. I am getting no support from the users/developers mailing >> > list. >> > >> > Some of the questions I hve been sending include the following: >> > >> > subject: ExtractByLocation (sent on 01-Dec-2017) >> > subject: write unstructured grid vtk file to query-able database format >> > (sent in 11-Nov-2017) >> > subject: trying to extract points by location (sent in 11-Nov-2017) >> > subject: Extracting selection from UnstructuredGridDataset using python >> > (sent in 16-Nov-2017) >> > >> > I believe my questions are appropriate for the mailing list and I do not >> > understand why they are not getting any response. I have also checked >> > the >> > mailing list options to make sure I am not blocking responses and I >> > don't >> > think I am. >> > >> > Is vtk an open source tool? or does one need to be part of some special >> > community to receive support for basic functionality which comes with >> > the >> > free package? >> > >> > Thanks for your consideration and look forward to hearing from you. >> > >> > Regards, >> > >> > Amine >> > >> > >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > 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 > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From cory.quammen at kitware.com Fri Dec 8 10:14:17 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 8 Dec 2017 10:14:17 -0500 Subject: [vtkusers] vtkLookupTable reacts to rotating actor In-Reply-To: References: Message-ID: Hmm, I'm not sure I understand what you want to see. Do you want the colors on the polydata to change so that they correspond to the z value after rotating or translating the actor? On Fri, Dec 8, 2017 at 9:34 AM, Beatrix Schober wrote: > Hi, > > I am wondering how to solve following problem: > > I have vtkPolyData (with x, y, z values, whereas z values as grayvalue > defines the "height") and use the vtkLookupTable to display the points in > colors (heatmap). > > If I rotate or translate the actor with the mouse, the data does not change, > but the lookup table is not correct any more. The same issue with calling > scale on the actor. > > I also thought about changing the z value of vtkPolyData after scaling, but > still I do not know, how to handle the rotation or translation of the actor > with the mouse... > > How can I adapt the lookup table, which should fit the scale then? > > Thank you very much for your hints! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From lasso at queensu.ca Fri Dec 8 10:49:55 2017 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 8 Dec 2017 15:49:55 +0000 Subject: [vtkusers] [vtk-developers] Getting 0 response for all my questions In-Reply-To: References: <7d368890-8fcf-41c8-b6ec-a74a571b0a3d@email.android.com> Message-ID: On VTK-users list, only 60-70% of posts get responses on average (I?ve just checked recent posts on nabble). Maybe those 30-40% of questions shouldn?t have been asked. Considering the outstanding textbook, examples, and API documentation of VTK, asking easy questions is generally not justified. Some other questions may be too difficult or too broad or too specific. However, the person who asks the question may not realize that the question is bad. Just getting some boilerplate text answer that explains what the problem with the question is, would be great help. It would give a chance for the user to give more details, to know where to start looking for that information instead of just waiting, etc. Quality of questions could be also improved by adding ?Read before posting? info to https://www.vtk.org/mailing-lists/ page to improve quality of questions (http://www.cplusplus.com/forum/beginner/1/ could be a good starting point). In addition to emails, offering a modern, rich web interface (such as Discourse; instead of mailman and nabble) would also make reading and answering questions more pleasant experience for many. What users could do: Others in this thread had some good suggestions. Also, check out ?Read before posting? guidelines of other mailing lists. Finally, you may write to more specific forums. For example, forums of applications that are based on VTK. If you do medical image computing then you can ask on 3D Slicer, MITK, ITK-Snap mailing list, how that particular problem can be solved using that that application (you can then either use that application or use their source code as example). Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Amine Aboufirass Sent: Friday, December 8, 2017 7:12 AM To: Bill Lorensen Cc: VTK Users Subject: Re: [vtkusers] [vtk-developers] Getting 0 response for all my questions Hi All, Thanks for your responses. I do make good use of the documentation. Let's see how far I can get. Regards, Amine On Fri, Dec 8, 2017 at 12:12 PM, Bill Lorensen > wrote: Also, almost of the examples in the VTK Book have been translated to C++ and Python. The C++ examples are here: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ he VTKExamples has hundreds for examples, mainly C++ and Python. https://lorensen.github.io/VTKExamples/site/Cxx/ Enjoy, Bill On Fri, Dec 8, 2017 at 4:56 AM, Todd via vtkusers > wrote: > Hi Paul > > My response was not intended to be heartless. I was merely pointing out that > people on the mailing list may simply ignore questions which are not > specific and that is what appears to be happening. I made no judgment on > whether that was reasonable. > > On 8 Dec 2017 10:18 p.m., Paul Korir > wrote: > > Dear Amine, > > While Todd's response is logically correct, I think it is heartless and > undermines the whole point of an open source community. > > I can understand your disappointment that you have not received any > response. It might even be because, as Todd stated, that your queries are > too broad. However, I think with a bit more info you can put yourself if a > better position by going through the examples in the now freely available > documentation which is of a very high standard. It seems to me that within > the documentation you can find good enough hints to your questions to solve > them or ultimately frame them in a way that invites more responses. > > Don't despair. Keep at it. For every heartless comment there will be some > that spur you on to keep going. > > Best wishes, > > Paul K. Korir, PhD > Scientific Programmer > EMBL-EBI > 01223494422 > > On 08/12/2017 08:30, Todd via vtkusers wrote: > > Hi Amine > > Since it is a mailing list and not a support service, no one is obliged to > respond at all. > > I would suppose your questions are too general. > > > On 8 Dec 2017 8:43 p.m., Amine Aboufirass > > wrote: > > Hello, > > In the last month or so, I have sent over 4 detailed messages with > legitimate queries on vtk functionality to the vtk users mailing list, the > vtk developers mailing list and also the kitware support line. The kitware > support always either 1) refer me back to the mailing lists or 2) propose > paid support. I am getting no support from the users/developers mailing > list. > > Some of the questions I hve been sending include the following: > > subject: ExtractByLocation (sent on 01-Dec-2017) > subject: write unstructured grid vtk file to query-able database format > (sent in 11-Nov-2017) > subject: trying to extract points by location (sent in 11-Nov-2017) > subject: Extracting selection from UnstructuredGridDataset using python > (sent in 16-Nov-2017) > > I believe my questions are appropriate for the mailing list and I do not > understand why they are not getting any response. I have also checked the > mailing list options to make sure I am not blocking responses and I don't > think I am. > > Is vtk an open source tool? or does one need to be part of some special > community to receive support for basic functionality which comes with the > free package? > > Thanks for your consideration and look forward to hearing from you. > > Regards, > > Amine > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 sean at rogue-research.com Fri Dec 8 10:54:26 2017 From: sean at rogue-research.com (Sean McBride) Date: Fri, 8 Dec 2017 10:54:26 -0500 Subject: [vtkusers] vtkGL2PSExporter crashes In-Reply-To: References: Message-ID: <20171208155426.1620201755@mail.rogue-research.com> On Fri, 5 May 2017 20:18:51 +0200, Amine Aboufirass said: >Allright. So in order to be a part of this mailing list, ask questions, >receive answers but not necessarily have to deal with a barrage of >10+emails a day what can a person do? > >I'm interested in being a part of the mailing list but I really don't need >to receive every single communication that happens on it... Somebody help >please. If everyone had that attitude there would be nobody left to read your messages, or anyone else's. :( The idea is that members at least scan the subjects to see if there's discussion that they can help with. There's no one here who's job it is to read and respond to messages. You should be able to create a folder and filter your email there so it doesn't clutter your inbox. You might also want to read this oldie but goodie: Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From lasso at queensu.ca Fri Dec 8 11:04:56 2017 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 8 Dec 2017 16:04:56 +0000 Subject: [vtkusers] vtkGL2PSExporter crashes In-Reply-To: <20171208155426.1620201755@mail.rogue-research.com> References: <20171208155426.1620201755@mail.rogue-research.com> Message-ID: Actually, the solution is to switch from mailing list to forum. One of the key advantages of forums that you can watch particular categories or topics. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Sean McBride Sent: Friday, December 8, 2017 10:54 AM To: Amine Aboufirass ; rakesh patil Cc: VTK Users Subject: Re: [vtkusers] vtkGL2PSExporter crashes On Fri, 5 May 2017 20:18:51 +0200, Amine Aboufirass said: >Allright. So in order to be a part of this mailing list, ask questions, >receive answers but not necessarily have to deal with a barrage of >10+emails a day what can a person do? > >I'm interested in being a part of the mailing list but I really don't >need to receive every single communication that happens on it... >Somebody help please. If everyone had that attitude there would be nobody left to read your messages, or anyone else's. :( The idea is that members at least scan the subjects to see if there's discussion that they can help with. There's no one here who's job it is to read and respond to messages. You should be able to create a folder and filter your email there so it doesn't clutter your inbox. You might also want to read this oldie but goodie: Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research https://na01.safelinks.protection.outlook.com/?url=www.rogue-research.com&data=02%7C01%7Classo%40queensu.ca%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=G7GEy9YJ2VU16%2Fx91vCx17odqOanhscpiuZzO08dKHg%3D&reserved=0 Mac Software Developer Montr?al, Qu?bec, Canada _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=G76iyhyL6NaI3O1wSPiTZnkEhV86U1xF0RameFHhWIU%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%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=JXMmtAr%2BOPKAzlgij5lFwk6AGldNssRXpaMTj7F3EWM%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%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=ld0mXo1n4wDdjZ7C6uQjrjeplkkDL5XUP6zxhqzLHNY%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%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=08SVaUh%2BI6cYkS1z1ynTW2K%2Fv5F5zF0qnwAtnEljGlk%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%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=JPUU6qgB9YemKfYNI%2B%2FnhT337s2JTY%2FiCSTFuULIvwU%3D&reserved=0 From f.nellmeldin at open-engineering.com Fri Dec 8 11:11:51 2017 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Fri, 8 Dec 2017 17:11:51 +0100 Subject: [vtkusers] vtkCutter equivalent that doesn't automatically triangulate? Message-ID: Hello I had to do this for our project. I have the plane source to cut the mesh, and the output of the slice in a vtkTableBasedClipDataSet. This is my pipeline: vtkPlaneSource -> vtkCutter vtkTableBasedClipDataSet -> vtkCutter -> vtkCleanUnstructuredGrid -> vtkXMLUnstructuredGridWriter The trick here is to use vtkCleanUnstructuredGrid which is a class I obtained from ParaView code. You can follow my discussion here: https://public.kitware.com/pipermail/vtkusers/2017-October/100018.html Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Dec 8 12:30:27 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 8 Dec 2017 12:30:27 -0500 Subject: [vtkusers] vtkGL2PSExporter crashes In-Reply-To: References: <20171208155426.1620201755@mail.rogue-research.com> Message-ID: Personally I don't care for the forum. I use gmail filters to organize my email. Too old to change... On Dec 8, 2017 11:05 AM, "Andras Lasso" wrote: > Actually, the solution is to switch from mailing list to forum. One of the > key advantages of forums that you can watch particular categories or topics. > > Andras > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Sean McBride > Sent: Friday, December 8, 2017 10:54 AM > To: Amine Aboufirass ; rakesh patil < > prakeshofficial at gmail.com> > Cc: VTK Users > Subject: Re: [vtkusers] vtkGL2PSExporter crashes > > On Fri, 5 May 2017 20:18:51 +0200, Amine Aboufirass said: > > >Allright. So in order to be a part of this mailing list, ask questions, > >receive answers but not necessarily have to deal with a barrage of > >10+emails a day what can a person do? > > > >I'm interested in being a part of the mailing list but I really don't > >need to receive every single communication that happens on it... > >Somebody help please. > > If everyone had that attitude there would be nobody left to read your > messages, or anyone else's. :( The idea is that members at least scan the > subjects to see if there's discussion that they can help with. There's no > one here who's job it is to read and respond to messages. > > You should be able to create a folder and filter your email there so it > doesn't clutter your inbox. > > You might also want to read this oldie but goodie: > http:%2F%2Fcatb.org%2F~esr%2Ffaqs%2Fsmart-questions.html& > data=02%7C01%7Classo%40queensu.ca%7C376eba4fbae84c66983208d53e54e569% > 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata= > rcU4AWs7JoUYd7NVLXQYxCC%2BJlANQtGsR6l4AaKqIzQ%3D&reserved=0> > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research https://na01.safelinks. > protection.outlook.com/?url=www.rogue-research.com&data= > 02%7C01%7Classo%40queensu.ca%7C376eba4fbae84c66983208d53e54e569% > 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata= > G7GEy9YJ2VU16%2Fx91vCx17odqOanhscpiuZzO08dKHg%3D&reserved=0 > Mac Software Developer Montr?al, Qu?bec, Canada > > > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url= > www.kitware.com&data=02%7C01%7Classo%40queensu.ca% > 7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636483456698853245&sdata=G76iyhyL6NaI3O1wSPiTZnkEhV86U1 > xF0RameFHhWIU%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% > 7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636483456698853245&sdata=JXMmtAr% > 2BOPKAzlgij5lFwk6AGldNssRXpaMTj7F3EWM%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%7C376eba4fbae84c66983208d53e54e569% > 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata= > ld0mXo1n4wDdjZ7C6uQjrjeplkkDL5XUP6zxhqzLHNY%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% > 7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636483456698853245&sdata=08SVaUh%2BI6cYkS1z1ynTW2K% > 2Fv5F5zF0qnwAtnEljGlk%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% > 7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636483456698853245&sdata=JPUU6qgB9YemKfYNI%2B% > 2FnhT337s2JTY%2FiCSTFuULIvwU%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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Fri Dec 8 12:48:11 2017 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 8 Dec 2017 17:48:11 +0000 Subject: [vtkusers] vtkGL2PSExporter crashes In-Reply-To: References: <20171208155426.1620201755@mail.rogue-research.com> Message-ID: You can interact with a forum as a mailing list (read, post, reply through emails only). Fine-grained subscriptions is useful for those people who use tens of libraries and don?t have the capacity to follow all discussions in all topics in all mailing lists. If you only offer a mailing list, those people will not sign up to the mailing list or define rules to move emails to folders that they never have the time to read. Andras From: Bill Lorensen [mailto:bill.lorensen at gmail.com] Sent: Friday, December 8, 2017 12:30 PM To: Andras Lasso Cc: Sean McBride ; Amine Aboufirass ; rakesh patil ; VTK Users Subject: Re: [vtkusers] vtkGL2PSExporter crashes Personally I don't care for the forum. I use gmail filters to organize my email. Too old to change... On Dec 8, 2017 11:05 AM, "Andras Lasso" > wrote: Actually, the solution is to switch from mailing list to forum. One of the key advantages of forums that you can watch particular categories or topics. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Sean McBride Sent: Friday, December 8, 2017 10:54 AM To: Amine Aboufirass >; rakesh patil > Cc: VTK Users > Subject: Re: [vtkusers] vtkGL2PSExporter crashes On Fri, 5 May 2017 20:18:51 +0200, Amine Aboufirass said: >Allright. So in order to be a part of this mailing list, ask questions, >receive answers but not necessarily have to deal with a barrage of >10+emails a day what can a person do? > >I'm interested in being a part of the mailing list but I really don't >need to receive every single communication that happens on it... >Somebody help please. If everyone had that attitude there would be nobody left to read your messages, or anyone else's. :( The idea is that members at least scan the subjects to see if there's discussion that they can help with. There's no one here who's job it is to read and respond to messages. You should be able to create a folder and filter your email there so it doesn't clutter your inbox. You might also want to read this oldie but goodie: Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research https://na01.safelinks.protection.outlook.com/?url=www.rogue-research.com&data=02%7C01%7Classo%40queensu.ca%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=G7GEy9YJ2VU16%2Fx91vCx17odqOanhscpiuZzO08dKHg%3D&reserved=0 Mac Software Developer Montr?al, Qu?bec, Canada _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=G76iyhyL6NaI3O1wSPiTZnkEhV86U1xF0RameFHhWIU%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%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=JXMmtAr%2BOPKAzlgij5lFwk6AGldNssRXpaMTj7F3EWM%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%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=ld0mXo1n4wDdjZ7C6uQjrjeplkkDL5XUP6zxhqzLHNY%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%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=08SVaUh%2BI6cYkS1z1ynTW2K%2Fv5F5zF0qnwAtnEljGlk%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%7C376eba4fbae84c66983208d53e54e569%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483456698853245&sdata=JPUU6qgB9YemKfYNI%2B%2FnhT337s2JTY%2FiCSTFuULIvwU%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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Fri Dec 8 13:04:29 2017 From: sean at rogue-research.com (Sean McBride) Date: Fri, 8 Dec 2017 13:04:29 -0500 Subject: [vtkusers] vtkGL2PSExporter crashes In-Reply-To: References: <20171208155426.1620201755@mail.rogue-research.com> Message-ID: <20171208180429.898497831@mail.rogue-research.com> On Fri, 8 Dec 2017 17:48:11 +0000, Andras Lasso said: >You can interact with a forum as a mailing list (read, post, reply >through emails only). Based on my experience with the ITK switch, the discource experience is *much* worse. - all email is now html - quoted text doesn't appear as usual - the 'from' address is not something that can be replied to, making off-list replies impossible. - 'reply all' is broken because the 'from' address is 'noreply at discourse' - there is no 'List-Post' header, making it hard to start a new thread via email - it strips off email signatures Since they switched, I find myself only using it when I have something to ask; it's not conducive to following along and helping out. Your mileage may vary. Such things tend to get religious. My advice to Amine was strictly practical, not to re-start this tiresome list vs forum stuff. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From stephen.langer at nist.gov Fri Dec 8 13:58:27 2017 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Fri, 8 Dec 2017 18:58:27 +0000 Subject: [vtkusers] Antialiasing questions on 8.1.0.rc2 In-Reply-To: References: Message-ID: <5222AD8A-A680-41B9-9472-153EE0F4612C@nist.gov> Hi Ken -- Thanks. That helps a lot. FXAA seems to work, but SSAA is giving me strange results for the surface representation of grids of tetrahedral or hexahedra. Some surfaces aren't drawn, some are drawn at the wrong depth, and there are error messages from vtkSSAAPass: ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 59 vtkSSAAPass (0x7fc596326370): FrameBufferObject should have been deleted in ReleaseGraphicsResources(). ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 63 vtkSSAAPass (0x7fc596326370): Pass1 should have been deleted in ReleaseGraphicsResources(). ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 67 vtkSSAAPass (0x7fc596326370): Pass2 should have been deleted in ReleaseGraphicsResources(). I've attached two screenshots, with and without SSAA. The displayed object is the output from a vtkRectlinearGridAlgorithm subclass that I've defined to take data from a vtkImage and display the voxels as rectangular prisms instead of points. I don't think that that subclass is the problem, since it displays correctly with no antialiasing, and also with FXAA or the old AA frames. -- Steve From: Ken Martin Date: Friday, December 8, 2017 at 8:54 AM To: "Langer, Stephen A. (Fed)" Cc: VTK Users Subject: Re: [vtkusers] Antialiasing questions on 8.1.0.rc2 See this post https://blog.kitware.com/new-fxaa-anti-aliasing-option-in-paraviewvtk/ which talks about using FXAA in Paraview, but the support is built into VTK via https://www.vtk.org/doc/nightly/html/classvtkRenderer.html#a3f46ed85e17e5e297e6c3b02be07ebba Other options include SSAA an example of which is shown here https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/Testing/Cxx/TestSSAAPass.cxx Both should be faster than the old AAFrames approach. FXAA will be very fast, almost free, SSAA will be slower than FXAA and depends on its settings, as it is a more brute force approach,. But even SSAA should be faster than the old AA frames approach. Thanks! Ken On Thu, Dec 7, 2017 at 4:51 PM, Langer, Stephen A. (Fed) > wrote: Hi -- I'm trying out 8.1.0.rc2 and it says that antialiasing with vtkRenderWindow::SetAAFrames is deprecated, so I tried using SetMultiSamples instead. If I set a non-trivial number of samples before the first call to Render, it works, but if I change the the number of samples and call Render again, it has no effect. Is this expected? Do I have to do something else to get the sampling to change? This is using vtkCocoaRenderWindow. Is there a different substitute for SetAAFrames? SetMultiSamples also has no effect on a Linux VM where I'm using vtkXOpenGLRenderWindow. I'm guessing that's because the VM has no hardware graphics acceleration. Is there a non-deprecated replacement for SetAAFrames that doesn't rely on hardware? 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 -- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: noaa.png Type: image/png Size: 18612 bytes Desc: noaa.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ssaa.png Type: image/png Size: 51054 bytes Desc: ssaa.png URL: From ken.martin at kitware.com Fri Dec 8 14:11:24 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 8 Dec 2017 14:11:24 -0500 Subject: [vtkusers] Antialiasing questions on 8.1.0.rc2 In-Reply-To: <5222AD8A-A680-41B9-9472-153EE0F4612C@nist.gov> References: <5222AD8A-A680-41B9-9472-153EE0F4612C@nist.gov> Message-ID: Well what did render looks nice :-) The errors are unrelated I believe. I just ran the example test for SSAA and it looks fine so I suspect it is something different between the test and your code. I would guess that something has turned depth testing off and SSAAPass or related is not turning them on at the right time. Maybe try looking at the difference between the test I linked and your code and see if changing one of them makes the difference. On Fri, Dec 8, 2017 at 1:58 PM, Langer, Stephen A. (Fed) < stephen.langer at nist.gov> wrote: > Hi Ken -- > > > > Thanks. That helps a lot. > > > > FXAA seems to work, but SSAA is giving me strange results for the surface > representation of grids of tetrahedral or hexahedra. Some surfaces aren't > drawn, some are drawn at the wrong depth, and there are error messages from > vtkSSAAPass: > > > > ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, > line 59 > > vtkSSAAPass (0x7fc596326370): FrameBufferObject should have been deleted > in ReleaseGraphicsResources(). > > > > ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, > line 63 > > vtkSSAAPass (0x7fc596326370): Pass1 should have been deleted in > ReleaseGraphicsResources(). > > > > ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, > line 67 > > vtkSSAAPass (0x7fc596326370): Pass2 should have been deleted in > ReleaseGraphicsResources(). > > > > I've attached two screenshots, with and without SSAA. The displayed > object is the output from a vtkRectlinearGridAlgorithm subclass that I've > defined to take data from a vtkImage and display the voxels as rectangular > prisms instead of points. I don't think that that subclass is the problem, > since it displays correctly with no antialiasing, and also with FXAA or the > old AA frames. > > > > -- Steve > > > > > > *From: *Ken Martin > *Date: *Friday, December 8, 2017 at 8:54 AM > *To: *"Langer, Stephen A. (Fed)" > *Cc: *VTK Users > *Subject: *Re: [vtkusers] Antialiasing questions on 8.1.0.rc2 > > > > See this post > > > > https://blog.kitware.com/new-fxaa-anti-aliasing-option-in-paraviewvtk/ > > > > > which talks about using FXAA in Paraview, but the support is built into > VTK via > > > > https://www.vtk.org/doc/nightly/html/classvtkRenderer.html# > a3f46ed85e17e5e297e6c3b02be07ebba > > > > > Other options include SSAA an example of which is shown here > > > > https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/Testing/Cxx/ > TestSSAAPass.cxx > > > > > Both should be faster than the old AAFrames approach. FXAA will be very > fast, almost free, SSAA will be slower than FXAA and depends on its > settings, as it is a more brute force approach,. But even SSAA should be > faster than the old AA frames approach. > > > > Thanks! > > Ken > > > > > > On Thu, Dec 7, 2017 at 4:51 PM, Langer, Stephen A. (Fed) < > stephen.langer at nist.gov> wrote: > > Hi -- > > I'm trying out 8.1.0.rc2 and it says that antialiasing with > vtkRenderWindow::SetAAFrames is deprecated, so I tried using > SetMultiSamples instead. If I set a non-trivial number of samples before > the first call to Render, it works, but if I change the the number of > samples and call Render again, it has no effect. Is this expected? Do I > have to do something else to get the sampling to change? This is using > vtkCocoaRenderWindow. > > Is there a different substitute for SetAAFrames? SetMultiSamples also has > no effect on a Linux VM where I'm using vtkXOpenGLRenderWindow. I'm > guessing that's because the VM has no hardware graphics acceleration. Is > there a non-deprecated replacement for SetAAFrames that doesn't rely on > hardware? > > 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 > > > > > > > -- > > 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 lasso at queensu.ca Fri Dec 8 14:59:55 2017 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 8 Dec 2017 19:59:55 +0000 Subject: [vtkusers] vtkGL2PSExporter crashes In-Reply-To: <20171208180429.898497831@mail.rogue-research.com> References: <20171208155426.1620201755@mail.rogue-research.com> <20171208180429.898497831@mail.rogue-research.com> Message-ID: > not to re-start this tiresome list vs forum stuff Well, that's the point. Not everybody is interested in every topics. It's good to have the tools to deal with this nicely. By the way, most differences you listed are useful features, but of course individual user preferences may differ. You can configure these features at system or user level. See details below. Andras > all email is now html It is a feature. With HTML formatting, you can make your post easier to read. It's really hard to find email clients that cannot cope with HTML. > quoted text doesn't appear as usual It is a feature. Text can be quoted properly now. Finally, there is standard way of referring to particular portion of previous posts. > the 'from' address is not something that can be replied to, making off-list replies impossible. > 'reply all' is broken because the 'from' address is 'noreply at discourse' Reply by email works just fine, unless it is disabled intentionally or by mistake. > there is no 'List-Post' header, making it hard to start a new thread via email You can start new threads via email. You can customize the email template with any headers and footers. > it strips off email signatures That's a great feature. Signatures make long email threads painful to read. > Since they switched, I find myself only using it when I have something to ask; it's not conducive to following along and helping out. Your mileage may vary. Such things tend to get religious. You can set up default notification settings any way you want. You can notify all users by all posts by default (mailing-list-style), or first post of each new topic, etc. -----Original Message----- From: Sean McBride [mailto:sean at rogue-research.com] Sent: Friday, December 8, 2017 1:04 PM To: Andras Lasso ; Bill Lorensen Cc: Amine Aboufirass ; rakesh patil ; VTK Users Subject: Re: [vtkusers] vtkGL2PSExporter crashes On Fri, 8 Dec 2017 17:48:11 +0000, Andras Lasso said: >You can interact with a forum as a mailing list (read, post, reply >through emails only). Based on my experience with the ITK switch, the discource experience is *much* worse. - all email is now html - quoted text doesn't appear as usual - the 'from' address is not something that can be replied to, making off-list replies impossible. - 'reply all' is broken because the 'from' address is 'noreply at discourse' - there is no 'List-Post' header, making it hard to start a new thread via email - it strips off email signatures Since they switched, I find myself only using it when I have something to ask; it's not conducive to following along and helping out. Your mileage may vary. Such things tend to get religious. My advice to Amine was strictly practical, not to re-start this tiresome list vs forum stuff. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research https://na01.safelinks.protection.outlook.com/?url=www.rogue-research.com&data=02%7C01%7Classo%40queensu.ca%7Ce8b9c74ea84a4f29995508d53e66233f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483530765077683&sdata=Hw3Ft2LHTg0I253Oc3rjjDYBbxPY%2FkJiXFaBFM2EaEE%3D&reserved=0 Mac Software Developer Montr?al, Qu?bec, Canada From stephen.langer at nist.gov Fri Dec 8 15:44:53 2017 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Fri, 8 Dec 2017 20:44:53 +0000 Subject: [vtkusers] Antialiasing questions on 8.1.0.rc2 In-Reply-To: References: <5222AD8A-A680-41B9-9472-153EE0F4612C@nist.gov> Message-ID: The errors are because I didn't understand that vtkNew<> is different from vtkSmartPointer<>::New, and tried to do things the way I've always done, with vtkSmartPointer. (Is vtkNew documented anywhere? It's not in the book. The man page for it says how to use it, but doesn't discuss how it differs from vtkSmartPointer or how to choose which to use.) Do I need to rebuild vtk with BUILD_TESTING and BUILD_EXAMPLES in order to run the test you linked without modification? It looks like that will take a while? Is there a short cut? Thanks. -- Steve From: Ken Martin Date: Friday, December 8, 2017 at 2:11 PM To: "Langer, Stephen A. (Fed)" Cc: VTK Users Subject: Re: [vtkusers] Antialiasing questions on 8.1.0.rc2 Well what did render looks nice :-) The errors are unrelated I believe. I just ran the example test for SSAA and it looks fine so I suspect it is something different between the test and your code. I would guess that something has turned depth testing off and SSAAPass or related is not turning them on at the right time. Maybe try looking at the difference between the test I linked and your code and see if changing one of them makes the difference. On Fri, Dec 8, 2017 at 1:58 PM, Langer, Stephen A. (Fed) > wrote: Hi Ken -- Thanks. That helps a lot. FXAA seems to work, but SSAA is giving me strange results for the surface representation of grids of tetrahedral or hexahedra. Some surfaces aren't drawn, some are drawn at the wrong depth, and there are error messages from vtkSSAAPass: ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 59 vtkSSAAPass (0x7fc596326370): FrameBufferObject should have been deleted in ReleaseGraphicsResources(). ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 63 vtkSSAAPass (0x7fc596326370): Pass1 should have been deleted in ReleaseGraphicsResources(). ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 67 vtkSSAAPass (0x7fc596326370): Pass2 should have been deleted in ReleaseGraphicsResources(). I've attached two screenshots, with and without SSAA. The displayed object is the output from a vtkRectlinearGridAlgorithm subclass that I've defined to take data from a vtkImage and display the voxels as rectangular prisms instead of points. I don't think that that subclass is the problem, since it displays correctly with no antialiasing, and also with FXAA or the old AA frames. -- Steve From: Ken Martin > Date: Friday, December 8, 2017 at 8:54 AM To: "Langer, Stephen A. (Fed)" > Cc: VTK Users > Subject: Re: [vtkusers] Antialiasing questions on 8.1.0.rc2 See this post https://blog.kitware.com/new-fxaa-anti-aliasing-option-in-paraviewvtk/ which talks about using FXAA in Paraview, but the support is built into VTK via https://www.vtk.org/doc/nightly/html/classvtkRenderer.html#a3f46ed85e17e5e297e6c3b02be07ebba Other options include SSAA an example of which is shown here https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/Testing/Cxx/TestSSAAPass.cxx Both should be faster than the old AAFrames approach. FXAA will be very fast, almost free, SSAA will be slower than FXAA and depends on its settings, as it is a more brute force approach,. But even SSAA should be faster than the old AA frames approach. Thanks! Ken On Thu, Dec 7, 2017 at 4:51 PM, Langer, Stephen A. (Fed) > wrote: Hi -- I'm trying out 8.1.0.rc2 and it says that antialiasing with vtkRenderWindow::SetAAFrames is deprecated, so I tried using SetMultiSamples instead. If I set a non-trivial number of samples before the first call to Render, it works, but if I change the the number of samples and call Render again, it has no effect. Is this expected? Do I have to do something else to get the sampling to change? This is using vtkCocoaRenderWindow. Is there a different substitute for SetAAFrames? SetMultiSamples also has no effect on a Linux VM where I'm using vtkXOpenGLRenderWindow. I'm guessing that's because the VM has no hardware graphics acceleration. Is there a non-deprecated replacement for SetAAFrames that doesn't rely on hardware? 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 -- 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 ken.martin at kitware.com Fri Dec 8 15:52:07 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 8 Dec 2017 15:52:07 -0500 Subject: [vtkusers] Antialiasing questions on 8.1.0.rc2 In-Reply-To: References: <5222AD8A-A680-41B9-9472-153EE0F4612C@nist.gov> Message-ID: I was just suggesting to look at the differences in code between the two. To see if maybe there was something you were doing differently. Sort of process of elimination. On Fri, Dec 8, 2017 at 3:44 PM, Langer, Stephen A. (Fed) < stephen.langer at nist.gov> wrote: > The errors are because I didn't understand that vtkNew<> is different from > vtkSmartPointer<>::New, and tried to do things the way I've always done, > with vtkSmartPointer. (Is vtkNew documented anywhere? It's not in the > book. The man page for it says how to use it, but doesn't discuss how it > differs from vtkSmartPointer or how to choose which to use.) > > > > Do I need to rebuild vtk with BUILD_TESTING and BUILD_EXAMPLES in order to > run the test you linked without modification? It looks like that will take > a while? Is there a short cut? > > > > Thanks. > > > > -- Steve > > > > > > *From: *Ken Martin > *Date: *Friday, December 8, 2017 at 2:11 PM > *To: *"Langer, Stephen A. (Fed)" > *Cc: *VTK Users > *Subject: *Re: [vtkusers] Antialiasing questions on 8.1.0.rc2 > > > > Well what did render looks nice :-) The errors are unrelated I believe. > > > > I just ran the example test for SSAA and it looks fine so I suspect it is > something different between the test and your code. I would guess that > something has turned depth testing off and SSAAPass or related is not > turning them on at the right time. Maybe try looking at the difference > between the test I linked and your code and see if changing one of them > makes the difference. > > > > On Fri, Dec 8, 2017 at 1:58 PM, Langer, Stephen A. (Fed) < > stephen.langer at nist.gov> wrote: > > Hi Ken -- > > > > Thanks. That helps a lot. > > > > FXAA seems to work, but SSAA is giving me strange results for the surface > representation of grids of tetrahedral or hexahedra. Some surfaces aren't > drawn, some are drawn at the wrong depth, and there are error messages from > vtkSSAAPass: > > > > ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, > line 59 > > vtkSSAAPass (0x7fc596326370): FrameBufferObject should have been deleted > in ReleaseGraphicsResources(). > > > > ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, > line 63 > > vtkSSAAPass (0x7fc596326370): Pass1 should have been deleted in > ReleaseGraphicsResources(). > > > > ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, > line 67 > > vtkSSAAPass (0x7fc596326370): Pass2 should have been deleted in > ReleaseGraphicsResources(). > > > > I've attached two screenshots, with and without SSAA. The displayed > object is the output from a vtkRectlinearGridAlgorithm subclass that I've > defined to take data from a vtkImage and display the voxels as rectangular > prisms instead of points. I don't think that that subclass is the problem, > since it displays correctly with no antialiasing, and also with FXAA or the > old AA frames. > > > > -- Steve > > > > > > *From: *Ken Martin > *Date: *Friday, December 8, 2017 at 8:54 AM > *To: *"Langer, Stephen A. (Fed)" > *Cc: *VTK Users > *Subject: *Re: [vtkusers] Antialiasing questions on 8.1.0.rc2 > > > > See this post > > > > https://blog.kitware.com/new-fxaa-anti-aliasing-option-in-paraviewvtk/ > > > > > which talks about using FXAA in Paraview, but the support is built into > VTK via > > > > https://www.vtk.org/doc/nightly/html/classvtkRenderer.html# > a3f46ed85e17e5e297e6c3b02be07ebba > > > > > Other options include SSAA an example of which is shown here > > > > https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/Testing/Cxx/ > TestSSAAPass.cxx > > > > > Both should be faster than the old AAFrames approach. FXAA will be very > fast, almost free, SSAA will be slower than FXAA and depends on its > settings, as it is a more brute force approach,. But even SSAA should be > faster than the old AA frames approach. > > > > Thanks! > > Ken > > > > > > On Thu, Dec 7, 2017 at 4:51 PM, Langer, Stephen A. (Fed) < > stephen.langer at nist.gov> wrote: > > Hi -- > > I'm trying out 8.1.0.rc2 and it says that antialiasing with > vtkRenderWindow::SetAAFrames is deprecated, so I tried using > SetMultiSamples instead. If I set a non-trivial number of samples before > the first call to Render, it works, but if I change the the number of > samples and call Render again, it has no effect. Is this expected? Do I > have to do something else to get the sampling to change? This is using > vtkCocoaRenderWindow. > > Is there a different substitute for SetAAFrames? SetMultiSamples also has > no effect on a Linux VM where I'm using vtkXOpenGLRenderWindow. I'm > guessing that's because the VM has no hardware graphics acceleration. Is > there a non-deprecated replacement for SetAAFrames that doesn't rely on > hardware? > > 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 > > > > > > > -- > > 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. > -- 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 rccm.kyoshimi at gmail.com Sat Dec 9 05:49:29 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sat, 9 Dec 2017 19:49:29 +0900 Subject: [vtkusers] ExtractByLocation In-Reply-To: References: Message-ID: Hello Amine, The searching range for location selection of points is limited by EPSILON key. You can set a bigger value to expand the searching range as below. SelectionNode.GetProperties().Set(SelectionNode.EPSILON(), 1000) Thanks 2017-12-02 0:45 GMT+09:00 Amine Aboufirass : > Hello, > > I am trying to figure out how to select the closest neighboring points to a > list of coordinates using the vtk library. I have a simple point data set in > the Unstructured Grid Format. The dataset contains one attribute named the > 'point_id' which is just enumerating the points starting from 1 instead of > 0. The raw text from the ASCII file is attached in testScalar.vtk below. > > I have also written a script in python which I thought would function as > follows: > > INPUT: > > List of tuples containing world coordinates [(X1,Y1,Z1),(X2,Y2,Z2)] > name of attribute to extract as a string. in this case "point_id" > > OUTPUT: > > List of floating point values of the attribute for the selected points > > This does work to a certain degree, for instance when I do : > > ExtractByLocation('testScalar.vtk', [(5.999,0,0)], 'point_id') > > I do indeed get back the following: > > array([ 2.], dtype=float32) > > So point_id 2 is the closest point to the coordinates I have specified. > However, as soon as I get a bit too far from one of the points, the function > starts returning an empty list. For instance: > > ExtractByLocation('testScalar.vtk', [(5.888,0,0)], 'point_id') > > Returns > array([], dtype=float32) > > I found out that the cut off point is 5.89-5.90. If I plugin 5.9 I get the > point, if I plugin 5.89 I get back an empty list. > > According to the object reference > (https://www.vtk.org/doc/nightly/html/classvtkSelectionNode.html#aa7b54148c40adf4f5019b8ad3e160535a97d8505c922b2a25c5d2755607d3cbb6) > LOCATIONS is supposed to select the points near the supplied world > coordinates. Is there an option or something that selects the nearest point > PERIOD? i.e using a simple distance formula? I would like to never get back > an empty list but always get back a list of the closest point to the > supplied coordinates. > > Kind Regards, > > Amine > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 lovstakk at gmail.com Sun Dec 10 05:16:14 2017 From: lovstakk at gmail.com (lovstakk) Date: Sun, 10 Dec 2017 03:16:14 -0700 (MST) Subject: [vtkusers] How to map colors based on multiple scalars? Message-ID: <1512900974789-0.post@n5.nabble.com> Dear VTK users, A relatively common use case in my field of work requires mapping colors/alpha based on several scalars. It could for instance be based on both velocity in addition to power or an uncertainty measure, where the alpha value is modified using the power or uncertainty. I made this work for images using RGB output from vtkImageMapToColors, and by appending a custom alpha component with vtkImageAppendComponents. My problem is that I can't seem to find out how this can be done for polydata such as the output from vtkstreamtracer. I would like to map the velocity scalar to color but in addition use IntegrationTime to add a fade-in / fade-out effect using alpha-blending. I would also like to let the velocity control some alpha to fade-out the low velocities. Sorry if I should have gotten this from the documentation already. Any tips highly appreciated! Best regards, Lasse L?vstakken -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From JFSLB at gmx.de Sun Dec 10 05:30:06 2017 From: JFSLB at gmx.de (JFSLB at gmx.de) Date: Sun, 10 Dec 2017 11:30:06 +0100 Subject: [vtkusers] problem creating a vtu file with a VTK polyhedron Message-ID: Dear VTK users, I am trying to generate a vtu file that contains a single cell of type VTK_POLYHEDRON. The file I generated loads successfully in paraview but two edges of one face are not renderred correctly. The wireframe is displayed corretly. The cell consists of seven polygonal faces. I have made sure that the surface is water tight and that every edge is used exactly twice. I have also inverted the orientation of the polygons but that did not improve the situation. Can someone see an error in the vtu file below? Thanks! 0 0.0204729 -0.000857723 0.0396787 0.0206677 -0.000857723 0.038172 0.0212252 -0.000857723 0.038172 0.0212252 -0.000857723 0.0396787 0.0207424 0.0006489 0.038172 0.0207424 0.0006489 0.0387988 0.0206286 0.0006489 0.0396787 0.0212252 0.0006489 0.0396787 0.0212252 0.0006489 0.038172 0.0207501 -6.0656e-05 0.038172 0 1 2 3 4 5 6 7 42 7 4 3 2 1 0 5 8 7 6 5 4 5 1 2 8 4 9 4 7 3 0 6 4 3 7 8 2 3 4 5 9 5 0 1 9 5 6 38 From alican1812 at hotmail.com Sun Dec 10 07:10:31 2017 From: alican1812 at hotmail.com (alican) Date: Sun, 10 Dec 2017 05:10:31 -0700 (MST) Subject: [vtkusers] Bug in vtkRenderWindowInteractor ? Message-ID: <1512907831307-0.post@n5.nabble.com> I am using the exact code of this example: https://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SeedWidgetWithCustomCallback with one exception: instead of creating a new renderer and a new render window, like in the example: // A renderer and render window vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); I am using my existing renderer and window. Now, when a user finishes an interaction, I would like to remove the seed widget, and stay with my renderer and my render window. So I am doing like that: seedWidget->RemoveObserver(vtkCommand::InteractionEvent); seedWidget->RemoveObserver(vtkCommand::EndInteractionEvent); seedWidget->Off(); seedWidget = nullptr; foreach(vtkSmartPointer hw, seeds) hw->Off(); seeds.clear(); iren->Delete(); It looks OK, the widget disappears, but when I quit my program, the process still stays active and I can see in debugger that it is stuck in vtkWin32RenderWindowInteractor::StartEventLoop() Is it a bug in interactor, or am I doing something wrong? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Sun Dec 10 09:54:43 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 10 Dec 2017 09:54:43 -0500 Subject: [vtkusers] Bug in vtkRenderWindowInteractor ? In-Reply-To: <1512907831307-0.post@n5.nabble.com> References: <1512907831307-0.post@n5.nabble.com> Message-ID: Just a reminder to use the new VTKExamples at: https://lorensen.github.io/VTKExamples/site/Cxx/Widgets/SeedWidgetWithCustomCallback/ This does not answer your question. On Sun, Dec 10, 2017 at 7:10 AM, alican wrote: > I am using the exact code of this example: > https://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SeedWidgetWithCustomCallback > > > > with one exception: instead of creating a new renderer and a new render > window, like in the example: > // A renderer and render window > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > > I am using my existing renderer and window. > > Now, when a user finishes an interaction, I would like to remove the seed > widget, and stay with my renderer and my render window. So I am doing like > that: > > seedWidget->RemoveObserver(vtkCommand::InteractionEvent); > seedWidget->RemoveObserver(vtkCommand::EndInteractionEvent); > seedWidget->Off(); > seedWidget = nullptr; > foreach(vtkSmartPointer hw, seeds) > hw->Off(); > seeds.clear(); > iren->Delete(); > > It looks OK, the widget disappears, but when I quit my program, the process > still stays active and I can see in debugger that it is stuck in > > vtkWin32RenderWindowInteractor::StartEventLoop() > > Is it a bug in interactor, or am I doing something wrong? > > > > -- > 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 bill.lorensen at gmail.com Sun Dec 10 09:56:42 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 10 Dec 2017 09:56:42 -0500 Subject: [vtkusers] problem creating a vtu file with a VTK polyhedron In-Reply-To: References: Message-ID: Try building this example and run with your data. For one thing, your faces are ordered incorrectly. https://lorensen.github.io/VTKExamples/site/Cxx/IO/ReadUnstructuredGrid/ On Sun, Dec 10, 2017 at 5:30 AM, wrote: > Dear VTK users, > I am trying to generate a vtu file that contains a single cell of type VTK_POLYHEDRON. The file I generated loads successfully in paraview but two edges of one face are not renderred correctly. The wireframe is displayed corretly. The cell consists of seven polygonal faces. I have made sure that the surface is water tight and that every edge is used exactly twice. I have also inverted the orientation of the polygons but that did not improve the situation. > > Can someone see an error in the vtu file below? > > Thanks! > > > > > > > > > 0 > > > > > 0.0204729 -0.000857723 0.0396787 > 0.0206677 -0.000857723 0.038172 > 0.0212252 -0.000857723 0.038172 > 0.0212252 -0.000857723 0.0396787 > 0.0207424 0.0006489 0.038172 > 0.0207424 0.0006489 0.0387988 > 0.0206286 0.0006489 0.0396787 > 0.0212252 0.0006489 0.0396787 > 0.0212252 0.0006489 0.038172 > 0.0207501 -6.0656e-05 0.038172 > > > > > 0 1 2 3 4 5 6 > > > 7 > > 42 > > > 7 > 4 3 2 1 0 > 5 8 7 6 5 4 > 5 1 2 8 4 9 > 4 7 3 0 6 > 4 3 7 8 2 > 3 4 5 9 > 5 0 1 9 5 6 > > > 38 > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 JFSLB at gmx.de Sun Dec 10 13:32:52 2017 From: JFSLB at gmx.de (JFSLB at gmx.de) Date: Sun, 10 Dec 2017 19:32:52 +0100 Subject: [vtkusers] (no subject) Message-ID: Dear Bill, Thanks for your quick reply. I have not tried building the example, but I am sure that it would display the same picture. Could you please point me to the correct ordering of faces? Greetings, Peter On 10.12.2017 15:56, Bill Lorensen wrote: > Try building this example and run with your data. For one thing, your > faces are ordered incorrectly. > > https://lorensen.github.io/VTKExamples/site/Cxx/IO/ReadUnstructuredGrid/ > > > On Sun, Dec 10, 2017 at 5:30 AM, wrote: >> Dear VTK users, >> I am trying to generate a vtu file that contains a single cell of type VTK_POLYHEDRON. The file I generated loads successfully in paraview but two edges of one face are not renderred correctly. The wireframe is displayed corretly. The cell consists of seven polygonal faces. I have made sure that the surface is water tight and that every edge is used exactly twice. I have also inverted the orientation of the polygons but that did not improve the situation. >> >> Can someone see an error in the vtu file below? >> >> Thanks! >> >> >> >> >> >> >> >> >> 0 >> >> >> >> >> 0.0204729 -0.000857723 0.0396787 >> 0.0206677 -0.000857723 0.038172 >> 0.0212252 -0.000857723 0.038172 >> 0.0212252 -0.000857723 0.0396787 >> 0.0207424 0.0006489 0.038172 >> 0.0207424 0.0006489 0.0387988 >> 0.0206286 0.0006489 0.0396787 >> 0.0212252 0.0006489 0.0396787 >> 0.0212252 0.0006489 0.038172 >> 0.0207501 -6.0656e-05 0.038172 >> >> >> >> >> 0 1 2 3 4 5 6 >> >> >> 7 >> >> 42 >> >> >> 7 >> 4 3 2 1 0 >> 5 8 7 6 5 4 >> 5 1 2 8 4 9 >> 4 7 3 0 6 >> 4 3 7 8 2 >> 3 4 5 9 >> 5 0 1 9 5 6 >> >> >> 38 >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 Sun Dec 10 15:37:21 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 10 Dec 2017 15:37:21 -0500 Subject: [vtkusers] (no subject) In-Reply-To: References: Message-ID: Just reverse the order of the face id's. On Sun, Dec 10, 2017 at 1:32 PM, wrote: > Dear Bill, > > Thanks for your quick reply. I have not tried building the example, but I am sure that it would display the same picture. Could you please point me to the correct ordering of faces? > > Greetings, > Peter > > > On 10.12.2017 15:56, Bill Lorensen wrote: >> Try building this example and run with your data. For one thing, your >> faces are ordered incorrectly. >> >> https://lorensen.github.io/VTKExamples/site/Cxx/IO/ReadUnstructuredGrid/ >> >> >> On Sun, Dec 10, 2017 at 5:30 AM, wrote: >>> Dear VTK users, >>> I am trying to generate a vtu file that contains a single cell of type VTK_POLYHEDRON. The file I generated loads successfully in paraview but two edges of one face are not renderred correctly. The wireframe is displayed corretly. The cell consists of seven polygonal faces. I have made sure that the surface is water tight and that every edge is used exactly twice. I have also inverted the orientation of the polygons but that did not improve the situation. >>> >>> Can someone see an error in the vtu file below? >>> >>> Thanks! >>> >>> >>> >>> >>> >>> >>> >>> >>> 0 >>> >>> >>> >>> >>> 0.0204729 -0.000857723 0.0396787 >>> 0.0206677 -0.000857723 0.038172 >>> 0.0212252 -0.000857723 0.038172 >>> 0.0212252 -0.000857723 0.0396787 >>> 0.0207424 0.0006489 0.038172 >>> 0.0207424 0.0006489 0.0387988 >>> 0.0206286 0.0006489 0.0396787 >>> 0.0212252 0.0006489 0.0396787 >>> 0.0212252 0.0006489 0.038172 >>> 0.0207501 -6.0656e-05 0.038172 >>> >>> >>> >>> >>> 0 1 2 3 4 5 6 >>> >>> >>> 7 >>> >>> 42 >>> >>> >>> 7 >>> 4 3 2 1 0 >>> 5 8 7 6 5 4 >>> 5 1 2 8 4 9 >>> 4 7 3 0 6 >>> 4 3 7 8 2 >>> 3 4 5 9 >>> 5 0 1 9 5 6 >>> >>> >>> 38 >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 JFSLB at gmx.de Sun Dec 10 16:08:44 2017 From: JFSLB at gmx.de (JFSLB at gmx.de) Date: Sun, 10 Dec 2017 22:08:44 +0100 Subject: [vtkusers] problem creating a vtu file with a VTK polyhedron Message-ID: I have reversed the order in "faces" so that the normals of the polygons point outwards, but he image is still the same. I have also reversed the order in "connectivity" but that did not help. For some reason two polygons (one in the x-y-plane and one in the x-z-plane) are rendered as a polygons with 4 points although they contain 5 points. When I generated the data set there were some duplicated vertices, i.e. vertices with identical coordinates but different index and only one of the polygons was rendered incorrectly. I eliminated the duplicates and the second polygon was rendered incorrectly. I have no idea if that helps. From bill.lorensen at gmail.com Sun Dec 10 16:56:06 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 10 Dec 2017 16:56:06 -0500 Subject: [vtkusers] problem creating a vtu file with a VTK polyhedron In-Reply-To: References: Message-ID: Post the new data set please. On Dec 10, 2017 4:08 PM, wrote: > I have reversed the order in "faces" so that the normals of the polygons > point outwards, but he image is still the same. I have also reversed the > order in "connectivity" but that did not help. For some reason two polygons > (one in the x-y-plane and one in the x-z-plane) are rendered as a polygons > with 4 points although they contain 5 points. > > When I generated the data set there were some duplicated vertices, i.e. > vertices with identical coordinates but different index and only one of the > polygons was rendered incorrectly. I eliminated the duplicates and the > second polygon was rendered incorrectly. I have no idea if that helps. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From JFSLB at gmx.de Sun Dec 10 18:20:10 2017 From: JFSLB at gmx.de (JFSLB at gmx.de) Date: Mon, 11 Dec 2017 00:20:10 +0100 Subject: [vtkusers] problem creating a vtu file with a VTK polyhedron Message-ID: 0 0.0204729 -0.000857723 0.0396787 0.0206677 -0.000857723 0.038172 0.0212252 -0.000857723 0.038172 0.0212252 -0.000857723 0.0396787 0.0207424 0.0006489 0.038172 0.0207424 0.0006489 0.0387988 0.0206286 0.0006489 0.0396787 0.0212252 0.0006489 0.0396787 0.0212252 0.0006489 0.038172 0.0207501 -6.0656e-05 0.038172 0 1 2 3 4 5 6 7 42 7 4 0 1 2 3 5 4 5 6 7 8 5 9 4 8 2 1 4 6 0 3 7 4 2 8 7 3 3 9 5 4 5 6 5 9 1 0 38 On 10.12.2017 22:56, Bill Lorensen wrote: > Post the new data set please. > > On Dec 10, 2017 4:08 PM, wrote: > > I have reversed the order in "faces" so that the normals of the polygons point outwards, but he image is still the same. I have also reversed the order in "connectivity" but that did not help. For some reason two polygons (one in the x-y-plane and one in the x-z-plane) are rendered as a polygons with 4 points although they contain 5 points. > > When I generated the data set there were some duplicated vertices, i.e. vertices with identical coordinates but different index and only one of the polygons was rendered incorrectly. I eliminated the duplicates and the second polygon was rendered incorrectly. I have no idea if that helps. > From rccm.kyoshimi at gmail.com Sun Dec 10 21:20:02 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Mon, 11 Dec 2017 11:20:02 +0900 Subject: [vtkusers] problem creating a vtu file with a VTK polyhedron In-Reply-To: References: Message-ID: Hello, OpenGL may not render non-convex polygons correctly, hence polyhedrons with concave faces too. http://vtk.1045678.n5.nabble.com/Polyhedron-with-concave-faces-td4363498.html In my experience, multiple non-convex polyhedrons which are mounted side by side are correctly displayed even though the rendering fails for an individual concave polygon. (Please see the attached) By the way, the data of "connecitivity" and "offsets" in the vtu file may be wrong. --- 0 1 2 3 4 5 6 7 8 9 10 ---- Thanks 2017-12-11 8:20 GMT+09:00 : > > > > > > 0 > > > > > 0.0204729 -0.000857723 0.0396787 > 0.0206677 -0.000857723 0.038172 > 0.0212252 -0.000857723 0.038172 > 0.0212252 -0.000857723 0.0396787 > 0.0207424 0.0006489 0.038172 > 0.0207424 0.0006489 0.0387988 > 0.0206286 0.0006489 0.0396787 > 0.0212252 0.0006489 0.0396787 > 0.0212252 0.0006489 0.038172 > 0.0207501 -6.0656e-05 0.038172 > > > > > 0 1 2 3 4 5 6 > > > 7 > > 42 > > > 7 > 4 0 1 2 3 > 5 4 5 6 7 8 > 5 9 4 8 2 1 > 4 6 0 3 7 > 4 2 8 7 3 > 3 9 5 4 > 5 6 5 9 1 0 > > > 38 > > > > > > > > On 10.12.2017 22:56, Bill Lorensen wrote: >> Post the new data set please. >> >> On Dec 10, 2017 4:08 PM, wrote: >> >> I have reversed the order in "faces" so that the normals of the polygons point outwards, but he image is still the same. I have also reversed the order in "connectivity" but that did not help. For some reason two polygons (one in the x-y-plane and one in the x-z-plane) are rendered as a polygons with 4 points although they contain 5 points. >> >> When I generated the data set there were some duplicated vertices, i.e. vertices with identical coordinates but different index and only one of the polygons was rendered incorrectly. I eliminated the duplicates and the second polygon was rendered incorrectly. I have no idea if that helps. >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- A non-text attachment was scrubbed... Name: concave_polyhedrons.png Type: image/png Size: 139143 bytes Desc: not available URL: From beatrix.schober at gmail.com Mon Dec 11 02:53:07 2017 From: beatrix.schober at gmail.com (Beatrix Schober) Date: Mon, 11 Dec 2017 08:53:07 +0100 Subject: [vtkusers] Fwd: vtkLookupTable reacts to rotating actor In-Reply-To: <140782a43db1435ba3c3610182298299@SIMAIL13.stemmer.local> References: <140782a43db1435ba3c3610182298299@SIMAIL13.stemmer.local> Message-ID: Hi Cory, yes, that is correct. Regards, Bea -----Urspr?ngliche Nachricht----- Von: vtkusers [mailto:vtkusers-bounces at vtk.org] Im Auftrag von Cory Quammen Gesendet: Freitag, 8. Dezember 2017 16:14 An: Beatrix Schober Cc: vtkusers Betreff: Re: [vtkusers] vtkLookupTable reacts to rotating actor Hmm, I'm not sure I understand what you want to see. Do you want the colors on the polydata to change so that they correspond to the z value after rotating or translating the actor? On Fri, Dec 8, 2017 at 9:34 AM, Beatrix Schober wrote: > Hi, > > I am wondering how to solve following problem: > > I have vtkPolyData (with x, y, z values, whereas z values as grayvalue > defines the "height") and use the vtkLookupTable to display the points > in colors (heatmap). > > If I rotate or translate the actor with the mouse, the data does not > change, but the lookup table is not correct any more. The same issue > with calling scale on the actor. > > I also thought about changing the z value of vtkPolyData after > scaling, but still I do not know, how to handle the rotation or > translation of the actor with the mouse... > > How can I adapt the lookup table, which should fit the scale then? > > Thank you very much for your hints! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From hysinkmust at gmail.com Mon Dec 11 03:10:36 2017 From: hysinkmust at gmail.com (Hu Yangsheng) Date: Mon, 11 Dec 2017 16:10:36 +0800 Subject: [vtkusers] Reader Update in Qt sub thread Message-ID: Hello everyone, I use Qt and VTK together?so I need to read big DICOM files in another thread. While, there has some problems I cannot solve... I encapsulating the VTK Reader into a Qt class called ImageReader. And Use the ImageDataLoader starts new thread using ImageReaders to load files. Now I use vtkDICOMReader in DCMSegReader which is a subclass for ImageReader. But sometimes, it will crash into vtkObjectBase::GetClassName. I know it's a null pointer error while i dont know why and it is not crashed in my code. so does anyone know how to fix this ? Or could anyone give me a right code to do this thing ? I use the VTK 8.0.0 and Qt 5.5.1 in MSVC2013. My code: //////////////////////////////////////////////////////////////////////////////////////////// Class:mageDataLoader Method:startReadThread //////////////////////////////////////////////////////////////////////////////////////////// // init the reader Reader->SetInputPath (CachePath); // take it into sub thread Reader->moveToThread (&ReadThread); // connect signal/slot QObject::connect (&ReadThread, SIGNAL (started ()), Reader, SLOT (ReadImage())); QObject::connect (Reader, SIGNAL (updateProgress ()), this, SLOT (readingProgressUpdating ()), Qt::QueuedConnection); QObject::connect (Reader, SIGNAL (progressSuccess ()), this, SLOT (readingProgressSuccess ()), Qt::QueuedConnection); QObject::connect (Reader, SIGNAL (progressError ()), this, SLOT (readingProgressError ()), Qt::QueuedConnection); ReadThread.start (); //////////////////////////////////////////////////////////////////////////////////////////// Class:DCMSegReader Method:ReadImage----this method will start when thread start. //////////////////////////////////////////////////////////////////////////////////////////// void DCMSegReader::ReadImage () { qDebug () << "DCMSegReader---ReadImage"; this->Reader = vtkDICOMImageReader::New () // Connector is a instance of vtkEventQtSlotConnect, updateProgressCallback will emit signal updateProgress() or signal progressError() Connector->Connect (this->Reader, vtkCommand::ProgressEvent, this, SLOT (updateProgressCallback ()), NULL, 0.0, Qt::DirectConnection); Connector->Connect (this->Reader, vtkCommand::ErrorEvent, this, SLOT (updateProgressCallback ()), NULL, 0.0, Qt::DirectConnection); vtkDICOMImageReader::SafeDownCast (this->Reader)->SetDirectoryName ("D:\\I_VTK\\ImageData\\Beijing_data\\MRI_Heart");//CachePath.toLocal8Bit ().data () qDebug () << "DCMSegReader---Update"; this->Reader->Update ();// sometimes crash here qDebug () << "DCMSegReader---Updated"; //////////////////////////////////////////////////////////////////////////////////////////// It will crash sometimes ,when i call this->Reader->Update(). This error is teminated at vtkObjectBase::GetClassName(). I look forward to your answer. Thank you! Yangsheng Hu From petr.gazak at lim.cz Mon Dec 11 03:38:09 2017 From: petr.gazak at lim.cz (pegga) Date: Mon, 11 Dec 2017 01:38:09 -0700 (MST) Subject: [vtkusers] vtkOpenGLGPUVolumeRayCastMapper - issue with texture streaming Message-ID: <1512981489616-0.post@n5.nabble.com> Dear All, I am facing a problem when trying to render "Big" data using vtkOpenGLGPUVolumeRayCastMapper. My data are usually quite large and as such, there is no way it fits GPU memory. My solution for now 1) Use vtkImageResample to down sample the data so that it fits GPU memory. This mode will be used for interactivity (fast rendering). There is a problem with GetReductionRatio method of vtkOpenGLGPUVolumeRayCastMapper which is not implemented in latest VTK releases (since OpenGL2 it seems), but this is not a big problem. 2) Use SetPartitions method on vtkOpenGLGPUVolumeRayCastMapper. Using this method, one can render image data block by block. By choosing correct number of blocks in all dimensions, I can render whole data set in native resolution. This is especially useful when zoomed in so that I can see all the details. Composite blend seems to work well, but Maximum intensity blend is not working correctly. The problem is there are visible blocks in resulting image. See uploaded images for details. https://ibb.co/e9C3QG (visible blocking) https://ibb.co/mC2Reb (rendered without SetPartitions) What can I do to fix the problem? Is there some setting parameter I am missing of is it necessary to fix a bug in mapper itself? Could someone give me a hit where to start with fixing this issue? Best Regards, Petr -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From charles.kind at bristol.ac.uk Mon Dec 11 05:00:39 2017 From: charles.kind at bristol.ac.uk (Charles Kind) Date: Mon, 11 Dec 2017 03:00:39 -0700 (MST) Subject: [vtkusers] How to map colors based on multiple scalars? In-Reply-To: <1512900974789-0.post@n5.nabble.com> References: <1512900974789-0.post@n5.nabble.com> Message-ID: <1512986439177-0.post@n5.nabble.com> Lasse, This one had me stumped for a while too. Below is the code I have used to implement HSV varying colours over the unit sphere. I am not sure about extending beyond three variables. First declare an UnsignedCharArray and chuck your tuples in. Then convert your chosen colours to RGB. def ColorVectors(pd): numPoints = pd.GetNumberOfPoints() Colors = vtk.vtkUnsignedCharArray() Colors.SetNumberOfComponents(3) Colors.SetName("Colors") #Color by Vector #Set Hue from planar angle #Set Value and reverse order [0,1]->[1,0] for x in range(numPoints): azi = math.atan2(pd.GetPointData().GetAbstractArray(0).GetTuple(x)[0],pd.GetPointData().GetAbstractArray(0).GetTuple(x)[1]) + math.pi cH = azi / (2*math.pi) pol = math.acos(pd.GetPointData().GetAbstractArray(0).GetTuple(x)[2]) cV = ((pol / math.pi)-1)*(-1) cS = math.sin(pol) cR = 255*vtk.vtkMath.HSVToRGB(cH,cS,cV)[0] cG = 255*vtk.vtkMath.HSVToRGB(cH,cS,cV)[1] cB = 255*vtk.vtkMath.HSVToRGB(cH,cS,cV)[2] Colors.InsertNextTuple3(cR, cG, cB) pd.GetPointData().SetScalars(Colors) return pd Then what I did here, as I was colouring vectors and my PolyData contained points, vectors, and color data was in my glyph creation, def MakeGlyphs(arrowSource,csG): glyph3D = vtk.vtkGlyph3D() glyph3D.SetSourceConnection(arrowSource.GetOutputPort()) glyph3D.SetVectorModeToUseVector() glyph3D.SetInputData(csG) glyph3D.SetInputArrayToProcess(0,0,1,0,'m') glyph3D.SetInputArrayToProcess(0,0,0,0,'colors') #glyph3D.SetScaleFactor(1e-07) glyph3D.SetColorModeToColorByScalar() glyph3D.Update() return glyph3D was to tell the glyph which arrays to use and set color mode to scalar. This worked!! Good luck, Charlie -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jmax.red at gmail.com Mon Dec 11 08:32:34 2017 From: jmax.red at gmail.com (Jean-Max Redonnet) Date: Mon, 11 Dec 2017 14:32:34 +0100 Subject: [vtkusers] Building a colored texture by interpolating a set of colored points. Message-ID: Hi, I'm still quite new to vtk, and I would like a pro advice. I have a set of pixels, each one given with its full rgb color information. I would like to build a full image by interpolating color of pixels between the given points. First, I would like to know if there is a magic wand to do that. I searched it for days but maybe I missed something. If the job need to be done by hand, I plan to do this: - first I split my image using a Delaunay algorithm. - then, each pixels (except the given ones) belongs to a single triangle. Thus I can calculate the scalar factors using a barycenter formula. For example, let be a triangle defined by three pixels A, B and C. Let be P a pixel inside this triangle. The following vectorial relations can be written: PA = a.u, PB = b.v and PC = c.w, where u,v and w are unit vector along (PA), (PB) and (PC) respectively. In this context I plan to use scalar factors a, b and c to interpolate A,B and C pixels colors values. The color of pixel P being then set to these interpolated values. Is it the right way to do ? Do you know a better way to do this ? Giving you a larger sight may help you to help me. Actually I want to interpolate a vector field from a given set of vectors. The idea is to do something like normal maps used in computer graphics. Mapping the 3D vectors position to a 2D space is not a problem since their starting point belongs to a parametric surface, therefore the 2D parametric space of the surface can be used. Then the (u,v) space can easily be mapped to an image pixels space while the coordinates of my vectors can meanwhile be mapped to a rgb color space. Using an image to build and store my vector field interpolation is convenient but I would like to set up all this in the most efficient manner. According to you, what is the better way to do this ? Thanks for any help. jMax -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Mon Dec 11 11:00:17 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 11 Dec 2017 16:00:17 +0000 Subject: [vtkusers] ExtractByLocation In-Reply-To: References: Message-ID: Hello Amine, Take a look at point locators in VTK. Here is an example of the KdTreePointLocator: https://lorensen.github.io/VTKExamples/site/Cxx/DataStructures/KdTreePointLocator/ClosestNPoints/ For your particular use case, you might want to look at vtkKdTreePointLocator::FindPointsWithinRadius Hope this helps. Best, Sankhesh ? On Sat, Dec 9, 2017 at 5:49 AM kenichiro yoshimi wrote: > Hello Amine, > > The searching range for location selection of points is limited by > EPSILON key. You can set a bigger value to expand the searching range > as below. > SelectionNode.GetProperties().Set(SelectionNode.EPSILON(), 1000) > > Thanks > > 2017-12-02 0:45 GMT+09:00 Amine Aboufirass : > > Hello, > > > > I am trying to figure out how to select the closest neighboring points > to a > > list of coordinates using the vtk library. I have a simple point data > set in > > the Unstructured Grid Format. The dataset contains one attribute named > the > > 'point_id' which is just enumerating the points starting from 1 instead > of > > 0. The raw text from the ASCII file is attached in testScalar.vtk below. > > > > I have also written a script in python which I thought would function as > > follows: > > > > INPUT: > > > > List of tuples containing world coordinates [(X1,Y1,Z1),(X2,Y2,Z2)] > > name of attribute to extract as a string. in this case "point_id" > > > > OUTPUT: > > > > List of floating point values of the attribute for the selected points > > > > This does work to a certain degree, for instance when I do : > > > > ExtractByLocation('testScalar.vtk', [(5.999,0,0)], 'point_id') > > > > I do indeed get back the following: > > > > array([ 2.], dtype=float32) > > > > So point_id 2 is the closest point to the coordinates I have specified. > > However, as soon as I get a bit too far from one of the points, the > function > > starts returning an empty list. For instance: > > > > ExtractByLocation('testScalar.vtk', [(5.888,0,0)], 'point_id') > > > > Returns > > array([], dtype=float32) > > > > I found out that the cut off point is 5.89-5.90. If I plugin 5.9 I get > the > > point, if I plugin 5.89 I get back an empty list. > > > > According to the object reference > > ( > https://www.vtk.org/doc/nightly/html/classvtkSelectionNode.html#aa7b54148c40adf4f5019b8ad3e160535a97d8505c922b2a25c5d2755607d3cbb6 > ) > > LOCATIONS is supposed to select the points near the supplied world > > coordinates. Is there an option or something that selects the nearest > point > > PERIOD? i.e using a simple distance formula? I would like to never get > back > > an empty list but always get back a list of the closest point to the > > supplied coordinates. > > > > Kind Regards, > > > > Amine > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 zhuangming.shen at sphic.org.cn Mon Dec 11 21:33:58 2017 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Tue, 12 Dec 2017 02:33:58 +0000 Subject: [vtkusers] VTK web application Message-ID: <1513046029721.39911@sphic.org.cn> ?Hi all, I referred vtkweb/launcher.py in VTK 8.0.0 to write my own codes with twisted 17.1.0 and autobahn 0.8.14, it can work using python 2.7. But when I upgraded python to 3.4, it did not respond to http request, and in front-end displayed "404 No such Resource". So I wonder if launcher.py can support python 3.x? Need to modify something? Any suggestions are welcome. BTW, I noticed that launcher.py has been removed in VTK 8.1.0. Does that mean VTK web application use a new architecture? Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Tue Dec 12 05:05:10 2017 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Tue, 12 Dec 2017 21:05:10 +1100 Subject: [vtkusers] Standard human anatomical position In-Reply-To: References: Message-ID: I have created a little example to show the various anatomical planes and relate them to coordinate systems using vtkOrientationMarkerWidget. I would like to put a human body in the standard anatomical position i.e. standing up straight with the body at rest into this view. Does anyone know of a freely available model I can use that is compliant with VTK licensing? Thanks in advance, Andrew Maclean -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Dec 12 08:36:43 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 12 Dec 2017 06:36:43 -0700 Subject: [vtkusers] VTK web application In-Reply-To: <1513046029721.39911@sphic.org.cn> References: <1513046029721.39911@sphic.org.cn> Message-ID: VTK 8.1.0 will support Python 3 with our WSLink library. In order to migrate, you will have a couple of import to fix but the API should be almost the same if not the same. Aron should be able to give you some pointers on where to look for migration examples. Seb On Mon, Dec 11, 2017 at 7:33 PM, ??? wrote: > ?Hi all, > > > I referred vtkweb/launcher.py in VTK 8.0.0 to write my own codes with > twisted 17.1.0 and autobahn 0.8.14, it can work using python 2.7. But when > I upgraded python to 3.4, it did not respond to http request, and in > front-end displayed "404 No such Resource". So I wonder if launcher.py can > support python 3.x? Need to modify something? Any suggestions are welcome. > > > BTW, I noticed that launcher.py has been removed in VTK 8.1.0. Does that > mean VTK web application use a new architecture? > > > > Regards, > > > Zhuangming Shen > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Tue Dec 12 08:40:39 2017 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 12 Dec 2017 13:40:39 +0000 Subject: [vtkusers] Standard human anatomical position In-Reply-To: References: Message-ID: You can grab this one from 3D Slicer (all resource files that we put into Slicer can be used without even attribution): https://www.dropbox.com/s/5ftwq3egtun19um/SlicerHumanOrientationMarker.png?dl=0 https://github.com/Slicer/Slicer/blob/master/Base/Logic/Resources/OrientationMarkers/Human.vtp The model is shaped colored to make it easy to distinguish directions (left/right, up/down, front/back), even when shown in a small size. Color information is stored embedded as scalar data, so you don?t need to load it separately from a texture file. Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Andrew Maclean Sent: Tuesday, December 12, 2017 5:05 AM To: VTK Developers ; vtk Subject: [vtkusers] Standard human anatomical position I have created a little example to show the various anatomical planes and relate them to coordinate systems using vtkOrientationMarkerWidget. I would like to put a human body in the standard anatomical position i.e. standing up straight with the body at rest into this view. Does anyone know of a freely available model I can use that is compliant with VTK licensing? Thanks in advance, Andrew Maclean -------------- next part -------------- An HTML attachment was scrubbed... URL: From Zoltan.Kovacs at esi-group.com Tue Dec 12 12:05:16 2017 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Tue, 12 Dec 2017 17:05:16 +0000 Subject: [vtkusers] Install of vtkMPEG2 Encoder. Message-ID: Hi All, I have built vtkmpeg2encode from source in the directory /home/zko/vtkmpeg2encode, which contains the shared object libvtkMPEG2Encode.so and the header files. Then I set the cmake variables VTK_USE_MPEG2_ENCODER to ON, vtkMPEG2Encode_INCLUDE_PATH to /home/zko/vtkmpeg2encode and vtkMPEG2Encode_LIBRARIES to /home/zko/vtkmpeg2encode/ libvtkMPEG2Encode.so and built and install VTK. However, when checking the files cmake_install.cmake and install_manifest.txt, I could not find vtkMPEG2Writer.h among the installed header files. It seems cmake did not built the mpeg encoder library even if the file CMakeCache.txt contains the lines VTK_USE_MPEG2_ENCODER:BOOL=ON vtkMPEG2Encode_INCLUDE_PATH:PATH=/home/zko/vtkmpeg2encode vtkMPEG2Encode_LIBRARIES:STRING=/home/zko/vtkmpeg2encode/ libvtkMPEG2Encode.so. Is there any step missing from the building and installing process of the mpeg2 encoder? Thanks, Zoltan -------------- next part -------------- An HTML attachment was scrubbed... URL: From elhassan.abdou at gmail.com Tue Dec 12 13:51:41 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Tue, 12 Dec 2017 19:51:41 +0100 Subject: [vtkusers] offscreen rendering vtkGenericopenglRenderWindow Message-ID: Hi, I am trying to do offscreen rendering of a scene. When I captured the framebuffer and add to Qopenglvtkwidget using image actor the image was split into two halves as attached in the image attached. Can you please help me to know how to solve this issue to make the captured framebuffer looks like the scene shown VTKWidget1->GetRenderWindow()->AddRenderer(m_rendererLeft); VTKWidget2->GetRenderWindow()->AddRenderer(m_rendererRight); VTKWidget1->show(); VTKWidget2->show(); m_SkinMapperLeft->SetInputConnection(m_SkinNormals->GetOutputPort()); m_SkinMapperLeft->ScalarVisibilityOff(); //m_SkinMapperRight->SetInputConnection(m_SkinNormals->GetOutputPort()); //m_SkinMapperRight->ScalarVisibilityOff(); m_SkinActorLeft->SetMapper(m_SkinMapperLeft); //m_SkinActorRight->SetMapper(m_SkinMapperRight); m_outlineData->SetInputConnection(m_Volume16Reader->GetOutputPort()); m_mapOutlineLeft->SetInputConnection(m_outlineData->GetOutputPort()); m_outlineActorLeft->SetMapper(m_mapOutlineLeft); m_outlineActorLeft->GetProperty()->SetColor(0, 0, 0); m_CameraLeft->SetViewUp(0, 0, -1); m_CameraLeft->SetPosition(0, 1, 0); m_CameraLeft->SetFocalPoint(0, 0, 0); m_CameraLeft->ComputeViewPlaneNormal(); m_CameraLeft->Azimuth(30.0); m_CameraLeft->Elevation(30.0); m_rendererLeft->AddActor(m_outlineActorLeft); m_rendererLeft->AddActor(m_SkinActorLeft); m_rendererLeft->SetActiveCamera(m_CameraLeft); m_rendererLeft->ResetCamera(); m_rendererRight->SetActiveCamera(m_CameraLeft); m_rendererRight->ResetCamera(); m_CameraLeft->Dolly(1.5); // Set a background color for the renderer and set the size of the // render window (expressed in pixels). m_rendererLeft->SetBackground(.2, .3, .4); m_rendererRight->SetBackground(.2, .3, .4); //m_rendererRight->SetActiveCamera(m_CameraLeft); //m_rendererRight->ResetCamera(); //Creates an Empty image /*m_LeftRenderWindow->SetUseOffScreenBuffers(true); m_rendererLeft->Render(); int* size = m_LeftRenderWindow->GetSize(); vtkNew image; image->SetDimensions(size[0] - 1, size[1] - 1, 1); image->AllocateScalars(VTK_UNSIGNED_CHAR, 3); m_LeftRenderWindow->GetPixelData(0, 0, size[0] - 1, size[1] - 1,0, vtkArrayDownCast(image->GetPointData()->GetScalars()),0);*/ m_LeftRenderWindow->SetUseOffScreenBuffers(false); m_LeftRenderWindow->Render(); m_LeftRenderWindow->SetUseOffScreenBuffers(true); m_LeftRenderWindow->Render(); int* size = m_LeftRenderWindow->GetSize(); vtkNew image; image->SetDimensions(size[0] - 1, size[1] - 1, 1); image->AllocateScalars(VTK_UNSIGNED_CHAR, 3); m_LeftRenderWindow->GetPixelData(0, 0, size[0] - 1, size[1] - 1, 0, vtkArrayDownCast(image->GetPointData()->GetScalars()), 0); m_LeftRenderWindow->SetUseOffScreenBuffers(false); vtkNew imageActor; imageActor->GetMapper()->SetInputData(image); m_rendererRight->AddActor(imageActor); m_rendererRight->Render(); [image: Inline image 1] Best regards Elhassan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 290311 bytes Desc: not available URL: From andrew.amaclean at gmail.com Tue Dec 12 15:25:19 2017 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Wed, 13 Dec 2017 07:25:19 +1100 Subject: [vtkusers] Standard human anatomical position In-Reply-To: References: Message-ID: Thankyou very much! It looks to be exactly what I need. On Wed, Dec 13, 2017 at 12:40 AM, Andras Lasso wrote: > You can grab this one from 3D Slicer (all resource files that we put into > Slicer can be used without even attribution): > > > > https://www.dropbox.com/s/5ftwq3egtun19um/SlicerHumanOrientationMarker. > png?dl=0 > > > > https://github.com/Slicer/Slicer/blob/master/Base/Logic/ > Resources/OrientationMarkers/Human.vtp > > > > The model is shaped colored to make it easy to distinguish directions > (left/right, up/down, front/back), even when shown in a small size. Color > information is stored embedded as scalar data, so you don?t need to load it > separately from a texture file. > > > > Andras > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Andrew > Maclean > *Sent:* Tuesday, December 12, 2017 5:05 AM > *To:* VTK Developers ; vtk > *Subject:* [vtkusers] Standard human anatomical position > > > > I have created a little example to show the various anatomical planes and > relate them to coordinate systems using vtkOrientationMarkerWidget. I would > like to put a human body in the standard anatomical position i.e. standing > up straight with the body at rest into this view. > > > > Does anyone know of a freely available model I can use that is compliant > with VTK licensing? > > > > > Thanks in advance, > > Andrew Maclean > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Tue Dec 12 15:36:13 2017 From: aron.helser at kitware.com (Aron Helser) Date: Tue, 12 Dec 2017 15:36:13 -0500 Subject: [vtkusers] VTK web application In-Reply-To: References: <1513046029721.39911@sphic.org.cn> Message-ID: The older Autobahn had a number of issues with Python 3 - so I would expect you to have problems. We were able to make it work with python 3 by backporting a number of python3 fixes, but can you upgrade to VTK 8.1.0? Then you can use the newest autobahn and twisted, with wslink. launcher.py has migrated to wslink: https://github.com/ Kitware/wslink/blob/master/python/src/wslink/launcher.py but it didn't change very much. I don't know if we have a vtk-only example of migration, but the Visualizer app migrated, including the launcher, I believe. Aron On Tue, Dec 12, 2017 at 8:36 AM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > VTK 8.1.0 will support Python 3 with our WSLink library. > In order to migrate, you will have a couple of import to fix but the API > should be almost the same if not the same. > > Aron should be able to give you some pointers on where to look for > migration examples. > > Seb > > On Mon, Dec 11, 2017 at 7:33 PM, ??? wrote: > >> ?Hi all, >> >> >> I referred vtkweb/launcher.py in VTK 8.0.0 to write my own codes with >> twisted 17.1.0 and autobahn 0.8.14, it can work using python 2.7. But when >> I upgraded python to 3.4, it did not respond to http request, and in >> front-end displayed "404 No such Resource". So I wonder if launcher.py can >> support python 3.x? Need to modify something? Any suggestions are welcome. >> >> >> BTW, I noticed that launcher.py has been removed in VTK 8.1.0. Does that >> mean VTK web application use a new architecture? >> >> >> >> Regards, >> >> >> Zhuangming Shen >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elhassan.abdou at gmail.com Wed Dec 13 03:34:09 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Wed, 13 Dec 2017 09:34:09 +0100 Subject: [vtkusers] EGL offscreen rendering Message-ID: Hi all, where can I find an example explains the use of EGL for offscreen rendering? How can I visually debug the output of the EGL rendering? Best regards Elhassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From kornicki.entwicklung at chello.at Wed Dec 13 04:18:45 2017 From: kornicki.entwicklung at chello.at (Entwicklung Kornicki) Date: Wed, 13 Dec 2017 10:18:45 +0100 Subject: [vtkusers] Rendering an image with Kitware VTK Message-ID: <84fe4c41-9ce8-fee6-fade-2624dec77e66@chello.at> I have a problem inserting an image into an existing assembly using ActiViz Kitware VTK 5.8 (for C#). This is how I defined the actor: ??? private vtkImageActor psi_imgActor; ??? psi_imgActor = vtkImageActor.New(); ??? Psi_DrawTable_Image(); In the method Psi_DrawTable_Image, I created the image and stored it as a file. I checked the file, it is okay and looks as it should, so that is not the problem. Then I created a vtkBMPReader object and set the input of the actor: ??? vtkBMPReader bmpReader = vtkBMPReader.New(); ??? bmpReader.SetFileName(filename); ??? bmpReader.Update(); ??? psi_imgActor.SetInput(bmpReader.GetOutput()); ??? psi_imgActor.InterpolateOff(); ??? psi_imgActor.SetPosition(250, 200, 1000); Finally, I added the actor to the assembly, where assembly3D is a variable of type vtkAssembly - I added everything that is visible to this assembly, except the 2D stuff (such as texts). ??? if (psi_imgActor != null) assembly3D.AddPart(psi_imgActor); Unfortunately, I do not get to see the image. What's wrong? Where's the mistake? Thank you in advance. From kornicki.entwicklung at chello.at Wed Dec 13 04:55:45 2017 From: kornicki.entwicklung at chello.at (Entwicklung Kornicki) Date: Wed, 13 Dec 2017 10:55:45 +0100 Subject: [vtkusers] Rendering an image with Kitware VTK Message-ID: <8da90199-6e91-2c84-5f77-ea0a9d7e2ea6@chello.at> It turned out that for whatever reason, it was a problem that I used vtkBMPReader. With vtkJPEGReader (which required a few statements to be modified), it works now. From utkarsh.ayachit at kitware.com Wed Dec 13 09:58:28 2017 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 13 Dec 2017 09:58:28 -0500 Subject: [vtkusers] EGL offscreen rendering In-Reply-To: References: Message-ID: Elhassan, For VTK 8.1, you can set the following CMake variables: VTK_USE_X=OFF VTK_OPENGL_HAS_EGL=ON EGL_INCLUDE_DIR: Path to directory containing GL/egl.h. EGL_LIBRARY: Path to libEGL.so. EGL_opengl_LIBRARY: Path to libOpenGL.so. > How can I visually debug the output of the EGL rendering? Currently, we don't support an on-screen rendering with EGL. Utkarsh From cory.quammen at kitware.com Wed Dec 13 11:37:28 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 13 Dec 2017 11:37:28 -0500 Subject: [vtkusers] Building a colored texture by interpolating a set of colored points. In-Reply-To: References: Message-ID: That seems like a reasonable approach to doing what you are describing. If you need only to compute normals between points on a Delaunay2D surface and display them immediately, then the rendering is already doing that for you on the GPU, so it is very fast. If you need to save out the texture, then doing it the way you describe also sounds reasonable. HTH, Cory On Mon, Dec 11, 2017 at 8:32 AM, Jean-Max Redonnet wrote: > Hi, I'm still quite new to vtk, and I would like a pro advice. > > I have a set of pixels, each one given with its full rgb color > information. I would like to build a full image by interpolating color of > pixels between the given points. First, I would like to know if there is a > magic wand to do that. I searched it for days but maybe I missed something. > > If the job need to be done by hand, I plan to do this: > - first I split my image using a Delaunay algorithm. > - then, each pixels (except the given ones) belongs to a single triangle. > Thus I can calculate the scalar factors using a barycenter formula. > > For example, let be a triangle defined by three pixels A, B and C. Let be > P a pixel inside this triangle. The following vectorial relations can be > written: PA = a.u, PB = b.v and PC = c.w, where u,v and w are unit vector > along (PA), (PB) and (PC) respectively. In this context I plan to use > scalar factors a, b and c to interpolate A,B and C pixels colors values. > The color of pixel P being then set to these interpolated values. > > Is it the right way to do ? Do you know a better way to do this ? > > Giving you a larger sight may help you to help me. Actually I want to > interpolate a vector field from a given set of vectors. The idea is to do > something like normal maps used in computer graphics. Mapping the 3D > vectors position to a 2D space is not a problem since their starting point > belongs to a parametric surface, therefore the 2D parametric space of the > surface can be used. Then the (u,v) space can easily be mapped to an image > pixels space while the coordinates of my vectors can meanwhile be mapped to > a rgb color space. > > Using an image to build and store my vector field interpolation is > convenient but I would like to set up all this in the most efficient manner. > > According to you, what is the better way to do this ? > > Thanks for any help. > > jMax > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 tonyuanac at gmail.com Wed Dec 13 11:40:25 2017 From: tonyuanac at gmail.com (Tony Yuan) Date: Wed, 13 Dec 2017 11:40:25 -0500 Subject: [vtkusers] vtkOBJReader not reading the whole mesh Message-ID: Hi, I have a problem reading Blender OBJ files using VTK. The vtkOBJReader seems to only read part of the mesh. When I render the data being read it looks like this: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk.png Type: image/png Size: 18480 bytes Desc: not available URL: -------------- next part -------------- However, when I import the OBJ file in Meshlab it looks fine. Mac?s Preview is also able to open the complete mesh. -------------- next part -------------- A non-text attachment was scrubbed... Name: meshlab.png Type: image/png Size: 34904 bytes Desc: not available URL: -------------- next part -------------- I attached the OBJ file and my code below. I am not very familiar with the OBJ format and how vtkOBJReader is implemented. If someone could point me to the problem and possible fixes, that would be great. -------------- next part -------------- A non-text attachment was scrubbed... Name: model.obj Type: application/octet-stream Size: 628701 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ReadObj.cpp Type: application/octet-stream Size: 1419 bytes Desc: not available URL: -------------- next part -------------- Thanks, Tony From sebastien.jourdain at kitware.com Wed Dec 13 12:25:21 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 13 Dec 2017 10:25:21 -0700 Subject: [vtkusers] vtkOBJReader not reading the whole mesh In-Reply-To: References: Message-ID: The file you sent have several materials and I think that the vtkOBJReader just read the first one as it is focusing on the mesh only. Your file is correct and I've tried it with vtk.js with success here: https://kitware.github.io/vtk-js/examples/OBJViewer.html But you may have more luck with the importer which could also process the mtl file that should come along. That way all the pieces that compose that object will be loaded. Seb On Wed, Dec 13, 2017 at 9:40 AM, Tony Yuan wrote: > Hi, > > I have a problem reading Blender OBJ files using VTK. The vtkOBJReader > seems to only read part of the mesh. When I render the data being read it > looks like this: > > > > However, when I import the OBJ file in Meshlab it looks fine. Mac?s > Preview is also able to open the complete mesh. > > > > I attached the OBJ file and my code below. I am not very familiar with the > OBJ format and how vtkOBJReader is implemented. If someone could point me > to the problem and possible fixes, that would be great. > > > > Thanks, > Tony > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Dec 13 12:53:17 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 13 Dec 2017 17:53:17 +0000 Subject: [vtkusers] vtkOBJReader not reading the whole mesh In-Reply-To: References: Message-ID: You also need the material file that is referenced in the .obj file: model.mtl Then use the OBJImporter because you have more than one object in the file See: https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ On Wed, Dec 13, 2017 at 4:40 PM, Tony Yuan wrote: > Hi, > > I have a problem reading Blender OBJ files using VTK. The vtkOBJReader seems to only read part of the mesh. When I render the data being read it looks like this: > > > > However, when I import the OBJ file in Meshlab it looks fine. Mac?s Preview is also able to open the complete mesh. > > > > I attached the OBJ file and my code below. I am not very familiar with the OBJ format and how vtkOBJReader is implemented. If someone could point me to the problem and possible fixes, that would be great. > > > > Thanks, > Tony > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 tonyuanac at gmail.com Wed Dec 13 13:56:44 2017 From: tonyuanac at gmail.com (Tony Yuan) Date: Wed, 13 Dec 2017 13:56:44 -0500 Subject: [vtkusers] vtkOBJReader not reading the whole mesh In-Reply-To: References: Message-ID: <16A27948-BCCD-417A-9B81-EA67EDF68D65@gmail.com> Hi Bill, I tried the code on the example website, and got a mesh with texture, but still, it only contains the legs of the chair. From what I see in Meshlab, it seems that only the legs have texture. Is that the reason why the OBJImporter doesn?t read the remaining part? I am only interested in getting the entire mesh as a vtkPolyData, not the texture. If the material file is incomplete, is there a way I can still get the mesh from the obj file? I attached the mtl file for your reference. -------------- next part -------------- A non-text attachment was scrubbed... Name: model.mtl Type: application/octet-stream Size: 712 bytes Desc: not available URL: -------------- next part -------------- Tony > On Dec 13, 2017, at 12:53 PM, Bill Lorensen wrote: > > You also need the material file that is referenced in the .obj file: > model.mtl > > Then use the OBJImporter because you have more than one object in the file > > See: > https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ > > > On Wed, Dec 13, 2017 at 4:40 PM, Tony Yuan wrote: >> Hi, >> >> I have a problem reading Blender OBJ files using VTK. The vtkOBJReader seems to only read part of the mesh. When I render the data being read it looks like this: >> >> >> >> However, when I import the OBJ file in Meshlab it looks fine. Mac?s Preview is also able to open the complete mesh. >> >> >> >> I attached the OBJ file and my code below. I am not very familiar with the OBJ format and how vtkOBJReader is implemented. If someone could point me to the problem and possible fixes, that would be great. >> >> >> >> Thanks, >> Tony >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 tonyuanac at gmail.com Wed Dec 13 14:07:44 2017 From: tonyuanac at gmail.com (Tony Yuan) Date: Wed, 13 Dec 2017 14:07:44 -0500 Subject: [vtkusers] vtkOBJReader not reading the whole mesh In-Reply-To: References: Message-ID: Hi Sebastien, The js loader works fine, but I couldn?t get the same behavior in C++. I tried to see if the reader has multiple outputs, but objReader.getNumberOfOutputPorts() returns 1. I am interested in getting the mesh as a vtkPolyData, is there a way I can do that with OBJImporter? There seems to be no GetOutput function like OBJReader. Tony > On Dec 13, 2017, at 12:25 PM, Sebastien Jourdain wrote: > > The file you sent have several materials and I think that the vtkOBJReader just read the first one as it is focusing on the mesh only. > > Your file is correct and I've tried it with vtk.js with success here: https://kitware.github.io/vtk-js/examples/OBJViewer.html > > But you may have more luck with the importer which could also process the mtl file that should come along. That way all the pieces that compose that object will be loaded. > > Seb > > On Wed, Dec 13, 2017 at 9:40 AM, Tony Yuan > wrote: > Hi, > > I have a problem reading Blender OBJ files using VTK. The vtkOBJReader seems to only read part of the mesh. When I render the data being read it looks like this: > > > > However, when I import the OBJ file in Meshlab it looks fine. Mac?s Preview is also able to open the complete mesh. > > > > I attached the OBJ file and my code below. I am not very familiar with the OBJ format and how vtkOBJReader is implemented. If someone could point me to the problem and possible fixes, that would be great. > > > > Thanks, > Tony > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Dec 13 15:13:20 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 13 Dec 2017 13:13:20 -0700 Subject: [vtkusers] vtkOBJReader not reading the whole mesh In-Reply-To: References: Message-ID: That script [1] should work with ParaView to generate the various datasets. Once they are converted, you can load them in your VTK application. Also, if you need you can merge the various polydata into a single file using ParaView. [1] https://github.com/Kitware/vtk-js/blob/master/Utilities/ParaView/obj-mtl-importer.py On Wed, Dec 13, 2017 at 12:07 PM, Tony Yuan wrote: > Hi Sebastien, > > The js loader works fine, but I couldn?t get the same behavior in C++. I > tried to see if the reader has multiple outputs, but objReader.getNumberOfOutputPorts() > returns 1. > > I am interested in getting the mesh as a vtkPolyData, is there a way I can > do that with OBJImporter? There seems to be no GetOutput function like > OBJReader. > > Tony > > On Dec 13, 2017, at 12:25 PM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > > The file you sent have several materials and I think that the vtkOBJReader > just read the first one as it is focusing on the mesh only. > > Your file is correct and I've tried it with vtk.js with success here: > https://kitware.github.io/vtk-js/examples/OBJViewer.html > > But you may have more luck with the importer which could also process the > mtl file that should come along. That way all the pieces that compose that > object will be loaded. > > Seb > > On Wed, Dec 13, 2017 at 9:40 AM, Tony Yuan wrote: > >> Hi, >> >> I have a problem reading Blender OBJ files using VTK. The vtkOBJReader >> seems to only read part of the mesh. When I render the data being read it >> looks like this: >> >> >> >> However, when I import the OBJ file in Meshlab it looks fine. Mac?s >> Preview is also able to open the complete mesh. >> >> >> >> I attached the OBJ file and my code below. I am not very familiar with >> the OBJ format and how vtkOBJReader is implemented. If someone could point >> me to the problem and possible fixes, that would be great. >> >> >> >> Thanks, >> Tony >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Dec 13 15:35:43 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 13 Dec 2017 15:35:43 -0500 Subject: [vtkusers] vtkOBJReader not reading the whole mesh In-Reply-To: References: Message-ID: There must be a bug in the OBJImporter. It reports 4 actors, but only one has polygons. The others report 0 polygons. I'll take a look. On Wed, Dec 13, 2017 at 2:07 PM, Tony Yuan wrote: > Hi Sebastien, > > The js loader works fine, but I couldn?t get the same behavior in C++. I > tried to see if the reader has multiple outputs, but > objReader.getNumberOfOutputPorts() returns 1. > > I am interested in getting the mesh as a vtkPolyData, is there a way I can > do that with OBJImporter? There seems to be no GetOutput function like > OBJReader. > > Tony > > On Dec 13, 2017, at 12:25 PM, Sebastien Jourdain > wrote: > > The file you sent have several materials and I think that the vtkOBJReader > just read the first one as it is focusing on the mesh only. > > Your file is correct and I've tried it with vtk.js with success here: > https://kitware.github.io/vtk-js/examples/OBJViewer.html > > But you may have more luck with the importer which could also process the > mtl file that should come along. That way all the pieces that compose that > object will be loaded. > > Seb > > On Wed, Dec 13, 2017 at 9:40 AM, Tony Yuan wrote: >> >> Hi, >> >> I have a problem reading Blender OBJ files using VTK. The vtkOBJReader >> seems to only read part of the mesh. When I render the data being read it >> looks like this: >> >> >> >> However, when I import the OBJ file in Meshlab it looks fine. Mac?s >> Preview is also able to open the complete mesh. >> >> >> >> I attached the OBJ file and my code below. I am not very familiar with the >> OBJ format and how vtkOBJReader is implemented. If someone could point me to >> the problem and possible fixes, that would be great. >> >> >> >> Thanks, >> Tony >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From dave.demarle at kitware.com Wed Dec 13 16:39:53 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 13 Dec 2017 16:39:53 -0500 Subject: [vtkusers] announce: vtk 8.1.0.rc3 is ready to try Message-ID: Hi folks, VTK 8.1.0.rc3 is up on the downloads site and tagged in git. Please give it a try and report any problems that you find to us via the gitlab issue tracker with an "8.1" milestone tag. Developers, use the same tag to let us know of any fixes that you want integrated to the release branch in time for 8.1.0 final in about a week. If nothing major comes up, this will be retagged as 8.1.0 final. We expect the next release, VTK 9.0.0, to be out in a few short months. The reason for rc3 is that we decided to deprecate vtkHyperOctree. It has long been superseded by vtkHyperTreeGrid, which is being actively maintained and updated, unlike its predecessor. thanks 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 bill.lorensen at gmail.com Wed Dec 13 16:44:42 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 13 Dec 2017 16:44:42 -0500 Subject: [vtkusers] vtkOBJReader not reading the whole mesh In-Reply-To: References: Message-ID: I found the problem. The OBJImporter skips any polydata that // If some vertices have tcoords and not others (likewise normals) // then we must do something else VTK will complain. (crash on render attempt) // Easiest solution is to delete polys that don't have complete tcoords (if there // are any tcoords in the dataset) or normals (if there are any normals in the dataset). If does without warning. Only report the skipping if debug is on. This is bad!!! I'll try to fix the problem in a different way. At the very least I'll warn out loud about the skipping. I've attached a model.obj that removes the tcoords and normals. Bill On Wed, Dec 13, 2017 at 3:35 PM, Bill Lorensen wrote: > There must be a bug in the OBJImporter. It reports 4 actors, but only > one has polygons. The others report 0 polygons. > > I'll take a look. > > > On Wed, Dec 13, 2017 at 2:07 PM, Tony Yuan wrote: >> Hi Sebastien, >> >> The js loader works fine, but I couldn?t get the same behavior in C++. I >> tried to see if the reader has multiple outputs, but >> objReader.getNumberOfOutputPorts() returns 1. >> >> I am interested in getting the mesh as a vtkPolyData, is there a way I can >> do that with OBJImporter? There seems to be no GetOutput function like >> OBJReader. >> >> Tony >> >> On Dec 13, 2017, at 12:25 PM, Sebastien Jourdain >> wrote: >> >> The file you sent have several materials and I think that the vtkOBJReader >> just read the first one as it is focusing on the mesh only. >> >> Your file is correct and I've tried it with vtk.js with success here: >> https://kitware.github.io/vtk-js/examples/OBJViewer.html >> >> But you may have more luck with the importer which could also process the >> mtl file that should come along. That way all the pieces that compose that >> object will be loaded. >> >> Seb >> >> On Wed, Dec 13, 2017 at 9:40 AM, Tony Yuan wrote: >>> >>> Hi, >>> >>> I have a problem reading Blender OBJ files using VTK. The vtkOBJReader >>> seems to only read part of the mesh. When I render the data being read it >>> looks like this: >>> >>> >>> >>> However, when I import the OBJ file in Meshlab it looks fine. Mac?s >>> Preview is also able to open the complete mesh. >>> >>> >>> >>> I attached the OBJ file and my code below. I am not very familiar with the >>> OBJ format and how vtkOBJReader is implemented. If someone could point me to >>> the problem and possible fixes, that would be great. >>> >>> >>> >>> Thanks, >>> Tony >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- A non-text attachment was scrubbed... Name: model.obj Type: application/octet-stream Size: 622245 bytes Desc: not available URL: From elhassan.abdou at gmail.com Wed Dec 13 17:01:19 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Wed, 13 Dec 2017 23:01:19 +0100 Subject: [vtkusers] EGL offscreen rendering In-Reply-To: References: Message-ID: <5a31a319.01c0500a.31a13.3197@mx.google.com> Hi Can you suggest a way to debug my output from the offscreen rendering process ? I appreciate your help Elhassan Sent from Mail for Windows 10 From: Utkarsh Ayachit Sent: Wednesday, December 13, 2017 3:58 PM To: Elhassan Abdou Cc: vtk Subject: Re: [vtkusers] EGL offscreen rendering Elhassan, For VTK 8.1, you can set the following CMake variables: VTK_USE_X=OFF VTK_OPENGL_HAS_EGL=ON EGL_INCLUDE_DIR: Path to directory containing GL/egl.h. EGL_LIBRARY: Path to libEGL.so. EGL_opengl_LIBRARY: Path to libOpenGL.so. > How can I visually debug the output of the EGL rendering? Currently, we don't support an on-screen rendering with EGL. Utkarsh -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott.wittenburg at kitware.com Wed Dec 13 17:11:43 2017 From: scott.wittenburg at kitware.com (Scott Wittenburg) Date: Wed, 13 Dec 2017 15:11:43 -0700 Subject: [vtkusers] EGL offscreen rendering In-Reply-To: <5a31a319.01c0500a.31a13.3197@mx.google.com> References: <5a31a319.01c0500a.31a13.3197@mx.google.com> Message-ID: I like to just save a screenshot for that purpose. Following is some sample code (I did not run this exactly, so you may need to tweak it, add includes, etc...) *Python* from vtk import * source = vtkConeSource() mapper = vtkPolyDataMapper() mapper.SetInputConnection(source.GetOutputPort()) actor = vtkActor() actor.SetMapper(mapper) ren = vtkRenderer() renWin = vtkRenderWindow() renWin.AddRenderer(ren) ren.AddActor(actor) renWin.Render() w2if = vtkWindowToImageFilter() w2if.SetInput(renWin) w2if.ReadFrontBufferOff() writer = vtkPNGWriter() writer.SetInputConnection(w2if.GetOutputPort()) w2if.Update() writer.SetFileName('/tmp/savedConeImage.png') writer.Write() *C++* vtkSmartPointer source = vtkSmartPointer::New(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(source->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); vtkSmartPointer ren = vtkSmartPointer::New(); vtkSmartPointer renWin = vtkSmartPointer::New(); renWin->AddRenderer(ren); ren->AddActor(actor); renWin->Render(); vtkSmartPointer w2if = vtkSmartPointer::New(); w2if->SetInput(renWin); w2if->ReadFrontBufferOff(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetInputConnection(w2if->GetOutputPort()); w2if->Update(); writer->SetFileName("/tmp/savedConeImage.png"); writer->Write(); Hope that helps. Cheers, Scott On Wed, Dec 13, 2017 at 3:01 PM, Elhassan Abdou wrote: > Hi > > > > Can you suggest a way to debug my output from the offscreen rendering > process ? > > > > I appreciate your help > > Elhassan > > > > Sent from Mail for > Windows 10 > > > > *From: *Utkarsh Ayachit > *Sent: *Wednesday, December 13, 2017 3:58 PM > *To: *Elhassan Abdou > *Cc: *vtk > *Subject: *Re: [vtkusers] EGL offscreen rendering > > > > Elhassan, > > > > For VTK 8.1, you can set the following CMake variables: > > > > VTK_USE_X=OFF > > VTK_OPENGL_HAS_EGL=ON > > EGL_INCLUDE_DIR: Path to directory containing GL/egl.h. > > EGL_LIBRARY: Path to libEGL.so. > > EGL_opengl_LIBRARY: Path to libOpenGL.so. > > > > > How can I visually debug the output of the EGL rendering? > > > > Currently, we don't support an on-screen rendering with EGL. > > > > Utkarsh > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 nztoddler at yahoo.com Wed Dec 13 18:28:33 2017 From: nztoddler at yahoo.com (Todd Martin) Date: Wed, 13 Dec 2017 23:28:33 +0000 (UTC) Subject: [vtkusers] vtkOBJReader not reading the whole mesh In-Reply-To: References: Message-ID: <1844444505.2946418.1513207713806@mail.yahoo.com> I found a problem similar to this when using? vtkPolyData->SetPoints(). If the point coordinates were not initialised, no polygons were produced. I didn't search the code, but it seemed to me that the coordinate values (floats) should be explicitly set to zero when a vtkPoint object is created (or any other object with real values), because I presume the compiler will not do it automatically (unlike integers). Todd. On Thursday, December 14, 2017, 10:45:17 AM GMT+13, Bill Lorensen wrote: I found the problem. The OBJImporter skips any polydata that ? ? ? ? ? // If some vertices have tcoords and not others (likewise normals) ? ? ? ? ? // then we must do something else VTK will complain. (crash on render attempt) ? ? ? ? ? // Easiest solution is to delete polys that don't have complete tcoords (if there ? ? ? ? ? // are any tcoords in the dataset) or normals (if there are any normals in the dataset). If does without warning. Only report the skipping? if debug is on. This is bad!!! I'll try to fix the problem in a different way. At the very least I'll warn out loud about the skipping. I've attached a model.obj that removes the tcoords and normals. Bill On Wed, Dec 13, 2017 at 3:35 PM, Bill Lorensen wrote: > There must be a bug in the OBJImporter. It reports 4 actors, but only > one has polygons. The others report 0 polygons. > > I'll take a look. > > > On Wed, Dec 13, 2017 at 2:07 PM, Tony Yuan wrote: >> Hi Sebastien, >> >> The js loader works fine, but I couldn?t get the same behavior in C++. I >> tried to see if the reader has multiple outputs, but >> objReader.getNumberOfOutputPorts() returns 1. >> >> I am interested in getting the mesh as a vtkPolyData, is there a way I can >> do that with OBJImporter? There seems to be no GetOutput function like >> OBJReader. >> >> Tony >> >> On Dec 13, 2017, at 12:25 PM, Sebastien Jourdain >> wrote: >> >> The file you sent have several materials and I think that the vtkOBJReader >> just read the first one as it is focusing on the mesh only. >> >> Your file is correct and I've tried it with vtk.js with success here: >> https://kitware.github.io/vtk-js/examples/OBJViewer.html >> >> But you may have more luck with the importer which could also process the >> mtl file that should come along. That way all the pieces that compose that >> object will be loaded. >> >> Seb >> >> On Wed, Dec 13, 2017 at 9:40 AM, Tony Yuan wrote: >>> >>> Hi, >>> >>> I have a problem reading Blender OBJ files using VTK. The vtkOBJReader >>> seems to only read part of the mesh. When I render the data being read it >>> looks like this: >>> >>> >>> >>> However, when I import the OBJ file in Meshlab it looks fine. Mac?s >>> Preview is also able to open the complete mesh. >>> >>> >>> >>> I attached the OBJ file and my code below. I am not very familiar with the >>> OBJ format and how vtkOBJReader is implemented. If someone could point me to >>> the problem and possible fixes, that would be great. >>> >>> >>> >>> Thanks, >>> Tony >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Dec 13 20:05:43 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 13 Dec 2017 20:05:43 -0500 Subject: [vtkusers] vtkOBJReader not reading the whole mesh In-Reply-To: <1844444505.2946418.1513207713806@mail.yahoo.com> References: <1844444505.2946418.1513207713806@mail.yahoo.com> Message-ID: This problem is because in given polydata the number of tcoords or normals does not match the number of points. The importer silently skips the polydata. On Dec 13, 2017 6:28 PM, "Todd Martin" wrote: > I found a problem similar to this when using vtkPolyData->SetPoints(). If > the point coordinates were not initialised, no polygons were produced. > > I didn't search the code, but it seemed to me that the coordinate values > (floats) should be explicitly set to zero when a vtkPoint object is created > (or any other object with real values), because I presume the compiler will > not do it automatically (unlike integers). > > Todd. > > > On Thursday, December 14, 2017, 10:45:17 AM GMT+13, Bill Lorensen < > bill.lorensen at gmail.com> wrote: > > > I found the problem. The OBJImporter skips any polydata that > // If some vertices have tcoords and not others (likewise > normals) > // then we must do something else VTK will complain. (crash > on render attempt) > // Easiest solution is to delete polys that don't have > complete tcoords (if there > // are any tcoords in the dataset) or normals (if there are > any normals in the dataset). > > If does without warning. Only report the skipping if debug is on. > This is bad!!! > > I'll try to fix the problem in a different way. At the very least I'll > warn out loud about the skipping. > > I've attached a model.obj that removes the tcoords and normals. > > Bill > > > On Wed, Dec 13, 2017 at 3:35 PM, Bill Lorensen > wrote: > > There must be a bug in the OBJImporter. It reports 4 actors, but only > > one has polygons. The others report 0 polygons. > > > > I'll take a look. > > > > > > On Wed, Dec 13, 2017 at 2:07 PM, Tony Yuan wrote: > >> Hi Sebastien, > >> > >> The js loader works fine, but I couldn?t get the same behavior in C++. I > >> tried to see if the reader has multiple outputs, but > >> objReader.getNumberOfOutputPorts() returns 1. > >> > >> I am interested in getting the mesh as a vtkPolyData, is there a way I > can > >> do that with OBJImporter? There seems to be no GetOutput function like > >> OBJReader. > >> > >> Tony > >> > >> On Dec 13, 2017, at 12:25 PM, Sebastien Jourdain > >> wrote: > >> > >> The file you sent have several materials and I think that the > vtkOBJReader > >> just read the first one as it is focusing on the mesh only. > >> > >> Your file is correct and I've tried it with vtk.js with success here: > >> https://kitware.github.io/vtk-js/examples/OBJViewer.html > >> > >> But you may have more luck with the importer which could also process > the > >> mtl file that should come along. That way all the pieces that compose > that > >> object will be loaded. > >> > >> Seb > >> > >> On Wed, Dec 13, 2017 at 9:40 AM, Tony Yuan wrote: > >>> > >>> Hi, > >>> > >>> I have a problem reading Blender OBJ files using VTK. The vtkOBJReader > >>> seems to only read part of the mesh. When I render the data being read > it > >>> looks like this: > >>> > >>> > >>> > >>> However, when I import the OBJ file in Meshlab it looks fine. Mac?s > >>> Preview is also able to open the complete mesh. > >>> > >>> > >>> > >>> I attached the OBJ file and my code below. I am not very familiar with > the > >>> OBJ format and how vtkOBJReader is implemented. If someone could point > me to > >>> the problem and possible fixes, that would be great. > >>> > >>> > >>> > >>> Thanks, > >>> Tony > >>> > >>> > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>> http://www.kitware.com/opensource/opensource.html > >>> > >>> Please keep messages on-topic and check the VTK FAQ at: > >>> http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Search the list archives at: http://markmail.org/search/?q=vtkusers > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://public.kitware.com/mailman/listinfo/vtkusers > >>> > >> > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtkusers > >> > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Thu Dec 14 02:07:32 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Thu, 14 Dec 2017 00:07:32 -0700 (MST) Subject: [vtkusers] Labeling to Image Message-ID: <1513235252882-0.post@n5.nabble.com> Hi, I want to label the binary image like this example. How should i do? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Andx_roo at live.com Thu Dec 14 02:44:08 2017 From: Andx_roo at live.com (Andaharoo) Date: Thu, 14 Dec 2017 00:44:08 -0700 (MST) Subject: [vtkusers] Unable to build VTK 8.0.1 vtkRenderingOculus Message-ID: <1513237448062-0.post@n5.nabble.com> I'm trying to build VTK for Oculus. I think everything is setup fine through cmake but when building the project on msvc2017_64 I get "void ovr_CalcEyePoses2(ovrPosef,const ovrPosef [],ovrPosef [])': cannot convert argument 2 from 'ovrVector3f [2]' to 'const ovrPosef []'" in vtkOculusRenderWindow.cxx line 174. And 'HmdToEyeOffset': is not a member of 'ovrEyeRenderDesc_' in vtkOculusRenderWindow.cxx line 415 and 416. I downloaded the Oculus SDK and SDL2. Built SDL2. Gave VTK the oculus root directory, SDL2 directory, lib files, and ofc checked vtkRenderingOculus. Also I'm using vtk 8.0.1. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From agatakrason at gmail.com Thu Dec 14 03:23:10 2017 From: agatakrason at gmail.com (=?UTF-8?Q?Agata_Kraso=C5=84?=) Date: Thu, 14 Dec 2017 09:23:10 +0100 Subject: [vtkusers] build VTK 7.1 on windows with MS VISUAL STUDIO 2015 or 2017 Message-ID: Hello, I am trying to build vtk (7.1 or higher) from source on windows in visual studio 2015 or 2017. I configure and generate project in cmake. I didn't make any change in cmake. (in options) I cant get build success on my pc. I always got kind a stuck of link errors like that : Severity Code Description Project File Line Suppression State Error LNK1104 cannot open file '..\..\lib\Debug\vtkIOCore-7.1.lib' vtkIOXMLParser C:\VTK\build-7.1-3\IO\XMLParser\LINK 1 Error LNK1104 cannot open file '..\..\lib\Debug\vtkCommonExecutionModel-7.1. lib' vtkFiltersSelection C:\VTK\build-7.1-3\Filters\Selection\LINK 1 Error LNK1104 cannot open file '..\..\..\lib\Debug\vtkNetCDF_cxx-7.1.lib' vtkexoIIc C:\VTK\build-7.1-3\ThirdParty\exodusII\vtkexodusII\LINK 1 Error C1083 Cannot open include file: 'vtkUnicodeCaseFoldData.h': No such file or directory vtkCommonCore C:\VTK\VTK-7.1.1\Common\Core\ vtkUnicodeString.cxx 375 Error LNK1104 cannot open file '..\..\lib\Debug\vtkCommonCore-7.1.lib' vtkCommonMath C:\VTK\build-7.1-3\Common\Math\LINK 1 Error LNK1104 cannot open file '..\..\lib\Debug\vtkCommonMath-7.1.lib' vtkCommonMisc C:\VTK\build-7.1-3\Common\Misc\LINK 1 Severity Code Description Project File Line Suppression State Error LNK1104 cannot open file '..\..\lib\Debug\vtkIOCore-7.1.lib' vtkIOXMLParser C:\VTK\build-7.1-3\IO\XMLParser\LINK 1 Error LNK1104 cannot open file '..\..\lib\Debug\vtkCommonExecutionModel-7.1.lib' vtkFiltersSelection C:\VTK\build-7.1-3\Filters\Selection\LINK 1 Error LNK1104 cannot open file '..\..\..\lib\Debug\vtkNetCDF_cxx-7.1.lib' vtkexoIIc C:\VTK\build-7.1-3\ThirdParty\exodusII\vtkexodusII\LINK 1 Error C1083 Cannot open include file: 'vtkUnicodeCaseFoldData.h': No such file or directory vtkCommonCore C:\VTK\VTK-7.1.1\Common\Core\vtkUnicodeString.cxx 375 Error LNK1104 cannot open file '..\..\lib\Debug\vtkCommonCore-7.1.lib' vtkCommonMath C:\VTK\build-7.1-3\Common\Math\LINK 1 Error LNK1104 cannot open file '..\..\lib\Debug\vtkCommonMath-7.1.lib' vtkCommonMisc C:\VTK\build-7.1-3\Common\Misc\LINK 1 Could someone help me please ? I would be appreciate for any help/advice. Best, Agata -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andx_roo at live.com Thu Dec 14 04:56:39 2017 From: Andx_roo at live.com (Andaharoo) Date: Thu, 14 Dec 2017 02:56:39 -0700 (MST) Subject: [vtkusers] Unable to build VTK 8.0.1 vtkRenderingOculus In-Reply-To: <1513237448062-0.post@n5.nabble.com> References: <1513237448062-0.post@n5.nabble.com> Message-ID: <1513245399377-0.post@n5.nabble.com> This appears to be an issue only present in newer versions of the Oculus SDK. On another note I keep getting mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelase'. How can I get the Oculus SDK to be dynamically linked without throwing this error? Do I have to build the Oculus SDK myself? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Thu Dec 14 08:29:11 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 14 Dec 2017 08:29:11 -0500 Subject: [vtkusers] Unable to build VTK 8.0.1 vtkRenderingOculus In-Reply-To: <1513237448062-0.post@n5.nabble.com> References: <1513237448062-0.post@n5.nabble.com> Message-ID: Oculus made some changes to how their SDK works such that the VTK build/link process needs to be reworked to link against their SDK. Probably not super difficult but it hasn't been done by anyone. For now a better option may be to build with OpenVR support and use the Oculus through OpenVR/SteamVR. On Thu, Dec 14, 2017 at 2:44 AM, Andaharoo wrote: > I'm trying to build VTK for Oculus. I think everything is setup fine > through > cmake but when building the project on msvc2017_64 I get > > "void ovr_CalcEyePoses2(ovrPosef,const ovrPosef [],ovrPosef [])': cannot > convert argument 2 from 'ovrVector3f [2]' to 'const ovrPosef []'" in > vtkOculusRenderWindow.cxx line 174. > > And 'HmdToEyeOffset': is not a member of 'ovrEyeRenderDesc_' in > vtkOculusRenderWindow.cxx line 415 and 416. > > I downloaded the Oculus SDK and SDL2. Built SDL2. Gave VTK the oculus root > directory, SDL2 directory, lib files, and ofc checked vtkRenderingOculus. > Also I'm using vtk 8.0.1. > > > > -- > 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 > -- 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 aron.helser at kitware.com Thu Dec 14 08:56:26 2017 From: aron.helser at kitware.com (Aron Helser) Date: Thu, 14 Dec 2017 08:56:26 -0500 Subject: [vtkusers] Labeling to Image In-Reply-To: <1513235252882-0.post@n5.nabble.com> References: <1513235252882-0.post@n5.nabble.com> Message-ID: Did you find anything in the VTK examples that looks similar to what you want? Did you try it? Regards, Aron On Thu, Dec 14, 2017 at 2:07 AM, arwtyxouymz wrote: > Hi, > > I want to label the binary image like this example. > > > How should i do? > > > > -- > 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 pechnikov at mobigroup.ru Thu Dec 14 11:10:32 2017 From: pechnikov at mobigroup.ru (Alexey Pechnikov) Date: Thu, 14 Dec 2017 23:10:32 +0700 Subject: [vtkusers] vtkTransform: doesn't work for long distance translation Message-ID: This sample code works correct: transform = vtk.vtkTransform() transform.Translate(0, 100, 0) but the same code produces bad geometry: transform = vtk.vtkTransform() transform.Translate(0,10000000, 0) P.S. Yes, I really need y=10000000 for GIS data. And I can use the same coordinates for VTK data arrays without any problem. There is the full test script below: import sys sys.path.append("/usr/local/Cellar/vtk/8.0.1_1//lib/python2.7/site-packages/vtk/") import vtk text = vtk.vtkVectorText() text.SetText('PLD003') # Set up a transform to move the label to a new position. transform = vtk.vtkTransform() transform.Identity() transform.Translate(0, 10000000, 0) #transform.Translate(100,100,100) transformFilter = vtk.vtkTransformPolyDataFilter() for x in range(100): transformFilter.SetTransform(transform) transformFilter.SetInputConnection(text.GetOutputPort()) writer = vtk.vtkXMLPolyDataWriter() writer.SetInputConnection(transformFilter.GetOutputPort()) writer.SetFileName('text.vtp') writer.SetDataModeToAscii() writer.Write() -- Best regards, Alexey Pechnikov. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Thu Dec 14 20:59:32 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 15 Dec 2017 10:59:32 +0900 Subject: [vtkusers] vtkTransform: doesn't work for long distance translation In-Reply-To: References: Message-ID: Hello, Usually setting double precision for the transform filter solves the problem. transformFilter.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION) But in your case, switching to double is not sufficient for preventing the loss of trailing digits because the difference in the absolute value is too large between the coordinates of text polydata with 1e-10 and the translation-value with 1e+7. It might be more practical to display string as labels using vtkLabeledDataMapper and so on. Thanks 2017-12-15 1:10 GMT+09:00 Alexey Pechnikov : > This sample code works correct: > > transform = vtk.vtkTransform() > transform.Translate(0, 100, 0) > > but the same code produces bad geometry: > > transform = vtk.vtkTransform() > transform.Translate(0,10000000, 0) > > P.S. Yes, I really need y=10000000 for GIS data. And I can use the same > coordinates for VTK data arrays without any problem. > > > There is the full test script below: > > import sys > > sys.path.append("/usr/local/Cellar/vtk/8.0.1_1//lib/python2.7/site-packages/vtk/") > > > import vtk > > > text = vtk.vtkVectorText() > > text.SetText('PLD003') > > > # Set up a transform to move the label to a new position. > > transform = vtk.vtkTransform() > > transform.Identity() > > transform.Translate(0, 10000000, 0) > > #transform.Translate(100,100,100) > > > transformFilter = vtk.vtkTransformPolyDataFilter() > > for x in range(100): > > transformFilter.SetTransform(transform) > > transformFilter.SetInputConnection(text.GetOutputPort()) > > > writer = vtk.vtkXMLPolyDataWriter() > > writer.SetInputConnection(transformFilter.GetOutputPort()) > > writer.SetFileName('text.vtp') > > writer.SetDataModeToAscii() > > writer.Write() > > > -- > Best regards, Alexey Pechnikov. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 > From Andx_roo at live.com Thu Dec 14 21:11:23 2017 From: Andx_roo at live.com (Andaharoo) Date: Thu, 14 Dec 2017 19:11:23 -0700 (MST) Subject: [vtkusers] Unable to build VTK 8.0.1 vtkRenderingOculus In-Reply-To: References: <1513237448062-0.post@n5.nabble.com> Message-ID: <1513303883750-0.post@n5.nabble.com> Thanks OpenVR was very easy to get setup. Can you do volume rendering in VTK through VR? I tried adding a volume like I normally would and it doesn't show up. (Polygons do though) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From nztoddler at yahoo.com Thu Dec 14 21:25:45 2017 From: nztoddler at yahoo.com (Todd Martin) Date: Fri, 15 Dec 2017 02:25:45 +0000 (UTC) Subject: [vtkusers] vtkTransform: doesn't work for long distance translation In-Reply-To: References: Message-ID: <2050654650.3477354.1513304745108@mail.yahoo.com> As a work-around could you not just change your length unit to km? Or do you lose accuracy then? Todd. On Friday, December 15, 2017, 2:59:58 PM GMT+13, kenichiro yoshimi wrote: Hello, Usually setting double precision for the transform filter solves the problem. transformFilter.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION) But in your case, switching to double is not sufficient for preventing the loss of trailing digits because the difference in the absolute value is too large between the coordinates of text polydata with 1e-10 and the translation-value with 1e+7. It might be more practical to display string as labels using vtkLabeledDataMapper and so on. Thanks 2017-12-15 1:10 GMT+09:00 Alexey Pechnikov : > This sample code works correct: > > transform = vtk.vtkTransform() > transform.Translate(0, 100, 0) > > but the same code produces bad geometry: > > transform = vtk.vtkTransform() > transform.Translate(0,10000000, 0) > > P.S. Yes, I really need y=10000000 for GIS data. And I can use the same > coordinates for VTK data arrays without any problem. > > > There is the full test script below: > > import sys > > sys.path.append("/usr/local/Cellar/vtk/8.0.1_1//lib/python2.7/site-packages/vtk/") > > > import vtk > > > text = vtk.vtkVectorText() > > text.SetText('PLD003') > > > # Set up a transform to move the label to a new position. > > transform = vtk.vtkTransform() > > transform.Identity() > > transform.Translate(0, 10000000, 0) > > #transform.Translate(100,100,100) > > > transformFilter = vtk.vtkTransformPolyDataFilter() > > for x in range(100): > >? ? transformFilter.SetTransform(transform) > > transformFilter.SetInputConnection(text.GetOutputPort()) > > > writer = vtk.vtkXMLPolyDataWriter() > > writer.SetInputConnection(transformFilter.GetOutputPort()) > > writer.SetFileName('text.vtp') > > writer.SetDataModeToAscii() > > writer.Write() > > > -- > Best regards, Alexey Pechnikov. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 ken.martin at kitware.com Thu Dec 14 22:27:21 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 14 Dec 2017 22:27:21 -0500 Subject: [vtkusers] Unable to build VTK 8.0.1 vtkRenderingOculus In-Reply-To: <1513303883750-0.post@n5.nabble.com> References: <1513237448062-0.post@n5.nabble.com> <1513303883750-0.post@n5.nabble.com> Message-ID: For volume rendering with OpenVR make sure you set multisamples to zero before the first render. Give that a shot. On Thu, Dec 14, 2017 at 9:11 PM, Andaharoo wrote: > Thanks OpenVR was very easy to get setup. Can you do volume rendering in > VTK > through VR? I tried adding a volume like I normally would and it doesn't > show up. (Polygons do though) > > > > -- > 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 > -- 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 onatt at gmx.de Fri Dec 15 06:02:12 2017 From: onatt at gmx.de (Oliver Natt) Date: Fri, 15 Dec 2017 12:02:12 +0100 Subject: [vtkusers] Using vtkLineWidget2 with PyQt Message-ID: <21548920-7298-3c07-5950-445e6057e8eb@gmx.de> Dear vtkusers, for some reason, I cannot manage to get a vtkLineWidget2 working in one of my PyQt-applications. Interestingly, the same code works well in a regular vtk-window. Please find attaced two python scripts. The first script "linewidget2_noQt.py" works exactly as expected: A yellow cylinder and the line widget is rendered. I can also interact with the widget by dragging the endpoints with the mouse. However, the same code embedded into a Qt-Window (cf. linewidget2_qt.py) does not work: The yellow cylinder is shown, but the line widget is missing. Do you have any suggestions how to get the vtkLineWidget2 working in a PyQt-application? Best regards, Oliver -------------- next part -------------- A non-text attachment was scrubbed... Name: linewidget2_noQt.py Type: text/x-python Size: 1524 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: linewidget2_qt.py Type: text/x-python Size: 2253 bytes Desc: not available URL: From jmax.red at gmail.com Fri Dec 15 06:41:06 2017 From: jmax.red at gmail.com (Jean-Max Redonnet) Date: Fri, 15 Dec 2017 12:41:06 +0100 Subject: [vtkusers] Building a colored texture by interpolating a set of colored points. In-Reply-To: References: Message-ID: Thanks for your answer. Unfortunately, I'm not trying to compute normals but some other vector field resulting from previous calculation. Here is the code I'm working on. But for moment it doesn't provides the expected results... vtkPoints points = new vtkPoints(); vtkUnsignedCharArray colors = new vtkUnsignedCharArray(); colors.SetNumberOfComponents(3); colors.SetName("Colors"); // Weaves, Chunks and SurfacePoints are my own objects from which I get the geometrical informations I need // SurfacePoint holds both 3D and parametric informations of each point. ie (x,y,z) and (u, v) for (Weave w : part.getFirstPly().getWeaves()) { for (int i = 0; i < w.getNbPoints() - 1; i++) { WeaveChunk chunk = w.getChunkAtIndex(i); SurfacePoint p = chunk.getStart(); points.InsertNextPoint(p.u, p.v, 0.0); Vector3d vec = chunk.getDirectionVector(); vec.normalize(); double[] dcolor = new double[]{vec.x, vec.y, vec.z}; byte[] color = new byte[3]; for(int j = 0; j < 3; j++) color[j] = (byte)( 255 * dcolor[j]); colors.InsertNextTuple3(color[0], color[1], color[2]); } } vtkPolyData inputPolyData = new vtkPolyData(); inputPolyData.SetPoints(points); vtkDelaunay2D delaunay = new vtkDelaunay2D(); delaunay.SetInputData(inputPolyData); delaunay.Update(); vtkPolyData outputPolyData = new vtkPolyData(); outputPolyData.ShallowCopy(delaunay.GetOutput()); outputPolyData.GetPointData().SetScalars(colors); I can figure out what I missed. Any hint would be very appreciated. jMax 2017-12-15 12:38 GMT+01:00 Jean-Max Redonnet : > Thanks for your answer. > > Unfortunately, I'm not trying to compute normals but some other vector > field resulting from previous calculation. > > Here is the code I'm working on. But for moment it doesn't provides the > expected results... > > > vtkPoints points = new vtkPoints(); > vtkUnsignedCharArray colors = new vtkUnsignedCharArray(); > colors.SetNumberOfComponents(3); > colors.SetName("Colors"); > > > // Weaves, Chunks and SurfacePoints are my own objects from which > I get the geometrical informations I need > // SurfacePoint holds both 3D and parametric informations of each > point. ie (x,y,z) and (u, v) > for (Weave w : part.getFirstPly().getWeaves()) { > for (int i = 0; i < w.getNbPoints() - 1; i++) { > WeaveChunk chunk = w.getChunkAtIndex(i); > SurfacePoint p = chunk.getStart(); > points.InsertNextPoint(p.u, p.v, 0.0); > Vector3d vec = chunk.getDirectionVector(); > vec.normalize(); > double[] dcolor = new double[]{vec.x, vec.y, vec.z}; > byte[] color = new byte[3]; > for(int j = 0; j < 3; j++) > color[j] = (byte)( 255 * dcolor[j]); > colors.InsertNextTuple3(color[0], color[1], color[2]); > } > } > > vtkPolyData inputPolyData = new vtkPolyData(); > inputPolyData.SetPoints(points); > > vtkDelaunay2D delaunay = new vtkDelaunay2D(); > delaunay.SetInputData(inputPolyData); > delaunay.Update(); > > vtkPolyData outputPolyData = new vtkPolyData(); > outputPolyData.ShallowCopy(delaunay.GetOutput()); > outputPolyData.GetPointData().SetScalars(colors); > > > > I can figure out what I missed. > > Any hint would be very appreciated. > > jMax > > 2017-12-13 17:37 GMT+01:00 Cory Quammen : > >> That seems like a reasonable approach to doing what you are describing. >> If you need only to compute normals between points on a Delaunay2D surface >> and display them immediately, then the rendering is already doing that for >> you on the GPU, so it is very fast. If you need to save out the texture, >> then doing it the way you describe also sounds reasonable. >> >> HTH, >> Cory >> >> On Mon, Dec 11, 2017 at 8:32 AM, Jean-Max Redonnet >> wrote: >> >>> Hi, I'm still quite new to vtk, and I would like a pro advice. >>> >>> I have a set of pixels, each one given with its full rgb color >>> information. I would like to build a full image by interpolating color of >>> pixels between the given points. First, I would like to know if there is a >>> magic wand to do that. I searched it for days but maybe I missed something. >>> >>> If the job need to be done by hand, I plan to do this: >>> - first I split my image using a Delaunay algorithm. >>> - then, each pixels (except the given ones) belongs to a single >>> triangle. Thus I can calculate the scalar factors using a barycenter >>> formula. >>> >>> For example, let be a triangle defined by three pixels A, B and C. Let >>> be P a pixel inside this triangle. The following vectorial relations can be >>> written: PA = a.u, PB = b.v and PC = c.w, where u,v and w are unit vector >>> along (PA), (PB) and (PC) respectively. In this context I plan to use >>> scalar factors a, b and c to interpolate A,B and C pixels colors values. >>> The color of pixel P being then set to these interpolated values. >>> >>> Is it the right way to do ? Do you know a better way to do this ? >>> >>> Giving you a larger sight may help you to help me. Actually I want to >>> interpolate a vector field from a given set of vectors. The idea is to do >>> something like normal maps used in computer graphics. Mapping the 3D >>> vectors position to a 2D space is not a problem since their starting point >>> belongs to a parametric surface, therefore the 2D parametric space of the >>> surface can be used. Then the (u,v) space can easily be mapped to an image >>> pixels space while the coordinates of my vectors can meanwhile be mapped to >>> a rgb color space. >>> >>> Using an image to build and store my vector field interpolation is >>> convenient but I would like to set up all this in the most efficient manner. >>> >>> According to you, what is the better way to do this ? >>> >>> Thanks for any help. >>> >>> jMax >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 Patricio.Sandana at synopsys.com Fri Dec 15 11:12:00 2017 From: Patricio.Sandana at synopsys.com (Patricio Sandana) Date: Fri, 15 Dec 2017 16:12:00 +0000 Subject: [vtkusers] vtk-js webpack configuration Message-ID: <4A2A9A281AE5D54CA205FB13069FD8740157293962@us01wembx1.internal.synopsys.com> Hi everyone, I tried to setup a webpack project with vtk-js. I followed the instructions from here https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html. As my project is already created, I copied manually the things they seem like needed. But when running my project I got this error: ERROR in ./~/vtk.js/Sources/Rendering/OpenGL/ImageMapper/index.js Module not found: Error: Can't resolve 'shader-loader' in 'C:\ProjectFolder' @ ./~/vtk.js/Sources/Rendering/OpenGL/ImageMapper/index.js 53:21-87 @ ./~/vtk.js/Sources/Rendering/OpenGL/ViewNodeFactory/index.js @ ./~/vtk.js/Sources/Rendering/OpenGL/RenderWindow/index.js @ ./~/vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js What could be wrong or missing? Regards, Pato Sanda?a TCAD R&D Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Fri Dec 15 11:55:46 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 15 Dec 2017 09:55:46 -0700 Subject: [vtkusers] vtk-js webpack configuration In-Reply-To: <4A2A9A281AE5D54CA205FB13069FD8740157293962@us01wembx1.internal.synopsys.com> References: <4A2A9A281AE5D54CA205FB13069FD8740157293962@us01wembx1.internal.synopsys.com> Message-ID: you are missing some dev dependencies that are coming with npm install kw-web-suite --save-dev but you can add them individually after each error you may run into. For the current one, you need: $ npm install shader-loader --save-dev On Fri, Dec 15, 2017 at 9:12 AM, Patricio Sandana < Patricio.Sandana at synopsys.com> wrote: > Hi everyone, > > > > I tried to setup a webpack project with vtk-js. I followed the > instructions from here https://kitware.github.io/vtk- > js/docs/intro_vtk_as_es6_dependency.html. As my project is already > created, I copied manually the things they seem like needed. But when > running my project I got this error: > > ERROR in ./~/vtk.js/Sources/Rendering/OpenGL/ImageMapper/index.js > > Module not found: Error: Can't resolve 'shader-loader' in > 'C:\ProjectFolder' > > @ ./~/vtk.js/Sources/Rendering/OpenGL/ImageMapper/index.js 53:21-87 > > @ ./~/vtk.js/Sources/Rendering/OpenGL/ViewNodeFactory/index.js > > @ ./~/vtk.js/Sources/Rendering/OpenGL/RenderWindow/index.js > > @ ./~/vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index.js > > @ ./src/main.js > > @ multi (webpack)-dev-server/client?http://localhost:8080 > webpack/hot/dev-server ./src/main.js > > > > What could be wrong or missing? > > > > Regards, > > > > *Pato Sanda?a* > > TCAD R&D Engineer > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 henan1 at umbc.edu Fri Dec 15 16:40:38 2017 From: henan1 at umbc.edu (Henan Zhao) Date: Fri, 15 Dec 2017 16:40:38 -0500 Subject: [vtkusers] Smoothing Surface Message-ID: Hi, I met a problem when using vtkSmoothPolyDataFilter. I want to use this filter to smooth a mesh, and I want to have a new mesh which is outside the original one. However, the new mesh I got is inside the original one. Here is a figure: the white wireframe is my original mesh, and the white solid surface is the new one using vtkSmoothPolyDataFilter. [image: Inline image 1] I am wondering if there is a parameter I should set or any other filters I should use. Thank you in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-175.png Type: image/png Size: 185037 bytes Desc: not available URL: From bill.lorensen at gmail.com Fri Dec 15 17:57:35 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Dec 2017 17:57:35 -0500 Subject: [vtkusers] Smoothing Surface In-Reply-To: References: Message-ID: Try this: https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/WindowedSincPolyDataFilter/ On Fri, Dec 15, 2017 at 4:40 PM, Henan Zhao wrote: > Hi, > > I met a problem when using vtkSmoothPolyDataFilter. > I want to use this filter to smooth a mesh, and I want to have a new mesh > which is outside the original one. > > However, the new mesh I got is inside the original one. > Here is a figure: the white wireframe is my original mesh, and the white > solid surface is the new one using vtkSmoothPolyDataFilter. > > [image: Inline image 1] > > > I am wondering if there is a parameter I should set or any other filters I > should use. > > Thank you in advance. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-175.png Type: image/png Size: 185037 bytes Desc: not available URL: From henan1 at umbc.edu Fri Dec 15 22:56:30 2017 From: henan1 at umbc.edu (Henan Zhao) Date: Fri, 15 Dec 2017 22:56:30 -0500 Subject: [vtkusers] Smoothing Surface In-Reply-To: References: Message-ID: Thanks! I have one more question about smoothing a surface. If a surface is made up by two shapes, like a semi-sphere and a plane. Is there a good way to smooth the original connectivity between the two shapes in VTK? For example, assuming that I locate a semi-sphere on the top of a plane, I expect that the angle on the connectivity part is 90 degree. However, the connectivity part is also smoothed and the angle is larger than 90 degree after I use the smoothing algorithm. On Fri, Dec 15, 2017 at 5:57 PM, Bill Lorensen wrote: > Try this: > https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/ > WindowedSincPolyDataFilter/ > > > > On Fri, Dec 15, 2017 at 4:40 PM, Henan Zhao wrote: > >> Hi, >> >> I met a problem when using vtkSmoothPolyDataFilter. >> I want to use this filter to smooth a mesh, and I want to have a new mesh >> which is outside the original one. >> >> However, the new mesh I got is inside the original one. >> Here is a figure: the white wireframe is my original mesh, and the white >> solid surface is the new one using vtkSmoothPolyDataFilter. >> >> [image: Inline image 1] >> >> >> I am wondering if there is a parameter I should set or any other filters >> I should use. >> >> Thank you in advance. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > > > -- > Unpaid intern in BillsBasement at noware dot com > -- Henan Zhao Website: http://www.csee.umbc.edu/~henan1/ Graduate student, Dept. of Computer Science and Electrical Engineering, University of Maryland, Baltimore County -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-175.png Type: image/png Size: 185037 bytes Desc: not available URL: From lasso at queensu.ca Sat Dec 16 01:20:29 2017 From: lasso at queensu.ca (Andras Lasso) Date: Sat, 16 Dec 2017 06:20:29 +0000 Subject: [vtkusers] Smoothing Surface In-Reply-To: References: Message-ID: You can use the joint smoothing method implemented in 3D Slicer to make independent meshes smoother while keeping their interface airtight. The key idea is to create a merged polydata, smooth it, and split it. Sample images: * Before: https://www.dropbox.com/s/819nenm7kpb09tz/1-before-joint-smoothing.png?dl=0 * After: https://www.dropbox.com/s/7o0ijjk1kfz7ha2/2-after-joint-smoothing.png?dl=0 You can try it by downloading&installing 3D Slicer and following these steps: * go to Segment Editor module * draw a few segments * click Show 3D to see segments as surface meshes in 3D * select Smoothing effect, Joint smoothing method, and click Apply Source code: https://github.com/Slicer/Slicer/blob/1b713d1701dea926134ec6366134fa3e08caf21e/Modules/Loadable/Segmentations/EditorEffects/Python/SegmentEditorSmoothingEffect.py#L262-L351 Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Henan Zhao Sent: Friday, December 15, 2017 10:57 PM To: Bill Lorensen Cc: VTK Users Subject: Re: [vtkusers] Smoothing Surface Thanks! I have one more question about smoothing a surface. If a surface is made up by two shapes, like a semi-sphere and a plane. Is there a good way to smooth the original connectivity between the two shapes in VTK? For example, assuming that I locate a semi-sphere on the top of a plane, I expect that the angle on the connectivity part is 90 degree. However, the connectivity part is also smoothed and the angle is larger than 90 degree after I use the smoothing algorithm. On Fri, Dec 15, 2017 at 5:57 PM, Bill Lorensen > wrote: Try this: https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/WindowedSincPolyDataFilter/ On Fri, Dec 15, 2017 at 4:40 PM, Henan Zhao > wrote: Hi, I met a problem when using vtkSmoothPolyDataFilter. I want to use this filter to smooth a mesh, and I want to have a new mesh which is outside the original one. However, the new mesh I got is inside the original one. Here is a figure: the white wireframe is my original mesh, and the white solid surface is the new one using vtkSmoothPolyDataFilter. [Inline image 1] I am wondering if there is a parameter I should set or any other filters I should use. Thank you in advance. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com -- Henan Zhao Website: http://www.csee.umbc.edu/~henan1/ Graduate student, Dept. of Computer Science and Electrical Engineering, University of Maryland, Baltimore County -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 48513 bytes Desc: image001.jpg URL: From isaiah.norton at gmail.com Sat Dec 16 10:43:36 2017 From: isaiah.norton at gmail.com (Isaiah Norton) Date: Sat, 16 Dec 2017 10:43:36 -0500 Subject: [vtkusers] OT: comments on ITK Discourse (was vtkGL2PSExporter crashes) Message-ID: Sean, We did indeed have some people unhappy due to similar complaints when we migrated the Slicer lists to Discourse, but we went through several rounds of customization and I think (hope...) we were able to solve about 75% of the issues. The person who was most vocal still participates, mostly via email, and I think at about the same level as they did on the old mailing list. In my view, the move to Discourse for Slicer was absolutely a success because it has improved the quality of answers and the overall experience and efficiency for both users and question-answerers. Raising these issues on the ITK discourse itself could prompt some improvements! Discourse is reasonably customizable from the admin interface alone, and the code is very high quality if even more specific customization is needed (although I'm not sure if ITK runs their own instance or uses hosting). A few specific comments: > all email is now html Discourse notification emails have a `text/plain` payload (I just double-checked several notifications from the ITK Discourse). Most email clients should be configurable to display this instead of `text/html`... quoted text doesn't appear as usual I think we had to tweak templates a little bit for discourse.slicer.org to make people happy, and it is indeed still a little different from a mailing list (e.g. only 1 replay context and indents instead of angle brackets). the 'from' address is not something that can be replied to, making off-list > replies impossible. This is by both design and necessity: many users only interact via the web interface. Private messages are available via the web interface, and I think Discourse will relay notifications and responses via email once a discussion has been started. (Off-list replies were a big waste of time on the Slicer list and others I've participated in, because: people unknowingly respond when the question had already been answered off-list, users asked follow-ups off-list, answers weren't preserved for future reference, etc. I'm very happy to be rid of that -- and I would have changed the mailman mode to be reply-to-list a long time ago if I was the list admin) Best, Isaiah On Fri, Dec 8, 2017 at 2:59 PM, Andras Lasso wrote: > > not to re-start this tiresome list vs forum stuff > > Well, that's the point. Not everybody is interested in every topics. It's > good to have the tools to deal with this nicely. > > By the way, most differences you listed are useful features, but of course > individual user preferences may differ. You can configure these features at > system or user level. See details below. > > Andras > > > > all email is now html > > It is a feature. With HTML formatting, you can make your post easier to > read. It's really hard to find email clients that cannot cope with HTML. > > > quoted text doesn't appear as usual > > It is a feature. Text can be quoted properly now. Finally, there is > standard way of referring to particular portion of previous posts. > > > the 'from' address is not something that can be replied to, making > off-list replies impossible. > > 'reply all' is broken because the 'from' address is 'noreply at discourse' > > Reply by email works just fine, unless it is disabled intentionally or by > mistake. > > > there is no 'List-Post' header, making it hard to start a new thread via > email > > You can start new threads via email. You can customize the email template > with any headers and footers. > > > it strips off email signatures > > That's a great feature. Signatures make long email threads painful to read. > > > Since they switched, I find myself only using it when I have something > to ask; it's not conducive to following along and helping out. Your > mileage may vary. Such things tend to get religious. > > You can set up default notification settings any way you want. You can > notify all users by all posts by default (mailing-list-style), or first > post of each new topic, etc. > > -----Original Message----- > From: Sean McBride [mailto:sean at rogue-research.com] > Sent: Friday, December 8, 2017 1:04 PM > To: Andras Lasso ; Bill Lorensen < > bill.lorensen at gmail.com> > Cc: Amine Aboufirass ; rakesh patil < > prakeshofficial at gmail.com>; VTK Users > Subject: Re: [vtkusers] vtkGL2PSExporter crashes > > On Fri, 8 Dec 2017 17:48:11 +0000, Andras Lasso said: > > >You can interact with a forum as a mailing list (read, post, reply > >through emails only). > > Based on my experience with the ITK switch, the discource experience is > *much* worse. > > - all email is now html > - quoted text doesn't appear as usual > - the 'from' address is not something that can be replied to, making > off-list replies impossible. > - 'reply all' is broken because the 'from' address is 'noreply at discourse' > - there is no 'List-Post' header, making it hard to start a new thread via > email > - it strips off email signatures > > Since they switched, I find myself only using it when I have something to > ask; it's not conducive to following along and helping out. Your mileage > may vary. Such things tend to get religious. > > My advice to Amine was strictly practical, not to re-start this tiresome > list vs forum stuff. > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research https://na01.safelinks. > protection.outlook.com/?url=www.rogue-research.com&data= > 02%7C01%7Classo%40queensu.ca%7Ce8b9c74ea84a4f29995508d53e66233f% > 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636483530765077683&sdata= > Hw3Ft2LHTg0I253Oc3rjjDYBbxPY%2FkJiXFaBFM2EaEE%3D&reserved=0 > Mac Software Developer Montr?al, Qu?bec, Canada > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 pechnikov at mobigroup.ru Sun Dec 17 01:13:56 2017 From: pechnikov at mobigroup.ru (Alexey Pechnikov) Date: Sun, 17 Dec 2017 13:13:56 +0700 Subject: [vtkusers] How to use custom labels Message-ID: Is it possible to use custom label format for axis labels? I tried different format specifiers (%f, %d, %#f, "%#f" and other) and these don't work. -- Best regards, Alexey Pechnikov. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pechnikov at mobigroup.ru Sun Dec 17 02:37:00 2017 From: pechnikov at mobigroup.ru (Alexey Pechnikov) Date: Sun, 17 Dec 2017 14:37:00 +0700 Subject: [vtkusers] How to use custom labels In-Reply-To: References: Message-ID: Ah, I see "Custom Labels" are just static label values list :( Sorry, there is no documentation and it's not obvious (I googled but with no success). I have labels like to "9.0295e+6" but it should be 9'029'500 instead. 2017-12-17 13:13 GMT+07:00 Alexey Pechnikov : > Is it possible to use custom label format for axis labels? I tried > different format specifiers (%f, %d, %#f, "%#f" and other) and these don't > work. > > -- > Best regards, Alexey Pechnikov. > -- Best regards, Alexey Pechnikov. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elhassan.abdou at gmail.com Sun Dec 17 02:52:01 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Sun, 17 Dec 2017 08:52:01 +0100 Subject: [vtkusers] (no subject) Message-ID: Hi all, I am trying to use vtkEGLrenderWindow but I receive this runtime error: Setting an EGL display to device index: 0 require EGL_EXT_device_base EGL_EXT_platform_device EGL_EXT_platform_base extensions ERROR: In D:\toolkits\vtkrcgit\Rendering\OpenGL2\vtkEGLRenderWindow.cxx, line 356 vtkEGLRenderWindow (00000196387DE220): No matching EGL configuration found. Any idea why I am receiving this. Can you give me tip even how to fix this? Regards Elhassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From elhassan.abdou at gmail.com Sun Dec 17 02:52:41 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Sun, 17 Dec 2017 08:52:41 +0100 Subject: [vtkusers] vtkEGLRenderWindow error message Message-ID: Hi all, I am trying to use vtkEGLrenderWindow but I receive this runtime error: Setting an EGL display to device index: 0 require EGL_EXT_device_base EGL_EXT_platform_device EGL_EXT_platform_base extensions ERROR: In D:\toolkits\vtkrcgit\Rendering\OpenGL2\vtkEGLRenderWindow.cxx, line 356 vtkEGLRenderWindow (00000196387DE220): No matching EGL configuration found. Any idea why I am receiving this. Can you give me tip even how to fix this? Regards Elhassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Sun Dec 17 20:32:46 2017 From: doug at beachmailing.com (scotsman60) Date: Sun, 17 Dec 2017 18:32:46 -0700 (MST) Subject: [vtkusers] How to find range of data in Cell Scalar Array? Message-ID: <1513560766273-0.post@n5.nabble.com> Hello, I'm using vtk in a Python app and I need to set parameters on a lookup table based on the range of values in an integer scalar array associated to Cells in a vtkUnstructuredGrid. I can access the array , name = self.mesh.GetCellData().GetArrayName('PID') where self.mesh is my vtkUnstructuredGrid But how can I find the unique value sin this array? I need something like numpy.unique () - is there a vtk method available? Thanks in advance, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From onatt at gmx.de Mon Dec 18 02:45:00 2017 From: onatt at gmx.de (Oliver Natt) Date: Mon, 18 Dec 2017 08:45:00 +0100 Subject: [vtkusers] Using vtkLineWidget2 with PyQt In-Reply-To: <21548920-7298-3c07-5950-445e6057e8eb@gmx.de> References: <21548920-7298-3c07-5950-445e6057e8eb@gmx.de> Message-ID: Dear vtkusers, I found a solution to my problem: The problem is obviously caused by python's garbage? collector. If I assign the vtkLineWidget2 to an instance variable of the class MainWindow, it works as expected. The same issue happens with other vtkWidgets, too. I am interested to understand, why this actually happens. It is not a problem for the vtkActor but only for the vtk...Widget. Something must be fundamentally different between those classes which causes that the vtk...Widget is garbage-collected although it is still needed by vtk. Best regards, Oliver Am 15.12.2017 um 12:02 schrieb Oliver Natt: > Dear vtkusers, > > for some reason, I cannot manage to get a vtkLineWidget2 working in > one of my PyQt-applications. Interestingly, the same code works well > in a regular vtk-window. Please find attaced two python scripts. The > first script "linewidget2_noQt.py" works exactly as expected: A yellow > cylinder and the line widget is rendered. I can also interact with the > widget by dragging the endpoints with the mouse. However, the same > code embedded into a Qt-Window (cf. linewidget2_qt.py) does not work: > The yellow cylinder is shown, but the line widget is missing. > > Do you have any suggestions how to get the vtkLineWidget2 working in a > PyQt-application? > > Best regards, > Oliver > > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: 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 zhuangming.shen at sphic.org.cn Mon Dec 18 02:41:23 2017 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Mon, 18 Dec 2017 07:41:23 +0000 Subject: [vtkusers] VTK web application In-Reply-To: References: <1513046029721.39911@sphic.org.cn> , Message-ID: <1513582867081.49149@sphic.org.cn> Hi Aron and Sebastien, Thanks for your helpful comments. As you expected, VTK 8.1.0 can support python 3. Up to now, I almost finished except some errors in the client (see the figure). I guess js also need to upgrade, right? Hope some vtk-only examples can be obtained in the future. Thanks again. Regards, Zhuangming Shen ________________________________ From: Aron Helser Sent: Wednesday, December 13, 2017 4:36 AM To: Sebastien Jourdain Cc: ???; vtkusers at vtk.org Subject: Re: [vtkusers] VTK web application The older Autobahn had a number of issues with Python 3 - so I would expect you to have problems. We were able to make it work with python 3 by backporting a number of python3 fixes, but can you upgrade to VTK 8.1.0? Then you can use the newest autobahn and twisted, with wslink. launcher.py has migrated to wslink: https://github.com/Kitware/wslink/blob/master/python/src/wslink/launcher.py but it didn't change very much. I don't know if we have a vtk-only example of migration, but the Visualizer app migrated, including the launcher, I believe. Aron On Tue, Dec 12, 2017 at 8:36 AM, Sebastien Jourdain > wrote: VTK 8.1.0 will support Python 3 with our WSLink library. In order to migrate, you will have a couple of import to fix but the API should be almost the same if not the same. Aron should be able to give you some pointers on where to look for migration examples. Seb On Mon, Dec 11, 2017 at 7:33 PM, ??? > wrote: ?Hi all, I referred vtkweb/launcher.py in VTK 8.0.0 to write my own codes with twisted 17.1.0 and autobahn 0.8.14, it can work using python 2.7. But when I upgraded python to 3.4, it did not respond to http request, and in front-end displayed "404 No such Resource". So I wonder if launcher.py can support python 3.x? Need to modify something? Any suggestions are welcome. BTW, I noticed that launcher.py has been removed in VTK 8.1.0. Does that mean VTK web application use a new architecture? Regards, Zhuangming Shen _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: client errors.jpg Type: image/jpeg Size: 62547 bytes Desc: client errors.jpg URL: From zhuangming.shen at sphic.org.cn Mon Dec 18 03:41:57 2017 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Mon, 18 Dec 2017 08:41:57 +0000 Subject: [vtkusers] Compile and build gdcm 2.8.4 using vtk 8.1.0 rc3 Message-ID: <1513586501338.7464@sphic.org.cn> Hi all,? When I used vtk 8.1.0 rc3 to compile and build gdcm 2.8.4, I got an error (please see the attached figure). Can someone fix this bug? Thanks in advanced. Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gdcm_error.PNG Type: image/png Size: 60956 bytes Desc: gdcm_error.PNG URL: From Patricio.Sandana at synopsys.com Mon Dec 18 04:26:18 2017 From: Patricio.Sandana at synopsys.com (Patricio Sandana) Date: Mon, 18 Dec 2017 09:26:18 +0000 Subject: [vtkusers] vtk-js webpack configuration In-Reply-To: References: <4A2A9A281AE5D54CA205FB13069FD8740157293962@us01wembx1.internal.synopsys.com> Message-ID: <4A2A9A281AE5D54CA205FB13069FD87401572940DD@us01wembx1.internal.synopsys.com> Hi Sebastien, It worked. I just thought npm will retrieve all the vtk.js dependencies automatically. Many thanks! Cheers, Pato Sanda?a TCAD R&D Engineer From: Sebastien Jourdain [mailto:sebastien.jourdain at kitware.com] Sent: Friday, December 15, 2017 5:56 PM To: Patricio Sandana Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtk-js webpack configuration you are missing some dev dependencies that are coming with npm install kw-web-suite --save-dev but you can add them individually after each error you may run into. For the current one, you need: $ npm install shader-loader --save-dev On Fri, Dec 15, 2017 at 9:12 AM, Patricio Sandana > wrote: Hi everyone, I tried to setup a webpack project with vtk-js. I followed the instructions from here https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html. As my project is already created, I copied manually the things they seem like needed. But when running my project I got this error: ERROR in ./~/vtk.js/Sources/Rendering/OpenGL/ImageMapper/index.js Module not found: Error: Can't resolve 'shader-loader' in 'C:\ProjectFolder' @ ./~/vtk.js/Sources/Rendering/OpenGL/ImageMapper/index.js 53:21-87 @ ./~/vtk.js/Sources/Rendering/OpenGL/ViewNodeFactory/index.js @ ./~/vtk.js/Sources/Rendering/OpenGL/RenderWindow/index.js @ ./~/vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js What could be wrong or missing? Regards, Pato Sanda?a TCAD R&D Engineer _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 bakkari.abdelkhalek at hotmail.fr Mon Dec 18 05:32:11 2017 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Mon, 18 Dec 2017 10:32:11 +0000 Subject: [vtkusers] QVTKWidget with mouse release Message-ID: Dear All, I am trying to mark on the image using a mouse release event. But the mark appears in different coordinates than which I indicate. Below is my code: if (event->button() == Qt::LeftButton ) { // Seed points visualization vtkSmartPointer sphereSource = vtkSmartPointer::New(); double center[3] = {event->pos().x(), event->pos().y(), currentSlice}; qDebug() << "center: " << center[0] << " "<< center[1] << " " << center[2]; sphereSource->SetCenter(0.0, 0.0, 0.0); sphereSource->SetRadius(10.0); sphereSource->Update(); vtkSmartPointer sphereMapper = vtkSmartPointer::New(); sphereMapper->SetInputConnection(sphereSource->GetOutputPort()); sphereMapper->Update(); vtkSmartPointer sphereActor = vtkSmartPointer::New(); sphereActor->SetMapper(sphereMapper); sphereActor->GetProperty()->SetColor(1.0, 0.0, 0.0); sphereActor->GetProperty()->SetPointSize(5); sphereActor->SetPosition(center); m_renderer->DisplayToWorld(); m_renderer->AddActor(sphereActor); } ui->qVTK1->update(); ----- Thank you in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From koopman.mk at gmail.com Mon Dec 18 08:30:12 2017 From: koopman.mk at gmail.com (Martijn Koopman) Date: Mon, 18 Dec 2017 14:30:12 +0100 Subject: [vtkusers] QVTKWidget with mouse release In-Reply-To: References: Message-ID: Hi Abdelkhalek, Where is this code located? Do you override the function QWidget::mouseReleaseEvent in a subclass of the QVTKWidget? I guess not, because ui->qVTK is probably an instance of QVTKWidget. MouseEvent::pos() returns the position relative to the widget that receives the event. So, if you override this function in QMainWindow (for example), then you get a position relative to that widget. You have three options: 1. map the position relative to the QVTKWidget (Qt may have some helper functions for this) 2. subclass QVTKWidget and override mouseReleaseEvent there 3. Handle mouse events in VTK. See also https://lorensen.github.io/VTKExamples/site/Cxx/Interaction/ MouseEventsObserver/ for option 3. Regards, Martijn 2017-12-18 11:32 GMT+01:00 Abdelkhalek Bakkari < bakkari.abdelkhalek at hotmail.fr>: > Dear All, > > > I am trying to mark on the image using a mouse release event. But the > mark appears in different coordinates than which I indicate. > > Below is my code: > > > if (event->button() == Qt::LeftButton ) > { > > // Seed points visualization > vtkSmartPointer sphereSource = vtkSmartPointer< > vtkSphereSource>::New(); > > double center[3] = {event->pos().x(), event->pos().y(), currentSlice}; > qDebug() << "center: " << center[0] << " "<< center[1] << " " << > center[2]; > > > sphereSource->SetCenter(0.0, 0.0, 0.0); > sphereSource->SetRadius(10.0); > > sphereSource->Update(); > > vtkSmartPointer sphereMapper = vtkSmartPointer< > vtkPolyDataMapper>::New(); > sphereMapper->SetInputConnection(sphereSource->GetOutputPort()); > sphereMapper->Update(); > > vtkSmartPointer sphereActor = vtkSmartPointer::New(); > sphereActor->SetMapper(sphereMapper); > sphereActor->GetProperty()->SetColor(1.0, 0.0, 0.0); > sphereActor->GetProperty()->SetPointSize(5); > sphereActor->SetPosition(center); > > m_renderer->DisplayToWorld(); > m_renderer->AddActor(sphereActor); > } > ui->qVTK1->update(); > ----- > > Thank you in advance > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From agatakrason at gmail.com Mon Dec 18 09:50:34 2017 From: agatakrason at gmail.com (=?UTF-8?Q?Agata_Kraso=C5=84?=) Date: Mon, 18 Dec 2017 15:50:34 +0100 Subject: [vtkusers] How to transform polydata mesh to binary image volume ? Message-ID: Hello, I created some polydata surface meshes. I would like to transform them into binary mask. Could it be possible in VTK ? I would appreciate for any help please. Best, agatte -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Dec 18 10:10:56 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 18 Dec 2017 10:10:56 -0500 Subject: [vtkusers] How to find range of data in Cell Scalar Array? In-Reply-To: <1513560766273-0.post@n5.nabble.com> References: <1513560766273-0.post@n5.nabble.com> Message-ID: I'm not sure if there is something in VTK that does this, but the good news is you can use numpy to do it. See Berk's blog post series on VTK/numpy integration starting with https://blog.kitware.com/improved-vtk-numpy-integration/. HTH, Cory On Sun, Dec 17, 2017 at 8:32 PM, scotsman60 wrote: > Hello, > > I'm using vtk in a Python app and I need to set parameters on a lookup > table > based on the range of values in an integer scalar array associated to Cells > in a vtkUnstructuredGrid. > > I can access the array , > > name = self.mesh.GetCellData().GetArrayName('PID') > > where self.mesh is my vtkUnstructuredGrid > > But how can I find the unique value sin this array? > > I need something like numpy.unique () - is there a vtk method available? > > Thanks 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: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gavin.wheeler at kcl.ac.uk Mon Dec 18 10:15:11 2017 From: gavin.wheeler at kcl.ac.uk (Wheeler, Gavin) Date: Mon, 18 Dec 2017 15:15:11 +0000 Subject: [vtkusers] Syncing the View and Projection Matrices of a vtkExternalOpenGLCamera in an ExternalVTKWidget with Unity Message-ID: We are trying to build a Unity plugin using Native C++ which will allow us to incorporate VTK rendering. We have a plugin which demonstrates the basics of this based and draws a rotating cube. Our problem is that the cube doesn't move with the rest of the world - the vtkExternalOpenGLCamera doesn't appear to be using the View or Projection matrices given to it. Platform is Windows 10 64bit application. A few ways we have investigated this: * The cube can be moved within the view by setting its position * Setting X or Y to +/-1 moves it to the edges of the view - indicating that it's position is in screen space, where the limits are +/_ 1 * Changing Z doesn't change the view of the cube - indicating that the view is orthographic * Looking at the transforms/matrices in the camera using the debugger they are identity matrices - which is consostent with the above * To Unity we have added a cebug script which allows the user to move the camera around * The elements of the scene rendered by Unity move as expected * The elements in the of the scene rendered by VTK do not move - they stay in the same place relative to the camera * This indicates that the View matrix is not being used by the vtkExternalOpenGLCamera * Getting the camera View and Projection matrices from Unity and passing them to VTK * This post suggests that we should not need to do this (http://vtk.1045678.n5.nabble.com/Using-vtkExternalOpenGLCamera-td5744015.html) - the camera position should be automatically be updated by the vtk code - "The external renderer is responsible for updating the VTK camera matrices based on the OpenGL state." * However, we added functions to the plugin to pass the View and projection matrix values and then set them in the vtkExternalOpenGLCamera * No change is observed in the rendering * Running through the code in the debugger the matrices do appear to be set in the camera During the first run the first run these matrices appear to be successfully set... * UserProvidedViewTransform - false -> true * ViewTransform - Concatenation - PreMatrix - Identity -> Matches transpose of supplied view matrix * ModelViewTransform - Concatenation - PreMatrix - Identity -> Matches transpose of supplied view matrix * UseExplicitProjectionTransformMatrix - false -> true * ExplicitProjectionTransformMatrix - undefined -> defined as the transpose of the supplied projection matrix I've also tried setting these to hard coded values, but with no effect. So at this point we are a bit stuck as to why it isn't working, and so how to make it work. * Any suggestions to fix this are welcomed Core code for the plugin (which includes all of the VTK code follows) NB, this was based on an example native C++ Unity Plugin from here (but a lot of the code has been stripped out for clarity): https://bitbucket.org/Unity-Technologies/graphicsdemos/src/43011994ae74/NativeRenderingPlugin/?at=default #include "RenderAPI.h" #include "PlatformBase.h" // OpenGL Core profile (desktop) or OpenGL ES (mobile) implementation of RenderAPI. // Supports several flavors: Core, ES2, ES3 //vtk headers #include "vtkAutoInit.h" VTK_MODULE_INIT(vtkRenderingOpenGL2); // VTK was built with vtkRenderingOpenGL2 #include #include #include #include #include #include #include #include #include #include #include #include "vtkWindows.h" // Needed to include OpenGL header on Windows. #include #if SUPPORT_OPENGL_UNIFIED #include "GLEW/glew.h" class RenderAPI_OpenGLCoreES : public RenderAPI { public: RenderAPI_OpenGLCoreES(UnityGfxRenderer apiType); virtual ~RenderAPI_OpenGLCoreES() { } virtual void ProcessDeviceEvent(UnityGfxDeviceEventType type, IUnityInterfaces* interfaces); virtual bool GetUsesReverseZ() { return false; } virtual void UpdateVtk(const double viewMatrix[16], const double projectionMatrix[16]); // std::string &debugStr); private: void CreateResources(); private: // vtk vtkNew m_ExternalVTKWidget; vtkNew m_renderer; vtkNew m_CubeActor; vtkSmartPointer m_externalVtkCamera; UnityGfxRenderer m_APIType; GLuint m_VertexShader; GLuint m_Program; GLuint m_VertexBuffer; }; RenderAPI* CreateRenderAPI_OpenGLCoreES(UnityGfxRenderer apiType) { return new RenderAPI_OpenGLCoreES(apiType); } enum VertexInputs { kVertexInputPosition = 0, kVertexInputColor = 1 }; // Simple vertex shader source #define VERTEX_SHADER_SRC(ver, attr, varying) \ ver \ attr " highp vec3 pos;\n" \ attr " lowp vec4 color;\n" \ "\n" \ varying " lowp vec4 ocolor;\n" \ "\n" \ "uniform highp mat4 worldMatrix;\n" \ "uniform highp mat4 viewMatrix;\n" \ "uniform highp mat4 projMatrix;\n" \ "\n" \ "void main()\n" \ "{\n" \ " gl_Position = (projMatrix * viewMatrix * worldMatrix) * vec4(pos,1);\n" \ " ocolor = color;\n" \ "}\n" \ static const char* kGlesVProgTextGLES2 = VERTEX_SHADER_SRC("\n", "attribute", "varying"); static const char* kGlesVProgTextGLES3 = VERTEX_SHADER_SRC("#version 300 es\n", "in", "out"); #if SUPPORT_OPENGL_CORE static const char* kGlesVProgTextGLCore = VERTEX_SHADER_SRC("#version 150\n", "in", "out"); #endif #undef VERTEX_SHADER_SRC static GLuint CreateShader(GLenum type, const char* sourceText) { GLuint ret = glCreateShader(type); glShaderSource(ret, 1, &sourceText, NULL); glCompileShader(ret); return ret; } void RenderAPI_OpenGLCoreES::CreateResources() { // Create shaders glewExperimental = GL_TRUE; glewInit(); glGetError(); // Clean up error generated by glewInit m_VertexShader = CreateShader(GL_VERTEX_SHADER, kGlesVProgTextGLCore); // Link shaders into a program and find uniform locations m_Program = glCreateProgram(); glBindAttribLocation(m_Program, kVertexInputPosition, "pos"); glBindAttribLocation(m_Program, kVertexInputColor, "color"); glAttachShader(m_Program, m_VertexShader); //glAttachShader(m_Program, m_FragmentShader); # if SUPPORT_OPENGL_CORE if (m_APIType == kUnityGfxRendererOpenGLCore) { glBindFragDataLocation(m_Program, 0, "fragColor"); } # endif // if SUPPORT_OPENGL_CORE glLinkProgram(m_Program); GLint status = 0; glGetProgramiv(m_Program, GL_LINK_STATUS, &status); assert(status == GL_TRUE); // Create vertex buffer glGenBuffers(1, &m_VertexBuffer); glBindBuffer(GL_ARRAY_BUFFER, m_VertexBuffer); glBufferData(GL_ARRAY_BUFFER, 1024, NULL, GL_STREAM_DRAW); assert(glGetError() == GL_NO_ERROR); //InitialiseWorldTriangleTest(); // Rotating cube --------------------------------------------------------------- // initiate vtk content // create the VTK scene vtkNew cs; vtkNew mapper; mapper->SetInputConnection(cs->GetOutputPort()); m_CubeActor->SetMapper(mapper.GetPointer()); m_CubeActor->GetProperty()->SetColor(1, 1, 0.2); m_CubeActor->GetProperty()->SetOpacity(0.5); m_CubeActor->SetPosition(0.5, 0, 0); // create the VTK external renderer vtkNew renWin; m_ExternalVTKWidget->SetRenderWindow(renWin.GetPointer()); m_ExternalVTKWidget->GetRenderWindow()->AddRenderer(m_renderer.GetPointer()); m_renderer->AddActor(m_CubeActor.GetPointer()); m_renderer->ResetCamera(); m_externalVtkCamera = vtkSmartPointer( dynamic_cast(m_renderer->GetActiveCamera())); } RenderAPI_OpenGLCoreES::RenderAPI_OpenGLCoreES(UnityGfxRenderer apiType) : m_APIType(apiType) { } void RenderAPI_OpenGLCoreES::ProcessDeviceEvent(UnityGfxDeviceEventType type, IUnityInterfaces* interfaces) { if (type == kUnityGfxDeviceEventInitialize) { CreateResources(); } else if (type == kUnityGfxDeviceEventShutdown) { //@TODO: release resources } } void RenderAPI_OpenGLCoreES::UpdateVtk(const double viewMatrix[16], const double projectionMatrix[16]) //std::string &debugStr) { m_externalVtkCamera->SetViewTransformMatrix(viewMatrix); m_externalVtkCamera->SetProjectionTransformMatrix(projectionMatrix); // draw vtk content m_CubeActor->RotateX(1.0f); m_CubeActor->RotateY(1.0f); m_ExternalVTKWidget->GetRenderWindow()->Render(); } #endif // #if SUPPORT_OPENGL_UNIFIED -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Mon Dec 18 10:58:55 2017 From: aron.helser at kitware.com (Aron Helser) Date: Mon, 18 Dec 2017 10:58:55 -0500 Subject: [vtkusers] VTK web application In-Reply-To: <1513582867081.49149@sphic.org.cn> References: <1513046029721.39911@sphic.org.cn> <1513582867081.49149@sphic.org.cn> Message-ID: Yes, the JS side also needs to be upgraded to use the wslink client... Glad you are progressing! Aron On Mon, Dec 18, 2017 at 2:41 AM, ??? wrote: > Hi Aron and Sebastien, > > > Thanks for your helpful comments. As you expected, VTK 8.1.0 can support > python 3. Up to now, I almost finished except some errors in the > client (see the figure). I guess js also need to upgrade, right? Hope some > vtk-only examples can be obtained in the future. Thanks again. > > > Regards, > > > Zhuangming Shen > ------------------------------ > *From:* Aron Helser > *Sent:* Wednesday, December 13, 2017 4:36 AM > *To:* Sebastien Jourdain > *Cc:* ???; vtkusers at vtk.org > *Subject:* Re: [vtkusers] VTK web application > > The older Autobahn had a number of issues with Python 3 - so I would > expect you to have problems. We were able to make it work with python 3 by > backporting a number of python3 fixes, but can you upgrade to VTK 8.1.0? > Then you can use the newest autobahn and twisted, with wslink. > > launcher.py has migrated to wslink: https://github.com/Kit > ware/wslink/blob/master/python/src/wslink/launcher.py > but it didn't change very much. > > I don't know if we have a vtk-only example of migration, but the > Visualizer app migrated, including the launcher, I believe. > > Aron > > > On Tue, Dec 12, 2017 at 8:36 AM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> VTK 8.1.0 will support Python 3 with our WSLink library. >> In order to migrate, you will have a couple of import to fix but the API >> should be almost the same if not the same. >> >> Aron should be able to give you some pointers on where to look for >> migration examples. >> >> Seb >> >> On Mon, Dec 11, 2017 at 7:33 PM, ??? >> wrote: >> >>> ?Hi all, >>> >>> >>> I referred vtkweb/launcher.py in VTK 8.0.0 to write my own codes with >>> twisted 17.1.0 and autobahn 0.8.14, it can work using python 2.7. But when >>> I upgraded python to 3.4, it did not respond to http request, and in >>> front-end displayed "404 No such Resource". So I wonder if launcher.py can >>> support python 3.x? Need to modify something? Any suggestions are welcome. >>> >>> >>> BTW, I noticed that launcher.py has been removed in VTK 8.1.0. Does >>> that mean VTK web application use a new architecture? >>> >>> >>> >>> Regards, >>> >>> >>> Zhuangming Shen >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Mon Dec 18 12:21:22 2017 From: sean at rogue-research.com (Sean McBride) Date: Mon, 18 Dec 2017 12:21:22 -0500 Subject: [vtkusers] Compile and build gdcm 2.8.4 using vtk 8.1.0 rc3 In-Reply-To: <1513586501338.7464@sphic.org.cn> References: <1513586501338.7464@sphic.org.cn> Message-ID: <20171218172122.200485208@mail.rogue-research.com> On Mon, 18 Dec 2017 08:41:57 +0000, ??? said: >When I used vtk 8.1.0 rc3 to compile and build gdcm 2.8.4, I got an >error (please see the attached figure). Can someone fix this bug? Thanks >in advanced. That looks like GDCM itself needs to be updated to work with the newest VTK. GDCM 2.8.4 is newest version, but you might try GDCM from git master, and if that doesn't work, you should post on the GDCM mailing list: . Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From dan.lipsa at kitware.com Mon Dec 18 13:17:58 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 18 Dec 2017 13:17:58 -0500 Subject: [vtkusers] vtkEGLRenderWindow error message In-Reply-To: References: Message-ID: Elhassan, Do the VTK tests run fine? Try to compile with BUILD_TESTING and then run ctest in the build directory. On Sun, Dec 17, 2017 at 2:52 AM, Elhassan Abdou wrote: > Hi all, > > I am trying to use vtkEGLrenderWindow but I receive this runtime error: > Setting an EGL display to device index: 0 require EGL_EXT_device_base > EGL_EXT_platform_device EGL_EXT_platform_base extensions > > ERROR: In D:\toolkits\vtkrcgit\Rendering\OpenGL2\vtkEGLRenderWindow.cxx, > line 356 > vtkEGLRenderWindow (00000196387DE220): No matching EGL configuration found. > > > Any idea why I am receiving this. Can you give me tip even how to fix this? > > Regards > Elhassan > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 elhassan.abdou at gmail.com Mon Dec 18 13:23:07 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Mon, 18 Dec 2017 19:23:07 +0100 Subject: [vtkusers] vtkEGLRenderWindow error message In-Reply-To: References: Message-ID: Hi , Thank you for your reply. I have not ran the test yet. I Will do this. But do you think that glew needs to be updated with eglew files that are supported from glew2.0.0? I am not sure which version VTK has. In the error message I noticed that glew failed to initialize Regards Elhassan On 18 Dec 2017 7:18 PM, "Dan Lipsa" wrote: > Elhassan, > Do the VTK tests run fine? Try to compile with BUILD_TESTING and then run > ctest in the build directory. > > On Sun, Dec 17, 2017 at 2:52 AM, Elhassan Abdou > wrote: > >> Hi all, >> >> I am trying to use vtkEGLrenderWindow but I receive this runtime error: >> Setting an EGL display to device index: 0 require EGL_EXT_device_base >> EGL_EXT_platform_device EGL_EXT_platform_base extensions >> >> ERROR: In D:\toolkits\vtkrcgit\Rendering\OpenGL2\vtkEGLRenderWindow.cxx, >> line 356 >> vtkEGLRenderWindow (00000196387DE220): No matching EGL configuration >> found. >> >> >> Any idea why I am receiving this. Can you give me tip even how to fix >> this? >> >> Regards >> Elhassan >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 dan.lipsa at kitware.com Mon Dec 18 13:46:18 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 18 Dec 2017 13:46:18 -0500 Subject: [vtkusers] vtkEGLRenderWindow error message In-Reply-To: References: Message-ID: Not sure about glew. It runs fine on our test machines. https://open.cdash.org/index.php?project=VTK taanab is an EGL build. What OS, graphics card, graphics card driver version do you have? Are you your EGL installation works correctly. Can you compile/run a small EGL program? For instance https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglIntro.xhtml On Mon, Dec 18, 2017 at 1:23 PM, Elhassan Abdou wrote: > Hi , > > Thank you for your reply. I have not ran the test yet. I Will do this. But > do you think that glew needs to be updated with eglew files that are > supported from glew2.0.0? > I am not sure which version VTK has. > In the error message I noticed that glew failed to initialize > > Regards > Elhassan > > On 18 Dec 2017 7:18 PM, "Dan Lipsa" wrote: > >> Elhassan, >> Do the VTK tests run fine? Try to compile with BUILD_TESTING and then run >> ctest in the build directory. >> >> On Sun, Dec 17, 2017 at 2:52 AM, Elhassan Abdou > > wrote: >> >>> Hi all, >>> >>> I am trying to use vtkEGLrenderWindow but I receive this runtime error: >>> Setting an EGL display to device index: 0 require EGL_EXT_device_base >>> EGL_EXT_platform_device EGL_EXT_platform_base extensions >>> >>> ERROR: In D:\toolkits\vtkrcgit\Rendering\OpenGL2\vtkEGLRenderWindow.cxx, >>> line 356 >>> vtkEGLRenderWindow (00000196387DE220): No matching EGL configuration >>> found. >>> >>> >>> Any idea why I am receiving this. Can you give me tip even how to fix >>> this? >>> >>> Regards >>> Elhassan >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> 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 lasso at queensu.ca Mon Dec 18 14:15:04 2017 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 18 Dec 2017 19:15:04 +0000 Subject: [vtkusers] How to find range of data in Cell Scalar Array? In-Reply-To: References: <1513560766273-0.post@n5.nabble.com> Message-ID: Have you tried vtkDataArray::GetRange()? https://www.vtk.org/doc/nightly/html/classvtkDataArray.html#a717568beffb50a7ddff9ed3919dcf153 Computing range may take a long time on large data sets. GetRange() has an important feature that it caches the computed range and the value is also propagated through the processing pipeline. Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Cory Quammen Sent: Monday, December 18, 2017 10:11 AM To: scotsman60 Cc: vtkusers Subject: Re: [vtkusers] How to find range of data in Cell Scalar Array? I'm not sure if there is something in VTK that does this, but the good news is you can use numpy to do it. See Berk's blog post series on VTK/numpy integration starting with https://blog.kitware.com/improved-vtk-numpy-integration/. HTH, Cory On Sun, Dec 17, 2017 at 8:32 PM, scotsman60 > wrote: Hello, I'm using vtk in a Python app and I need to set parameters on a lookup table based on the range of values in an integer scalar array associated to Cells in a vtkUnstructuredGrid. I can access the array , name = self.mesh.GetCellData().GetArrayName('PID') where self.mesh is my vtkUnstructuredGrid But how can I find the unique value sin this array? I need something like numpy.unique () - is there a vtk method available? Thanks 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: https://vtk.org/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 Mon Dec 18 17:40:56 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 18 Dec 2017 17:40:56 -0500 Subject: [vtkusers] ANN: VTK Book Figures completed Message-ID: Folks, Andrew Maclean and I have successfully revived 112 examples from the VTK Book. This covers all figures that were generated by VTK code. A few figures were generated with "mystery" codes and are not included. Most of the figures were created by Tcl scripts and 30 C++ programs. Andrew also converted many of the figure examples to Python. All of the figure examples are part of the VTKExamples repo and can be viewed here: https://lorensen.github.io/VTKExamples/site/VTKBookFigures/ Each Book example has an image that is regression tested every night. Also, a link to the original code is provided. Most of the scripts were deleted from the repo many years ago. The VTKExamples https://lorensen.github.io/VTKExamples/site/ now contains: C++ examples: 948 CSharp examples: 121 Python examples: 161 Java examples: 18 Total examples: 1248 This effort means that the "once lost" figure examples will live on. Old Guys Rule! Bill From nztoddler at yahoo.com Mon Dec 18 18:47:03 2017 From: nztoddler at yahoo.com (Todd) Date: Tue, 19 Dec 2017 12:47:03 +1300 Subject: [vtkusers] [vtk-developers] ANN: VTK Book Figures completed In-Reply-To: Message-ID: <3e6d7cb0-4eca-4dbf-9ee7-dc49e7f16c92@email.android.com> An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Mon Dec 18 19:01:28 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Tue, 19 Dec 2017 09:01:28 +0900 Subject: [vtkusers] How to transform polydata mesh to binary image volume ? In-Reply-To: References: Message-ID: Hello, If polydata surface meshes are closed, this is helpful. https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ Thanks 2017-12-18 23:50 GMT+09:00 Agata Kraso? : > Hello, > > I created some polydata surface meshes. I would like to transform them into > binary mask. > Could it be possible in VTK ? > > > I would appreciate for any help please. > > Best, > agatte > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 > From elainejiang8 at gmail.com Mon Dec 18 19:36:12 2017 From: elainejiang8 at gmail.com (elainejiang8) Date: Mon, 18 Dec 2017 17:36:12 -0700 (MST) Subject: [vtkusers] Rectilinear grid to structured grid Message-ID: <1513643772242-0.post@n5.nabble.com> Hi all, I am trying to volume render a data set, but the data set given was in rectilinear grid form. Is there a way to convert rectilinear grids to structured grids so that I can use the volume rendering functions (color transfer function etc.)? If not, is there another way I can volume render a rectilinear data set? Thanks, Elaine -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Mon Dec 18 20:00:41 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 18 Dec 2017 20:00:41 -0500 Subject: [vtkusers] Rectilinear grid to structured grid In-Reply-To: <1513643772242-0.post@n5.nabble.com> References: <1513643772242-0.post@n5.nabble.com> Message-ID: Look at this: https://lorensen.github.io/VTKExamples/site/Cxx/VolumeRendering/PseudoVolumeRendering/ On Mon, Dec 18, 2017 at 7:36 PM, elainejiang8 wrote: > Hi all, > > I am trying to volume render a data set, but the data set given was in > rectilinear grid form. Is there a way to convert rectilinear grids to > structured grids so that I can use the volume rendering functions (color > transfer function etc.)? If not, is there another way I can volume render a > rectilinear data set? > > Thanks, > Elaine > > > > -- > 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 BillsBasement at noware dot com From doug at beachmailing.com Mon Dec 18 21:07:39 2017 From: doug at beachmailing.com (scotsman60) Date: Mon, 18 Dec 2017 19:07:39 -0700 (MST) Subject: [vtkusers] How to find range of data in Cell Scalar Array? In-Reply-To: <1513560766273-0.post@n5.nabble.com> References: <1513560766273-0.post@n5.nabble.com> Message-ID: <1513649259910-0.post@n5.nabble.com> Cory, Andras, Thanks for these suggestions. Cory - I use numpy to set up the data for the vtkUnstructuredGrid.... for example from vtk.util import numpy_support, keys self.mesh.SetCells(vtkCellTypes, vtkOffsets, self.cells) But I haven't had to use it on the output side..... which as you pointed out is trivially easy using 'vtk_to-numpy' pr = numpy_support.vtk_to_numpy(self.mesh.GetCellData().GetArray('PID')) Andras, Thanks for the GetRange() suggestion - it also works well pid_range = self.mesh.GetCellData().GetArray('PID').GetRange() It turned out that I didn't actually need the unique ID's so I ended up using the GetRange() method in this case. Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From pechnikov at mobigroup.ru Tue Dec 19 02:25:57 2017 From: pechnikov at mobigroup.ru (Alexey Pechnikov) Date: Tue, 19 Dec 2017 14:25:57 +0700 Subject: [vtkusers] How to create vtk/vtp file where is possible to enable/disable visibility of some objects Message-ID: As sample could I create vtk/vtp file with 2 spheres where I can plot any combination of 0, 1, 2 spheres? In Voxler I can enable/disable some objects in layer but I'm not sure if it's possible in ParaView. -- Best regards, Alexey Pechnikov. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arw.tyx-ouy_mz at ezweb.ne.jp Tue Dec 19 04:35:40 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Tue, 19 Dec 2017 02:35:40 -0700 (MST) Subject: [vtkusers] Labeling each pixel by continuity Message-ID: <1513676140556-0.post@n5.nabble.com> Hi, all I have a binary image and want to label each pixels by continuity. In detail, Firstly, I created 512x512 binary image. Secondly, I check if each pixel connect to neighborhood pixel by 5x5 mask. Thirdly, if mask center pixel connect to neighborhood pixel, I put same label to the pixels. In VTK is it possible? If possible, please tell me how to do? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From elhassan.abdou at gmail.com Tue Dec 19 17:45:56 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Tue, 19 Dec 2017 23:45:56 +0100 Subject: [vtkusers] vtkEGLRenderWindow error message In-Reply-To: References: Message-ID: <5a3996a4.03cb500a.73a1c.9d34@mx.google.com> Hi, I ran the tests of VTK, they passed except 4 tests The following tests FAILED: 1> 1045 - vtkRenderingCoreCxx-TestResetCameraVerticalAspectRatio (Failed) 1> 1046 - vtkRenderingCoreCxx-TestResetCameraVerticalAspectRatioParallel (Failed) 1> 1062 - vtkRenderingCoreCxx-TestWindowToImageFilter (Failed) 1> 1068 - vtkRenderingExternalCxx-TestGLUTRenderWindow (Failed) They are not related to EGL. They failed because of command line error ?I guess?: >Errors while running CTest 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program Files\CMake\bin\ctest.exe" --force-new-ctest-process -C Release 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 8. 1>Done building project "RUN_TESTS.vcxproj" -- FAILED. I tried to run the small EGL program, but it is not compiled. The unistd.h does not exist on Windows 10 visual studio 2017. I can not figure out where is the problem. The EGL files and lib I used, I got from ANGLE project. I think that is problem. Can you help me where I can find EGL files to my platform?. I am using windows 10 Nvidia GTX 1060 Driver version 388.59 Visual studio 2017 community I am looking forward to hearing from you Elhassan Sent from Mail for Windows 10 From: Dan Lipsa Sent: Monday, December 18, 2017 7:46 PM To: Elhassan Abdou Cc: VTK Users Subject: Re: [vtkusers] vtkEGLRenderWindow error message Not sure about glew. It runs fine on our test machines. https://open.cdash.org/index.php?project=VTK taanab is an EGL build. What OS, graphics card, graphics card driver version do you have? Are you your EGL installation works correctly. Can you compile/run a small EGL program? For instance https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglIntro.xhtml On Mon, Dec 18, 2017 at 1:23 PM, Elhassan Abdou wrote: Hi , Thank you for your reply. I have not ran the test yet. I Will do this. But do you think that glew needs to be updated with eglew files that are supported from glew2.0.0? I am not sure which version VTK has. In the error message I noticed that glew failed to initialize Regards Elhassan On 18 Dec 2017 7:18 PM, "Dan Lipsa" wrote: Elhassan, Do the VTK tests run fine? Try to compile with?BUILD_TESTING and then run ctest in the build directory. On Sun, Dec 17, 2017 at 2:52 AM, Elhassan Abdou wrote: Hi all, I am trying to use vtkEGLrenderWindow but I receive this runtime error: ?Setting an EGL display to device index: 0 require EGL_EXT_device_base EGL_EXT_platform_device EGL_EXT_platform_base extensions ERROR: In D:\toolkits\vtkrcgit\Rendering\OpenGL2\vtkEGLRenderWindow.cxx, line 356 vtkEGLRenderWindow (00000196387DE220): No matching EGL configuration found. Any idea why I am receiving this. Can you give me tip even how to fix this? Regards Elhassan _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 dan.lipsa at kitware.com Wed Dec 20 09:46:44 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 20 Dec 2017 09:46:44 -0500 Subject: [vtkusers] vtkEGLRenderWindow error message In-Reply-To: <5a3996a4.03cb500a.73a1c.9d34@mx.google.com> References: <5a3996a4.03cb500a.73a1c.9d34@mx.google.com> Message-ID: Elhassan, The fact that most tests passed means that your VTK works correctly, however I am not sure you compiled it with EGL. Can you make sure you have VTK_USE_X = OFF VTK_OPENGL_HAS_EGL = ON in cmake-gui. The header files I had to download myself from the Kronos page: https://www.khronos.org/registry/EGL/ just download the 4 header files (maintaining the same directory hierarchy). The two libraries you need should be where your graphics driver is installed. This what I have on my machine: //Path to a file. EGL_INCLUDE_DIR:PATH=/home/danlipsa/include //Path to a library. EGL_LIBRARY:FILEPATH=/usr/lib/nvidia-384/libEGL.so //Path to a library. EGL_opengl_LIBRARY:FILEPATH=/usr/lib/nvidia-384/libOpenGL.so On Tue, Dec 19, 2017 at 5:45 PM, Elhassan Abdou wrote: > Hi, > > > > I ran the tests of VTK, they passed except 4 tests > > The following tests FAILED: > > 1> 1045 - vtkRenderingCoreCxx-TestResetCameraVerticalAspectRatio > (Failed) > > 1> 1046 - vtkRenderingCoreCxx-TestResetCameraVerticalAspectRatioParallel > (Failed) > > 1> 1062 - vtkRenderingCoreCxx-TestWindowToImageFilter (Failed) > > 1> 1068 - vtkRenderingExternalCxx-TestGLUTRenderWindow > (Failed) > > They are not related to EGL. They failed because of command line error ?I > guess?: > > >Errors while running CTest > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The > command "setlocal > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: > "C:\Program Files\CMake\bin\ctest.exe" --force-new-ctest-process -C Release > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if > %errorlevel% neq 0 goto :cmEnd > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: > endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: > :cmErrorLevel > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit > /b %1 > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: > :cmDone > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if > %errorlevel% neq 0 goto :VCEnd > > 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: > :VCEnd" exited with code 8. > > 1>Done building project "RUN_TESTS.vcxproj" -- FAILED. > > > > > > I tried to run the small EGL program, but it is not compiled. The unistd.h > does not exist on Windows 10 visual studio 2017. I can not figure out where > is the problem. The EGL files and lib I used, I got from ANGLE project. I > think that is problem. Can you help me where I can find EGL files to my > platform?. > > I am using windows 10 > > Nvidia GTX 1060 Driver version 388.59 > > Visual studio 2017 community > > > > I am looking forward to hearing from you > > > > Elhassan > > > > > > Sent from Mail for > Windows 10 > > > > *From: *Dan Lipsa > *Sent: *Monday, December 18, 2017 7:46 PM > *To: *Elhassan Abdou > *Cc: *VTK Users > *Subject: *Re: [vtkusers] vtkEGLRenderWindow error message > > > > Not sure about glew. It runs fine on our test machines. > > > > https://open.cdash.org/index.php?project=VTK > > > > taanab is an EGL build. > > > > What OS, graphics card, graphics card driver version do you have? Are you > your EGL installation works correctly. Can you compile/run a small EGL > program? > > For instance > > https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglIntro.xhtml > > > > > > > > > > On Mon, Dec 18, 2017 at 1:23 PM, Elhassan Abdou > wrote: > > Hi , > > > > Thank you for your reply. I have not ran the test yet. I Will do this. But > do you think that glew needs to be updated with eglew files that are > supported from glew2.0.0? > > I am not sure which version VTK has. > > In the error message I noticed that glew failed to initialize > > > > Regards > > Elhassan > > > > On 18 Dec 2017 7:18 PM, "Dan Lipsa" wrote: > > Elhassan, > > Do the VTK tests run fine? Try to compile with BUILD_TESTING and then run > ctest in the build directory. > > > > On Sun, Dec 17, 2017 at 2:52 AM, Elhassan Abdou > wrote: > > Hi all, > > > > I am trying to use vtkEGLrenderWindow but I receive this runtime error: > > Setting an EGL display to device index: 0 require EGL_EXT_device_base > EGL_EXT_platform_device EGL_EXT_platform_base extensions > > > > ERROR: In D:\toolkits\vtkrcgit\Rendering\OpenGL2\vtkEGLRenderWindow.cxx, > line 356 > > vtkEGLRenderWindow (00000196387DE220): No matching EGL configuration found. > > > > > > Any idea why I am receiving this. Can you give me tip even how to fix this? > > > > Regards > > Elhassan > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 elhassan.abdou at gmail.com Wed Dec 20 10:00:57 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Wed, 20 Dec 2017 16:00:57 +0100 Subject: [vtkusers] vtkEGLRenderWindow error message In-Reply-To: References: <5a3996a4.03cb500a.73a1c.9d34@mx.google.com> Message-ID: Hi Dan , Thank you for your reply. I am sure that I built VTK with EGL, but I am building it on Windows 10, it USE_X was set to false. After checking Nvidia driver I figured out that Nvidia does not support EGL on Windows platform, it is supported on Linux, I am not sure about OSX. Unfortunately, I am stuck with windows for this project. The ANGLE implementation does not work here it seems. Is there is any other way to make offscreen rendering without EGL? Best regards Elhassan On Wed, Dec 20, 2017 at 3:46 PM, Dan Lipsa wrote: > Elhassan, > The fact that most tests passed means that your VTK works correctly, > however I am not sure you compiled it with EGL. > > Can you make sure you have > VTK_USE_X = OFF > VTK_OPENGL_HAS_EGL = ON > > in cmake-gui. > > The header files I had to download myself from the Kronos page: > https://www.khronos.org/registry/EGL/ > just download the 4 header files (maintaining the same directory > hierarchy). > > The two libraries you need should be where your graphics driver is > installed. This what I have on my machine: > > //Path to a file. > EGL_INCLUDE_DIR:PATH=/home/danlipsa/include > > //Path to a library. > EGL_LIBRARY:FILEPATH=/usr/lib/nvidia-384/libEGL.so > > //Path to a library. > EGL_opengl_LIBRARY:FILEPATH=/usr/lib/nvidia-384/libOpenGL.so > > > > On Tue, Dec 19, 2017 at 5:45 PM, Elhassan Abdou > wrote: > >> Hi, >> >> >> >> I ran the tests of VTK, they passed except 4 tests >> >> The following tests FAILED: >> >> 1> 1045 - vtkRenderingCoreCxx-TestResetCameraVerticalAspectRatio >> (Failed) >> >> 1> 1046 - vtkRenderingCoreCxx-TestResetC >> ameraVerticalAspectRatioParallel (Failed) >> >> 1> 1062 - vtkRenderingCoreCxx-TestWindowToImageFilter (Failed) >> >> 1> 1068 - vtkRenderingExternalCxx-TestGLUTRenderWindow >> (Failed) >> >> They are not related to EGL. They failed because of command line error ?I >> guess?: >> >> >Errors while running CTest >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The >> command "setlocal >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >> "C:\Program Files\CMake\bin\ctest.exe" --force-new-ctest-process -C Release >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if >> %errorlevel% neq 0 goto :cmEnd >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >> :cmEnd >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >> endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >> :cmErrorLevel >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit >> /b %1 >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >> :cmDone >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if >> %errorlevel% neq 0 goto :VCEnd >> >> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >> :VCEnd" exited with code 8. >> >> 1>Done building project "RUN_TESTS.vcxproj" -- FAILED. >> >> >> >> >> >> I tried to run the small EGL program, but it is not compiled. The >> unistd.h does not exist on Windows 10 visual studio 2017. I can not figure >> out where is the problem. The EGL files and lib I used, I got from ANGLE >> project. I think that is problem. Can you help me where I can find EGL >> files to my platform?. >> >> I am using windows 10 >> >> Nvidia GTX 1060 Driver version 388.59 >> >> Visual studio 2017 community >> >> >> >> I am looking forward to hearing from you >> >> >> >> Elhassan >> >> >> >> >> >> Sent from Mail for >> Windows 10 >> >> >> >> *From: *Dan Lipsa >> *Sent: *Monday, December 18, 2017 7:46 PM >> *To: *Elhassan Abdou >> *Cc: *VTK Users >> *Subject: *Re: [vtkusers] vtkEGLRenderWindow error message >> >> >> >> Not sure about glew. It runs fine on our test machines. >> >> >> >> https://open.cdash.org/index.php?project=VTK >> >> >> >> taanab is an EGL build. >> >> >> >> What OS, graphics card, graphics card driver version do you have? Are you >> your EGL installation works correctly. Can you compile/run a small EGL >> program? >> >> For instance >> >> https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglIntro.xhtml >> >> >> >> >> >> >> >> >> >> On Mon, Dec 18, 2017 at 1:23 PM, Elhassan Abdou >> wrote: >> >> Hi , >> >> >> >> Thank you for your reply. I have not ran the test yet. I Will do this. >> But do you think that glew needs to be updated with eglew files that are >> supported from glew2.0.0? >> >> I am not sure which version VTK has. >> >> In the error message I noticed that glew failed to initialize >> >> >> >> Regards >> >> Elhassan >> >> >> >> On 18 Dec 2017 7:18 PM, "Dan Lipsa" wrote: >> >> Elhassan, >> >> Do the VTK tests run fine? Try to compile with BUILD_TESTING and then run >> ctest in the build directory. >> >> >> >> On Sun, Dec 17, 2017 at 2:52 AM, Elhassan Abdou >> wrote: >> >> Hi all, >> >> >> >> I am trying to use vtkEGLrenderWindow but I receive this runtime error: >> >> Setting an EGL display to device index: 0 require EGL_EXT_device_base >> EGL_EXT_platform_device EGL_EXT_platform_base extensions >> >> >> >> ERROR: In D:\toolkits\vtkrcgit\Rendering\OpenGL2\vtkEGLRenderWindow.cxx, >> line 356 >> >> vtkEGLRenderWindow (00000196387DE220): No matching EGL configuration >> found. >> >> >> >> >> >> Any idea why I am receiving this. Can you give me tip even how to fix >> this? >> >> >> >> Regards >> >> Elhassan >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 dan.lipsa at kitware.com Wed Dec 20 10:35:28 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 20 Dec 2017 10:35:28 -0500 Subject: [vtkusers] vtkEGLRenderWindow error message In-Reply-To: References: <5a3996a4.03cb500a.73a1c.9d34@mx.google.com> Message-ID: You can use SetOffScreenRendering(1) on the render window. EGL and OSMesa are also headless (they don't need a windowing system) besides offscreen. On Wed, Dec 20, 2017 at 10:00 AM, Elhassan Abdou wrote: > Hi Dan , > > Thank you for your reply. I am sure that I built VTK with EGL, but I am > building it on Windows 10, it USE_X was set to false. > After checking Nvidia driver I figured out that Nvidia does not support > EGL on Windows platform, it is supported on Linux, I am not sure about OSX. > Unfortunately, I am stuck with windows for this project. > The ANGLE implementation does not work here it seems. > > Is there is any other way to make offscreen rendering without EGL? > > Best regards > > Elhassan > > On Wed, Dec 20, 2017 at 3:46 PM, Dan Lipsa wrote: > >> Elhassan, >> The fact that most tests passed means that your VTK works correctly, >> however I am not sure you compiled it with EGL. >> >> Can you make sure you have >> VTK_USE_X = OFF >> VTK_OPENGL_HAS_EGL = ON >> >> in cmake-gui. >> >> The header files I had to download myself from the Kronos page: >> https://www.khronos.org/registry/EGL/ >> just download the 4 header files (maintaining the same directory >> hierarchy). >> >> The two libraries you need should be where your graphics driver is >> installed. This what I have on my machine: >> >> //Path to a file. >> EGL_INCLUDE_DIR:PATH=/home/danlipsa/include >> >> //Path to a library. >> EGL_LIBRARY:FILEPATH=/usr/lib/nvidia-384/libEGL.so >> >> //Path to a library. >> EGL_opengl_LIBRARY:FILEPATH=/usr/lib/nvidia-384/libOpenGL.so >> >> >> >> On Tue, Dec 19, 2017 at 5:45 PM, Elhassan Abdou > > wrote: >> >>> Hi, >>> >>> >>> >>> I ran the tests of VTK, they passed except 4 tests >>> >>> The following tests FAILED: >>> >>> 1> 1045 - vtkRenderingCoreCxx-TestResetCameraVerticalAspectRatio >>> (Failed) >>> >>> 1> 1046 - vtkRenderingCoreCxx-TestResetC >>> ameraVerticalAspectRatioParallel (Failed) >>> >>> 1> 1062 - vtkRenderingCoreCxx-TestWindowToImageFilter (Failed) >>> >>> 1> 1068 - vtkRenderingExternalCxx-TestGLUTRenderWindow >>> (Failed) >>> >>> They are not related to EGL. They failed because of command line error >>> ?I guess?: >>> >>> >Errors while running CTest >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The >>> command "setlocal >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >>> "C:\Program Files\CMake\bin\ctest.exe" --force-new-ctest-process -C Release >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if >>> %errorlevel% neq 0 goto :cmEnd >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >>> :cmEnd >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >>> endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >>> :cmErrorLevel >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >>> exit /b %1 >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >>> :cmDone >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if >>> %errorlevel% neq 0 goto :VCEnd >>> >>> 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ >>> IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: >>> :VCEnd" exited with code 8. >>> >>> 1>Done building project "RUN_TESTS.vcxproj" -- FAILED. >>> >>> >>> >>> >>> >>> I tried to run the small EGL program, but it is not compiled. The >>> unistd.h does not exist on Windows 10 visual studio 2017. I can not figure >>> out where is the problem. The EGL files and lib I used, I got from ANGLE >>> project. I think that is problem. Can you help me where I can find EGL >>> files to my platform?. >>> >>> I am using windows 10 >>> >>> Nvidia GTX 1060 Driver version 388.59 >>> >>> Visual studio 2017 community >>> >>> >>> >>> I am looking forward to hearing from you >>> >>> >>> >>> Elhassan >>> >>> >>> >>> >>> >>> Sent from Mail for >>> Windows 10 >>> >>> >>> >>> *From: *Dan Lipsa >>> *Sent: *Monday, December 18, 2017 7:46 PM >>> *To: *Elhassan Abdou >>> *Cc: *VTK Users >>> *Subject: *Re: [vtkusers] vtkEGLRenderWindow error message >>> >>> >>> >>> Not sure about glew. It runs fine on our test machines. >>> >>> >>> >>> https://open.cdash.org/index.php?project=VTK >>> >>> >>> >>> taanab is an EGL build. >>> >>> >>> >>> What OS, graphics card, graphics card driver version do you have? Are >>> you your EGL installation works correctly. Can you compile/run a small EGL >>> program? >>> >>> For instance >>> >>> https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglIntro.xhtml >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Mon, Dec 18, 2017 at 1:23 PM, Elhassan Abdou < >>> elhassan.abdou at gmail.com> wrote: >>> >>> Hi , >>> >>> >>> >>> Thank you for your reply. I have not ran the test yet. I Will do this. >>> But do you think that glew needs to be updated with eglew files that are >>> supported from glew2.0.0? >>> >>> I am not sure which version VTK has. >>> >>> In the error message I noticed that glew failed to initialize >>> >>> >>> >>> Regards >>> >>> Elhassan >>> >>> >>> >>> On 18 Dec 2017 7:18 PM, "Dan Lipsa" wrote: >>> >>> Elhassan, >>> >>> Do the VTK tests run fine? Try to compile with BUILD_TESTING and then >>> run ctest in the build directory. >>> >>> >>> >>> On Sun, Dec 17, 2017 at 2:52 AM, Elhassan Abdou < >>> elhassan.abdou at gmail.com> wrote: >>> >>> Hi all, >>> >>> >>> >>> I am trying to use vtkEGLrenderWindow but I receive this runtime error: >>> >>> Setting an EGL display to device index: 0 require EGL_EXT_device_base >>> EGL_EXT_platform_device EGL_EXT_platform_base extensions >>> >>> >>> >>> ERROR: In D:\toolkits\vtkrcgit\Rendering\OpenGL2\vtkEGLRenderWindow.cxx, >>> line 356 >>> >>> vtkEGLRenderWindow (00000196387DE220): No matching EGL configuration >>> found. >>> >>> >>> >>> >>> >>> Any idea why I am receiving this. Can you give me tip even how to fix >>> this? >>> >>> >>> >>> Regards >>> >>> Elhassan >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> 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 robert.aungst at gmail.com Wed Dec 20 22:41:56 2017 From: robert.aungst at gmail.com (Robby Aungst) Date: Wed, 20 Dec 2017 21:41:56 -0600 Subject: [vtkusers] vtkWarpVector/vtkGlyph3D array problem Message-ID: Hello, I'm having an issue where my end goal is to be able to have a set of warped points displaying a variety of glyphs with different colors and scales. I'm able to get it to work without the vtkWarpVector introduced to the pipeline, but as soon as that is introduced the array that I'm using for the indexes seems to no longer be found (as well as the scalar data), and the glyph defaults to the first in the set and no longer uses the scalar data for color. Is there something about vtkWarpVector where it doesn't pass along arrays? My working pipeline is: vtkPolyData->vtkExtractSelectedIds->vtkDistanceToCamera->vtkGlyph3D I store a vtkIntArray on the vtkPolyData with self.pointSet.GetPointData().AddArray(indexArray) and then later use it on the vtkGlyph3D to set the indexes into my glyph table: self.glyph.SetInputArrayToProcess(0, 0, 0, 0, "indexes"). This works great, but when I change the pipeline to: vtkPolyData->vtkExtractSelectedIds->vtkWarpVector->vtkDistanceToCamera-> vtkGlyph3D the vtkGlyph3D can no longer find the "indexes" array from the original polydata. It can still find the "DistanceToCamera" array which is used for the scale - I'm guessing because it gets created after the vtkWarpVector in the pipeline? I don't think that vtkWarpVector is supposed to remove the arrays, so what's happening? Is there any other way to get the arrays to SetInputArrayToProcess? Or some other way to combine vtkWarpVector and vtkGlyph3D? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From charles.kind at bristol.ac.uk Thu Dec 21 05:49:47 2017 From: charles.kind at bristol.ac.uk (Charles Kind) Date: Thu, 21 Dec 2017 03:49:47 -0700 (MST) Subject: [vtkusers] Cannot build vtk for python3 on Ubuntu 16.04 Message-ID: <1513853387977-0.post@n5.nabble.com> I am running ubuntu 16.04. I build vtk with VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON. Once built and installed it only runs from the system Python 2.7.12. Even if I run vtkpython I get: *******@********:~/Downloads/a/vtkBuild$ vtkpython vtk version 8.0.1 Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import vtk Traceback (most recent call last): File "", line 1, in ImportError: No module named 'vtk' Help!! I do have Enthought Canopy on the same system, running VTK from python 3.5, but not running when I do the ccmake, make and install for vtk8.0.1. Could this be the problem, I am a little fearful of removing it right now as I am producing work for an imminent paper and need my code working. Thanks in advance for any help. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Thu Dec 21 05:50:34 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 21 Dec 2017 10:50:34 +0000 Subject: [vtkusers] vtkWarpVector/vtkGlyph3D array problem In-Reply-To: References: Message-ID: Robby, If you can post a complete compilable C++ or Python example with a small dataset we can take a look. Bill On Dec 20, 2017 10:42 PM, "Robby Aungst" wrote: > Hello, > > I'm having an issue where my end goal is to be able to have a set of > warped points displaying a variety of glyphs with different colors and > scales. I'm able to get it to work without the vtkWarpVector introduced to > the pipeline, but as soon as that is introduced the array that I'm using > for the indexes seems to no longer be found (as well as the scalar data), > and the glyph defaults to the first in the set and no longer uses the > scalar data for color. Is there something about vtkWarpVector where it > doesn't pass along arrays? > > My working pipeline is: > > vtkPolyData->vtkExtractSelectedIds->vtkDistanceToCamera->vtkGlyph3D > > I store a vtkIntArray on the vtkPolyData with self > .pointSet.GetPointData().AddArray(indexArray) and then later use it on > the vtkGlyph3D to set the indexes into my glyph table: self.glyph. > SetInputArrayToProcess(0, 0, 0, 0, "indexes"). This works great, but when > I change the pipeline to: > > vtkPolyData->vtkExtractSelectedIds->vtkWarpVector->vtkDistan > ceToCamera->vtkGlyph3D > > the vtkGlyph3D can no longer find the "indexes" array from the original > polydata. It can still find the "DistanceToCamera" array which is used for > the scale - I'm guessing because it gets created after the vtkWarpVector in > the pipeline? > > I don't think that vtkWarpVector is supposed to remove the arrays, so > what's happening? Is there any other way to get the arrays to SetInputArrayToProcess? > Or some other way to combine vtkWarpVector and vtkGlyph3D? > > Thanks! > > _______________________________________________ > 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: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.aungst at gmail.com Thu Dec 21 10:25:14 2017 From: robert.aungst at gmail.com (Robby Aungst) Date: Thu, 21 Dec 2017 09:25:14 -0600 Subject: [vtkusers] vtkWarpVector/vtkGlyph3D array problem In-Reply-To: References: Message-ID: I've attached a simple example that shows the issue. If you toggle between lines 46 and 47, you'll see that when warp isn't in the pipeline you end up with 3 different glyphs with 3 different colors, scaled by the distance to camera. If you introduce warp into the pipeline, you get an error that says "Turning indexing off; no data to index with". The warp vector did something to the glyphIndexes array that I don't understand and also lost the scalar data that was on polydata points. It's possible that I'm just doing it wrong - all I'm after is to be able to warp the points but still be able to control the scaling/index/color of the glyphs. I'm using VTK 8.0.1 on Python 3.5. Thank you! On Thu, Dec 21, 2017 at 4:50 AM, Bill Lorensen wrote: > Robby, > > If you can post a complete compilable C++ or Python example with a small > dataset we can take a look. > > Bill > On Dec 20, 2017 10:42 PM, "Robby Aungst" wrote: > >> Hello, >> >> I'm having an issue where my end goal is to be able to have a set of >> warped points displaying a variety of glyphs with different colors and >> scales. I'm able to get it to work without the vtkWarpVector introduced to >> the pipeline, but as soon as that is introduced the array that I'm using >> for the indexes seems to no longer be found (as well as the scalar data), >> and the glyph defaults to the first in the set and no longer uses the >> scalar data for color. Is there something about vtkWarpVector where it >> doesn't pass along arrays? >> >> My working pipeline is: >> >> vtkPolyData->vtkExtractSelectedIds->vtkDistanceToCamera->vtkGlyph3D >> >> I store a vtkIntArray on the vtkPolyData with self >> .pointSet.GetPointData().AddArray(indexArray) and then later use it on >> the vtkGlyph3D to set the indexes into my glyph table: self.glyph. >> SetInputArrayToProcess(0, 0, 0, 0, "indexes"). This works great, but >> when I change the pipeline to: >> >> vtkPolyData->vtkExtractSelectedIds->vtkWarpVector->vtkDistan >> ceToCamera->vtkGlyph3D >> >> the vtkGlyph3D can no longer find the "indexes" array from the original >> polydata. It can still find the "DistanceToCamera" array which is used for >> the scale - I'm guessing because it gets created after the vtkWarpVector in >> the pipeline? >> >> I don't think that vtkWarpVector is supposed to remove the arrays, so >> what's happening? Is there any other way to get the arrays to SetInputArrayToProcess? >> Or some other way to combine vtkWarpVector and vtkGlyph3D? >> >> Thanks! >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- import vtk ren = vtk.vtkRenderer() # create some points, indexes and colors points = vtk.vtkPoints() points.InsertNextPoint(0, 0, 0) points.InsertNextPoint(5, 0, 0) points.InsertNextPoint(10, 0, 0) index = vtk.vtkIntArray() index.SetName("GlyphIndexes") index.SetNumberOfComponents(1) index.InsertNextValue(0) index.InsertNextValue(1) index.InsertNextValue(2) colors = vtk.vtkUnsignedCharArray() colors.SetName("Colors") colors.SetNumberOfComponents(3) colors.InsertNextTuple((255, 0, 0)) colors.InsertNextTuple((0, 255, 0)) colors.InsertNextTuple((0, 0, 255)) # add into the poly data polyData = vtk.vtkPolyData() polyData.SetPoints(points) polyData.GetPointData().AddArray(index) polyData.GetPointData().SetScalars(colors) # pass into vtkExtractSelectedIds (skipped for this example) # pass into warp warp = vtk.vtkWarpVector() warp.SetInputData(polyData) warp.Update() # pass into distance2camera wd2c = vtk.vtkDistanceToCamera() wd2c.SetInputConnection(warp.GetOutputPort()) # this doesn't work (all the glyphs the first index, colored by distance2camera) #wd2c.SetInputData(polyData) # this works as intended (separate colors / indexes for glyph) wd2c.SetScreenSize(1.0) wd2c.SetRenderer(ren) wd2c.Update() # create some poly data cs = vtk.vtkCubeSource() cs.SetXLength(0.5) cs.SetYLength(1) cs.SetZLength(2) ss = vtk.vtkSphereSource() ss.SetRadius(0.25) cs2 = vtk.vtkConeSource() cs2.SetRadius(0.25) cs2.SetHeight(0.5) # create the glyph. scale by the distance to camera and index with the array glyph3D = vtk.vtkGlyph3D() glyph3D.SetVectorModeToUseVector() glyph3D.SetInputConnection(wd2c.GetOutputPort()) glyph3D.SetSourceConnection(0, cs.GetOutputPort()) glyph3D.SetSourceConnection(1, ss.GetOutputPort()) glyph3D.SetSourceConnection(2, cs2.GetOutputPort()) glyph3D.SetColorModeToColorByScalar() glyph3D.SetScaleFactor(25) # Overall scaling factor glyph3D.SetRange(0, 3) # Default is (0,1) glyph3D.SetIndexModeToVector() glyph3D.SetScaleModeToScaleByScalar() glyph3D.SetInputArrayToProcess(0, 0, 0, 0, "DistanceToCamera") glyph3D.SetInputArrayToProcess(1, 0, 0, 0, "GlyphIndexes") glyph3D.Update() # visualize mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(glyph3D.GetOutputPort()) mapper.ScalarVisibilityOn() actor = vtk.vtkActor() actor.SetMapper(mapper) ren.AddActor(actor) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() istyle = vtk.vtkInteractorStyleTrackballCamera() iren.SetInteractorStyle(istyle) iren.SetRenderWindow(renWin) ren.ResetCamera() renWin.Render() iren.Start() From david.gobbi at gmail.com Thu Dec 21 12:41:27 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 21 Dec 2017 10:41:27 -0700 Subject: [vtkusers] Cannot build vtk for python3 on Ubuntu 16.04 In-Reply-To: <1513853387977-0.post@n5.nabble.com> References: <1513853387977-0.post@n5.nabble.com> Message-ID: Hi Charles, Try running 'vtkpython' from your build tree (i.e. perhaps the build was fine, and it was just the "install" that put the python modules in the wrong place). For troubleshooting, use "find" to locate vtkCommonCorePython.so and vtkCommonCore.py and make sure they're in python's path: e.g. cd to build tree and find . -name vtkCommonCorePython.so find . -name vtkCommonCore.py Then do the same in your install prefix to find out where "make install" put them. You might have to copy them to lib/python3.5/site-packages, or set your PYTHONPATH before running vtkpython. It's odd that you say you can use it from the system's python2.7. Obviously, binary modules built for python3 will not work with python2, but when you run 'vtkpython' it clearly reports that VTK was built against python3. I have to ask, are you sure that the "vtk" that you import from python2 is the one that you just built? Because it seems fishy to me. Be sure to do a "print(vtk.__file__)" after you import vtk, so that you know where the module came from. - David On Thu, Dec 21, 2017 at 3:49 AM, Charles Kind wrote: > I am running ubuntu 16.04. I build vtk with VTK_PYTHON_VERSION=3 and > VTK_WRAP_PYTHON=ON. Once built and installed it only runs from the system > Python 2.7.12. Even if I run vtkpython I get: > > *******@********:~/Downloads/a/vtkBuild$ vtkpython > vtk version 8.0.1 > Python 3.5.2 (default, Nov 23 2017, 16:37:01) > [GCC 5.4.0 20160609] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> import vtk > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named 'vtk' > > Help!! > > I do have Enthought Canopy on the same system, running VTK from python 3.5, > but not running when I do the ccmake, make and install for vtk8.0.1. Could > this be the problem, I am a little fearful of removing it right now as I am > producing work for an imminent paper and need my code working. > > Thanks in advance for any help. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Thu Dec 21 20:24:40 2017 From: doug at beachmailing.com (scotsman60) Date: Thu, 21 Dec 2017 18:24:40 -0700 (MST) Subject: [vtkusers] How to control clipping updates when using vtkImplicitPlaneWidget2? Message-ID: <1513905880036-0.post@n5.nabble.com> Hello!!! I'm using the Python API to VTK and using the vtkImplicitPlaneWidget2 to control a cutting/clipping plane operating on a vtkUnstructuredGrid. I add an Observer to respond to "InteractionEvent" events and update the clipper each time the event fires. This works great for small models - mouse button down and drag causes the target to be clipped and displayed "dynamically" while dragging - very cool. But when then model become large it's not quite so cool...... The clip operation is taking several seconds and the resulting user experience is pretty bad. Also, I seem to get two events for each discrete mouse drag.... which is making things even worse I'd like to trigger a clip update only when the users lets go of the mouse button after dragging. So, 1) Mouse button down, 2) Drag (see the cutting plane move but no clip should be triggered) 3) Mouse button up - and Clip But I can only see the single "InteractionEvent" for vtkImplicitPlaneWidget2? Any ideas will be gratefully received. Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Thu Dec 21 21:20:10 2017 From: doug at beachmailing.com (scotsman60) Date: Thu, 21 Dec 2017 19:20:10 -0700 (MST) Subject: [vtkusers] How to control clipping updates when using vtkImplicitPlaneWidget2? In-Reply-To: <1513905880036-0.post@n5.nabble.com> References: <1513905880036-0.post@n5.nabble.com> Message-ID: <1513909210192-0.post@n5.nabble.com> Hello!!! Turns out there is an "EndInteractionEvent" that does exactly what I want. I didn't find this in the docs - I just took a guess and it worked out. Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jhlegarreta at vicomtech.org Fri Dec 22 06:23:19 2017 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Fri, 22 Dec 2017 12:23:19 +0100 Subject: [vtkusers] [vtk-developers] ANN: VTK Book Figures completed In-Reply-To: <3e6d7cb0-4eca-4dbf-9ee7-dc49e7f16c92@email.android.com> References: <3e6d7cb0-4eca-4dbf-9ee7-dc49e7f16c92@email.android.com> Message-ID: Simply awesome. Priceless work. This is another one of the kinds of things that make VTK and its community great. Thanks Bill, JON HAITZ -- On 19 December 2017 at 00:47, Todd via vtk-developers < vtk-developers at vtk.org> wrote: > That's excellent! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtk-developers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Fri Dec 22 07:20:44 2017 From: the.1.lily at hotmail.com (the lily) Date: Fri, 22 Dec 2017 12:20:44 +0000 Subject: [vtkusers] Writing an Unstructured data to a VTK file Message-ID: Hello, I have some arrays storing the values of the data and I want to write it as a vtk file, the data is unstructured tetrahedrons - Three arrays (X, Y, and Z) storing the coordinates - An array (data) storing scalar field - An array (ptIds) storing cell connectivity I'm trying to pass the scalar field to vtkUnstructuredGrid but I get an error: error: no member named 'SetInputData' in 'vtkUnstructuredGrid' This is the code I'm using vtkSmartPointer< vtkPoints > points = vtkSmartPointer< vtkPoints > :: New(); vtkSmartPointer< vtkFloatArray > val = vtkSmartPointer< vtkFloatArray > :: New(); val->SetNumberOfComponents(1); for(int i=0; i < npts; i++) { points->InsertNextPoint(X[i], Y[i], Z[i]); val->InsertTuple1(i, data[i]); } vtkSmartPointer unstructuredGrid = vtkSmartPointer::New(); unstructuredGrid->SetPoints(points); unstructuredGrid->GetPointData()->SetScalars(val); for(int i=0; i< ntets; i++) unstructuredGrid->InsertNextCell(VTK_TETRA, 4, ptIds[i]); vtkDataSetWriter *w = vtkDataSetWriter::New(); w->SetFileTypeToASCII(); w->SetInputData(unstructuredGrid); w->SetFileName("data.vtk"); w->Write(); What is the correct way to pass the scalar field? -Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Dec 22 07:52:22 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 22 Dec 2017 07:52:22 -0500 Subject: [vtkusers] Writing an Unstructured data to a VTK file In-Reply-To: References: Message-ID: What version of VTK are you using? On Fri, Dec 22, 2017 at 7:20 AM, the lily wrote: > Hello, > > I have some arrays storing the values of the data and I want to write it as > a vtk file, the data is unstructured tetrahedrons > > - Three arrays (X, Y, and Z) storing the coordinates > - An array (data) storing scalar field > - An array (ptIds) storing cell connectivity > > I'm trying to pass the scalar field to vtkUnstructuredGrid but I get an > error: > > error: no member named 'SetInputData' in > 'vtkUnstructuredGrid' > > This is the code I'm using > > vtkSmartPointer< vtkPoints > points = vtkSmartPointer< vtkPoints > :: New(); > > vtkSmartPointer< vtkFloatArray > val = vtkSmartPointer< vtkFloatArray > :: > New(); > > val->SetNumberOfComponents(1); > > > for(int i=0; i < npts; i++) > > { > > points->InsertNextPoint(X[i], Y[i], Z[i]); > val->InsertTuple1(i, data[i]); > > } > > vtkSmartPointer unstructuredGrid = > vtkSmartPointer::New(); > unstructuredGrid->SetPoints(points); > unstructuredGrid->GetPointData()->SetScalars(val); > > for(int i=0; i< ntets; i++) > unstructuredGrid->InsertNextCell(VTK_TETRA, 4, ptIds[i]); > > vtkDataSetWriter *w = vtkDataSetWriter::New(); > w->SetFileTypeToASCII(); > w->SetInputData(unstructuredGrid); > w->SetFileName("data.vtk"); > w->Write(); > > > What is the correct way to pass the scalar field? > > > > -Thanks > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From vorpal at internode.on.net Fri Dec 22 08:43:50 2017 From: vorpal at internode.on.net (John) Date: Sat, 23 Dec 2017 00:13:50 +1030 Subject: [vtkusers] Many VTK build tests fail when run from Jenkins/Bamboo or VNC display, even when DISPLAY is set to good opengl-enabled display Message-ID: Hi Everybody, This is more of a question about building/testing VTK than using VTK, so perhaps i should be posting this to the vtk-deveolopes list, but... I'm using bamboo & jenkins to build the VTK code from source and run the testing suite, and I've hit a weird problem: When i run the build/test scripts from a terminal on my actual Xorg display, all 1300+ tests succeed. But when I run the build/test via jenknins/bamboo, or manually from a VNC display, and use DISPLAY environment variable to *send* the opengl output windows to my Xorg/nvidia display, I have 347 tests failing (and 967 succeed). If I walk over to my main head and look at the Xorg/nvidia display, while this is happening, there are opengl windows opening & I can see most of the tests are working fine. So, there doesn't seem to be anything *totally* wrong with my setup. But for some reason, 347 of the tests fail. Perhaps the reason these tests are failing is obvious to someone with a more knowledge of the testing process? I've got a feeling I'm just overlooking something. Or if not, does anyone have any suggestions re how I could get some more info to debug the issue? Ta for any advice! John -------------------------- ps if it helps, the full results of a build with all these inexplicably failing tests can be found at: https://homunculoid.com/CDash/viewTest.php?onlyfailed&buildid=38 Also, I've isolated a command to run one of the failing tests, and I can replicate the problem easily, with a script containing just one test: export DISPLAY=:0 VTK_BUILD_DIR="/data-ssd/data/development/src/vtk/build/jenkins/dashboard/nightly/1/vtk-build" "${VTK_BUILD_DIR}/bin/vtkChartsCoreCxxTests" "TestMultipleRenderers" "-E" "25" "-D" "${VTK_BUILD_DIR}/ExternalData/Testing" "-T" "${VTK_BUILD_DIR}/Testing/Temporary" "-V" "${VTK_BUILD_DIR}/ExternalData/Charts/Core/Testing/Data/Baseline/TestMultipleRenderers.png" Running the test from a terminal directly on the Xorg display is all good, with results showing ImageError=0: 0 Standard0.0331759 0.079182 Running the test from a terminal on a VNC display, but with DISPLAY set to point to the proper Xorg display, spits out a bunch of opengl info, which shows it is attempting to run on the right head, and all the GL info looks good (to me), and then at the bottom are the results which indicate the test failed: server glx vendor string: NVIDIA Corporation server glx version string: 1.4 server glx extensions: GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_import_context GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_video_sync GLX_SGI_swap_control GLX_EXT_swap_control GLX_EXT_swap_control_tear GLX_EXT_texture_from_pixmap GLX_EXT_buffer_age GLX_ARB_create_context GLX_ARB_create_context_profile GLX_EXT_create_context_es_profile GLX_EXT_create_context_es2_profile GLX_ARB_create_context_robustness GLX_NV_delay_before_swap GLX_EXT_stereo_tree GLX_EXT_libglvnd GLX_ARB_context_flush_control GLX_NV_robustness_video_memory_purge GLX_ARB_multisample GLX_NV_float_buffer GLX_ARB_fbconfig_float GLX_EXT_framebuffer_sRGB GLX_NV_copy_image client glx vendor string: NVIDIA Corporation client glx version string: 1.4 glx extensions: GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_import_context GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_video_sync GLX_SGI_swap_control GLX_EXT_swap_control GLX_EXT_swap_control_tear GLX_EXT_texture_from_pixmap GLX_EXT_buffer_age GLX_ARB_create_context GLX_ARB_create_context_profile GLX_EXT_create_context_es_profile GLX_EXT_create_context_es2_profile GLX_ARB_create_context_robustness GLX_NV_delay_before_swap GLX_EXT_stereo_tree GLX_ARB_context_flush_control GLX_NV_robustness_video_memory_purge GLX_ARB_multisample GLX_NV_float_buffer GLX_ARB_fbconfig_float GLX_EXT_framebuffer_sRGB GLX_NV_copy_image GLX_ARB_get_proc_address OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GTX 960/PCIe/SSE2 OpenGL version string: 4.5.0 NVIDIA 384.98 OpenGL extensions: ... lots of extensions ... X Extensions: Generic Event Extension, SHAPE, MIT-SHM, XInputExtension, XTEST, BIG-REQUESTS, SYNC, XKEYBOARD, XC-MISC, XFIXES, RENDER, RANDR, XINERAMA, Composite, DAMAGE, MIT-SCREEN-SAVER, DOUBLE-BUFFER, RECORD, DPMS, Present, X-Resource, XVideo, XFree86-VidModeExtension, XFree86-DGA, DRI2, GLX, NV-GLX, NV-CONTROL, XINERAMA 244344 1/data-ssd/data/development/src/vtk/build/jenkins/dashboard/nightly/1/vtk-build/Testing/Temporary/TestMultipleRenderers.png Failed Image Test ( TestMultipleRenderers.png ) : 244344 /data-ssd/data/development/src/vtk/build/jenkins/dashboard/nightly/1/vtk-build/Testing/Temporary/TestMultipleRenderers.diff.png/data-ssd/data/development/src/vtk/build/jenkins/dashboard/nightly/1/vtk-build/ExternalData/Charts/Core/Testing/Data/Baseline/TestMultipleRenderers_1.png0.695937 1.87324 So, I can see two issues here - first, there is a difference image, so the results were different to the baseline image, and 2nd, the WallTime & CPUTime are much greater on the failed test, compared to when it succeeds. I had been hoping the reason for failure might just be timing-related, and maybe it is, but I had a quick look and I can't see anything in the TestMultipleRenderers.cxx which stipulates any strict time limit for the test, so I don't think that's it. It's puzzling! Pls Halp! From jmax.red at gmail.com Fri Dec 22 09:02:18 2017 From: jmax.red at gmail.com (Jean-Max Redonnet) Date: Fri, 22 Dec 2017 15:02:18 +0100 Subject: [vtkusers] How to retrieve individual value from a vtkTable in Java Message-ID: Hi, I did a K-Means clustering following the C++ example ( https://lorensen.github.io/VTKExamples/site/Cxx/InfoVis/KMeansClustering/). vtkTable kmeansInputData = new vtkTable(); kmeansInputData.AddColumn(output.GetPointData().GetVectors()); // output object is a polydata with vectors attached resulting from previous calculation vtkKMeansStatistics kMeansStatistics = new vtkKMeansStatistics(); kMeansStatistics.SetInputData(kmeansInputData); kMeansStatistics.SetColumnStatus(kmeansInputData.GetColumnName(0), 1); kMeansStatistics.SetColumnStatus(kmeansInputData.GetColumnName(1), 1); kMeansStatistics.SetColumnStatus(kmeansInputData.GetColumnName(2), 1); // kMeansStatistics.SetColumnStatus( "Testing", 1 ); kMeansStatistics.RequestSelectedColumns(); kMeansStatistics.SetAssessOption(true); kMeansStatistics.SetDefaultNumberOfClusters(3); kMeansStatistics.Update(); kMeansStatistics.GetOutput().Dump(32, -1); // dump shows the clustering is OK vtkIntArray clusterArray = new vtkIntArray(); clusterArray.SetNumberOfComponents(1); clusterArray.SetName("ClusterId"); for(int r = 0; r < kMeansStatistics.GetOutput().GetNumberOfRows(); r++){ // at this point the C++ instruction to retrieve information is // vtkVariant v = kMeansStatistics->GetOutput()->GetValue(r, kMeansStatistics->GetOutput()->GetNumberOfColumns() - 1); // ... } AFAIK vtkVariant does not exists in Java. I tried to get row first using vtkAbstractArray a = kMeansStatistics.GetOutput().GetRow(r); My debugger indicates array a is instance of vtkFloatArray, but java cast doesn't work, thus I can't retrieve the value I guess SafeDownCast is the good method to do that, but can't find it in java wrapper. So, I can't figure out the right way to retrieve individual value from a vtkTable in Java. Any help would be really appreciated jMax -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Fri Dec 22 10:50:53 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 22 Dec 2017 10:50:53 -0500 Subject: [vtkusers] Many VTK build tests fail when run from Jenkins/Bamboo or VNC display, even when DISPLAY is set to good opengl-enabled display In-Reply-To: References: Message-ID: <20171222155053.GB13083@megas.kitware.com> On Sat, Dec 23, 2017 at 00:13:50 +1030, John wrote: > Perhaps the reason these tests are failing is obvious to someone with a > more knowledge of the testing process? I don't know how mcuh I'd be able to help, but if you could submit an experimental run to CDash and link to it, it'd make it easier to see what's common between the failing tests. FWIW, we do have a few machines using VNC for their testing, but they're currently only testing ParaView. One is `megas` which tests Catalyst and the other is `pvbinsdash` which is working on the ParaView superbuild. Historically, `megas` also had VTK builds on it, but other than volume rendering tests (due to Fedora's Mesa not supporting floating point textures), some others were excluded mentioning "broken selection on VNC", "broken transparency on VNC(?)", and "broken stencil buffer on VNC(?)": - TestYoungsMaterialInterface - TestWindowToImageTransparency - rendererSource --Ben From dave.demarle at kitware.com Fri Dec 22 11:56:51 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 22 Dec 2017 11:56:51 -0500 Subject: [vtkusers] announce : VTK 8.1.0 Message-ID: Hi folks, VTK 8.1.0 is tagged and up on the download page. Read all about it here: https://blog.kitware.com/vtk-8-1-0/ happy holidays everyone! 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 vorpal at internode.on.net Fri Dec 22 13:27:00 2017 From: vorpal at internode.on.net (John) Date: Sat, 23 Dec 2017 04:57:00 +1030 Subject: [vtkusers] Many VTK build tests fail when run from Jenkins/Bamboo or VNC display, even when DISPLAY is set to good opengl-enabled display In-Reply-To: <20171222155053.GB13083@megas.kitware.com> References: <20171222155053.GB13083@megas.kitware.com> Message-ID: Thanks Ben, I've submitted a run here: https://open.cdash.org/buildSummary.php?buildid=5192358 The list of failing tests is here: https://open.cdash.org/viewTest.php?onlyfailed&buildid=5192358 I'll keep my fingers Xed... it'd be great if someone with more knowledge could take a look at the list of failing tests and spot something they have in common! John ---------- ps Re using VNC, for me it was an almost total failure, so i quickly gave up and switched to sending the tests to my main Xorg/nvidia head. Under vnc,the tests fail with an error message which says: ERROR: In /data-ssd/data/development/src/vtk/git/vtk-master/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 793 vtkXOpenGLRenderWindow (0x14251e0): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2. It's odd, because it says i need mesa > 10.6.5 with GL version 2.1 but I've got Mesa 17.2.4-2.fc27.x86_64, which provides "Max compat profile version 2.1 and OpenGL > 3.2) and it still isn't happy. I think these opengl features are just not supported on vnc, or not on my vnc ("llvmpipe" device, tigervnc server), or perhaps they are supported, but i haven't worked out how to enable them. Maybe i just need to change the "preferred profile, from "compat (0x2) to something newer. (On VNC): glxinfo -B name of display: :14.0 display: :14 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: VMware, Inc. (0xffffffff) Device: llvmpipe (LLVM 4.0, 256 bits) (0xffffffff) Version: 17.2.4 Accelerated: no Video memory: 32113MB Unified memory: no Preferred profile: compat (0x2) Max core profile version: 0.0 Max compat profile version: 2.1 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 2.0 OpenGL vendor string: VMware, Inc. OpenGL renderer string: llvmpipe (LLVM 4.0, 256 bits) OpenGL version string: 2.1 Mesa 17.2.4 OpenGL shading language version string: 1.30 OpenGL ES profile version string: OpenGL ES 2.0 Mesa 17.2.4 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16 On 2017-12-23 2:20 AM, Ben Boeckel wrote: > On Sat, Dec 23, 2017 at 00:13:50 +1030, John wrote: >> Perhaps the reason these tests are failing is obvious to someone with a >> more knowledge of the testing process? > > I don't know how mcuh I'd be able to help, but if you could submit an > experimental run to CDash and link to it, it'd make it easier to see > what's common between the failing tests. > > FWIW, we do have a few machines using VNC for their testing, but they're > currently only testing ParaView. One is `megas` which tests Catalyst and > the other is `pvbinsdash` which is working on the ParaView superbuild. > Historically, `megas` also had VTK builds on it, but other than volume > rendering tests (due to Fedora's Mesa not supporting floating point > textures), some others were excluded mentioning "broken selection on > VNC", "broken transparency on VNC(?)", and "broken stencil buffer on > VNC(?)": > > - TestYoungsMaterialInterface > - TestWindowToImageTransparency > - rendererSource > > --Ben > From karanovicm at gmail.com Mon Dec 25 14:07:46 2017 From: karanovicm at gmail.com (KM) Date: Mon, 25 Dec 2017 12:07:46 -0700 (MST) Subject: [vtkusers] set camera orientation to match with vtkImagePlaneWidget In-Reply-To: References: Message-ID: <1514228866115-0.post@n5.nabble.com> Hi Girish Did you manage to solve camera setting, I needed the same for my projects Thanks, MK -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Tue Dec 26 18:24:18 2017 From: doug at beachmailing.com (scotsman60) Date: Tue, 26 Dec 2017 16:24:18 -0700 (MST) Subject: [vtkusers] How to debug vtkXMLUnstructuredGridWriter? Message-ID: <1514330658749-0.post@n5.nabble.com> Hello!! I'm using vtk through the Python API. I have a large vtkUnstructuredGrid comprising ~95 million Hexahedral cells and ~150 million points. I can successfully visualize this model - albeit a little slow...... I created the model by importing HDF5 data, reindexing the data and then populating the vtkUnstructuredGrid. I'm trying to save the model using vtkXMLUnstructureGirdWriter and although this appears to work (the Write() method returns 1) I'm unable to subsequently read the grid into my code or Paraview. In Paraview, I get the following error When I query the actual vtkUnstructuredGrid I find that the celltypes array has the correct length - and of course I am able to render the model so I believe the grid is OK and the problem is with the writer - or the reader. My question is how can I debug either of these? Thanks, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Wed Dec 27 03:06:49 2017 From: doug at beachmailing.com (scotsman60) Date: Wed, 27 Dec 2017 01:06:49 -0700 (MST) Subject: [vtkusers] How to debug vtkXMLUnstructuredGridWriter? In-Reply-To: <1514330658749-0.post@n5.nabble.com> References: <1514330658749-0.post@n5.nabble.com> Message-ID: <1514362009743-0.post@n5.nabble.com> Some more info. When I open the file using vtkXMLUnstructuredGridReader I get the following error. ERROR: In ..\IO\XML\vtkXMLReader.cxx, line 258 vtkXMLUnstructuredGridReader (000002A4E641B030): Error opening file E:/Models/gigadof/gigadofmdl.vtu ERROR: In ..\Common\ExecutionModel\vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (000002A4E9431280): Algorithm vtkXMLUnstructuredGridReader(000002A4E641B030) returned failure for request: vtkInformation (000002A4E92B1270) Debug: Off Modified Time: 11581 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From charles.kind at bristol.ac.uk Wed Dec 27 06:56:48 2017 From: charles.kind at bristol.ac.uk (Charles Kind) Date: Wed, 27 Dec 2017 04:56:48 -0700 (MST) Subject: [vtkusers] Cannot build vtk for python3 on Ubuntu 16.04 In-Reply-To: References: <1513853387977-0.post@n5.nabble.com> Message-ID: <1514375808511-0.post@n5.nabble.com> Dear David, Apologies for late reply, family engaged in stomach flu and xmas. I have fixed the install by setting the PYTHONPATH. The python2.7 issue, with it running vtk, was because the University standard Ubuntu install includes VTK6 installed from standard repos (doh, should have checked). Thank you so much for your help in this issue, I am very happy to be running the latest VTK, it is noticeably more memory efficient and faster than the version 7 with Canopy I was using. :) Happy New Year! Charlie -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From hadas.judah at gmail.com Wed Dec 27 08:01:37 2017 From: hadas.judah at gmail.com (VTKJunky) Date: Wed, 27 Dec 2017 06:01:37 -0700 (MST) Subject: [vtkusers] Using Marching Squares algorithm Message-ID: <1514379697427-0.post@n5.nabble.com> I'm a newbie to VTK and would like to mostly use vtkMarchingSquares algorithm in my code. I don't want/need any rendering done and also would like to supply the algorithm with a basic float matrix as input. Is there a more flexible way to call Marching Squares? Or do I have to use the pipeline method only? I'm basically looking for an option of just calling the algorithm with my input matrix and using the output as I want, could anyone supply a basic example or maybe some tips on how to do this? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ben.boeckel at kitware.com Wed Dec 27 08:46:46 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 27 Dec 2017 08:46:46 -0500 Subject: [vtkusers] Many VTK build tests fail when run from Jenkins/Bamboo or VNC display, even when DISPLAY is set to good opengl-enabled display In-Reply-To: References: <20171222155053.GB13083@megas.kitware.com> Message-ID: <20171227134646.GA13765@megas.kitware.com> On Sat, Dec 23, 2017 at 04:57:00 +1030, John wrote: > ps Re using VNC, for me it was an almost total failure, so i quickly > gave up and switched to sending the tests to my main Xorg/nvidia head. > > Under vnc,the tests fail with an error message which says: What if you set `MESA_GL_VERSION_OVERRIDE=3.2` in the environment? Something causes a request of a compat profile when on VNC. This tells Mesa to claim it has a compat profile at 3.2 (this profile is technically missing old functions, but VTK doesn't need them anyways). > Preferred profile: compat (0x2) You can see that a compat profile was requested here. --Ben From bakkari.abdelkhalek at hotmail.fr Thu Dec 28 05:28:10 2017 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Thu, 28 Dec 2017 10:28:10 +0000 Subject: [vtkusers] QVTKWidget with vtk actor and mouserelease Message-ID: Dear All, I am trying to add a seed point by a mouse release event. But, I've got an issue, the window/level (intercept/slope) parameters of the image visualization is changed. Maybe adding a red circle into the visualization window affected the parameters? Below is my code : void MainWindow::myMouseReleaseEvent (QMouseEvent * event) { const unsigned int InputDimension = 3;//Dimension of image typedef short InputPixelType;//Pixel Type typedef itk::Image< InputPixelType, InputDimension > InputImageType;//Image Type //Set input image to VTK viewer double* range = image_vtk->GetScalarRange(); image_view->SetInputData(image_vtk); image_view->SetColorLevel(0.5*(range[0]+range[1])); image_view->SetColorWindow(range[1] - range[0]); mMinSliderX = image_view->GetSliceMin(); mMaxSliderX = image_view->GetSliceMax(); ui->horizontalSlider->setMinimum(mMinSliderX); ui->horizontalSlider->setMaximum(mMaxSliderX); Hori_slider_position = 0; int sliceNumber = currentSlice; vtkSmartPointer extractVOI = vtkSmartPointer::New(); extractVOI->SetInputData(image_vtk); extractVOI->SetSampleRate(1,1,1); extractVOI-> SetVOI ( 0, image_vtk-> GetExtent () [1], 0, image_vtk-> GetExtent () [3], sliceNumber, sliceNumber ); extractVOI->Update(); vtkImageData* extracted = extractVOI->GetOutput(); vtkSmartPointer extractedCastFilter = vtkSmartPointer::New(); extractedCastFilter->SetInputData(extracted); extractedCastFilter->SetOutputScalarTypeToUnsignedShort(); extractedCastFilter->Update(); vtkSmartPointer imageActor = vtkSmartPointer::New(); imageActor->GetMapper()->SetInputConnection( extractedCastFilter->GetOutputPort()); // Setup renderer vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(imageActor); if (event->button() == Qt::LeftButton ) { QPointF currPos = event->windowPos(); currPos.setX(currPos.x()); currPos.setY(ui->qVTK1->height() - currPos.y()); // Seed points visualization vtkSmartPointer sphereSource = vtkSmartPointer::New(); sphereSource->SetCenter(0.0, 0.0, 0.0); sphereSource->SetRadius(10.0); sphereSource->Update(); vtkSmartPointer sphereMapper = vtkSmartPointer::New(); sphereMapper->SetInputConnection(sphereSource->GetOutputPort()); sphereMapper->Update(); vtkSmartPointer sphereActor = vtkSmartPointer::New(); sphereActor->SetMapper(sphereMapper); sphereActor->GetProperty()->SetColor(1.0, 0.0, 0.0); sphereActor->GetProperty()->SetPointSize(5); sphereActor->SetPosition( currPos.x(), currPos.y() ); renderer->AddActor(sphereActor); renderer->ResetCamera(); } ui-> qVTK1-> GetRenderWindow () -> AddRenderer (renderer); ui-> qVTK1-> GetRenderWindow () -> render (); ui->qVTK1->update(); } Kind regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From polly_sukting at hotmail.com Thu Dec 28 12:21:16 2017 From: polly_sukting at hotmail.com (Polly Pui) Date: Thu, 28 Dec 2017 17:21:16 +0000 Subject: [vtkusers] vtkThreshold: how to change the parameter to colour instead of remove the areas Message-ID: Hi. I am using vtkThreshold to extract the areas on vtk 3D face data. However, it removed the important areas (areas that i am looking at) and left with holes. My question is how can I change the parameter on this ThresholdByLower? I would like to replace the deleted areas which meet the criterion with different colour instead of just remove them and leave them with holes. I have been looking over the library and found vtkThreshold.cxx regarding the parameter of this. However, I am not able to change the 'delete' to 'SetColor'. // now clean up / update ourselves pointMap->Delete(); newCellPts->Delete(); output->Delete(); newPoints->Delete(); output->Squeeze(); Much appreciate if someone can help on this. Image is attached: http://vtk.1045678.n5.nabble.com/file/t341727/M_0.jpg [http://vtk.1045678.n5.nabble.com/file/t341727/M_0.jpg] This is my code: vtkPolyDataReader *reader = vtkPolyDataReader::New(); reader->SetFileName(argv[1]); reader->Update(); vtkCurvatures *meanCurve = vtkCurvatures::New(); meanCurve->SetInputConnection(reader->GetOutputPort()); meanCurve->SetCurvatureTypeToMean(); meanCurve->Update(); vtkThreshold *thresh = vtkThreshold::New(); thresh->SetInputConnection(meanCurve->GetOutputPort()); thresh->ThresholdByLower(0.085); thresh->Update(); vtkGeometryFilter *geom = vtkGeometryFilter::New(); geom->SetInputConnection(thresh->GetOutputPort()); vtkPolyDataMapper *mapper2 = vtkPolyDataMapper::New(); mapper2->SetInputConnection(geom->GetOutputPort()); mapper2->SetLookupTable(lut); mapper2->Update(); vtkActor *actor2 = vtkActor::New(); actor2->SetMapper(mapper2); actor2->GetProperty()->SetColor(0.0, 0.0, 0.0); vtkRenderer *renderer = vtkRenderer::New(); renderer->AddActor(actor2); renderer->SetBackground(.1, .2, .3); // Background color blue // Render and interact vtkRenderWindow *renderWindow = vtkRenderWindow::New(); renderWindow->AddRenderer(renderer); renderWindow->SetSize(800, 800); vtkRenderWindowInteractor *renderWindowInteractor = vtkRenderWindowInteractor::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderWindow->Render(); renderWindowInteractor->Start(); Thank you very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Thu Dec 28 17:11:51 2017 From: doug at beachmailing.com (scotsman60) Date: Thu, 28 Dec 2017 15:11:51 -0700 (MST) Subject: [vtkusers] vtkUnstructuredGrid - How to write/read very large data sets? Message-ID: <1514499111229-0.post@n5.nabble.com> Hello, I've been struggling for a few days with large vtkUnstructuredGrid. The grid has 95 million hexhedral cells and ~150 million points. I create the grid by reading in an hdf5 file and I'm able to visualize it. I'm also saving the grid using both vtkUnstructuredGridWriter and vtkXMLUnstructuredGridWriter. My problem is that I am unable to read the files I write using the corresponding Readers. Paraview is able to read the legacy (non-XML) version, but when I use vtkUnstructuredGridReader in a small test harness the import fails as soon it hits reader.Update() with the following error ERROR: In ..\IO\Legacy\vtkDataReader.cxx, line 430 vtkUnstructuredGridReader (000001C70722A950): Unable to open file: E:\Models\gigadof\gigadofmdl.vtk The legacy vtk file is ~5.5GB (binary). Can anyone help? Should vtk be able to work with files this size or is there a better strategy for working with large data sets? The fact that Paraview can open and display the file I'm writing makes me think that I SHOULD be able to do this.... Thanks in advance, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From konovalov at saldlab.com Thu Dec 28 17:59:18 2017 From: konovalov at saldlab.com (Dmitry) Date: Fri, 29 Dec 2017 01:59:18 +0300 Subject: [vtkusers] vtkUnstructuredGrid - How to write/read very large data sets? In-Reply-To: <1514499111229-0.post@n5.nabble.com> References: <1514499111229-0.post@n5.nabble.com> Message-ID: Hello Doug, Yes, It?s possible to write large number of mesh elements, but you need to fix third party libraries in vtk to Int64 data format instead of Int32. Best regards, Dmitry > On 29 Dec 2017, at 01:11, scotsman60 wrote: > > Hello, > > I've been struggling for a few days with large vtkUnstructuredGrid. The grid > has 95 million hexhedral cells and ~150 million points. > > I create the grid by reading in an hdf5 file and I'm able to visualize it. > > I'm also saving the grid using both vtkUnstructuredGridWriter and > vtkXMLUnstructuredGridWriter. > > My problem is that I am unable to read the files I write using the > corresponding Readers. > > Paraview is able to read the legacy (non-XML) version, but when I use > vtkUnstructuredGridReader in a small test harness the import fails as soon > it hits reader.Update() with the following error > > ERROR: In ..\IO\Legacy\vtkDataReader.cxx, line 430 > vtkUnstructuredGridReader (000001C70722A950): Unable to open file: > E:\Models\gigadof\gigadofmdl.vtk > > The legacy vtk file is ~5.5GB (binary). > > Can anyone help? > > Should vtk be able to work with files this size or is there a better > strategy for working with large data sets? > > The fact that Paraview can open and display the file I'm writing makes me > think that I SHOULD be able to do this.... > > Thanks 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: > https://vtk.org/mailman/listinfo/vtkusers From doug at beachmailing.com Thu Dec 28 18:27:58 2017 From: doug at beachmailing.com (scotsman60) Date: Thu, 28 Dec 2017 16:27:58 -0700 (MST) Subject: [vtkusers] vtkUnstructuredGrid - How to write/read very large data sets? In-Reply-To: <1514499111229-0.post@n5.nabble.com> References: <1514499111229-0.post@n5.nabble.com> Message-ID: <1514503678169-0.post@n5.nabble.com> Dmitry, I'm using vtk with Python and I downloaded the 64 bit version from the vtk download site - vtkpython-7.1.1-Windows-64bit.exe I expected that this would include the 64bit vtk dll's too. Are you suggesting that I need to do something other than above? Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Thu Dec 28 18:51:33 2017 From: doug at beachmailing.com (scotsman60) Date: Thu, 28 Dec 2017 16:51:33 -0700 (MST) Subject: [vtkusers] vtkUnstructuredGrid - How to write/read very large data sets? In-Reply-To: <1514499111229-0.post@n5.nabble.com> References: <1514499111229-0.post@n5.nabble.com> Message-ID: <1514505093626-0.post@n5.nabble.com> Dmitry, I checked the .dlls that are being called by Python and I find that they are all 64 bit. Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Fri Dec 29 14:08:14 2017 From: doug at beachmailing.com (scotsman60) Date: Fri, 29 Dec 2017 12:08:14 -0700 (MST) Subject: [vtkusers] vtkThreshold: how to change the parameter to colour instead of remove the areas In-Reply-To: References: Message-ID: <1514574494642-0.post@n5.nabble.com> Hello, You code is setup to only visualize the cells that are output by the threshold filter - so you're only ever going to get some portion of the original model displayed. I'd suggest one of tthree strategies (there are likely others) 1) Create 2 mappers/actors - one for the cells above the threshold and one for the cells below. Feed one of the mappers with the "below threshold" filter and one with the "above threshold" filter. Color each actor differently and then render both actors 2) Set up a cell scalar field and use the threshold filter to find the cells above the threshold and change the scalar field value for these cells only - then color the cells by scalar value using a lut. 3) If you ONLY want to visualize the cells above some curvature value, use the curvature field and a two color lookup table directly and avoid the threshold filter - set up the lut to color scalar values above your desired threshold in one color and below it in another. Option 3 is likely way more efficient/faster than the others. Hope this helps, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Fri Dec 29 14:25:38 2017 From: doug at beachmailing.com (scotsman60) Date: Fri, 29 Dec 2017 12:25:38 -0700 (MST) Subject: [vtkusers] Is this the correct way to use QuadricLODActor with 3D unstructuredGrids? Message-ID: <1514575538362-0.post@n5.nabble.com> Hello, The below code runs and produces the expected LOD reduction during view manipulation. But since I'm unable to find any examples of QuadricLOD on unstructured solids, I'd like some confirmation that this is indeed the recommended pattern. import vtk #Set up the unstructured grid reader unstructuredGridFileName = r'E:\xxxxxx\enginem10.vtu' reader=vtk.vtkXMLUnstructuredGridReader() reader.SetFileName(unstructuredGridFileName) reader.Update() # Populate the grid rgrid = vtk.vtkUnstructuredGrid() rgrid = reader.GetOutput() #Extract the free faces from the (solid) grid surfaceFilter = vtk.vtkDataSetSurfaceFilter() surfaceFilter.SetInputData(rgrid); # Connect the free faces to the mapper surfaceMapper = vtk.vtkPolyDataMapper() surfaceMapper.SetInputConnection(surfaceFilter.GetOutputPort()) #Connect the mapper to the QaudricLOActor actor = vtk.vtkQuadricLODActor() actor.SetMapper(surfaceMapper) # A renderer and render window renderer = vtk.vtkRenderer() renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) # An interactor renderWindowInteractor = vtk.vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) #Adjust the aggresiveness of the LOD renderWindowInteractor.SetDesiredUpdateRate(2) renderer.AddActor(actor) renderWindow.Render() renderWindowInteractor.Start() Thanks in advance, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From robert.aungst at gmail.com Fri Dec 29 14:26:47 2017 From: robert.aungst at gmail.com (Robby Aungst) Date: Fri, 29 Dec 2017 13:26:47 -0600 Subject: [vtkusers] vtkWarpVector/vtkGlyph3D array problem In-Reply-To: References: Message-ID: I?m still stuck on this. How can you get array data to survive being passed through vtkWarpVector? Thanks! > On Dec 21, 2017, at 9:25 AM, Robby Aungst wrote: > > I've attached a simple example that shows the issue. If you toggle between lines 46 and 47, you'll see that when warp isn't in the pipeline you end up with 3 different glyphs with 3 different colors, scaled by the distance to camera. If you introduce warp into the pipeline, you get an error that says "Turning indexing off; no data to index with". The warp vector did something to the glyphIndexes array that I don't understand and also lost the scalar data that was on polydata points. > > It's possible that I'm just doing it wrong - all I'm after is to be able to warp the points but still be able to control the scaling/index/color of the glyphs. I'm using VTK 8.0.1 on Python 3.5. > > Thank you! > >> On Thu, Dec 21, 2017 at 4:50 AM, Bill Lorensen wrote: >> Robby, >> >> If you can post a complete compilable C++ or Python example with a small dataset we can take a look. >> >> Bill >>> On Dec 20, 2017 10:42 PM, "Robby Aungst" wrote: >>> Hello, >>> >>> I'm having an issue where my end goal is to be able to have a set of warped points displaying a variety of glyphs with different colors and scales. I'm able to get it to work without the vtkWarpVector introduced to the pipeline, but as soon as that is introduced the array that I'm using for the indexes seems to no longer be found (as well as the scalar data), and the glyph defaults to the first in the set and no longer uses the scalar data for color. Is there something about vtkWarpVector where it doesn't pass along arrays? >>> >>> My working pipeline is: >>> >>> vtkPolyData->vtkExtractSelectedIds->vtkDistanceToCamera->vtkGlyph3D >>> >>> I store a vtkIntArray on the vtkPolyData with self.pointSet.GetPointData().AddArray(indexArray) and then later use it on the vtkGlyph3D to set the indexes into my glyph table: self.glyph.SetInputArrayToProcess(0, 0, 0, 0, "indexes"). This works great, but when I change the pipeline to: >>> >>> vtkPolyData->vtkExtractSelectedIds->vtkWarpVector->vtkDistanceToCamera->vtkGlyph3D >>> >>> the vtkGlyph3D can no longer find the "indexes" array from the original polydata. It can still find the "DistanceToCamera" array which is used for the scale - I'm guessing because it gets created after the vtkWarpVector in the pipeline? >>> >>> I don't think that vtkWarpVector is supposed to remove the arrays, so what's happening? Is there any other way to get the arrays to SetInputArrayToProcess? Or some other way to combine vtkWarpVector and vtkGlyph3D? >>> >>> Thanks! >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From charles.kind at bristol.ac.uk Fri Dec 29 17:11:26 2017 From: charles.kind at bristol.ac.uk (Charles Kind) Date: Fri, 29 Dec 2017 15:11:26 -0700 (MST) Subject: [vtkusers] vtkWarpVector/vtkGlyph3D array problem In-Reply-To: References: Message-ID: <1514585486023-0.post@n5.nabble.com> Dear Robby, Below is a function where I warp points back by half a vector in order that the vector glyph arrow is drawn later on with the center of the vector in plane. You will note that I create the warp vector field, apply it to the warp, copy these points to a polydata then extract all relevant arrays and copy the whole lot back. This may not be the correct way of doing things, I am just hacking at VTK, but it works. If you designated arrays as vector or scalar you will need to do that again afterwards. # Generate warp vectors, these vectors warp the point data # Warp centers vectors on plane, but warps base geometry def CenterVectors(self): numPoints = self.thinPD.GetNumberOfPoints() mtrans = vtk.vtkFloatArray() mtrans.SetNumberOfTuples(numPoints) mtrans.SetNumberOfComponents(3) mtrans.SetNumberOfValues(3*numPoints) mtrans.SetName("mtrans") # Warp of -(1/2)v centers vectors if vector origin is z=0 plane for x in range(numPoints): mtrans.SetTuple3(x, \ -self.thinPD.GetPointData().GetAbstractArray('m').\ GetTuple(x)[0]/2, \ -self.thinPD.GetPointData().GetAbstractArray('m').\ GetTuple(x)[1]/2, \ -self.thinPD.GetPointData().GetAbstractArray('m').\ GetTuple(x)[2]/2) wpd = vtk.vtkPolyData() wpd.SetPoints(self.thinPD.GetPoints()) wpd.GetPointData().SetVectors(mtrans) # Warp vector origins warpVector = vtk.vtkWarpVector() warpVector.SetInputData(wpd) warpVector.Update() # Cast warped points and original vectors into PolyData warped = vtk.vtkPolyData() warped.SetPoints(warpVector.GetOutput().GetPoints()) noarrays = self.thinPD.GetPointData().GetNumberOfArrays() for x in range(noarrays): warped.GetPointData().AddArray(self.thinPD.GetPointData()\ .GetAbstractArray(x)) self.thinPD = warped Luck, Charlie -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From alican1812 at hotmail.com Sat Dec 30 08:12:44 2017 From: alican1812 at hotmail.com (alican) Date: Sat, 30 Dec 2017 06:12:44 -0700 (MST) Subject: [vtkusers] Actor disappears when using one direction interactor style. Message-ID: <1514639564212-0.post@n5.nabble.com> I am trying to limit actor's movement to one direction only. The question was already asked a couple of times and never answered. It initially looked straightforward, however I cannot make it work. When I start moving the mouse an actor is disappearing and for the life of me I do not know why. Can somebody please spot a problem? Thank you AC void MoveInteractorStyle::OnMouseMove() { if (m_Move && m_pActor) { int* pos = GetInteractor()->GetEventPosition(); if (CommonUtils::isEmpty(m_CurrentPos)) { m_CurrentPos = QVector3D(pos[0], pos[1], pos[2]); return; } QVector3D newPos(pos[0], pos[1], pos[2]); if (m_direction == X) m_pActor->SetPosition(newPos[0], m_CurrentPos[1], m_CurrentPos[2]); else if (m_direction == Y) m_pActor->SetPosition(m_CurrentPos[0], newPos[1], m_CurrentPos[2]); else if (m_direction == Z) m_pActor->SetPosition(m_CurrentPos[0], m_CurrentPos[1], newPos[2]); else m_pActor->SetPosition(newPos[0], newPos[1], newPos[2]); double* apos = m_pActor->GetPosition(); qDebug() << "x " << apos[0] << " y " << apos[1] << " z " << apos[2]; Pan(); //vtkInteractorStyleTrackballActor::OnMouseMove(); } else vtkInteractorStyleTrackballActor::OnMouseMove(); } void MoveInteractorStyle::OnLeftButtonUp() { m_Move = false; m_pActor = nullptr; CommonUtils::empty(m_CurrentPos); //vtkInteractorStyleTrackballActor::OnLeftButtonUp(); EndPan(); } void MoveInteractorStyle::OnLeftButtonDown() { m_direction = X; m_Move = true; m_pActor = pickActor(); StartPan(); } vtkActor* MoveInteractorStyle::pickActor() { int* clickPos = GetInteractor()->GetEventPosition(); // Pick from this location. vtkSmartPointer picker = vtkSmartPointer::New(); picker->Pick(clickPos[0], clickPos[1], 0, this->GetDefaultRenderer()); double* pos = picker->GetPickPosition(); return picker->GetActor(); } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From waldo.valenzuela at hotmail.com Sat Dec 30 12:59:27 2017 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Sat, 30 Dec 2017 17:59:27 +0000 Subject: [vtkusers] issue on Visual Studio 2015 vtkNetDCF and external library HDF5 HL Message-ID: Dear All, I am compiling VTK 8.1 with external HDF5 on Windows, Linux and Mac. Linux and Mac no problem, BUT in Windows with Visual Studio 2015, I have the following LINK errors when the vtkNetDCF library is compiled: libhdf5_hl.lib(H5DS.obj) : error LNK2019: unresolved external symbol H5T_STD_REF_OBJ_g referenced in function H5DS_get_REFLIST_type 1>libhdf5_hl.lib(H5LT.obj) : error LNK2019: unresolved external symbol H5T_STD_REF_DSETREG_g referenced in function H5LT_dtype_to_text 1>libhdf5_hl.lib(H5LT.obj) : error LNK2019: unresolved external symbol H5T_FORTRAN_S1_g referenced in function H5LT_dtype_to_text 1>libhdf5_hl.lib(H5LTparse.obj) : error LNK2001: unresolved external symbol H5T_FORTRAN_S1_g 1>libhdf5_hl.lib(H5LT.obj) : error LNK2019: unresolved external symbol H5T_NATIVE_LONG_g referenced in function H5LT_dtype_to_text 1>libhdf5_hl.lib(H5LTparse.obj) : error LNK2001: unresolved external symbol H5T_NATIVE_LONG_g 1>libhdf5_hl.lib(H5LT.obj) : error LNK2019: unresolved external symbol H5T_NATIVE_ULONG_g referenced in function H5LT_dtype_to_text 1>libhdf5_hl.lib(H5LTparse.obj) : error LNK2001: unresolved external symbol H5T_NATIVE_ULONG_g Any idea what is this error is about, I have to compile HDF5 with an special option? Any help is more than welcome, Cheers, Waldo. From pdhahn at compintensehpc.com Sat Dec 30 15:05:30 2017 From: pdhahn at compintensehpc.com (Paul Douglas Hahn) Date: Sat, 30 Dec 2017 14:05:30 -0600 Subject: [vtkusers] Actor disappears when using one direction interactor style. In-Reply-To: <1514639564212-0.post@n5.nabble.com> References: <1514639564212-0.post@n5.nabble.com> Message-ID: <7214427e-4462-09b9-3d22-d7f0b2f2f97a@compintensehpc.com> New to VTK, I found out I had to deal with triggering a repaint after changing positions of things in the scene from within event handlers -- with charts at least (context2d). I am not expert enough to give you an explicit answer for a fix, but the symptoms you describe do sound similar -- i.e., there needs to be a repaint triggered, at the end of the mouse move event handler and particularly at the end of mouse button up. I presume the former should probably happen in Pan(), and the latter in endPan(), but is not? But it could be some other issue, I suppose, so please take this newbie reply with a grain of salt. - Paul On 12/30/2017 07:12 AM, alican wrote: > I am trying to limit actor's movement to one direction only. > The question was already asked a couple of times and never answered. > It initially looked straightforward, however I cannot make it work. > When I start moving the mouse an actor is disappearing and for the life of > me I do not know why. > Can somebody please spot a problem? > Thank you > AC > > void MoveInteractorStyle::OnMouseMove() > { > if (m_Move && m_pActor) > { > int* pos = GetInteractor()->GetEventPosition(); > > if (CommonUtils::isEmpty(m_CurrentPos)) > { > m_CurrentPos = QVector3D(pos[0], pos[1], pos[2]); > return; > } > QVector3D newPos(pos[0], pos[1], pos[2]); > > if (m_direction == X) > m_pActor->SetPosition(newPos[0], m_CurrentPos[1], m_CurrentPos[2]); > else if (m_direction == Y) > m_pActor->SetPosition(m_CurrentPos[0], newPos[1], m_CurrentPos[2]); > else if (m_direction == Z) > m_pActor->SetPosition(m_CurrentPos[0], m_CurrentPos[1], newPos[2]); > else > m_pActor->SetPosition(newPos[0], newPos[1], newPos[2]); > > double* apos = m_pActor->GetPosition(); > qDebug() << "x " << apos[0] << " y " << apos[1] << " z " << apos[2]; > Pan(); > > //vtkInteractorStyleTrackballActor::OnMouseMove(); > } > else > vtkInteractorStyleTrackballActor::OnMouseMove(); > } > > > void MoveInteractorStyle::OnLeftButtonUp() > { > > m_Move = false; > m_pActor = nullptr; > CommonUtils::empty(m_CurrentPos); > //vtkInteractorStyleTrackballActor::OnLeftButtonUp(); > EndPan(); > } > > void MoveInteractorStyle::OnLeftButtonDown() > { > m_direction = X; > m_Move = true; > m_pActor = pickActor(); > StartPan(); > } > > vtkActor* MoveInteractorStyle::pickActor() > { > int* clickPos = GetInteractor()->GetEventPosition(); > > // Pick from this location. > vtkSmartPointer picker = > vtkSmartPointer::New(); > picker->Pick(clickPos[0], clickPos[1], 0, this->GetDefaultRenderer()); > > double* pos = picker->GetPickPosition(); > return picker->GetActor(); > } > > > > -- > 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 > -- Paul D. Hahn CompIntense HPC, LLC From alican1812 at hotmail.com Sat Dec 30 15:32:48 2017 From: alican1812 at hotmail.com (alican) Date: Sat, 30 Dec 2017 13:32:48 -0700 (MST) Subject: [vtkusers] Actor disappears when using one direction interactor style. In-Reply-To: <7214427e-4462-09b9-3d22-d7f0b2f2f97a@compintensehpc.com> References: <1514639564212-0.post@n5.nabble.com> <7214427e-4462-09b9-3d22-d7f0b2f2f97a@compintensehpc.com> Message-ID: <1514665968211-0.post@n5.nabble.com> Paul hello, Thanks for answering, I actually do repainting, it was left out for brevity. I was able to solve my problem using AddPosition instead of SetPosition, though why the former is working and the latter isn't I do not know. I wil try and post my solution when I 'll understand what is going on. Happy Holidays AC -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From vorpal at internode.on.net Sun Dec 31 22:28:17 2017 From: vorpal at internode.on.net (John) Date: Mon, 1 Jan 2018 13:58:17 +1030 Subject: [vtkusers] Many VTK build tests fail when run from Jenkins/Bamboo or VNC display, even when DISPLAY is set to good opengl-enabled display In-Reply-To: <20171227134646.GA13765@megas.kitware.com> References: <20171222155053.GB13083@megas.kitware.com> <20171227134646.GA13765@megas.kitware.com> Message-ID: <13811c29-73cd-f4b5-5e59-c527ad063946@internode.on.net> Ben, thanks muchly. MESA_GL_VERSION_OVERRIDE=3.2 made a huge difference to running the tests on vnc. With the override set, I'm able to run tests on vnc with only 102 failures, and most of those failures are from the TestGPURayCast group. So there's obviously something about that group which doesn't like the VNC/Mesa, but almost everything else is good. The above success with VNC was enough to motivate me to have another look at the main issue I've been having when running tests on nvidia. And thus began another trip down the rabbit-hole and almost to the brink of losing my sanity. I did find the answer though. After countless tests & hours of grief & frustation, I have solved it. The problem, as it turns out, was two things: 1) I have screensaver/power management disabled in xfce4, but DPMS was still being enabled by Xorg. When DPMS kicks in and turns off the display, suddenly tests start to fail. 347 out of 1314 will fail if DPMS has had the monitor turned off for the whole testing run, and, to make things more confusing, if the DPMS kicks in halfway through a test run, the number that fails will be lower. So I am now enabling xfce-power-manager and ensuring it is set to DISABLE screen blanking and DPMS, and I'm also using "xset s off -dpms" which should accomplish the same, if xfce-power-manager isn't running. 2) I typically have two X displays running on my nvidia card, and switch between them using ctrl-alt-Fx. If I try to run tests on the X display which is not selected, again, 347 of the tests fail. So, when I have DPMS disabled, and the right X display selected with Ctrl-Alt-Fx, I am now getting 100% success on all tests, on my mvidia card. 100% success. 100% confirmed. I do find this situation incredibly frustrating and utterly depressing though. Once again, I wonder why I ever began to use Linux. What sort of utter garbage is this, when having a monitor turn off due to DPMS suddenly breaks applications?!?! I just don't understand it. This doesn't happen on Windows. Imagine if Word or Autocad or Google Chrome or Call of Duty would suddenly crash every time you had a cup of coffee & your monitor went into power-saving mode. And what sort of nonsense is going on, when switching to a 2nd X display breaks apps on the first. I used to have Quake3 running on one X display and my normal desktop on another X display, 15 years ago. But Quake3 never crashed with OpenGL errors when I used Ctrl-Alt-Fx to switch back to my regular desktop. Perhaps the whole X display and every app on it used to be suspended when i switched VTs, but I don't think that was the case. I'm pretty sure I used to be able to hear the audio continuing, so quake3 & the x server must've still been running, even when the vt was not selected. It's all just utterly ridiculous. It shouldn't happen. But apparently this is the state of Linux/Xorg/nvidia now, in 2018. Just appalling. On 2017-12-28 12:16 AM, Ben Boeckel wrote: > On Sat, Dec 23, 2017 at 04:57:00 +1030, John wrote: >> ps Re using VNC, for me it was an almost total failure, so i quickly >> gave up and switched to sending the tests to my main Xorg/nvidia head. >> >> Under vnc,the tests fail with an error message which says: > > What if you set `MESA_GL_VERSION_OVERRIDE=3.2` in the environment? > Something causes a request of a compat profile when on VNC. This tells > Mesa to claim it has a compat profile at 3.2 (this profile is > technically missing old functions, but VTK doesn't need them anyways). > >> Preferred profile: compat (0x2) > > You can see that a compat profile was requested here. > > --Ben >