From amir.khojaste at sunnybrook.ca Fri May 1 12:33:38 2015 From: amir.khojaste at sunnybrook.ca (Khojaste, Amir) Date: Fri, 1 May 2015 16:33:38 +0000 Subject: [vtkusers] Reading an Image in ITK, help plz!! Message-ID: <639C0C4CF854594E920361562A5266BB30BCC50A@SBXNG01.sw.ca> Hey guys, I am new to developping with ITK,VTK and will appreciate if someone can pull me off from this problem! Sorry I have included VTK mailing list here too, I have not gotten my answer in ITK mailing list yet so was thinking maybe VTK users faced the same problem too. The following is the simplest piece of code that is simply reading an Image using "itkImageFileReader". I have built my ITK in debug mode using Cmake and VS2008. The Hello World program is running just fine but when I try to add couple of lines of code to read an image I get the following error: Unhandled exception at 0x000000013fcedb03 in HelloWorld.exe: 0xC0000005: Access violation reading location 0xffffffffffffffff. I am confused and don't know if this is the problem with Linking/my Cmakelists.txt or whatever else! I can read the image if I build the ITK examples and then use the codes there. This has made me even more confused! In the Call Stack the code goes to the lines 118 to 120 of "itkImageFileReader.txx" if which I think should't. if ( m_UserSpecifiedImageIO == false ) //try creating via factory { m_ImageIO = ImageIOFactory::CreateImageIO( m_FileName.c_str(), ImageIOFactory::ReadMode ); } Any help?! /***** Code #include "itkImage.h" #include "itkImageFileWriter.h" #include "itkImageFileReader.h" #include "itkCropImageFilter.h" #include "itksys/SystemTools.hxx" typedef unsigned char PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::ImageFileReader ReaderType; int main(int argc, char *argv[]) { ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); reader->Update(); // This line will crash system("pause"); return EXIT_SUCCESS; } /*==== CMakeLists.txt # This is the root ITK CMakeLists file. CMAKE_MINIMUM_REQUIRED(VERSION 2.4) IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) ENDIF(COMMAND CMAKE_POLICY) # This project is designed to be built outside the Insight source tree. PROJECT(HelloWorld) # Find ITK. FIND_PACKAGE(ITK REQUIRED) INCLUDE(${ITK_USE_FILE}) ADD_EXECUTABLE(HelloWorld HelloWorld.cxx ) TARGET_LINK_LIBRARIES(HelloWorld ${ITK_LIBRARIES}) This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Fri May 1 14:52:20 2015 From: sean at rogue-research.com (Sean McBride) Date: Fri, 1 May 2015 14:52:20 -0400 Subject: [vtkusers] [vtk-developers] Bug fix for boolean operations filter In-Reply-To: References: Message-ID: <20150501185220.885647698@mail.rogue-research.com> On Thu, 30 Apr 2015 22:09:01 -0400, Cory Quammen said: >Today I committed a bug fix to vtkImplicitPolyDataDistance that should fix >at least some of the known problems with vtkBooleanOperationPolyDataFilter. Great, thanks! I'll give it a try. We are still using the contributed GTS-based code because it gives better results for us (though does crash sometimes). 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 p.g.richardson at phantomjinx.co.uk Sat May 2 15:51:53 2015 From: p.g.richardson at phantomjinx.co.uk (phantomjinx) Date: Sat, 02 May 2015 20:51:53 +0100 Subject: [vtkusers] QVTKWidget and vtkGraphLayoutView Message-ID: <55452AD9.5050107@phantomjinx.co.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Am slowly learning VTK so forgive the crudeness of code but I am trying to integrate a mutable graph into my QT application. Following tutorials etc..., I have setup a QVTKWidget and am now inserting into it a vtkGraphLayoutView, except I just cannot get it to work. The following causes the application to display rubbish (window displays code from IDE underneath see [4]) where the QVTKWidget is supposed to be: VTK_CREATE(vtkMutableUndirectedGraph, graph); // Create 3 vertices vtkIdType v1 = graph->AddVertex(); vtkIdType v2 = graph->AddVertex(); vtkIdType v3 = graph->AddVertex(); // Create a fully connected graph graph->AddEdge(v1, v2); graph->AddEdge(v2, v3); graph->AddEdge(v1, v3); VTK_CREATE(vtkGraphLayoutView, graphLayoutView); graphLayoutView->SetInteractor(parent->GetInteractor()); // [1] parent->SetRenderWindow(graphLayoutView->GetRenderWindow()); // [2] graphLayoutView->AddRepresentationFromInput(graph); VTK_CREATE(vtkCircularLayoutStrategy, circularLayoutStrategy); graphLayoutView->SetLayoutStrategy(circularLayoutStrategy); graphLayoutView->SetVertexLabelVisibility(true); graphLayoutView->SetEdgeLabelVisibility(true); graphLayoutView->GetRenderer()->SetBackground(1.0, 0.0, 1.0); // [3] // VTK_CREATE(vtkCallbackCommand, selectionCallback); // selectionCallback->SetCallback(SelectionCallbackFunction); // graphLayoutView->GetRepresentation()->GetAnnotationLink()->AddObserver("AnnotationChangedEvent", selectionCallback); graphLayoutView->ResetCamera(); graphLayoutView->Render(); graphLayoutView->GetInteractor()->Initialize(); graphLayoutView->GetInteractor()->Start(); I originally did succeeed in displaying the drawn triangle by replacing lines [1] and [2] with: parent->GetRenderWindow()->AddRenderer(graphLayoutView->GetRenderer()); However, no mouse clicks work since the QVTKWidget parent has a different interactor to the graphLayoutView. Can someone with far my knowledge than I give me a bump in the right direction. OS - Fedora 20 VTK - 6.1 QT - 5.4.1 Many thanks. PGR [4] http://phantomjinx.co.uk/stuff/qtapp.png - -- Paul Richardson * p.g.richardson at phantomjinx.co.uk * p.g.richardson at redhat.com * pgrichardson at linux.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVFKtkACgkQcthLMIwdEb3eWwCfRue1kKC+FRY5OfR6+WRX+NfC LqgAn2HCwEXi8RINg0uGRiSAAxQkYdMI =jyYe -----END PGP SIGNATURE----- From mguttman at yahoo.com Mon May 4 08:10:36 2015 From: mguttman at yahoo.com (mguttman) Date: Mon, 4 May 2015 05:10:36 -0700 (MST) Subject: [vtkusers] Mixing OpenGL and VTK In-Reply-To: References: Message-ID: <1430741436236-5731739.post@n5.nabble.com> Additional observations here. I also found no rendering when using: ExternalVTKWidget vtkOpenGLVolumeTextureMapper3D And I would get errors like this: ERROR: In .../VTK-6.2.0/Rendering/VolumeOpenGL/vtkOpenGLVolumeTextureMapper3D.cxx, line 99 vtkOpenGLVolumeTextureMapper3D (0xe9c1e008): required extensions not supported However, it is rendering single 2D images when read from DICOM files. For testing, I added code to render the same volume in a non-external window using more typical classes: vtkRenderer vtkRenderWindow vtkRenderWindowInteractor It rendered fine in this window that popped up. Once it rendered correctly in this window, it would render correctly in the external window. So this suggests that some extensions are not being loaded when using the external window, but they are loaded when using the typical window. Would be great to know how to correctly get these extensions to load, if that is indeed the problem. Regards, Mike -- View this message in context: http://vtk.1045678.n5.nabble.com/Re-Mixing-OpenGL-and-VTK-tp5731242p5731739.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Mon May 4 08:18:17 2015 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Mon, 4 May 2015 05:18:17 -0700 (MST) Subject: [vtkusers] vtkGDCMImageReader spacing In-Reply-To: <1430401444878-5731702.post@n5.nabble.com> References: <1430401444878-5731702.post@n5.nabble.com> Message-ID: <1430741897878-5731740.post@n5.nabble.com> Anyone? I would really help any ideas. Cheers -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkGDCMImageReader-spacing-tp5731702p5731740.html Sent from the VTK - Users mailing list archive at Nabble.com. From hortense.kirisli at aquilab.com Mon May 4 10:09:39 2015 From: hortense.kirisli at aquilab.com (Hortense KIRISLI) Date: Mon, 4 May 2015 14:09:39 +0000 Subject: [vtkusers] Display filled contour of a cut sphere Message-ID: <01FD39A9A2882F4D8D183D7F88EC1C50BC5B75@SRVSBS.Aquilab.local> Hi all, Here is what I would like to do: I have a sphere that I cut with a plane. I succeeded to display the intersection of the sphere with the plane as a contour, but do not succeed to display it filled. Also, I do not want the sphere itself to be visible, only its intersection in plane, filled (so I cant use I have been looking into other vtk posts and example (capSphere.tcl), which are supposed to perform what I want, but could not make it works. Here is my code; the issue I see is that boundaryStrips seems to be empty. // Plane vtkSmartPointer cutterPlane = vtkSmartPointer::New(); cutterPlane = vtkSmartPointer::New(); cutterPlane->SetOrigin(0., 0., 0.); cutterPlane->SetNormal(normal[0], normal[1], normal[2]); // Sphere center vtkSmartPointer sphereCenter = vtkSmartPointer::New(); sphereCenter = vtkSmartPointer::New(); sphereCenter->SetCenter(0., 0., 0.); sphereCenter->SetRadius(20.0); sphereCenter->SetThetaResolution(16); sphereCenter->SetPhiResolution(16); //// Cutter sphere center //vtkSmartPointer cutterSphereCenter = vtkSmartPointer::New(); //cutterSphereCenter->SetCutFunction(cutterPlane); //cutterSphereCenter->SetInputConnection(sphereCenter->GetOutputPort()); // TODO: fill in the cutted sphere vtkSmartPointer clipper = vtkSmartPointer::New(); clipper->SetInputConnection(sphereCenter->GetOutputPort()); clipper->SetClipFunction(cutterPlane); //clipper->GenerateClipScalarsOn(); //clipper->GenerateClippedOutputOn(); //clipper->SetValue(0); // FeatureEdges vtkSmartPointer boundaryEdges = vtkSmartPointer::New(); boundaryEdges->SetInputConnection(clipper->GetOutputPort()); boundaryEdges->BoundaryEdgesOn(); boundaryEdges->FeatureEdgesOff(); boundaryEdges->NonManifoldEdgesOff(); // Stripper vtkSmartPointer boundaryStrips = vtkSmartPointer::New(); boundaryStrips->SetInputConnection(boundaryEdges->GetOutputPort()); std::cout << "Nb points : " << (boundaryStrips->GetOutput())->GetNumberOfPoints() << std::endl; std::cout << "Nb lines : " << (boundaryStrips->GetOutput())->GetNumberOfLines() << std::endl; // PolyData vtkSmartPointer boundaryPoly = vtkSmartPointer::New(); boundaryPoly->SetPoints((boundaryStrips->GetOutput())->GetPoints()); boundaryPoly->SetPolys((boundaryStrips->GetOutput())->GetLines()); // Triangle vtkSmartPointer boundaryTriangles = vtkSmartPointer::New(); boundaryTriangles->SetInputData(boundaryPoly); //Mapper sphere center vtkSmartPointer sphereCenterClipMapper = vtkSmartPointer::New(); sphereCenterClipMapper->SetInputConnection(boundaryTriangles->GetOutputPort()); // Actor sphere center vtkSmartPointer sphereCenterActor = vtkSmartPointer::New(); sphereCenterActor->SetMapper(sphereCenterClipMapper); sphereCenterActor->GetProperty()->SetColor(sphericalVOIData.colorSphere.redF(), sphericalVOIData.colorSphere.greenF(), sphericalVOIData.colorSphere.blueF()); sphereCenterActor->GetProperty()->SetEdgeColor(sphericalVOIData.colorSphere.redF(), sphericalVOIData.colorSphere.greenF(), sphericalVOIData.colorSphere.blueF()); sphereCenterActor->GetProperty()->EdgeVisibilityOn(); sphereCenterActor->VisibilityOff(); // TODO fin Any hints about what I might be doing wrong would be welcome, Regards, Hortense -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 4 10:41:31 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 4 May 2015 08:41:31 -0600 Subject: [vtkusers] Display filled contour of a cut sphere In-Reply-To: <01FD39A9A2882F4D8D183D7F88EC1C50BC5B75@SRVSBS.Aquilab.local> References: <01FD39A9A2882F4D8D183D7F88EC1C50BC5B75@SRVSBS.Aquilab.local> Message-ID: Hi Hortense, The vtkTriangleFilter can only triangulate existing faces, it cannot create new faces from a contour. I think that the filter you need is vtkContourTriangulator. http://www.vtk.org/doc/nightly/html/classvtkContourTriangulator.html - David On Mon, May 4, 2015 at 8:09 AM, Hortense KIRISLI < hortense.kirisli at aquilab.com> wrote: > Hi all, > > > > Here is what I would like to do: > > I have a sphere that I cut with a plane. I succeeded to display the > intersection of the sphere with the plane as a contour, but do not succeed > to display it filled. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon May 4 10:45:39 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 4 May 2015 10:45:39 -0400 Subject: [vtkusers] Display filled contour of a cut sphere In-Reply-To: References: <01FD39A9A2882F4D8D183D7F88EC1C50BC5B75@SRVSBS.Aquilab.local> Message-ID: Ah ha! I was just thinking there should be a filter in VTK that does this, having manually triangulated contours in the past by creating a vtkPolyData with a single polygon cell defined by the contour. I'll have to try this out. Cory On Mon, May 4, 2015 at 10:41 AM, David Gobbi wrote: > Hi Hortense, > > The vtkTriangleFilter can only triangulate existing faces, it cannot > create new faces from a contour. I think that the filter you need is > vtkContourTriangulator. > http://www.vtk.org/doc/nightly/html/classvtkContourTriangulator.html > > - David > > > On Mon, May 4, 2015 at 8:09 AM, Hortense KIRISLI < > hortense.kirisli at aquilab.com> wrote: > >> Hi all, >> >> >> >> Here is what I would like to do: >> >> I have a sphere that I cut with a plane. I succeeded to display the >> intersection of the sphere with the plane as a contour, but do not succeed >> to display it filled. >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 4 11:00:22 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 4 May 2015 09:00:22 -0600 Subject: [vtkusers] Display filled contour of a cut sphere In-Reply-To: References: <01FD39A9A2882F4D8D183D7F88EC1C50BC5B75@SRVSBS.Aquilab.local> Message-ID: Ideally, vtkDelaunay2D could be used to fill a contour, but it is numerically unstable and sometimes it segfaults... - David On Mon, May 4, 2015 at 8:45 AM, Cory Quammen wrote: > Ah ha! I was just thinking there should be a filter in VTK that does this, > having manually triangulated contours in the past by creating a vtkPolyData > with a single polygon cell defined by the contour. I'll have to try this > out. > > Cory > > On Mon, May 4, 2015 at 10:41 AM, David Gobbi > wrote: > >> Hi Hortense, >> >> The vtkTriangleFilter can only triangulate existing faces, it cannot >> create new faces from a contour. I think that the filter you need is >> vtkContourTriangulator. >> http://www.vtk.org/doc/nightly/html/classvtkContourTriangulator.html >> >> - David >> >> >> On Mon, May 4, 2015 at 8:09 AM, Hortense KIRISLI < >> hortense.kirisli at aquilab.com> wrote: >> >>> Hi all, >>> >>> >>> >>> Here is what I would like to do: >>> >>> I have a sphere that I cut with a plane. I succeeded to display the >>> intersection of the sphere with the plane as a contour, but do not succeed >>> to display it filled. >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon May 4 11:03:25 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 4 May 2015 11:03:25 -0400 Subject: [vtkusers] Display filled contour of a cut sphere In-Reply-To: References: <01FD39A9A2882F4D8D183D7F88EC1C50BC5B75@SRVSBS.Aquilab.local> Message-ID: Yes, I have found problems with vtkDelaunay2D in the boolean operations filter. I might have to try switching to vtkContourTriangulator. - Cory On Mon, May 4, 2015 at 11:00 AM, David Gobbi wrote: > Ideally, vtkDelaunay2D could be used to fill a contour, but it is > numerically unstable and sometimes it segfaults... > > - David > > On Mon, May 4, 2015 at 8:45 AM, Cory Quammen > wrote: > >> Ah ha! I was just thinking there should be a filter in VTK that does >> this, having manually triangulated contours in the past by creating a >> vtkPolyData with a single polygon cell defined by the contour. I'll have to >> try this out. >> >> Cory >> >> On Mon, May 4, 2015 at 10:41 AM, David Gobbi >> wrote: >> >>> Hi Hortense, >>> >>> The vtkTriangleFilter can only triangulate existing faces, it cannot >>> create new faces from a contour. I think that the filter you need is >>> vtkContourTriangulator. >>> http://www.vtk.org/doc/nightly/html/classvtkContourTriangulator.html >>> >>> - David >>> >>> >>> On Mon, May 4, 2015 at 8:09 AM, Hortense KIRISLI < >>> hortense.kirisli at aquilab.com> wrote: >>> >>>> Hi all, >>>> >>>> >>>> >>>> Here is what I would like to do: >>>> >>>> I have a sphere that I cut with a plane. I succeeded to display the >>>> intersection of the sphere with the plane as a contour, but do not succeed >>>> to display it filled. >>>> >>> > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hortense.kirisli at aquilab.com Mon May 4 11:28:30 2015 From: hortense.kirisli at aquilab.com (Hortense KIRISLI) Date: Mon, 4 May 2015 15:28:30 +0000 Subject: [vtkusers] Display filled contour of a cut sphere In-Reply-To: References: <01FD39A9A2882F4D8D183D7F88EC1C50BC5B75@SRVSBS.Aquilab.local> Message-ID: <01FD39A9A2882F4D8D183D7F88EC1C50BC5C8A@SRVSBS.Aquilab.local> Hi David, Thanks a lot for indicating me this filter ; it indeed allow me to do exactly what I have been trying to ? Hortense De : vtkusers [mailto:vtkusers-bounces at vtk.org] De la part de Cory Quammen Envoy? : lundi 4 mai 2015 17:03 ? : David Gobbi Cc : vtkusers at vtk.org Objet : Re: [vtkusers] Display filled contour of a cut sphere Yes, I have found problems with vtkDelaunay2D in the boolean operations filter. I might have to try switching to vtkContourTriangulator. - Cory On Mon, May 4, 2015 at 11:00 AM, David Gobbi > wrote: Ideally, vtkDelaunay2D could be used to fill a contour, but it is numerically unstable and sometimes it segfaults... - David On Mon, May 4, 2015 at 8:45 AM, Cory Quammen > wrote: Ah ha! I was just thinking there should be a filter in VTK that does this, having manually triangulated contours in the past by creating a vtkPolyData with a single polygon cell defined by the contour. I'll have to try this out. Cory On Mon, May 4, 2015 at 10:41 AM, David Gobbi > wrote: Hi Hortense, The vtkTriangleFilter can only triangulate existing faces, it cannot create new faces from a contour. I think that the filter you need is vtkContourTriangulator. http://www.vtk.org/doc/nightly/html/classvtkContourTriangulator.html - David On Mon, May 4, 2015 at 8:09 AM, Hortense KIRISLI > wrote: Hi all, Here is what I would like to do: I have a sphere that I cut with a plane. I succeeded to display the intersection of the sphere with the plane as a contour, but do not succeed to display it filled. -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From felfilali at dons.usfca.edu Mon May 4 14:05:10 2015 From: felfilali at dons.usfca.edu (Fatima Zahra El Filali) Date: Mon, 4 May 2015 11:05:10 -0700 Subject: [vtkusers] vtkCamera Question Message-ID: Hello, I am having some trouble with vtkCamera. Here is what I am trying to do: I am viewing a Structured Grid of dimension 500x500x100 and would like to put the camera in the middle of the grid and look out. When I set position to the middle of the grid 250x250x50 and focal point to the default (0,0,0) I cannot view anything. Any hints? or idea as to what coordinates I should be using? Thanks Fatima -------------- next part -------------- An HTML attachment was scrubbed... URL: From dae.wong at gmail.com Mon May 4 20:43:49 2015 From: dae.wong at gmail.com (Fabian Torres) Date: Mon, 4 May 2015 19:43:49 -0500 Subject: [vtkusers] VTK picking pixel Message-ID: Hi all. I been having some problems using the vtkPicker class. I want to know the pixel coordinates when the mouse passes throught the image. I'm displaying the image in a vtkImageViewer2 using QT. When I open the image, the picker seems to pick the right pixel, the problem comes when I change the size of the QT window the picker stops working properly, only in a small region of the image it seems that the picker choose the right pixel, in other regions of the image it doesn't change or only changes one pixel although the mouse moves a lot more. A simplification of the code I'm using is this vtkSmartPointer propPicker = vtkSmartPointer::New(); propPicker->PickFromListOn(); propPicker->AddPickList(imageActor); vtkSmartPointer interactor = Viewer->GetRenderWindow()->GetInteractor(); int* windowPosition = interactor->GetEventPosition(); int xWindow = windowPosition[0]; int yWindow = windowPosition[1]; int zWindow = windowPosition[2]; this->Picker->Pick(xWindow, yWindow, zWindow, Viewer->GetRenderer()); double* imPos = this->Picker->GetPickPosition(); xImagePosition = vtkMath::Round(imPos[0]); yImagePosition = vtkMath::Round(imPos[1]); -- Fabi?n Torres Robles Maestria en Ciencias en Ingenier?a Electr?nica Ingenier?a en Sistemas Electr?nicos tel. 58081280, 0445534661338 e-mail fabian.trobles at gmail.com, dae.wong at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From juleryma at hotmail.com Wed May 6 04:23:41 2015 From: juleryma at hotmail.com (julery) Date: Wed, 6 May 2015 01:23:41 -0700 (MST) Subject: [vtkusers] Line Surface vs. Surface with Edges Message-ID: <1430900621485-5731770.post@n5.nabble.com> We are using a tool called ParaView to view VTK objects. Here we have 2 object: one vtk (a closed curve) and one ply file. The default display like this: (Representation: Surface) If the change the Representation of the line object from "Surface" to "Surface with Edges", the line display like this: My question is: what's the difference between "Surface" and "Surface with Edges"? How to program in VTK? Any functions or interfaces call be called? Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Line-Surface-vs-Surface-with-Edges-tp5731770.html Sent from the VTK - Users mailing list archive at Nabble.com. From qinyang_1980 at qq.com Wed May 6 04:25:33 2015 From: qinyang_1980 at qq.com (qinyang_1980) Date: Wed, 6 May 2015 01:25:33 -0700 (MST) Subject: [vtkusers] Line Surface vs. Surface with Edges In-Reply-To: <1430900621485-5731770.post@n5.nabble.com> References: <1430900621485-5731770.post@n5.nabble.com> Message-ID: <1430900733077-5731771.post@n5.nabble.com> I also meet the same issue, anyone can help ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Line-Surface-vs-Surface-with-Edges-tp5731770p5731771.html Sent from the VTK - Users mailing list archive at Nabble.com. From luoxiayizhi at 163.com Wed May 6 05:39:40 2015 From: luoxiayizhi at 163.com (luoxiayizhi) Date: Wed, 6 May 2015 17:39:40 +0800 Subject: [vtkusers] how to open .iv file? Message-ID: <7c8de03f.5671.14d289847d4.Coremail.luoxiayizhi@163.com> Hello, Is anyone know how to turn .iv file to .vtk .vti or other form. This file I have is a cerebrovessl volumn picture. 2015-05-06 luoxiayizhi -------------- next part -------------- An HTML attachment was scrubbed... URL: From snakexf at gmail.com Wed May 6 07:36:28 2015 From: snakexf at gmail.com (Feng Xing) Date: Wed, 6 May 2015 13:36:28 +0200 Subject: [vtkusers] Polyhedron pvtu Message-ID: <821C8067-04F3-4360-98BA-0050B836FE26@gmail.com> Dear everyone, I would like to write a .pvtu file for Polyhedron mesh. I tried to use vtkXMLPUnstructuredGridWriter, it seems that it does not work. Paraview display nothing by reading the file .pvtu. However, the visu is successful by reading the .vtu files. I found in google someone said there is a bug some years ago : http://public.kitware.com/pipermail/vtk-developers/2013-January/028078.html . Another way I would like to try is that I write the file .pvtu by myself, but I didn?t find the doc for Polyhedron. Thank you very much for help. Feng Xing Postdoc INRIA France -------------- next part -------------- An HTML attachment was scrubbed... URL: From hgross at ar2tech.com Wed May 6 09:31:17 2015 From: hgross at ar2tech.com (=?UTF-8?B?SGVydsOpIEdyb3Nz?=) Date: Wed, 6 May 2015 06:31:17 -0700 Subject: [vtkusers] Polyhedron pvtu In-Reply-To: <821C8067-04F3-4360-98BA-0050B836FE26@gmail.com> References: <821C8067-04F3-4360-98BA-0050B836FE26@gmail.com> Message-ID: Hi Feng, This link is useful: http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support It explains the concept of facestream, necessary to write/read a polyhedron. Also, here is a simple example with a tetrahedron written as a polyhedron: .169 0 0 0 1 0 0 .5 1 0 .5 .5 1 0 1 2 3 4 42 4 3 0 1 2 3 0 1 3 3 1 2 3 3 0 2 3 17 Hope this helps, Herve Herve Gross, PhD ADVANCED RESOURCES AND RISK TECHNOLOGIES www.ar2tech.com On Wed, May 6, 2015 at 4:36 AM, Feng Xing wrote: > Dear everyone, > > I would like to write a .pvtu file for Polyhedron mesh. I tried to > use vtkXMLPUnstructuredGridWriter, it seems that it does not work. Paraview > display nothing by reading the file .pvtu. However, the visu is successful > by reading the .vtu files. I found in google someone said there is a bug > some years ago : > http://public.kitware.com/pipermail/vtk-developers/2013-January/028078.html > . > > Another way I would like to try is that I write the file .pvtu by myself, > but I didn?t find the doc for Polyhedron. Thank you very much for help. > > Feng Xing > Postdoc INRIA France > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From snakexf at gmail.com Wed May 6 09:46:43 2015 From: snakexf at gmail.com (Feng Xing) Date: Wed, 6 May 2015 15:46:43 +0200 Subject: [vtkusers] Polyhedron pvtu In-Reply-To: References: <821C8067-04F3-4360-98BA-0050B836FE26@gmail.com> Message-ID: Hello Herv?, Thank you much for your replying! But my problem is about writing the file .pvtu. I have two files: p1.vtu and p2.vtu which contain the polyhedrons. They are written by two MPI procs separately. Paraview could display them well. I used the writer vtkXMLPUnstructuredGridWriter to generate the file p.pvtu, but Paraview display nothing by reading p.pvtu. The file p.pvtu is like this. It works for pixel, polygon etc.. But not for Polyhedron. Regards, Feng > On 06 May 2015, at 15:31, Herv? Gross wrote: > > Hi Feng, > > This link is useful: > http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support > > It explains the concept of facestream, necessary to write/read a polyhedron. Also, here is a simple example with a tetrahedron written as a polyhedron: > > > > > > > > > > .169 > > > > > 0 0 0 > 1 0 0 > .5 1 0 > .5 .5 1 > > > > > 0 1 2 3 > > > 4 > > > 42 > > > 4 3 0 1 2 > 3 0 1 3 > 3 1 2 3 > 3 0 2 3 > > > 17 > > > > > > > Hope this helps, > > Herve > > > > > Herve Gross, PhD > > ADVANCED RESOURCES AND RISK TECHNOLOGIES > www.ar2tech.com > > On Wed, May 6, 2015 at 4:36 AM, Feng Xing > wrote: > Dear everyone, > > I would like to write a .pvtu file for Polyhedron mesh. I tried to use vtkXMLPUnstructuredGridWriter, it seems that it does not work. Paraview display nothing by reading the file .pvtu. However, the visu is successful by reading the .vtu files. I found in google someone said there is a bug some years ago : http://public.kitware.com/pipermail/vtk-developers/2013-January/028078.html . > > Another way I would like to try is that I write the file .pvtu by myself, but I didn?t find the doc for Polyhedron. Thank you very much for help. > > Feng Xing > Postdoc INRIA France > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Wed May 6 10:25:11 2015 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Wed, 6 May 2015 14:25:11 +0000 Subject: [vtkusers] Line Surface vs. Surface with Edges In-Reply-To: <201505060824.t468OA1B022268-t468OA1D022268@mta-1.nv.doe.gov> References: <201505060824.t468OA1B022268-t468OA1D022268@mta-1.nv.doe.gov> Message-ID: My guess is that ?Surface with Edges? is similar to using: your_actor->GetProperty()->EdgeVisibilityOn(); On 5/6/15, 1:23 AM, "julery" wrote: >We are using a tool called ParaView to view VTK objects. >Here we have 2 object: one vtk (a closed curve) and one ply file. >The default display like this: (Representation: Surface) > >If the change the Representation of the line object from "Surface" to >"Surface with Edges", >the line display like this: > > >My question is: what's the difference between "Surface" and "Surface with >Edges"? >How to program in VTK? Any functions or interfaces call be called? > >Thanks! > > > > > >-- >View this message in context: >http://vtk.1045678.n5.nabble.com/Line-Surface-vs-Surface-with-Edges-tp5731 >770.html >Sent from the VTK - Users mailing list archive at Nabble.com. >_______________________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Please keep messages on-topic and check the VTK FAQ at: >http://www.vtk.org/Wiki/VTK_FAQ > >Search the list archives at: http://markmail.org/search/?q=vtkusers > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers From felfilali at dons.usfca.edu Wed May 6 12:12:19 2015 From: felfilali at dons.usfca.edu (Fatima Zahra El Filali) Date: Wed, 6 May 2015 09:12:19 -0700 Subject: [vtkusers] vtkCamera Question In-Reply-To: <1101201229.108428.1430805423365.JavaMail.yahoo@mail.yahoo.com> References: <1101201229.108428.1430805423365.JavaMail.yahoo@mail.yahoo.com> Message-ID: Thanks for your help. I added your suggestion and still no luck. What i am trying to do is to put the camera within the actor for my Structured grid of 500x500x100. Any other ideas? thanks Fatima On Mon, May 4, 2015 at 10:57 PM, Wahyudin Permana Syam wrote: > Hi Fatima, > > maybe your data is out of clipping range > > you can try to add: > > ren->ResetCameraClippingRange(); > > to make sure all the data inside the clipping range > > > ============================================================ > Best regards, > Wahyudin Permana Syam > ============================================================ > > ------------------------------ > *From:* Fatima Zahra El Filali > *To:* VTK Users > *Sent:* Monday, May 4, 2015 8:05 PM > *Subject:* [vtkusers] vtkCamera Question > > Hello, > > I am having some trouble with vtkCamera. > > Here is what I am trying to do: > > I am viewing a Structured Grid of dimension 500x500x100 and would like to > put the camera in the middle of the grid and look out. > > When I set position to the middle of the grid 250x250x50 and focal point > to the default (0,0,0) I cannot view anything. > > Any hints? or idea as to what coordinates I should be using? > > Thanks > Fatima > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 pavelkalinnikov at gmail.com Wed May 6 16:31:51 2015 From: pavelkalinnikov at gmail.com (Pavel Kalinnikov) Date: Wed, 6 May 2015 23:31:51 +0300 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux Message-ID: Hi everyone! I have the following environment: * OS - x64 Ubuntu 12.04.5 LTS * Qt 5.4 * VTK 6.2.0 I'm trying to use QVTKWidget and it seems like it doesn't work properly. When I try to render some 3d object in this widget, I see that faces get rendered in a wrong order (maybe there are some problems with z-buffer or something). The same code built on Windows works perfectly. Also I tried to build and run the standard example Examples/GUI/Qt/Events distributed along with VTK-6.2.0, and it has the same problem in my Linux environment. And again, it works on Windows. Am I doing something wrong or is it a bug? Is there anyone who can fix this? Is there any known workaround for this case? Thank you, Pavel Kalinnikov -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed May 6 16:45:39 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 6 May 2015 16:45:39 -0400 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: References: Message-ID: If you can share the right/wrong images, that would help diagnose the cause. Is there opacity in the scene? If so depth peeling is needed to render the faces in the right order. To do depth peeling we need to ask the GPU what it can do and that can get messed up with different paths to the graphics context layers (under Qt vs natively for example.) David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, May 6, 2015 at 4:31 PM, Pavel Kalinnikov wrote: > Hi everyone! > > I have the following environment: > * OS - x64 Ubuntu 12.04.5 LTS > * Qt 5.4 > * VTK 6.2.0 > > I'm trying to use QVTKWidget and it seems like it doesn't work properly. > When I try to render some 3d object in this widget, I see that faces get > rendered in a wrong order (maybe there are some problems with z-buffer or > something). > The same code built on Windows works perfectly. > > Also I tried to build and run the standard example Examples/GUI/Qt/Events > distributed along with VTK-6.2.0, and it has the same problem in my Linux > environment. And again, it works on Windows. > > Am I doing something wrong or is it a bug? > Is there anyone who can fix this? > Is there any known workaround for this case? > > Thank you, > Pavel Kalinnikov > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 pavelkalinnikov at gmail.com Wed May 6 16:57:08 2015 From: pavelkalinnikov at gmail.com (Pavel Kalinnikov) Date: Wed, 6 May 2015 23:57:08 +0300 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: References: Message-ID: Here is the screenshot of working example from Examples/GUI/Qt/Events. One more thing I forgot to say - VTK works good on my Linux (when not using QVTKWidget). 2015-05-06 23:45 GMT+03:00 David E DeMarle : > If you can share the right/wrong images, that would help diagnose the > cause. > > Is there opacity in the scene? If so depth peeling is needed to render the > faces in the right order. To do depth peeling we need to ask the GPU what > it can do and that can get messed up with different paths to the graphics > context layers (under Qt vs natively for example.) > > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, May 6, 2015 at 4:31 PM, Pavel Kalinnikov < > pavelkalinnikov at gmail.com> wrote: > >> Hi everyone! >> >> I have the following environment: >> * OS - x64 Ubuntu 12.04.5 LTS >> * Qt 5.4 >> * VTK 6.2.0 >> >> I'm trying to use QVTKWidget and it seems like it doesn't work properly. >> When I try to render some 3d object in this widget, I see that faces get >> rendered in a wrong order (maybe there are some problems with z-buffer or >> something). >> The same code built on Windows works perfectly. >> >> Also I tried to build and run the standard example Examples/GUI/Qt/Events >> distributed along with VTK-6.2.0, and it has the same problem in my Linux >> environment. And again, it works on Windows. >> >> Am I doing something wrong or is it a bug? >> Is there anyone who can fix this? >> Is there any known workaround for this case? >> >> Thank you, >> Pavel Kalinnikov >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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: screenshot.png Type: image/png Size: 64456 bytes Desc: not available URL: From ben.boeckel at kitware.com Wed May 6 17:42:59 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 6 May 2015 17:42:59 -0400 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: References: Message-ID: <20150506214259.GA7590@megas.kitware.com> On Wed, May 06, 2015 at 16:45:39 -0400, David E DeMarle wrote: > If you can share the right/wrong images, that would help diagnose the cause. > > Is there opacity in the scene? If so depth peeling is needed to render the > faces in the right order. To do depth peeling we need to ask the GPU what > it can do and that can get messed up with different paths to the graphics > context layers (under Qt vs natively for example.) Do we not have tests for QVTKWidget? We do have Qt5 builders... Or are the tests not comprehensive enough? --Ben From tr_jun-jiang.ee at vitrox.com Wed May 6 23:27:35 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Wed, 6 May 2015 20:27:35 -0700 (MST) Subject: [vtkusers] vtk ObjLoader with Java Wrapping error Message-ID: <1430969255955-5731799.post@n5.nabble.com> HI. I use java-wrapper to create a obj reader refered to this example . The program works fine until i load .obj that has larger filesize approximately 150mb. # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fee92f8677, pid=1928, tid=5440 # # JRE version: Java(TM) SE Runtime Environment (7.0_75-b13) (build 1.7.0_75-b13) # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.75-b04 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [vtkCommonCore-6.2.dll+0xd8677] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # I have no glue of what is happening and hope for hint. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-ObjLoader-with-Java-Wrapping-error-tp5731799.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Thu May 7 00:00:47 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 6 May 2015 22:00:47 -0600 Subject: [vtkusers] vtk ObjLoader with Java Wrapping error In-Reply-To: <1430969255955-5731799.post@n5.nabble.com> References: <1430969255955-5731799.post@n5.nabble.com> Message-ID: Is your obj file valid? Did you try to load it from ParaView? Just a thought... Seb On Wed, May 6, 2015 at 9:27 PM, James Potota wrote: > HI. > > I use java-wrapper to create a obj reader refered to this example > . > > The program works fine until i load .obj that has larger filesize > approximately 150mb. > > # > # A fatal error has been detected by the Java Runtime Environment: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fee92f8677, > pid=1928, tid=5440 > # > # JRE version: Java(TM) SE Runtime Environment (7.0_75-b13) (build > 1.7.0_75-b13) > # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.75-b04 mixed mode > windows-amd64 compressed oops) > # Problematic frame: > # C [vtkCommonCore-6.2.dll+0xd8677] > # > # Failed to write core dump. Minidumps are not enabled by default on client > versions of Windows > # > # If you would like to submit a bug report, please visit: > # http://bugreport.sun.com/bugreport/crash.jsp > # The crash happened outside the Java Virtual Machine in native code. > # See problematic frame for where to report the bug. > # > > I have no glue of what is happening and hope for hint. > Thanks. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtk-ObjLoader-with-Java-Wrapping-error-tp5731799.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakota_63124 at yahoo.com Thu May 7 00:01:17 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Wed, 6 May 2015 21:01:17 -0700 (MST) Subject: [vtkusers] Using vtkXMLPolyDataWriter from Java Message-ID: <1430971277037-5731801.post@n5.nabble.com> I am trying to export to XML using the vtkXMLPolyDataWriter from Java using the following code: public void exportGraphicFile(String filename) { //Write the file vtkXMLPolyDataWriter writer = new vtkXMLPolyDataWriter(); writer.SetFileName(filename); writer.SetInputConnection(elementFaceActor.GetMapper().GetOutputPort()); // writer.SetInputData(elementFaceActor.GetMapper().GetInputAsDataSet()); //Optional - set the mode. The default is binary. //writer.SetDataModeToBinary(); writer.SetDataModeToAscii(); writer.Update(); writer.Write(); } I get a file that has some XML tags (see attached file), but it does not appear to be complete, and I do not get anything back when I attempt to import it using vtkXMLPolyDataReader as shown below: public void importGraphicFile(String filename) { //read all the data from the file vtkXMLPolyDataReader reader = new vtkXMLPolyDataReader(); reader.SetFileName(filename); reader.Update(); //Create a mapper and actor vtkPolyDataMapper mapper = new vtkPolyDataMapper(); mapper.SetInputConnection(reader.GetOutputPort()); elementFaceActor.SetMapper(mapper); SimfinitTestHex2.vtk updateView(); } Does anyone know what I am doing wrong? Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-vtkXMLPolyDataWriter-from-Java-tp5731801.html Sent from the VTK - Users mailing list archive at Nabble.com. From tr_jun-jiang.ee at vitrox.com Thu May 7 01:05:46 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Wed, 6 May 2015 22:05:46 -0700 (MST) Subject: [vtkusers] vtk ObjLoader with Java Wrapping error In-Reply-To: References: <1430969255955-5731799.post@n5.nabble.com> Message-ID: <1430975146541-5731802.post@n5.nabble.com> Thanks for replying Sebastian. Paraview 'has stopped working' loading that .obj file. However , I did successfully loaded it with Blender. So Im pretty sure the obj is valid. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-ObjLoader-with-Java-Wrapping-error-tp5731799p5731802.html Sent from the VTK - Users mailing list archive at Nabble.com. From qinyang_1980 at qq.com Thu May 7 01:38:01 2015 From: qinyang_1980 at qq.com (qinyang_1980) Date: Wed, 6 May 2015 22:38:01 -0700 (MST) Subject: [vtkusers] The cross/coplane issue when draw polyline with mesh surface. In-Reply-To: References: <1427252372098-5731146.post@n5.nabble.com> Message-ID: <1430977081833-5731803.post@n5.nabble.com> Hi Cory, Very thanks. It really works. :) Andy -- View this message in context: http://vtk.1045678.n5.nabble.com/The-cross-coplane-issue-when-draw-polyline-with-mesh-surface-tp5731146p5731803.html Sent from the VTK - Users mailing list archive at Nabble.com. From qinyang_1980 at qq.com Thu May 7 01:39:30 2015 From: qinyang_1980 at qq.com (qinyang_1980) Date: Wed, 6 May 2015 22:39:30 -0700 (MST) Subject: [vtkusers] Line Surface vs. Surface with Edges In-Reply-To: <1430900621485-5731770.post@n5.nabble.com> References: <1430900621485-5731770.post@n5.nabble.com> Message-ID: <1430977170202-5731804.post@n5.nabble.com> Hello, Please see this : http://vtk.1045678.n5.nabble.com/The-cross-coplane-issue-when-draw-polyline-with-mesh-surface-td5731146.html#a5731803 -- View this message in context: http://vtk.1045678.n5.nabble.com/Line-Surface-vs-Surface-with-Edges-tp5731770p5731804.html Sent from the VTK - Users mailing list archive at Nabble.com. From p.g.richardson at phantomjinx.co.uk Thu May 7 04:43:58 2015 From: p.g.richardson at phantomjinx.co.uk (phantomjinx) Date: Thu, 07 May 2015 09:43:58 +0100 Subject: [vtkusers] Fwd: QVTKWidget and vtkGraphLayoutView In-Reply-To: <55452AD9.5050107@phantomjinx.co.uk> References: <55452AD9.5050107@phantomjinx.co.uk> Message-ID: <554B25CE.5090105@phantomjinx.co.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I sent below a few days ago. Does anyone have any insight into this since I am unable to proceed any further. Any help much appreciated. Thanks Paul - -------- Forwarded Message -------- Subject: [vtkusers] QVTKWidget and vtkGraphLayoutView Date: Sat, 02 May 2015 20:51:53 +0100 From: phantomjinx To: vtkusers at vtk.org Hi, Am slowly learning VTK so forgive the crudeness of code but I am trying to integrate a mutable graph into my QT application. Following tutorials etc..., I have setup a QVTKWidget and am now inserting into it a vtkGraphLayoutView, except I just cannot get it to work. The following causes the application to display rubbish (window displays code from IDE underneath see [4]) where the QVTKWidget is supposed to be: VTK_CREATE(vtkMutableUndirectedGraph, graph); // Create 3 vertices vtkIdType v1 = graph->AddVertex(); vtkIdType v2 = graph->AddVertex(); vtkIdType v3 = graph->AddVertex(); // Create a fully connected graph graph->AddEdge(v1, v2); graph->AddEdge(v2, v3); graph->AddEdge(v1, v3); VTK_CREATE(vtkGraphLayoutView, graphLayoutView); graphLayoutView->SetInteractor(parent->GetInteractor()); // [1] parent->SetRenderWindow(graphLayoutView->GetRenderWindow()); // [2] graphLayoutView->AddRepresentationFromInput(graph); VTK_CREATE(vtkCircularLayoutStrategy, circularLayoutStrategy); graphLayoutView->SetLayoutStrategy(circularLayoutStrategy); graphLayoutView->SetVertexLabelVisibility(true); graphLayoutView->SetEdgeLabelVisibility(true); graphLayoutView->GetRenderer()->SetBackground(1.0, 0.0, 1.0); // [3] // VTK_CREATE(vtkCallbackCommand, selectionCallback); // selectionCallback->SetCallback(SelectionCallbackFunction); // graphLayoutView->GetRepresentation()->GetAnnotationLink()->AddObserver("AnnotationChangedEvent", selectionCallback); graphLayoutView->ResetCamera(); graphLayoutView->Render(); graphLayoutView->GetInteractor()->Initialize(); graphLayoutView->GetInteractor()->Start(); I originally did succeeed in displaying the drawn triangle by replacing lines [1] and [2] with: parent->GetRenderWindow()->AddRenderer(graphLayoutView->GetRenderer()); However, no mouse clicks work since the QVTKWidget parent has a different interactor to the graphLayoutView. Can someone with far my knowledge than I give me a bump in the right direction. OS - Fedora 20 VTK - 6.1 QT - 5.4.1 Many thanks. PGR [4] http://phantomjinx.co.uk/stuff/qtapp.png _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVLJc4ACgkQcthLMIwdEb1JsACglK1jsDft0ezITlnvXEWojmC8 0TEAn0nuFQ2+VpgNvLGD4HOdAGql3XOr =zZVY -----END PGP SIGNATURE----- From kekko84 at gmail.com Thu May 7 05:27:48 2015 From: kekko84 at gmail.com (francesco.argese) Date: Thu, 7 May 2015 02:27:48 -0700 (MST) Subject: [vtkusers] reading a vtk file with time steps Message-ID: <1430990868116-5731806.post@n5.nabble.com> Hello, I'm trying to read a vtk file with time steps obtained through a CAE simulation done with OpenFoam and resulting in a vtk output (through command foamToVtk). If I read it using ParaView I'm able to see time steps and to run simulation. I'm trying to convert it to another format so I need to retrieve polygons of each time step. At the moment I'm using a vtkGenericDataObjectReader but it seems not having support for time steps. Are there other readers that can allow to read these information? I've already used LsDynaReader succeding in this operation and I'm thinking using directly OpenFOAMReader but I have not understod which is the input parameter to load it. Any suggestions? Below the code I'm using to do these tests. Thank you in advance, Francesco // Get all data from the file mVtkReader = vtkSmartPointer::New(); mVtkReader->SetFileName(fileAbsPath.c_str()); mVtkReader->Update(); if( mVtkReader->GetErrorCode() != vtkErrorCode::NoError ) { std::cout << "Output is a unstructured grid" << std::endl; return false; } if (mVtkReader->IsFileUnstructuredGrid()) { std::cout << "File is an unstructured grid" << std::endl; vtkUnstructuredGrid *uGrid = mVtkReader->GetUnstructuredGridOutput(); // Create a mapper and actor vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(mVtkReader->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); } -- View this message in context: http://vtk.1045678.n5.nabble.com/reading-a-vtk-file-with-time-steps-tp5731806.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Thu May 7 10:13:34 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 7 May 2015 08:13:34 -0600 Subject: [vtkusers] Using vtkXMLPolyDataWriter from Java In-Reply-To: <1430971277037-5731801.post@n5.nabble.com> References: <1430971277037-5731801.post@n5.nabble.com> Message-ID: The only 2 things that I find strange are: writer.SetInputConnection(elementFaceActor.GetMapper().GetOutputPort()); // (option 1) writer.SetInputData(elementFaceActor.GetMapper().GetInputAsDataSet()); // (option 2) Which option are you using? What type of dataset are you using initially? Did you try vtkDataSetWriter/Reader, to see if you had similar behavior? Seb On Wed, May 6, 2015 at 10:01 PM, kent myers via vtkusers wrote: > I am trying to export to XML using the vtkXMLPolyDataWriter from Java using > the following code: > > public void exportGraphicFile(String filename) { > //Write the file > vtkXMLPolyDataWriter writer = new vtkXMLPolyDataWriter(); > writer.SetFileName(filename); > > writer.SetInputConnection(elementFaceActor.GetMapper().GetOutputPort()); > // > writer.SetInputData(elementFaceActor.GetMapper().GetInputAsDataSet()); > > //Optional - set the mode. The default is binary. > //writer.SetDataModeToBinary(); > writer.SetDataModeToAscii(); > writer.Update(); > writer.Write(); > } > > I get a file that has some XML tags (see attached file), but it does not > appear to be complete, and I do not get anything back when I attempt to > import it using vtkXMLPolyDataReader as shown below: > > public void importGraphicFile(String filename) { > //read all the data from the file > vtkXMLPolyDataReader reader = new vtkXMLPolyDataReader(); > reader.SetFileName(filename); > reader.Update(); > > //Create a mapper and actor > vtkPolyDataMapper mapper = new vtkPolyDataMapper(); > mapper.SetInputConnection(reader.GetOutputPort()); > > elementFaceActor.SetMapper(mapper); > SimfinitTestHex2.vtk > > updateView(); > > } > > Does anyone know what I am doing wrong? > > Thanks! > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Using-vtkXMLPolyDataWriter-from-Java-tp5731801.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Thu May 7 10:16:43 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 7 May 2015 08:16:43 -0600 Subject: [vtkusers] vtk ObjLoader with Java Wrapping error In-Reply-To: <1430975146541-5731802.post@n5.nabble.com> References: <1430969255955-5731799.post@n5.nabble.com> <1430975146541-5731802.post@n5.nabble.com> Message-ID: It might be valid for Blender but the VTK reader might be more limited than the blender one. Hence the issue you are facing. If ParaView can not read your file, that means that you won't be able to do it from Java either. You may report a bug with the corresponding file, so someone could track the issue specific to your file. Seb On Wed, May 6, 2015 at 11:05 PM, James Potota wrote: > Thanks for replying Sebastian. > > Paraview 'has stopped working' loading that .obj file. However , I did > successfully loaded it with Blender. > So Im pretty sure the obj is valid. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtk-ObjLoader-with-Java-Wrapping-error-tp5731799p5731802.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu May 7 10:18:29 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 May 2015 10:18:29 -0400 Subject: [vtkusers] vtk ObjLoader with Java Wrapping error In-Reply-To: References: <1430969255955-5731799.post@n5.nabble.com> <1430975146541-5731802.post@n5.nabble.com> Message-ID: Can you post a link to the obj file? On Thu, May 7, 2015 at 10:16 AM, Sebastien Jourdain wrote: > It might be valid for Blender but the VTK reader might be more limited than > the blender one. Hence the issue you are facing. > If ParaView can not read your file, that means that you won't be able to do > it from Java either. > > You may report a bug with the corresponding file, so someone could track the > issue specific to your file. > > Seb > > On Wed, May 6, 2015 at 11:05 PM, James Potota > wrote: >> >> Thanks for replying Sebastian. >> >> Paraview 'has stopped working' loading that .obj file. However , I did >> successfully loaded it with Blender. >> So Im pretty sure the obj is valid. >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/vtk-ObjLoader-with-Java-Wrapping-error-tp5731799p5731802.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From mat930121 at hotmail.com Thu May 7 10:55:21 2015 From: mat930121 at hotmail.com (Ragnarok) Date: Thu, 7 May 2015 07:55:21 -0700 (MST) Subject: [vtkusers] Rendering a large number of actors Message-ID: <1431010521010-5731814.post@n5.nabble.com> What's the best way to render a large number of actors (from 100 to ??more than 10000), knowing that I may want to modify their value (position, scaling, color, etc) individually in the future? I tried to add all the actors to the render window, but it's slowing the rendering speed by a lot (less than 1 fps). -- View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-a-large-number-of-actors-tp5731814.html Sent from the VTK - Users mailing list archive at Nabble.com. From coyarzunlaura at googlemail.com Thu May 7 10:58:58 2015 From: coyarzunlaura at googlemail.com (Cristina Oyarzun) Date: Thu, 7 May 2015 16:58:58 +0200 Subject: [vtkusers] CFP: MICCAI CLIP 2015 Workshop on Clinical Image-based Procedures: Translational Research in Medical Imaging Message-ID: CALL FOR PAPERS MICCAI 2015 Workshop on Clinical Image-based Procedures: Translational Research in Medical Imaging October 5, 2015 Munich, Germany Website:http://miccai-clip.org/ ============================== ========================================== SCOPE The outstanding proliferation of medical image applications has created a need for greater study and scrutiny of the clinical application and validation of such methods. New strategies are essential to ensure a smooth and effective translation of computational image-based techniques into the clinic. For these reasons CLIP 2015?s major focus is on *translational research *filling the gaps between basic science and clinical applications. A highlight of the workshop is the subject of *strategies for personalized medicine *to enhance diagnosis, treatment and interventions. Authors are encouraged to submit work centered on specific clinical applications, including techniques and procedures based on comprehensive clinical image data. Submissions related to applications already in use and evaluated by clinical users are particularly encouraged. The event will bring together world-class specialists to present ways to strengthen links between computer scientists and engineers, and clinicians. TOPICS *Strategies for patient-specific and anatomical modeling to support planning and interventions *Clinical studies employing advanced image-guided methods *Clinical translation and validation of image-guided systems *Current challenges and emerging techniques in image-based procedures *Identification of parameters and error analysis in image-based procedures *Multimodal image integration for modeling, planning and guidance *Clinical applications in open and minimally invasive procedures PAPER SUBMISSION Papers will be limited to eight pages following the MICCAI submission guidelines. Prospective authors should refer to the Paper Submission section on the workshop website for details on how to submit papers to be presented at the workshop. All submissions will be peer-reviewed by at least 2 members of the program committee. The selection of the papers will be based on the significance of results, novelty, technical merit, relevance and clarity of presentation. Papers will be presented in a day long single track workshop starting with plenary sessions. Accepted papers will be published as a post-proceedings volume in the Springer Lecture Notes in Computer Science (LNCS) series after the workshop. WORKSHOP FORMAT Accepted papers will be presented in a day long single track workshop. The final program will consist of invited speakers and original papers with time allocated for discussions. Electronic proceedings will be arranged for all of the papers presented at the workshop. IMPORTANT DATES * June 19, 2015: Paper submission due date * July 17, 2015: Notification of acceptance CONTACT Inquires about the workshop should be sent to the Information Desk (info@ miccai-clip.org). ORGANIZERS (in alphabetical order) Klaus Drechsler (Fraunhofer IGD, Germany) Marius Erdt (Fraunhofer IDM at NTU, Singapore) Miguel Gonz?lez Ballester (ICREA - Universitat Pompeu Fabra, Spain) Marius George Linguraru (Children's National Medical Center, USA) Cristina Oyarzun Laura (Fraunhofer IGD, Germany) Yoshinobu Sato (Nara Institute of Science and Technology, Japan) Raj Shekhar (Children's National Medical Center, USA) Stefan Wesarg (Fraunhofer IGD, Germany) ======================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From PhuongToan.Tran at kuleuven.be Thu May 7 12:36:17 2015 From: PhuongToan.Tran at kuleuven.be (Phuong Toan Tran) Date: Thu, 7 May 2015 16:36:17 +0000 Subject: [vtkusers] vtkAxesActor and user matrix/transform In-Reply-To: <13FE870369633A47AE2D2EBBDEFB803A05B3A53F@ICTS-S-MBX13.luna.kuleuven.be> References: <13FE870369633A47AE2D2EBBDEFB803A05B3A53F@ICTS-S-MBX13.luna.kuleuven.be> Message-ID: <13FE870369633A47AE2D2EBBDEFB803A05B3A658@ICTS-S-MBX13.luna.kuleuven.be> Hello, I'm trying to set the position and orientation of a vtkAxesActor by call SetUserMatrix(), but sometimes (not always) get segmentation faults during execution. The code to create and update the vtkAxesActor is as follows : void Viewer::addAxes( vtkSmartPointer& _axesActor, const std::string& _xLabel, const std::string& _yLabel, const std::string& _zLabel, bool _instantiate) { if(_instantiate) _axesActor = vtkSmartPointer::New(); // Axes labels _axesActor->SetXAxisLabelText(_xLabel.c_str()); _axesActor->SetYAxisLabelText(_yLabel.c_str()); _axesActor->SetZAxisLabelText(_zLabel.c_str()); renderer_->AddActor(_axesActor); } void Viewer::updateAxes( vtkSmartPointer& _axesActor, const Eigen::Matrix4d& _matrix) { vtkSmartPointer matrix = vtkSmartPointer::New(); for(int row = 0; row < 4; ++row) for(int col = 0; col < 4; ++col) matrix->SetElement(row, col, _matrix(row,col)); _axesActor->SetUserMatrix(matrix); _axesActor->Modified(); } The segmentation faults don't always occur and if they occur, they don't always occur at the same location in the vtk code ... The error messages also differ... Here are some examples of where the segmentation faults occur and the associated printed error: https://www.dropbox.com/s/h2i4fi8duo20ucl/vtkAxesActor1.png?dl=0 ERROR: In /home/toan/Libraries/vtk/VTK6.0.0/Common/Core/vtkObject.cxx, line 160 vtkObject (0x7fffb0223940): Trying to delete object with non-zero reference count. https://www.dropbox.com/s/uh3bgg0h801fyl2/vtkAxesActor2.png?dl=0 *** glibc detected *** free(): corrupted unsorted chunks: 0x00007fffb00bb120 *** https://www.dropbox.com/s/fp835mo85z9wicp/vtkAxesActor3.png?dl=0 Generic Warning: In /home/toan/Libraries/vtk/VTK6.0.0/Common/Core/vtkObjectBase.cxx, line 93 Trying to delete object with non-zero reference count. ERROR: In /home/toan/Libraries/vtk/VTK6.0.0/Common/Core/vtkObject.cxx, line 160 vtkObject (0x7fffb0010fe0): Trying to delete object with non-zero reference count. Generic Warning: In /home/toan/Libraries/vtk/VTK6.0.0/Common/Core/vtkObjectBase.cxx, line 93 Trying to delete object with non-zero reference count. https://www.dropbox.com/s/r02j73o7c9n8x5v/vtkAxesActor4.png?dl=0 (no printed message) I am not quite sure why this happens. Would it have something to do with the way I create/update the vtkAxesActor or the vtkMatrix4x4 ? Using another vtk object (e.g. vtkSphereSource and vtkActor) instead of vtkAxesActor to display the origin of the axes doesn't seem to generate any segmentation fault. The VTK rendering is embedded within a QVTKWidget and I use VTK6.0. Any help is appreciated. Toan -------------- next part -------------- An HTML attachment was scrubbed... URL: From mat930121 at hotmail.com Thu May 7 13:06:58 2015 From: mat930121 at hotmail.com (Ragnarok) Date: Thu, 7 May 2015 10:06:58 -0700 (MST) Subject: [vtkusers] Rendering a large number of actors In-Reply-To: <1431010521010-5731814.post@n5.nabble.com> References: <1431010521010-5731814.post@n5.nabble.com> Message-ID: <1431018418743-5731817.post@n5.nabble.com> Simple example of the problem. // Code to create the actors vtkSmartPointer actorArray[10]; vtkSmartPointer coneSource = vtkSmartPointer::New(); coneSource ->Update(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(arrowSource->GetOutputPort()); vtkSmartPointer propAssembly = vtkSmartPointer::New(); for (int i = 0; i < 1000; i++) { vtkSmartPointerconeActor = vtkSmartPointer::New(); coneActor ->SetMapper(mapper); actorArray[i] = coneActor ; propAssembly->AddPart(coneActor); } // rendering stuff ... //if I do this, I get 5 fps renderer->AddViewProp(propAssembly); //if I do this, I get 30 fps for (int i = 0; i < 1000; i++) { renderer->AddActor(actorArray[i]) } // If I do this, I get 5 fps for (int i = 0; i < 1000; i++) { renderer->AddViewProp(actorArray[i]) } How is it that the Addviewprop(propAssembly) is way slower than indivually adding all the actors in my renderer? I thought the purpose of the VtkpropAssembly was to group all elements to make the rendring speed way faster. Is there any other better way to gain speed? -- View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-a-large-number-of-actors-tp5731814p5731817.html Sent from the VTK - Users mailing list archive at Nabble.com. From tr_jun-jiang.ee at vitrox.com Thu May 7 21:51:53 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Thu, 7 May 2015 18:51:53 -0700 (MST) Subject: [vtkusers] vtk ObjLoader with Java Wrapping error In-Reply-To: References: <1430969255955-5731799.post@n5.nabble.com> <1430975146541-5731802.post@n5.nabble.com> Message-ID: <1431049913709-5731818.post@n5.nabble.com> Yeah sure. Here is the link : https://dl.dropboxusercontent.com/u/7356347/gull20mb.obj I would like to make a correction that it has nothing to do with filesize. So I uploaded a 20mb obj. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-ObjLoader-with-Java-Wrapping-error-tp5731799p5731818.html Sent from the VTK - Users mailing list archive at Nabble.com. From dakota_63124 at yahoo.com Thu May 7 22:18:39 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Thu, 7 May 2015 19:18:39 -0700 (MST) Subject: [vtkusers] Using vtkXMLPolyDataWriter from Java In-Reply-To: References: <1430971277037-5731801.post@n5.nabble.com> Message-ID: <1431051519183-5731819.post@n5.nabble.com> Hi Sebastien, I am attempting to export the vtkPolyData referenced by the mapping contained in the actor. If there is a better way, I am open to it. My end goal is to export a complete representation of what is in my rendering object. It contains multiple actors, filters, and look up tables. Once I can export the content of one actor, I would like to add the content of other actors to the same file if possible. so if you know something about that, it would be helpful. Regarding the SetInputConnection vs SetInputData, I am presently trying to use SetInputData. The other method is commented out because it did not work, but I wanted to keep a record of what I had tried. I was trying to follow examples that were written for C++ and it seems that not all methods are supported in the Java API. Thanks for your help. I hope you have some advice. Kent -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-vtkXMLPolyDataWriter-from-Java-tp5731801p5731819.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Thu May 7 23:03:02 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 7 May 2015 21:03:02 -0600 Subject: [vtkusers] Using vtkXMLPolyDataWriter from Java In-Reply-To: <1431051519183-5731819.post@n5.nabble.com> References: <1430971277037-5731801.post@n5.nabble.com> <1431051519183-5731819.post@n5.nabble.com> Message-ID: Try what you where doing with the writer and reader that I mentioned to see if you get some success. If not, that must mean you don't get the proper geometry. You may want to look at any vtkXXXXExporter code in VTK. They should be doing similar things. (Meaning going from to actor to get the geometry.) Other than that, I don't have much advice. Good luck, Seb On Thu, May 7, 2015 at 8:18 PM, kent myers via vtkusers wrote: > Hi Sebastien, > > I am attempting to export the vtkPolyData referenced by the mapping > contained in the actor. If there is a better way, I am open to it. My end > goal is to export a complete representation of what is in my rendering > object. It contains multiple actors, filters, and look up tables. Once I > can export the content of one actor, I would like to add the content of > other actors to the same file if possible. so if you know something about > that, it would be helpful. > > Regarding the SetInputConnection vs SetInputData, I am presently trying to > use SetInputData. The other method is commented out because it did not > work, but I wanted to keep a record of what I had tried. I was trying to > follow examples that were written for C++ and it seems that not all methods > are supported in the Java API. > > Thanks for your help. I hope you have some advice. > > Kent > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Using-vtkXMLPolyDataWriter-from-Java-tp5731801p5731819.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Thu May 7 23:55:30 2015 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 7 May 2015 23:55:30 -0400 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: References: Message-ID: Yep. It seems like depth peeling is OFF. You will have to turn depth peeling ON explicitly on the VTK render window. http://www.vtk.org/Wiki/VTK/Depth_Peeling Warm Regards, Sankhesh Jhaveri Research & Development Engineer Kitware, Inc. *Phone*: (518) 881 4417 *Fax*: (518) 371 4573 On Wed, May 6, 2015 at 4:57 PM, Pavel Kalinnikov wrote: > Here is the screenshot of working example from Examples/GUI/Qt/Events. > > One more thing I forgot to say - VTK works good on my Linux (when not > using QVTKWidget). > > 2015-05-06 23:45 GMT+03:00 David E DeMarle : > >> If you can share the right/wrong images, that would help diagnose the >> cause. >> >> Is there opacity in the scene? If so depth peeling is needed to render >> the faces in the right order. To do depth peeling we need to ask the GPU >> what it can do and that can get messed up with different paths to the >> graphics context layers (under Qt vs natively for example.) >> >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Wed, May 6, 2015 at 4:31 PM, Pavel Kalinnikov < >> pavelkalinnikov at gmail.com> wrote: >> >>> Hi everyone! >>> >>> I have the following environment: >>> * OS - x64 Ubuntu 12.04.5 LTS >>> * Qt 5.4 >>> * VTK 6.2.0 >>> >>> I'm trying to use QVTKWidget and it seems like it doesn't work properly. >>> When I try to render some 3d object in this widget, I see that faces get >>> rendered in a wrong order (maybe there are some problems with z-buffer or >>> something). >>> The same code built on Windows works perfectly. >>> >>> Also I tried to build and run the standard example >>> Examples/GUI/Qt/Events distributed along with VTK-6.2.0, and it has the >>> same problem in my Linux environment. And again, it works on Windows. >>> >>> Am I doing something wrong or is it a bug? >>> Is there anyone who can fix this? >>> Is there any known workaround for this case? >>> >>> Thank you, >>> Pavel Kalinnikov >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Fri May 8 00:32:25 2015 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Fri, 8 May 2015 00:32:25 -0400 Subject: [vtkusers] [EXTERNAL] Efficiently visualizing duplicate data in biological model In-Reply-To: <55424156.9030607@surfsara.nl> References: <554211F7.2060605@surfsara.nl> <55424156.9030607@surfsara.nl> Message-ID: Hi Paul, You could create a three component point array of colors on the polydata. The colors can be mapped from a lookup table based on which biological cell the pointId belongs to. You can alter the lookup table based on the variable being color-mapped. This example demonstrates coloring points by added a point array of colors: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints Hope this helps. Warm Regards, Sankhesh Jhaveri Research & Development Engineer Kitware, Inc. *Phone*: (518) 881 4417 *Fax*: (518) 371 4573 On Thu, Apr 30, 2015 at 10:51 AM, Paul Melis wrote: > Hi Gerrick, > > I tried to make the two different "cells" apparent: VTK cells and > biological cells in the model (the latter being represented by a piece of > polydata), but apparently failed :) The filters you suggest work on VTK > points and cells only, not the higher level of biological cells in the > model I'm looking for. > > I'll try to add more detail. I have several biological cells in my > polydata object that are each represented by a few hundred points and > triangles (basically a distorted sphere per biological cell). All cells in > the simulation are represented by a single VTK polydata object (so not a > polydata object per cell). There is a point-data array called "cellId" that > holds the biological cell ID, so polydata points that form the same > biological cell in the model will have the same cell ID value. > > For each of the biological cells there is a single value for a number of > model output values, e.g. volume of the biological cell, total amount of > distortion, etc. These values I'd like to visualize by coloring the whole > cell (i.e. that cell's subset of the polydata) with a color-mapped value. > It seems the only way to do that in VTK is to propagate the value to show > for a cell (say volume) to all that cell's polydata points, for each of the > biological cells, and then do color-mapped rendering as usual. > > However, this value propagation is not something VTK can do for me it > seems, so I've written it manually in Python at the moment. The way this > works is that I add a point-data array to the polydata object for each > value, e.g. Volume. It then takes the values per biological cell from an > HDF5 file and assigns those values to the polydata points, based on the > biological cell ID of each point, thereby duplicating e.g. the volume value > for cell 123 on all points having cellID value 123. > > This value propagation takes a bit of processing that I'd like to minimize > while interactively visualizing and reading in new timesteps. Preprocessing > all timestep files is possible, but will add a lot of duplicate data, > something I'd like to avoid. > > Regards, > Paul > > On 04/30/2015 04:27 PM, Gerrick Bivins wrote: > >> Hi Paul, >> I'm a little confused on what your data layout is and how you'd actually >> like it to be >> but have you tried using either of these: >> http://www.vtk.org/doc/nightly/html/classvtkCellDataToPointData.html >> http://www.vtk.org/doc/nightly/html/classvtkPointDataToCellData.html >> >> Gerrick >> >> >> -----Original Message----- >> From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Paul Melis >> Sent: Thursday, April 30, 2015 6:29 AM >> To: vtkusers at vtk.org >> Subject: [EXTERNAL] [vtkusers] Efficiently visualizing duplicate data in >> biological model >> >> Hi, >> >> (Sorry for the lengthy introduction below, I feel some detail is needed >> before framing my question :)) >> >> I'm working with output data from a simulation of certain biological >> cells, currently a few hundred of them. Each cell is modeled with a few >> hundred vertices and triangles and can deform and interact with other >> cells. There's both per-vertex data for each cell (like force), as well as >> per-biological-cell data for the whole cell (like volume, amount of >> deformation, etc). The two different sets of data are stored in separate >> HDF5 files per timestep and we're using Xdmf to read the cell geometry + >> per-vertex data in as VTK polydata for visualization. >> >> The per-biological-cell data is stored as arrays of scalars indexed by >> biological cell ID. The (biological) cell polydata has a per-vertex >> "cellId" scalar value referencing this cell ID. For visualizing the >> per-biological-cell values (coloring a whole biological cell with one color >> based on the "cell-global" value) I'm currently using a bit of Python to >> add extra point-data arrays to the polydata for each per-biological-cell >> value, thereby massively duplicating the per-biological-cell values to each >> point/vertex. This works, but it's a bit slow already (I'm processing >> on-the-fly during reading) and the datasets will need to scale up to much >> larger numbers of cells. >> Duplicating the per-biological-cell values to each point-data array and >> storing them in a preprocess is doable, but wastes a lot of disk space. >> And the current separation of files for per-vertex and >> per-biological-cell data seems natural (although obviously they could be >> datasets in the same HDF5 file, but that wouldn't solve the duplication >> issue I'm pondering on). >> >> I've tried to find good ways to handle this case in VTK (or even on the >> level of Xdmf), but don't see filters or operations that handle this case >> out of the box. Is there a better approach than the "manual" data >> duplication that I'm using at the moment? >> >> Thanks in advance for any reply, >> Paul >> >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 pavelkalinnikov at gmail.com Fri May 8 04:51:03 2015 From: pavelkalinnikov at gmail.com (Pavel Kalinnikov) Date: Fri, 8 May 2015 11:51:03 +0300 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: References: Message-ID: I tried to make all steps of "VTK calls" section, but it doesn't help. Do I really need depth peeling? The scene doesn't have any translucency, just an opaque sphere and a pyramid. Besides, if I replace QVTKWidget by QVTKWidget, everything works just fine. 2015-05-08 6:55 GMT+03:00 Sankhesh Jhaveri : > Yep. It seems like depth peeling is OFF. You will have to turn depth > peeling ON explicitly on the VTK render window. > > http://www.vtk.org/Wiki/VTK/Depth_Peeling > > > > > Warm Regards, > > Sankhesh Jhaveri > Research & Development Engineer > Kitware, Inc. > *Phone*: (518) 881 4417 > *Fax*: (518) 371 4573 > > > > On Wed, May 6, 2015 at 4:57 PM, Pavel Kalinnikov < > pavelkalinnikov at gmail.com> wrote: > >> Here is the screenshot of working example from Examples/GUI/Qt/Events. >> >> One more thing I forgot to say - VTK works good on my Linux (when not >> using QVTKWidget). >> >> 2015-05-06 23:45 GMT+03:00 David E DeMarle : >> >>> If you can share the right/wrong images, that would help diagnose the >>> cause. >>> >>> Is there opacity in the scene? If so depth peeling is needed to render >>> the faces in the right order. To do depth peeling we need to ask the GPU >>> what it can do and that can get messed up with different paths to the >>> graphics context layers (under Qt vs natively for example.) >>> >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Wed, May 6, 2015 at 4:31 PM, Pavel Kalinnikov < >>> pavelkalinnikov at gmail.com> wrote: >>> >>>> Hi everyone! >>>> >>>> I have the following environment: >>>> * OS - x64 Ubuntu 12.04.5 LTS >>>> * Qt 5.4 >>>> * VTK 6.2.0 >>>> >>>> I'm trying to use QVTKWidget and it seems like it doesn't work >>>> properly. When I try to render some 3d object in this widget, I see that >>>> faces get rendered in a wrong order (maybe there are some problems with >>>> z-buffer or something). >>>> The same code built on Windows works perfectly. >>>> >>>> Also I tried to build and run the standard example >>>> Examples/GUI/Qt/Events distributed along with VTK-6.2.0, and it has the >>>> same problem in my Linux environment. And again, it works on Windows. >>>> >>>> Am I doing something wrong or is it a bug? >>>> Is there anyone who can fix this? >>>> Is there any known workaround for this case? >>>> >>>> Thank you, >>>> Pavel Kalinnikov >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From javier.maestro at nabla-designs.es Fri May 8 06:36:19 2015 From: javier.maestro at nabla-designs.es (javier.maestro at nabla-designs.es) Date: Fri, 08 May 2015 12:36:19 +0200 Subject: [vtkusers] Fit data in window (auto scale x and y) Message-ID: <98f4d62df3040af2b8cc4238e795a35f@nabla-designs.es> Hi there, I have a simple question: Is there any option that enables auto scale on both x and y when the window resizes? I just want to fit the data in the window all the time (changing the aspect ratio). Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ColoredPoints.cxx Type: text/x-c Size: 5095 bytes Desc: not available URL: From pavelkalinnikov at gmail.com Fri May 8 07:14:34 2015 From: pavelkalinnikov at gmail.com (Pavel Kalinnikov) Date: Fri, 8 May 2015 14:14:34 +0300 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: References: Message-ID: * replace QVTKWidget by QVTKWidget2, sorry for the typo 2015-05-08 11:51 GMT+03:00 Pavel Kalinnikov : > I tried to make all steps of "VTK calls" section, but it doesn't help. Do > I really need depth peeling? The scene doesn't have any translucency, just > an opaque sphere and a pyramid. > > Besides, if I replace QVTKWidget by QVTKWidget, everything works just fine. > > 2015-05-08 6:55 GMT+03:00 Sankhesh Jhaveri : > >> Yep. It seems like depth peeling is OFF. You will have to turn depth >> peeling ON explicitly on the VTK render window. >> >> http://www.vtk.org/Wiki/VTK/Depth_Peeling >> >> >> >> >> Warm Regards, >> >> Sankhesh Jhaveri >> Research & Development Engineer >> Kitware, Inc. >> *Phone*: (518) 881 4417 >> *Fax*: (518) 371 4573 >> >> >> >> On Wed, May 6, 2015 at 4:57 PM, Pavel Kalinnikov < >> pavelkalinnikov at gmail.com> wrote: >> >>> Here is the screenshot of working example from Examples/GUI/Qt/Events. >>> >>> One more thing I forgot to say - VTK works good on my Linux (when not >>> using QVTKWidget). >>> >>> 2015-05-06 23:45 GMT+03:00 David E DeMarle : >>> >>>> If you can share the right/wrong images, that would help diagnose the >>>> cause. >>>> >>>> Is there opacity in the scene? If so depth peeling is needed to render >>>> the faces in the right order. To do depth peeling we need to ask the GPU >>>> what it can do and that can get messed up with different paths to the >>>> graphics context layers (under Qt vs natively for example.) >>>> >>>> >>>> >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Wed, May 6, 2015 at 4:31 PM, Pavel Kalinnikov < >>>> pavelkalinnikov at gmail.com> wrote: >>>> >>>>> Hi everyone! >>>>> >>>>> I have the following environment: >>>>> * OS - x64 Ubuntu 12.04.5 LTS >>>>> * Qt 5.4 >>>>> * VTK 6.2.0 >>>>> >>>>> I'm trying to use QVTKWidget and it seems like it doesn't work >>>>> properly. When I try to render some 3d object in this widget, I see that >>>>> faces get rendered in a wrong order (maybe there are some problems with >>>>> z-buffer or something). >>>>> The same code built on Windows works perfectly. >>>>> >>>>> Also I tried to build and run the standard example >>>>> Examples/GUI/Qt/Events distributed along with VTK-6.2.0, and it has the >>>>> same problem in my Linux environment. And again, it works on Windows. >>>>> >>>>> Am I doing something wrong or is it a bug? >>>>> Is there anyone who can fix this? >>>>> Is there any known workaround for this case? >>>>> >>>>> Thank you, >>>>> Pavel Kalinnikov >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mat930121 at hotmail.com Fri May 8 10:34:43 2015 From: mat930121 at hotmail.com (Ragnarok) Date: Fri, 8 May 2015 07:34:43 -0700 (MST) Subject: [vtkusers] Vector field color and direction? Message-ID: <1431095683340-5731841.post@n5.nabble.com> How would you modify this existant example to not only be able to modify the vector direction and size, but also it's color (so I can choose the color based on for example the vector length)? Would you add another set of imageData and then put the glyph2d color mode to SetColorModeToColorByScalar ? Even there, how can I add two set of inputData so I can have on one hand the direction and size of vector, and on the other change their color? the example in question : http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/VectorField -- View this message in context: http://vtk.1045678.n5.nabble.com/Vector-field-color-and-direction-tp5731841.html Sent from the VTK - Users mailing list archive at Nabble.com. From marcus.hanwell at kitware.com Fri May 8 10:37:49 2015 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Fri, 8 May 2015 10:37:49 -0400 Subject: [vtkusers] Journal article about rendering improvements in VTK Message-ID: Hi, I would like to draw your attention to our open access (CC-BY) article about rendering improvements in the Visualization Toolkit in a new open access journal called SoftwareX. We are among the first publications, and we are pleased to see more journals working to highlight the importance of reusable, open source software in scientific research.? http://dx.doi.org/10.1016/j.softx.2015.04.001 The corrected proof is now available, it discusses some of the OpenGL2 rendering improvements present in VTK 6.2. As noted in the acknowledgements this work was supported by the NIH VTK maintenance grant. Thanks, Marcus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri May 8 10:53:16 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 8 May 2015 10:53:16 -0400 Subject: [vtkusers] vtk ObjLoader with Java Wrapping error In-Reply-To: <1431049913709-5731818.post@n5.nabble.com> References: <1430969255955-5731799.post@n5.nabble.com> <1430975146541-5731802.post@n5.nabble.com> <1431049913709-5731818.post@n5.nabble.com> Message-ID: The file does not seem to be a valid obj file. The format is described here; http://en.wikipedia.org/wiki/Wavefront_.obj_file First, it has "vt" texture coordinates that are 3D. I believe that VTK only reads 2D texture. Second, the "f" face lines are of the form: f 1//1 2//2 3//3 I believe that the number after the // is a normal id. The file has no "vn" normal lines. If I change the "vt" to "vn" the file renders, but looks strange. On Thu, May 7, 2015 at 9:51 PM, James Potota wrote: > Yeah sure. Here is the link : > https://dl.dropboxusercontent.com/u/7356347/gull20mb.obj > > > I would like to make a correction that it has nothing to do with filesize. > So I uploaded a 20mb obj. > Thanks. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtk-ObjLoader-with-Java-Wrapping-error-tp5731799p5731818.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From frederic.perez at alma3d.com Fri May 8 11:02:51 2015 From: frederic.perez at alma3d.com (Frederic Perez) Date: Fri, 8 May 2015 17:02:51 +0200 Subject: [vtkusers] Journal article about rendering improvements in VTK In-Reply-To: References: Message-ID: Thank you Marcus for sharing the info and, most importantly, for all the effort you people invest in all the open source toolkits we all use (and benefit) from! Bon week-end, Frederic On Friday, May 8, 2015, Marcus D. Hanwell wrote: > Hi, > I would like to draw your attention to our open access (CC-BY) article about rendering improvements in the Visualization Toolkit in a new open access journal called SoftwareX. We are among the first publications, and we are pleased to see more journals working to highlight the importance of reusable, open source software in scientific research.? > > http://dx.doi.org/10.1016/j.softx.2015.04.001 > > The corrected proof is now available, it discusses some of the OpenGL2 rendering improvements present in VTK 6.2. As noted in the acknowledgements this work was supported by the NIH VTK maintenance grant. > Thanks, > Marcus > -- Best, Frederic Perez, PhD | R&D Team Manager *T.: 0034 932 380 592 * | *alma-medical.com * -- Q: Why is this email five sentences or less? A: http://five.sentenc.es -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri May 8 11:34:45 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 8 May 2015 11:34:45 -0400 Subject: [vtkusers] vtk ObjLoader with Java Wrapping error In-Reply-To: References: <1430969255955-5731799.post@n5.nabble.com> <1430975146541-5731802.post@n5.nabble.com> <1431049913709-5731818.post@n5.nabble.com> Message-ID: To follow up. If I replace "//" with "/" on the "f" lines, the file renders. So I think the problem is that the original file with the "//" expects to have normals, but none are defined. The code should report an error. I'll work on a patch. Bill On Fri, May 8, 2015 at 10:53 AM, Bill Lorensen wrote: > The file does not seem to be a valid obj file. The format is described here; > http://en.wikipedia.org/wiki/Wavefront_.obj_file > > First, it has "vt" texture coordinates that are 3D. I believe that VTK > only reads 2D texture. > Second, the "f" face lines are of the form: > > f 1//1 2//2 3//3 > > I believe that the number after the // is a normal id. The file has no > "vn" normal lines. > > If I change the "vt" to "vn" the file renders, but looks strange. > > > On Thu, May 7, 2015 at 9:51 PM, James Potota wrote: >> Yeah sure. Here is the link : >> https://dl.dropboxusercontent.com/u/7356347/gull20mb.obj >> >> >> I would like to make a correction that it has nothing to do with filesize. >> So I uploaded a 20mb obj. >> Thanks. >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.com/vtk-ObjLoader-with-Java-Wrapping-error-tp5731799p5731818.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From DLRdave at aol.com Fri May 8 11:46:04 2015 From: DLRdave at aol.com (David Cole) Date: Fri, 8 May 2015 11:46:04 -0400 Subject: [vtkusers] Journal article about rendering improvements in VTK In-Reply-To: References: Message-ID: Hear, hear! Really looking forward to the day the OpenGL2 backend is declared "ready for prime time"... Thanks to all of you for your hard work on making this speedup a reality! David C. On Fri, May 8, 2015 at 11:02 AM, Frederic Perez wrote: > Thank you Marcus for sharing the info and, most importantly, for all the > effort you people invest in all the open source toolkits we all use (and > benefit) from! > > Bon week-end, > > Frederic > > On Friday, May 8, 2015, Marcus D. Hanwell > wrote: > > Hi, > > I would like to draw your attention to our open access (CC-BY) article > about rendering improvements in the Visualization Toolkit in a new open > access journal called SoftwareX. We are among the first publications, and > we are pleased to see more journals working to highlight the importance of > reusable, open source software in scientific research.? > > > > http://dx.doi.org/10.1016/j.softx.2015.04.001 > > > > The corrected proof is now available, it discusses some of the OpenGL2 > rendering improvements present in VTK 6.2. As noted in the acknowledgements > this work was supported by the NIH VTK maintenance grant. > > Thanks, > > Marcus > > > > -- > > Best, > Frederic Perez, PhD | R&D Team Manager > > *T.: 0034 932 380 592 * | *alma-medical.com > * > -- > Q: Why is this email five sentences or less? > A: http://five.sentenc.es > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 pavelkalinnikov at gmail.com Fri May 8 16:07:43 2015 From: pavelkalinnikov at gmail.com (Pavel Kalinnikov) Date: Fri, 8 May 2015 23:07:43 +0300 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: References: Message-ID: Here I found a thread with the same problem described: http://public.kitware.com/pipermail/vtkusers/2014-October/085407.html But no solution was offered in this thread. I believe there is clearly a bug somewhere. Does anyone can reproduce this situation and try to resolve it? Thank you 2015-05-08 14:14 GMT+03:00 Pavel Kalinnikov : > * replace QVTKWidget by QVTKWidget2, sorry for the typo > > 2015-05-08 11:51 GMT+03:00 Pavel Kalinnikov : > >> I tried to make all steps of "VTK calls" section, but it doesn't help. Do >> I really need depth peeling? The scene doesn't have any translucency, just >> an opaque sphere and a pyramid. >> >> Besides, if I replace QVTKWidget by QVTKWidget, everything works just >> fine. >> >> 2015-05-08 6:55 GMT+03:00 Sankhesh Jhaveri >> : >> >>> Yep. It seems like depth peeling is OFF. You will have to turn depth >>> peeling ON explicitly on the VTK render window. >>> >>> http://www.vtk.org/Wiki/VTK/Depth_Peeling >>> >>> >>> >>> >>> Warm Regards, >>> >>> Sankhesh Jhaveri >>> Research & Development Engineer >>> Kitware, Inc. >>> *Phone*: (518) 881 4417 >>> *Fax*: (518) 371 4573 >>> >>> >>> >>> On Wed, May 6, 2015 at 4:57 PM, Pavel Kalinnikov < >>> pavelkalinnikov at gmail.com> wrote: >>> >>>> Here is the screenshot of working example from Examples/GUI/Qt/Events. >>>> >>>> One more thing I forgot to say - VTK works good on my Linux (when not >>>> using QVTKWidget). >>>> >>>> 2015-05-06 23:45 GMT+03:00 David E DeMarle : >>>> >>>>> If you can share the right/wrong images, that would help diagnose the >>>>> cause. >>>>> >>>>> Is there opacity in the scene? If so depth peeling is needed to render >>>>> the faces in the right order. To do depth peeling we need to ask the GPU >>>>> what it can do and that can get messed up with different paths to the >>>>> graphics context layers (under Qt vs natively for example.) >>>>> >>>>> >>>>> >>>>> >>>>> David E DeMarle >>>>> Kitware, Inc. >>>>> R&D Engineer >>>>> 21 Corporate Drive >>>>> Clifton Park, NY 12065-8662 >>>>> Phone: 518-881-4909 >>>>> >>>>> On Wed, May 6, 2015 at 4:31 PM, Pavel Kalinnikov < >>>>> pavelkalinnikov at gmail.com> wrote: >>>>> >>>>>> Hi everyone! >>>>>> >>>>>> I have the following environment: >>>>>> * OS - x64 Ubuntu 12.04.5 LTS >>>>>> * Qt 5.4 >>>>>> * VTK 6.2.0 >>>>>> >>>>>> I'm trying to use QVTKWidget and it seems like it doesn't work >>>>>> properly. When I try to render some 3d object in this widget, I see that >>>>>> faces get rendered in a wrong order (maybe there are some problems with >>>>>> z-buffer or something). >>>>>> The same code built on Windows works perfectly. >>>>>> >>>>>> Also I tried to build and run the standard example >>>>>> Examples/GUI/Qt/Events distributed along with VTK-6.2.0, and it has the >>>>>> same problem in my Linux environment. And again, it works on Windows. >>>>>> >>>>>> Am I doing something wrong or is it a bug? >>>>>> Is there anyone who can fix this? >>>>>> Is there any known workaround for this case? >>>>>> >>>>>> Thank you, >>>>>> Pavel Kalinnikov >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Fri May 8 17:45:24 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 8 May 2015 17:45:24 -0400 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: References: Message-ID: <20150508214524.GB15229@megas.kitware.com> On Fri, May 08, 2015 at 23:07:43 +0300, Pavel Kalinnikov wrote: > Here I found a thread with the same problem described: > http://public.kitware.com/pipermail/vtkusers/2014-October/085407.html > But no solution was offered in this thread. I believe there is clearly a > bug somewhere. Does anyone can reproduce this situation and try to resolve > it? We have a dashboard for Qt5 on Linux (it's on megas), but it does use an nVidia graphics card (though using nouveau rather than the binary driver). Is there a test which exercises this? I'll build the example and test it out here. --Ben From pavelkalinnikov at gmail.com Fri May 8 18:03:08 2015 From: pavelkalinnikov at gmail.com (Pavel Kalinnikov) Date: Sat, 9 May 2015 01:03:08 +0300 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: <20150508214524.GB15229@megas.kitware.com> References: <20150508214524.GB15229@megas.kitware.com> Message-ID: As I said before, I've build and run the "Examples/GUI/Qt/Events" example from the VTK-6.2.0 distribution. But I think we can find even simpler test which reproduces the problem. 2015-05-09 0:45 GMT+03:00 Ben Boeckel : > On Fri, May 08, 2015 at 23:07:43 +0300, Pavel Kalinnikov wrote: > > Here I found a thread with the same problem described: > > http://public.kitware.com/pipermail/vtkusers/2014-October/085407.html > > But no solution was offered in this thread. I believe there is clearly a > > bug somewhere. Does anyone can reproduce this situation and try to > resolve > > it? > > We have a dashboard for Qt5 on Linux (it's on megas), but it does use an > nVidia graphics card (though using nouveau rather than the binary > driver). Is there a test which exercises this? I'll build the example > and test it out here. > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tr_jun-jiang.ee at vitrox.com Sat May 9 01:54:09 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Fri, 8 May 2015 22:54:09 -0700 (MST) Subject: [vtkusers] vtk ObjLoader with Java Wrapping error In-Reply-To: References: <1430969255955-5731799.post@n5.nabble.com> <1430975146541-5731802.post@n5.nabble.com> <1431049913709-5731818.post@n5.nabble.com> Message-ID: <1431150849104-5731856.post@n5.nabble.com> thank you so much Bill. Noted and I will try it with 'new format'. Really appreciate for your help. Thank you again. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-ObjLoader-with-Java-Wrapping-error-tp5731799p5731856.html Sent from the VTK - Users mailing list archive at Nabble.com. From dfadzli at yahoo.com.my Sat May 9 14:13:13 2015 From: dfadzli at yahoo.com.my (dfadzli) Date: Sat, 9 May 2015 11:13:13 -0700 (MST) Subject: [vtkusers] vtk data type Message-ID: <1431195192989-5731858.post@n5.nabble.com> i have problem in writing the vtkreader pipeline for this type of file..can anyone help me... im beginner in VTK.. so far, ive only done the vtkreader pipeline for JPG image only.. are there any vtkreader pipeline that can read any type of data.. here are the type of file.. 30000012101001493281200007747 File (.30000012101001493281200007747) honestly..i have no idea what type of file is this, thus i cant find any vtkreader pipeline to read this kind of file. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-data-type-tp5731858.html Sent from the VTK - Users mailing list archive at Nabble.com. From dakota_63124 at yahoo.com Sat May 9 14:48:58 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Sat, 9 May 2015 11:48:58 -0700 (MST) Subject: [vtkusers] Get vtkPolyData from vtkMapper in vtkActor using Java API Message-ID: <1431197338219-5731859.post@n5.nabble.com> I am trying to export a vtkPolyData object to a vtp file using vtkXMLPolyDataWriter. The online VTK documentation says to use the writer.SetInput() method that takes a vtkPolyData object. I am having some problems with this strategy: 1. I can get the vtkMapper object from my vtkActor, but the vtkMapper object has no GetInput() method to retrieve a vtkPolyData object (or any other method) 2. vtkXMLPolyDataWriter has no SetInput() method (or any other method) to pass the vtkPolyData object even if I could get the vtkPolyData object. Has anyone successfully exported vtkPolyData from a Java application? If so, how? -- View this message in context: http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Sat May 9 15:07:20 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 9 May 2015 15:07:20 -0400 Subject: [vtkusers] Get vtkPolyData from vtkMapper in vtkActor using Java API In-Reply-To: <1431197338219-5731859.post@n5.nabble.com> References: <1431197338219-5731859.post@n5.nabble.com> Message-ID: Here is what I do in C++: vtkSmartPointer actors = vtkSmartPointer::New(); actors = renderer->GetActors(); actors->InitTraversal(); for (vtkIdType a = 0; a < actors->GetNumberOfItems(); ++a) { vtkActor * actor = actors->GetNextActor(); vtkPolyData *pd = vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput()); vtkSmartPointer clean = vtkSmartPointer::New(); clean->SetInputData(pd); vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputConnection(clean->GetOutputPort()); normals->Update(); vtkPolyDataMapper *mapper = vtkPolyDataMapper::SafeDownCast(actor->GetMapper()); mapper->SetInputData(normals->GetOutput()); } On Sat, May 9, 2015 at 2:48 PM, kent myers via vtkusers wrote: > I am trying to export a vtkPolyData object to a vtp file using > vtkXMLPolyDataWriter. The online VTK documentation says to use the > writer.SetInput() method that takes a vtkPolyData object. > > I am having some problems with this strategy: > 1. I can get the vtkMapper object from my vtkActor, but the vtkMapper object > has no GetInput() method to retrieve a vtkPolyData object (or any other > method) > 2. vtkXMLPolyDataWriter has no SetInput() method (or any other method) to > pass the vtkPolyData object even if I could get the vtkPolyData object. > > Has anyone successfully exported vtkPolyData from a Java application? If so, > how? > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From dakota_63124 at yahoo.com Sat May 9 15:21:10 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Sat, 9 May 2015 12:21:10 -0700 (MST) Subject: [vtkusers] Get vtkPolyData from vtkMapper in vtkActor using Java API In-Reply-To: References: <1431197338219-5731859.post@n5.nabble.com> Message-ID: <588822233.3371807.1431199245851.JavaMail.yahoo@mail.yahoo.com> Hi Bill, I edited my post shortly after I wrote it because I was able to get the vtkPolyData object from my actor. However I could not find the SetInput() method for the writer, so I tried SetInputData.? This crashes the Java virtual machine. I will try to understand your C++ code sample, but Java is very different, and it seems that not all C++ methods are exposed to Java. Thanks for the help.Kent On Saturday, May 9, 2015 12:07 PM, Bill Lorensen [via VTK] wrote: Here is what I do in C++: vtkSmartPointer actors = ? ? vtkSmartPointer::New(); ? actors = renderer->GetActors(); ? actors->InitTraversal(); ? for (vtkIdType a = 0; a < actors->GetNumberOfItems(); ++a) ? ? { ? ? vtkActor * actor = actors->GetNextActor(); ? ? vtkPolyData *pd = vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput()); ? ? vtkSmartPointer clean = ? ? ? vtkSmartPointer::New(); ? ? clean->SetInputData(pd); ? ? vtkSmartPointer normals = ? ? ? vtkSmartPointer::New(); ? ? normals->SetInputConnection(clean->GetOutputPort()); ? ? normals->Update(); ? ? vtkPolyDataMapper *mapper = vtkPolyDataMapper::SafeDownCast(actor->GetMapper()); ? ? mapper->SetInputData(normals->GetOutput()); ? ? } On Sat, May 9, 2015 at 2:48 PM, kent myers via vtkusers <[hidden email]> wrote: > I am trying to export a vtkPolyData object to a vtp file using > vtkXMLPolyDataWriter. ?The online VTK documentation says to use the > writer.SetInput() method that takes a vtkPolyData object. > > I am having some problems with this strategy: > 1. I can get the vtkMapper object from my vtkActor, but the vtkMapper object > has no GetInput() method to retrieve a vtkPolyData object (or any other > method) > 2. vtkXMLPolyDataWriter has no SetInput() method (or any other method) to > pass the vtkPolyData object even if I could get the vtkPolyData object. > > Has anyone successfully exported vtkPolyData from a Java application? If so, > how? > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859p5731860.html To unsubscribe from Get vtkPolyData from vtkMapper in vtkActor using Java API, click here. NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/Write-vtkPolyData-to-vtp-file-using-Java-API-tp5731859p5731861.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sat May 9 15:27:16 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 9 May 2015 15:27:16 -0400 Subject: [vtkusers] Get vtkPolyData from vtkMapper in vtkActor using Java API In-Reply-To: <588822233.3371807.1431199245851.JavaMail.yahoo@mail.yahoo.com> References: <1431197338219-5731859.post@n5.nabble.com> <588822233.3371807.1431199245851.JavaMail.yahoo@mail.yahoo.com> Message-ID: SetInput(polydata) is not in vtk6.x. It should be SetInputData. Not sure why you are crashing. Try printing the polydata. In C++: polydata->Print(std::cout); On Sat, May 9, 2015 at 3:21 PM, kent myers via vtkusers wrote: > Hi Bill, > > I edited my post shortly after I wrote it because I was able to get the > vtkPolyData object from my actor. > > However I could not find the SetInput() method for the writer, so I tried > SetInputData. This crashes the Java virtual machine. > > I will try to understand your C++ code sample, but Java is very different, > and it seems that not all C++ methods are exposed to Java. > > Thanks for the help. > Kent > > > > On Saturday, May 9, 2015 12:07 PM, Bill Lorensen [via VTK] <[hidden email]> > wrote: > > > Here is what I do in C++: > vtkSmartPointer actors = > vtkSmartPointer::New(); > actors = renderer->GetActors(); > actors->InitTraversal(); > for (vtkIdType a = 0; a < actors->GetNumberOfItems(); ++a) > { > vtkActor * actor = actors->GetNextActor(); > vtkPolyData *pd = > vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput()); > vtkSmartPointer clean = > vtkSmartPointer::New(); > clean->SetInputData(pd); > vtkSmartPointer normals = > vtkSmartPointer::New(); > normals->SetInputConnection(clean->GetOutputPort()); > normals->Update(); > vtkPolyDataMapper *mapper = > vtkPolyDataMapper::SafeDownCast(actor->GetMapper()); > mapper->SetInputData(normals->GetOutput()); > } > > > On Sat, May 9, 2015 at 2:48 PM, kent myers via vtkusers > <[hidden email]> wrote: > >> I am trying to export a vtkPolyData object to a vtp file using >> vtkXMLPolyDataWriter. The online VTK documentation says to use the >> writer.SetInput() method that takes a vtkPolyData object. >> >> I am having some problems with this strategy: >> 1. I can get the vtkMapper object from my vtkActor, but the vtkMapper >> object >> has no GetInput() method to retrieve a vtkPolyData object (or any other >> method) >> 2. vtkXMLPolyDataWriter has no SetInput() method (or any other method) to >> pass the vtkPolyData object even if I could get the vtkPolyData object. >> >> Has anyone successfully exported vtkPolyData from a Java application? If >> so, >> how? >> >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > -- > Unpaid intern in BillsBasement at noware dot com > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859p5731860.html > To unsubscribe from Get vtkPolyData from vtkMapper in vtkActor using Java > API, click here. > NAML > > > > ________________________________ > View this message in context: Re: Get vtkPolyData from vtkMapper in vtkActor > using Java API > > Sent from the VTK - Users mailing list archive at Nabble.com. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From dakota_63124 at yahoo.com Sat May 9 16:05:27 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Sat, 9 May 2015 13:05:27 -0700 (MST) Subject: [vtkusers] Get vtkPolyData from vtkMapper in vtkActor using Java API In-Reply-To: References: <1431197338219-5731859.post@n5.nabble.com> <588822233.3371807.1431199245851.JavaMail.yahoo@mail.yahoo.com> Message-ID: <205615301.3384270.1431201918022.JavaMail.yahoo@mail.yahoo.com> Hi Bill, The results of the print are at the end of this message. It looks to me like the polydata is ok.? Below is what my code looks like now.? Is it possible there is something wrong with the Write method as called from Java? By the way,?your code that?iterates through the actors in the renderer made me wonder if there would be a way to export multiple actors to the same VTP file.? The vtkXMLPolyDataWriter class doesn't have a Close() method, so it seems that the file will be closed immediately after the first write.? If you can give many any feedback on this question that would be great. For now the main issue is just to be able to call the write method without crashing. Thanks,Kent public void exportGraphicFile(String filename) { //Write the file vtkXMLPolyDataWriter writer = new vtkXMLPolyDataWriter(); writer.SetDataModeToAscii();; writer.SetFileName(filename); vtkActor testActor = elementFaceActor; vtkPolyDataMapper testMapper = (vtkPolyDataMapper) testActor.GetMapper(); vtkPolyData polyData = testMapper.GetInput(); String result = polyData.Print(); System.out.print(result); writer.SetInputData(polyData); // writer.Update(); writer.Write(); } OUTPUT FROM PRINT: vtkPolyData (00000000659D2ED0) Debug: Off Modified Time: 130 Reference Count: 7 Registered Events: (none) Information: 00000000659CBF10 Data Released: False Global Release Data: Off UpdateTime: 813 Field Data: Debug: Off Modified Time: 107 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Number Of Points: 192 Number Of Cells: 540 Cell Data: Debug: Off Modified Time: 110 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Point Data: Debug: Off Modified Time: 109 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Bounds: Xmin,Xmax: (0, 1) Ymin,Ymax: (0, 1) Zmin,Zmax: (0, 2) Compute Time: 822 Number Of Points: 192 Point Coordinates: 00000000659D3800 Locator: 0000000000000000 Number Of Vertices: 0 Number Of Lines: 0 Number Of Polygons: 540 Number Of Triangle Strips: 0 Number Of Pieces: 1 Piece: 0 Ghost Level: 0 On Saturday, May 9, 2015 12:27 PM, Bill Lorensen [via VTK] wrote: SetInput(polydata) is not in vtk6.x. It should be SetInputData. Not sure why you are crashing. Try printing the polydata. In C++: polydata->Print(std::cout); On Sat, May 9, 2015 at 3:21 PM, kent myers via vtkusers <[hidden email]> wrote: > Hi Bill, > > I edited my post shortly after I wrote it because I was able to get the > vtkPolyData object from my actor. > > However I could not find the SetInput() method for the writer, so I tried > SetInputData. ?This crashes the Java virtual machine. > > I will try to understand your C++ code sample, but Java is very different, > and it seems that not all C++ methods are exposed to Java. > > Thanks for the help. > Kent > > > > On Saturday, May 9, 2015 12:07 PM, Bill Lorensen [via VTK] <[hidden email]> > wrote: > > > Here is what I do in C++: > vtkSmartPointer actors = > ? ? vtkSmartPointer::New(); > ? actors = renderer->GetActors(); > ? actors->InitTraversal(); > ? for (vtkIdType a = 0; a < actors->GetNumberOfItems(); ++a) > ? ? { > ? ? vtkActor * actor = actors->GetNextActor(); > ? ? vtkPolyData *pd = > vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput()); > ? ? vtkSmartPointer clean = > ? ? ? vtkSmartPointer::New(); > ? ? clean->SetInputData(pd); > ? ? vtkSmartPointer normals = > ? ? ? vtkSmartPointer::New(); > ? ? normals->SetInputConnection(clean->GetOutputPort()); > ? ? normals->Update(); > ? ? vtkPolyDataMapper *mapper = > vtkPolyDataMapper::SafeDownCast(actor->GetMapper()); > ? ? mapper->SetInputData(normals->GetOutput()); > ? ? } > > > On Sat, May 9, 2015 at 2:48 PM, kent myers via vtkusers > <[hidden email]> wrote: > >> I am trying to export a vtkPolyData object to a vtp file using >> vtkXMLPolyDataWriter. ?The online VTK documentation says to use the >> writer.SetInput() method that takes a vtkPolyData object. >> >> I am having some problems with this strategy: >> 1. I can get the vtkMapper object from my vtkActor, but the vtkMapper >> object >> has no GetInput() method to retrieve a vtkPolyData object (or any other >> method) >> 2. vtkXMLPolyDataWriter has no SetInput() method (or any other method) to >> pass the vtkPolyData object even if I could get the vtkPolyData object. >> >> Has anyone successfully exported vtkPolyData from a Java application? If >> so, >> how? >> >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > -- > Unpaid intern in BillsBasement at noware dot com > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859p5731860.html > To unsubscribe from Get vtkPolyData from vtkMapper in vtkActor using Java > API, click here. > NAML > > > > ________________________________ > View this message in context: Re: Get vtkPolyData from vtkMapper in vtkActor > using Java API > > Sent from the VTK - Users mailing list archive at Nabble.com. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/Write-vtkPolyData-to-vtp-file-using-Java-API-tp5731859p5731862.html To unsubscribe from Write vtkPolyData to vtp file using Java API, click here. NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/Write-vtkPolyData-to-vtp-file-using-Java-API-tp5731859p5731863.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakota_63124 at yahoo.com Sat May 9 18:30:14 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Sat, 9 May 2015 15:30:14 -0700 (MST) Subject: [vtkusers] Get vtkPolyData from vtkMapper in vtkActor using Java API In-Reply-To: References: <1431197338219-5731859.post@n5.nabble.com> <588822233.3371807.1431199245851.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1599232535.3399102.1431210597113.JavaMail.yahoo@mail.yahoo.com> Hi Bill, I got a little better result using the code shown below.? In this case, it went through the loop 4 times, which is the correct number of actors in my renderer.? One of them had a null mapper, which was correct.? Two of them contained only lines and one contained facets. Outside the loop the Update() and Write() did not fail.? However, most of the time I did not get a file. One time I did get a file and it looked reasonable.? I imported this file using the code shown below the export method.? When importing, the count was only one.? The one imported actor?contained facets and it rendered correctly. This is an improvement, but there still seems to be a problem because the writer succeeds unpredictably writing the same data. Any suggestions? Thanks,Kent ?public void exportGraphicFile(String filename) { ???? vtkXMLPolyDataWriter writer = new vtkXMLPolyDataWriter(); ???? writer.SetFileName(filename); ???? writer.SetDataModeToAscii();???? vtkActorCollection actors = renderer.GetActors(); ??actors.InitTraversal(); ??for(int a = 0; a wrote: Hi Bill, The results of the print are at the end of this message. It looks to me like the polydata is ok.? Below is what my code looks like now.? Is it possible there is something wrong with the Write method as called from Java? By the way,?your code that?iterates through the actors in the renderer made me wonder if there would be a way to export multiple actors to the same VTP file.? The vtkXMLPolyDataWriter class doesn't have a Close() method, so it seems that the file will be closed immediately after the first write.? If you can give many any feedback on this question that would be great. For now the main issue is just to be able to call the write method without crashing. Thanks,Kent public void exportGraphicFile(String filename) { //Write the file vtkXMLPolyDataWriter writer = new vtkXMLPolyDataWriter(); writer.SetDataModeToAscii();; writer.SetFileName(filename); vtkActor testActor = elementFaceActor; vtkPolyDataMapper testMapper = (vtkPolyDataMapper) testActor.GetMapper(); vtkPolyData polyData = testMapper.GetInput(); String result = polyData.Print(); System.out.print(result); writer.SetInputData(polyData); // writer.Update(); writer.Write(); } OUTPUT FROM PRINT: vtkPolyData (00000000659D2ED0) Debug: Off Modified Time: 130 Reference Count: 7 Registered Events: (none) Information: 00000000659CBF10 Data Released: False Global Release Data: Off UpdateTime: 813 Field Data: Debug: Off Modified Time: 107 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Number Of Points: 192 Number Of Cells: 540 Cell Data: Debug: Off Modified Time: 110 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Point Data: Debug: Off Modified Time: 109 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Bounds: Xmin,Xmax: (0, 1) Ymin,Ymax: (0, 1) Zmin,Zmax: (0, 2) Compute Time: 822 Number Of Points: 192 Point Coordinates: 00000000659D3800 Locator: 0000000000000000 Number Of Vertices: 0 Number Of Lines: 0 Number Of Polygons: 540 Number Of Triangle Strips: 0 Number Of Pieces: 1 Piece: 0 Ghost Level: 0 On Saturday, May 9, 2015 12:27 PM, Bill Lorensen [via VTK] wrote: SetInput(polydata) is not in vtk6.x. It should be SetInputData. Not sure why you are crashing. Try printing the polydata. In C++: polydata->Print(std::cout); On Sat, May 9, 2015 at 3:21 PM, kent myers via vtkusers <[hidden email]> wrote: > Hi Bill, > > I edited my post shortly after I wrote it because I was able to get the > vtkPolyData object from my actor. > > However I could not find the SetInput() method for the writer, so I tried > SetInputData. ?This crashes the Java virtual machine. > > I will try to understand your C++ code sample, but Java is very different, > and it seems that not all C++ methods are exposed to Java. > > Thanks for the help. > Kent > > > > On Saturday, May 9, 2015 12:07 PM, Bill Lorensen [via VTK] <[hidden email]> > wrote: > > > Here is what I do in C++: > vtkSmartPointer actors = > ? ? vtkSmartPointer::New(); > ? actors = renderer->GetActors(); > ? actors->InitTraversal(); > ? for (vtkIdType a = 0; a < actors->GetNumberOfItems(); ++a) > ? ? { > ? ? vtkActor * actor = actors->GetNextActor(); > ? ? vtkPolyData *pd = > vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput()); > ? ? vtkSmartPointer clean = > ? ? ? vtkSmartPointer::New(); > ? ? clean->SetInputData(pd); > ? ? vtkSmartPointer normals = > ? ? ? vtkSmartPointer::New(); > ? ? normals->SetInputConnection(clean->GetOutputPort()); > ? ? normals->Update(); > ? ? vtkPolyDataMapper *mapper = > vtkPolyDataMapper::SafeDownCast(actor->GetMapper()); > ? ? mapper->SetInputData(normals->GetOutput()); > ? ? } > > > On Sat, May 9, 2015 at 2:48 PM, kent myers via vtkusers > <[hidden email]> wrote: > >> I am trying to export a vtkPolyData object to a vtp file using >> vtkXMLPolyDataWriter. ?The online VTK documentation says to use the >> writer.SetInput() method that takes a vtkPolyData object. >> >> I am having some problems with this strategy: >> 1. I can get the vtkMapper object from my vtkActor, but the vtkMapper >> object >> has no GetInput() method to retrieve a vtkPolyData object (or any other >> method) >> 2. vtkXMLPolyDataWriter has no SetInput() method (or any other method) to >> pass the vtkPolyData object even if I could get the vtkPolyData object. >> >> Has anyone successfully exported vtkPolyData from a Java application? If >> so, >> how? >> >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > -- > Unpaid intern in BillsBasement at noware dot com > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://vtk.1045678.n5.nabble.com/Get-vtkPolyData-from-vtkMapper-in-vtkActor-using-Java-API-tp5731859p5731860.html > To unsubscribe from Get vtkPolyData from vtkMapper in vtkActor using Java > API, click here. > NAML > > > > ________________________________ > View this message in context: Re: Get vtkPolyData from vtkMapper in vtkActor > using Java API > > Sent from the VTK - Users mailing list archive at Nabble.com. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/Write-vtkPolyData-to-vtp-file-using-Java-API-tp5731859p5731862.html To unsubscribe from Write vtkPolyData to vtp file using Java API, click here. NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/Write-vtkPolyData-to-vtp-file-using-Java-API-tp5731859p5731864.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pbb_991 at 163.com Sat May 9 23:16:58 2015 From: pbb_991 at 163.com (=?GBK?B?sfKx8g==?=) Date: Sun, 10 May 2015 11:16:58 +0800 (CST) Subject: [vtkusers] Bug in VTK5.10.1 when using class vtkImageViewer2 Message-ID: <7ae5f6be.e869.14d3bd361eb.Coremail.pbb_991@163.com> Hi, I met a trouble when i use class vtkImageViewer2 to adjust windowlevel of a image by VTK5.10.1, no such problems if i use VTK6.10 or VTK5.80 with the same code. I have no way to this problem, can someone help me? -------------- next part -------------- An HTML attachment was scrubbed... URL: From rahulsoni at immt.res.in Sun May 10 07:08:34 2015 From: rahulsoni at immt.res.in (Rahul Kumar Soni) Date: Sun, 10 May 2015 16:38:34 +0530 Subject: [vtkusers] Compiling vtk with icc Message-ID: Hello everyone I had a hard time in trying to compile VTK in SUSE-HPC cluster. When I do ccmake it always attempt to do everything with gcc compiler. I think the instructions are governed from the CMakeLists.txt file. But the cluster is having icc compiler. Is there anyway to compile it with the icc. -- Sincerely Rahul Kumar Soni Scientist, Institute of Minerals & Materials Technology Council of Scientific & Industrial Research, Govt. of India -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun May 10 16:34:35 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 10 May 2015 14:34:35 -0600 Subject: [vtkusers] Compiling vtk with icc In-Reply-To: References: Message-ID: Hi Rahul, Probably the easiest way to choose a compiler is by setting environment variables before running ccmake: export CC=icc export CXX=icpc When changing compilers, it is best to delete your CMakeCache.txt file and the entire build directory. - David On Sun, May 10, 2015 at 5:08 AM, Rahul Kumar Soni wrote: > Hello everyone > > I had a hard time in trying to compile VTK in SUSE-HPC cluster. When I do > ccmake it always attempt to do everything with gcc compiler. I think the > instructions are governed from the CMakeLists.txt file. But the cluster is > having icc compiler. Is there anyway to compile it with the icc. > -- > Sincerely > > Rahul Kumar Soni > Scientist, Institute of Minerals & Materials Technology > Council of Scientific & Industrial Research, Govt. of India > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakota_63124 at yahoo.com Sun May 10 19:59:33 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Sun, 10 May 2015 16:59:33 -0700 (MST) Subject: [vtkusers] How to display contours on a quad polygon from Java Message-ID: <1431302373078-5731870.post@n5.nabble.com> I am trying to learn how to create a contour map on a quadrilateral polygon from a Java application using VTK 6.2 and Java 8. The code below has been added to the standard vtkDemo application (I can supply the complete application if desired). The result is a cube that is solid blue instead of having a contour pattern based on the scalar values assigned to the vertices of the cube. I am probably doing something wrong, but this code is based on other similar examples I have found. Does anyone have suggestions about what might be wrong? Thanks, Kent private void createCube() { float[] points = { 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f }; int[] seq = { 4,0,1,2,3, 4,4,5,6,7, 4,8,9,10,11, 4,12,13,14,15, }; double[] faceScalars = { 1.0f, 2.0f, 3.0f, 2.0f, 2.0f, 4.0f, 5.0f, 3.0f, 4.0f, 4.0f, 5.0f, 5.0f, 4.0f, 1.0f, 2.0f, 5.0f }; vtkPolyData poly = new vtkPolyData(); vtkDoubleArray scalarData = new vtkDoubleArray(); scalarData.SetJavaArray(faceScalars); vtkPoints vtkPoints = new vtkPoints(); vtkFloatArray d = new vtkFloatArray(); d.SetJavaArray(points); d.SetNumberOfComponents(3); vtkPoints.SetData(d); poly.SetPoints(vtkPoints); poly.GetPointData().SetScalars(scalarData); vtkCellArray vtkCells = new vtkCellArray(); vtkIdTypeArray array = new vtkIdTypeArray(); vtkIntArray intArray = new vtkIntArray(); intArray.SetJavaArray(seq); array.DeepCopy(intArray); vtkCells.SetCells(seq.length, array); poly.SetPolys(vtkCells); cubeActor = new vtkActor(); vtkPolyDataMapper cubeMapper = new vtkPolyDataMapper(); cubeMapper.SetInputData(poly); cubeActor.SetMapper(cubeMapper); // set up contours vtkContourFilter contourFilter = new vtkContourFilter(); contourFilter.GenerateValues(10,1.0,5.0); contourFilter.SetInputData(poly); vtkPolyDataMapper contourMapper = new vtkPolyDataMapper(); contourMapper.SetInputData(contourFilter.GetOutput()); vtkLookupTable lut = createColorTable(10,1.0f,5.0f); contourMapper.SetLookupTable(lut); contourActor = new vtkActor(); contourActor.SetMapper(contourMapper); contourActor.VisibilityOn(); renWin.GetRenderer().AddActor(cubeActor); renWin.GetRenderer().AddActor(contourActor); } private vtkLookupTable createColorTable(int levels, float min, float max) { vtkLookupTable colorTable = new vtkLookupTable(); // original color table // Color[] contourColorTable = initColors(levels,min,max); colorTable.SetNumberOfColors(levels); for(int i=0; i Hello everyone, Has anyone done or is it possible to annotate an existing OpenGL widget ( already created and which has a context) with a VTKChart - ie: VTKChartXY ? Basically I have an opengl context already and would like an annotated plot inside it. I was wondering if its possible ? Thank you. Ram -------------- next part -------------- An HTML attachment was scrubbed... URL: From ram at centroidpic.com Mon May 11 02:17:21 2015 From: ram at centroidpic.com (Ram Sampath) Date: Sun, 10 May 2015 23:17:21 -0700 Subject: [vtkusers] VTKCharts - Annotated inside QGLWidget In-Reply-To: References: Message-ID: Hello, Sorry just to add to the question, would it be possible at all to add any kind of 2D annotations (text etc) inside an already existing opengl context and application. If so, could you kindly point me to an example. ? Thanks Ram. On Sun, May 10, 2015 at 10:30 PM, Ram Sampath wrote: > > Hello everyone, > > Has anyone done or is it possible to annotate an existing OpenGL widget ( > already created and which has a context) with a VTKChart - ie: VTKChartXY ? > > Basically I have an opengl context already and would like an annotated > plot inside it. I was wondering if its possible ? > > Thank you. > > Ram > -------------- next part -------------- An HTML attachment was scrubbed... URL: From artem.paraview at googlemail.com Mon May 11 06:47:27 2015 From: artem.paraview at googlemail.com (Artem Babayan) Date: Mon, 11 May 2015 11:47:27 +0100 Subject: [vtkusers] Triangulating 'vertical' polygon with Delaunay2D? Message-ID: Hello, I have 1) vtk_poijnts -- set of 3D points (vtkPoints object) located within the computational 3D box. 2) poly_1 -- std::vector -- connected subset of points from 1) representing non-convex polygon on the side of computational box. E.g. in XZ plane. 3) poly_hole_1, poly_hole_2 -- 2 subsets of points from 1) each representing possibly non-convex hole in poly_1 from 2). How am I visualise it with VTK? I assume that as I have holes in polygon the only choice of I have is to use vtkDelaunay2D? vtkDelaunay2D apparently uses all points from vtk_points for triangulization, while I need only points from poly_1, poly_hole_1 and poly_hole_2 ? I need to tell somehow vtkDelaunay2D than I want to tesselate in XZ plane rather than in XY plane? Thank you Artem -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.lasson at institutmaupertuis.fr Mon May 11 08:11:44 2015 From: francois.lasson at institutmaupertuis.fr (Francois Lasson) Date: Mon, 11 May 2015 14:11:44 +0200 Subject: [vtkusers] Polydata dilation Message-ID: <55509C80.7080503@institutmaupertuis.fr> Hello, I'm currently working on a project in which I need to dilate a polydata. To do that, I use vtkImplicitModeller + vtkContourFilter or vtkImplicitModeller + vtkMarchingCube. My problem is that I don't want a "donut", I just want to dilate the upper side of my polydata. I'll try to explain myself with two images (attached files) Could you explain me the best way to resolve my problem? Thank you, Francois -------------- next part -------------- A non-text attachment was scrubbed... Name: I_have.png Type: image/png Size: 67213 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: I_want.png Type: image/png Size: 44445 bytes Desc: not available URL: From david.gobbi at gmail.com Mon May 11 08:36:14 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 11 May 2015 06:36:14 -0600 Subject: [vtkusers] Triangulating 'vertical' polygon with Delaunay2D? In-Reply-To: References: Message-ID: Hi Artem, You can try using vtkContourTriangulator, it only uses the connected points for the triangulation and it works in any orientation: http://www.vtk.org/doc/nightly/html/classvtkContourTriangulator.html#details Delaunay2D also has a method for working in planes other than the XY plane: calling the method SetProjectionPlaneMode(VTK_BEST_FITTING_PLANE) should work, if all of your input points are in the same plane. - David On Mon, May 11, 2015 at 4:47 AM, Artem Babayan < artem.paraview at googlemail.com> wrote: > Hello, > > I have > > 1) vtk_poijnts -- set of 3D points (vtkPoints object) located within the > computational 3D box. > 2) poly_1 -- std::vector -- connected subset of points from 1) > representing non-convex polygon on the side of computational box. E.g. in > XZ plane. > 3) poly_hole_1, poly_hole_2 -- 2 subsets of points from 1) each > representing possibly non-convex hole in poly_1 from 2). > > How am I visualise it with VTK? > > I assume that as I have holes in polygon the only choice of I have is to > use vtkDelaunay2D? > > vtkDelaunay2D apparently uses all points from vtk_points for > triangulization, while I need only points from poly_1, poly_hole_1 and > poly_hole_2 ? > > I need to tell somehow vtkDelaunay2D than I want to tesselate in XZ plane > rather than in XY plane? > > Thank you > Artem > -------------- next part -------------- An HTML attachment was scrubbed... URL: From davis.vigneault at gmail.com Mon May 11 09:11:25 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Mon, 11 May 2015 06:11:25 -0700 (MST) Subject: [vtkusers] vtkDICOMImageReader origin Message-ID: <1431349885887-5731878.post@n5.nabble.com> All-- I'm having a problem where vtkDICOMImageReader is (incorrectly) giving an origin of zero. I have two programs (code below) to read in the image and print out the dimension/spacing/origin--the first with ITK, the second with VTK. The two programs give the same dimension and spacing, but the ITK program gives a nonzero origin and the VTK program gives a zero origin. The two programs are reading the same dataset. Am I misusing the vtkDICOMImageReader somehow? Has anyone come across this before? Best, and thanks, --Davis // // VTK // #include "vtkSmartPointer.h" #include "vtkDICOMImageReader.h" #include "vtkImageData.h" int main(int argc, char ** argv) { vtkSmartPointer< vtkDICOMImageReader > reader = vtkSmartPointer< vtkDICOMImageReader >::New(); reader->SetDirectoryName("../../data/ct_heart"); reader->Update(); vtkSmartPointer data = vtkSmartPointer::New(); data = reader->GetOutput(); int dims[3]; data->GetDimensions(dims); double spacing[3]; data->GetSpacing(spacing); double origin[3]; data->GetOrigin(origin); std::cout << "Dimensions: [" << dims[0] << ", " << dims[1] << ", " << dims[2] << "]" << std::endl; std::cout << "Spacing: [" << spacing[0] << ", " << spacing[1] << ", " << spacing[2] << "]" << std::endl; std::cout << "Origin: [" << origin[0] << ", " << origin[1] << ", " << origin[2] << "]" << std::endl; // Output: // Dimensions: [512, 512, 120] // Spacing: [0.332, 0.332, 1] // Origin: [0, 0, 0] return EXIT_SUCCESS; } // // ITK // #include "itkImage.h" #include "itkGDCMImageIO.h" #include "itkGDCMSeriesFileNames.h" #include "itkImageSeriesReader.h" typedef itk::Image< short, 3 > TInImage; typedef itk::GDCMImageIO TImageIO; typedef itk::GDCMSeriesFileNames TImageNames; typedef itk::ImageSeriesReader< TInImage > TImageReader; int main( int argc, char* argv[] ) { TImageIO::Pointer dicomIO = TImageIO::New(); TImageNames::Pointer names = TImageNames::New(); names->SetInputDirectory( "../../data/ct_heart" ); TImageReader::Pointer imageReader = TImageReader::New(); imageReader->SetImageIO( dicomIO ); imageReader->SetFileNames( names->GetInputFileNames() ); imageReader->Update(); std::cout << "Dimensions: " << imageReader->GetOutput()->GetLargestPossibleRegion().GetSize() << std::endl; std::cout << "Spacing: " << imageReader->GetOutput()->GetSpacing() << std::endl; std::cout << "Origin: " << imageReader->GetOutput()->GetOrigin() << std::endl; // Output: // Dimensions: [512, 512, 120] // Spacing: [0.332, 0.332, 1] // Origin: [-71.084, -93.584, 1562.5] return EXIT_SUCCESS; } -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDICOMImageReader-origin-tp5731878.html Sent from the VTK - Users mailing list archive at Nabble.com. From dhoppes at mbfbioscience.com Mon May 11 09:45:54 2015 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Mon, 11 May 2015 13:45:54 +0000 Subject: [vtkusers] build an half-oval based on a set of points Message-ID: <46CB11F12B9DC24D860D4082451B318A14F55BA2@exchange3.microbrightfield.com> Hey all, Not sure if there is a way to do this. Is there a way to build half of an oval based on a set of points? I have a wide coin-shaped object. Rather than the flat ends, I would like it to be more of an oval. I know the points around the coin edge and point that represents the distance out. Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 11 10:32:38 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 11 May 2015 08:32:38 -0600 Subject: [vtkusers] vtkDICOMImageReader origin In-Reply-To: <1431349885887-5731878.post@n5.nabble.com> References: <1431349885887-5731878.post@n5.nabble.com> Message-ID: Hi Davis, The vtkDICOMImageReader doesn't set the Origin. In any case, the VTK "Origin" and the ITK "Origin" have slightly different definitions, because in ITK the origin takes the image orientation into account. The best you can do is call GetImagePositionPatient() and GetImageOrientationPatient() on the reader, and use the results to position and orient the image. I've written my own dicom reader (https://github.com/dgobbi/vtk-dicom) that provides a GetPatientMatrix() method to return the position/orientation as a vtkMatrix4x4. - David On Mon, May 11, 2015 at 7:11 AM, DVigneault wrote: > All-- > > I'm having a problem where vtkDICOMImageReader is (incorrectly) giving an > origin of zero. I have two programs (code below) to read in the image and > print out the dimension/spacing/origin--the first with ITK, the second with > VTK. The two programs give the same dimension and spacing, but the ITK > program gives a nonzero origin and the VTK program gives a zero origin. The > two programs are reading the same dataset. Am I misusing the > vtkDICOMImageReader somehow? Has anyone come across this before? > > Best, and thanks, > > --Davis > > // > // VTK > // > > #include "vtkSmartPointer.h" > #include "vtkDICOMImageReader.h" > #include "vtkImageData.h" > > int main(int argc, char ** argv) > { > > vtkSmartPointer< vtkDICOMImageReader > reader = > vtkSmartPointer< vtkDICOMImageReader >::New(); > reader->SetDirectoryName("../../data/ct_heart"); > reader->Update(); > > vtkSmartPointer data = > vtkSmartPointer::New(); > data = reader->GetOutput(); > > int dims[3]; > data->GetDimensions(dims); > > double spacing[3]; > data->GetSpacing(spacing); > > double origin[3]; > data->GetOrigin(origin); > > std::cout << "Dimensions: [" << dims[0] << ", " << dims[1] << ", " << > dims[2] << "]" << std::endl; > std::cout << "Spacing: [" << spacing[0] << ", " << spacing[1] << ", " << > spacing[2] << "]" << std::endl; > std::cout << "Origin: [" << origin[0] << ", " << origin[1] << ", " << > origin[2] << "]" << std::endl; > > // Output: > // Dimensions: [512, 512, 120] > // Spacing: [0.332, 0.332, 1] > // Origin: [0, 0, 0] > > > return EXIT_SUCCESS; > } > > // > // ITK > // > > #include "itkImage.h" > #include "itkGDCMImageIO.h" > #include "itkGDCMSeriesFileNames.h" > #include "itkImageSeriesReader.h" > > typedef itk::Image< short, 3 > TInImage; > typedef itk::GDCMImageIO TImageIO; > typedef itk::GDCMSeriesFileNames TImageNames; > typedef itk::ImageSeriesReader< TInImage > TImageReader; > > int main( int argc, char* argv[] ) > { > > TImageIO::Pointer dicomIO = TImageIO::New(); > > TImageNames::Pointer names = TImageNames::New(); > names->SetInputDirectory( "../../data/ct_heart" ); > > TImageReader::Pointer imageReader = TImageReader::New(); > imageReader->SetImageIO( dicomIO ); > imageReader->SetFileNames( names->GetInputFileNames() ); > imageReader->Update(); > > std::cout << "Dimensions: " << > imageReader->GetOutput()->GetLargestPossibleRegion().GetSize() << > std::endl; > std::cout << "Spacing: " << imageReader->GetOutput()->GetSpacing() << > std::endl; > std::cout << "Origin: " << imageReader->GetOutput()->GetOrigin() << > std::endl; > > // Output: > // Dimensions: [512, 512, 120] > // Spacing: [0.332, 0.332, 1] > // Origin: [-71.084, -93.584, 1562.5] > > return EXIT_SUCCESS; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon May 11 11:04:51 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 11 May 2015 11:04:51 -0400 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: References: <20150508214524.GB15229@megas.kitware.com> Message-ID: <20150511150451.GA10573@megas.kitware.com> On Sat, May 09, 2015 at 01:03:08 +0300, Pavel Kalinnikov wrote: > As I said before, I've build and run the "Examples/GUI/Qt/Events" example > from the VTK-6.2.0 distribution. But I think we can find even simpler test > which reproduces the problem. I've reproduced the problem with the old OpenGL backend; it crashes with OpenGL2. It seems to be related to depth peeling (something we apparently don't test all that well) not working properly with the context Qt5 is using. I've asked Marcus to look at it (since he's much more familiar with the Qt/OpenGL codepaths than I). Thanks for the report. --Ben From davis.vigneault at gmail.com Mon May 11 11:23:18 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Mon, 11 May 2015 08:23:18 -0700 (MST) Subject: [vtkusers] vtkDICOMImageReader origin In-Reply-To: References: <1431349885887-5731878.post@n5.nabble.com> Message-ID: <1431357798723-5731883.post@n5.nabble.com> Thanks very much for your reply, David! I will take a look at your class. As a side note, when I read in the same dataset as an ITK image and then use itkImageToVTKImageFilter to convert it, I find that the ITK and VTK origins agree. However, I take it from what you've said that this is only true because the patient orientation in this patient is the identity matrix. Best, and thanks again, --Davis -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDICOMImageReader-origin-tp5731878p5731883.html Sent from the VTK - Users mailing list archive at Nabble.com. From berk.geveci at kitware.com Mon May 11 21:02:10 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 11 May 2015 21:02:10 -0400 Subject: [vtkusers] IEEE Scientific Visualization Contest Message-ID: Hi folks, We invite you to participate in the 2015 IEEE Scientific Visualization Contest. This year's contest targets data from cosmology research that studies the formation of structure in the Universe. Participants are challenged to create a comprehensive set of analysis and visualization capabilities that enable domain experts to gain deeper insight into the formation of various structures in the Universe and better understanding of observations from next generation telescopes. Besides a number of interesting incentives, the contest winners will be presenting their work at IEEE VIS 2015 and they will get a chance to publish their results as a full, peer-reviewed IEEE CG&A article. Find out more at http://sciviscontest.ieeevis.org/2015/ Best, -berk -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.hadimogullari at netcad.com.tr Tue May 12 06:10:01 2015 From: ali.hadimogullari at netcad.com.tr (alihadim) Date: Tue, 12 May 2015 03:10:01 -0700 (MST) Subject: [vtkusers] vtk CellType Tetra and PointId Releations Message-ID: <1431425401578-5731888.post@n5.nabble.com> Hi All, I have q question. I'm drawint UnstructuredGrid2 data and cell type vtktetra. Is it important cell point Ids? (is it any logic?) -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-CellType-Tetra-and-PointId-Releations-tp5731888.html Sent from the VTK - Users mailing list archive at Nabble.com. From ale.nonis at libero.it Tue May 12 09:23:31 2015 From: ale.nonis at libero.it (ale.nonis at libero.it) Date: Tue, 12 May 2015 15:23:31 +0200 (CEST) Subject: [vtkusers] VTK and QT Message-ID: <53967597.3911091431437011307.JavaMail.httpd@webmail-04.iol.local> Hi,my question is very simple; VTK 5.10.1 and QT 5.4.32 are compatible? Thanks.Ale -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Tue May 12 09:52:10 2015 From: drescherjm at gmail.com (John Drescher) Date: Tue, 12 May 2015 09:52:10 -0400 Subject: [vtkusers] VTK and QT In-Reply-To: <53967597.3911091431437011307.JavaMail.httpd@webmail-04.iol.local> References: <53967597.3911091431437011307.JavaMail.httpd@webmail-04.iol.local> Message-ID: > my question is very simple; VTK 5.10.1 and QT 5.4.32 are compatible? > No. You need Qt-4.8 or lower for vtk-5.10. John From ali.hadimogullari at netcad.com.tr Tue May 12 10:15:19 2015 From: ali.hadimogullari at netcad.com.tr (alihadim) Date: Tue, 12 May 2015 07:15:19 -0700 (MST) Subject: [vtkusers] Vtk.VtkPoints InsertNextPoint For Celltype is Tetra Message-ID: <1431440119273-5731893.post@n5.nabble.com> hi all, I created vtk.vtkUnstructuredGrid data. This picture is, *I'm writing code for data copy. and ouput picture is like under line. Can you help me for situation?;* vtk.vtkUnstructuredGrid unstructuredGrid1 = new vtk.vtkUnstructuredGrid(); vtk.vtkCellArray cellArray = new vtk.vtkCellArray(); vtk.vtkPoints points = new vtk.vtkPoints(); int counter = 0; foreach (INetcad3DCell Cell in Cells) { counter = 0; vtk.vtkTetra tetra = new vtk.vtkTetra(); foreach (var item in Cell.Points) { int ids = points.InsertNextPoint(item.X, item.Y, item.Z); tetra.GetPointIds().SetId(counter, ids); unstructuredGrid1.SetPoints(points); counter++; } cellArray.InsertNextCell(tetra); unstructuredGrid1.SetCells(10, cellArray); } -- View this message in context: http://vtk.1045678.n5.nabble.com/Vtk-VtkPoints-InsertNextPoint-For-Celltype-is-Tetra-tp5731893.html Sent from the VTK - Users mailing list archive at Nabble.com. From karasevpa at gmail.com Tue May 12 20:24:33 2015 From: karasevpa at gmail.com (Peter Karasev) Date: Tue, 12 May 2015 17:24:33 -0700 Subject: [vtkusers] vtkKdTreePointLocator + updating polydata ? Message-ID: If vtkPolyData used as input to a vtkKdTreePointLocator is updated, does the result of querying for nearest points in the locator become stale until BuildLocator is re-executed explicitly? Of course if the point data totally gets shuffled, that makes sense... but is there a way to efficiently update the KdTree structure in-place if the transformation on the points is just scale + offset per {x,y,z} coordinate? -- _______________ Peter Karasev karasevpa at gmail.com From artem.paraview at googlemail.com Wed May 13 08:41:16 2015 From: artem.paraview at googlemail.com (Artem Babayan) Date: Wed, 13 May 2015 13:41:16 +0100 Subject: [vtkusers] Triangulating 'vertical' polygon with Delaunay2D? In-Reply-To: References: Message-ID: Dear David, Thank you for your reply. Unfortunately I am apparently doing something wrong setting up the contour triangulation. For very simple 1-polygon example I have 1 polygon p_1 defined over subset of points vtk_points. I first create vtkPolygon, then vtkCellArray, then vtkPolyData, feed it to vtkContourTriangulator and call Update. The result is apparently empty vtkCellArray? vtkSmartPointer poly = vtkSmartPointer::New(); for(size_t v = 0; v < p_1.size(); ++v) { poly->GetPointIds()->InsertNextId(p_1[v]); } vtkSmartPointer cell_array = vtkSmartPointer::New(); cell_array->InsertNextCell(poly); vtkSmartPointer boundary = vtkSmartPointer::New(); boundary->SetPoints(vtk_points); boundary->SetPolys(cell_array); vtkSmartPointer tri_filter = vtkSmartPointer::New(); tri_filter->SetInputData(boundary); tri_filter->Update(); cout << "After triangulation I got " << tri_filter->GetOutput()->GetNumberOfCells() << " cells\n"; Could you tell me what can be possibly wrong here? On 11 May 2015 at 13:36, David Gobbi wrote: > Hi Artem, > > You can try using vtkContourTriangulator, it only uses the connected > points for the triangulation and it works in any orientation: > > http://www.vtk.org/doc/nightly/html/classvtkContourTriangulator.html#details > > Delaunay2D also has a method for working in planes other than the XY > plane: calling the method SetProjectionPlaneMode(VTK_BEST_FITTING_PLANE) > should work, if all of your input points are in the same plane. > > - David > > > On Mon, May 11, 2015 at 4:47 AM, Artem Babayan < > artem.paraview at googlemail.com> wrote: > >> Hello, >> >> I have >> >> 1) vtk_poijnts -- set of 3D points (vtkPoints object) located within the >> computational 3D box. >> 2) poly_1 -- std::vector -- connected subset of points from 1) >> representing non-convex polygon on the side of computational box. E.g. in >> XZ plane. >> 3) poly_hole_1, poly_hole_2 -- 2 subsets of points from 1) each >> representing possibly non-convex hole in poly_1 from 2). >> >> How am I visualise it with VTK? >> >> I assume that as I have holes in polygon the only choice of I have is to >> use vtkDelaunay2D? >> >> vtkDelaunay2D apparently uses all points from vtk_points for >> triangulization, while I need only points from poly_1, poly_hole_1 and >> poly_hole_2 ? >> >> I need to tell somehow vtkDelaunay2D than I want to tesselate in XZ plane >> rather than in XY plane? >> >> Thank you >> Artem >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed May 13 08:45:11 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 13 May 2015 06:45:11 -0600 Subject: [vtkusers] Triangulating 'vertical' polygon with Delaunay2D? In-Reply-To: References: Message-ID: Hi Artem, The vtkContourTriangulator requires a vtkPolyLine as input, rather than a polygon. - David On Wed, May 13, 2015 at 6:41 AM, Artem Babayan < artem.paraview at googlemail.com> wrote: > Dear David, > > Thank you for your reply. Unfortunately I am apparently doing something > wrong setting up the contour triangulation. > > For very simple 1-polygon example I have 1 polygon p_1 defined over subset > of points vtk_points. I first create vtkPolygon, then vtkCellArray, then > vtkPolyData, feed it to vtkContourTriangulator and call Update. The result > is apparently empty vtkCellArray? > > vtkSmartPointer poly = > vtkSmartPointer::New(); > for(size_t v = 0; v < p_1.size(); ++v) > { > poly->GetPointIds()->InsertNextId(p_1[v]); > } > > vtkSmartPointer cell_array = > vtkSmartPointer::New(); > cell_array->InsertNextCell(poly); > > vtkSmartPointer boundary = > vtkSmartPointer::New(); > boundary->SetPoints(vtk_points); > boundary->SetPolys(cell_array); > > vtkSmartPointer tri_filter = > vtkSmartPointer::New(); > tri_filter->SetInputData(boundary); > tri_filter->Update(); > cout << "After triangulation I got " << > tri_filter->GetOutput()->GetNumberOfCells() << " cells\n"; > > Could you tell me what can be possibly wrong here? > > > On 11 May 2015 at 13:36, David Gobbi wrote: > >> Hi Artem, >> >> You can try using vtkContourTriangulator, it only uses the connected >> points for the triangulation and it works in any orientation: >> >> http://www.vtk.org/doc/nightly/html/classvtkContourTriangulator.html#details >> >> Delaunay2D also has a method for working in planes other than the XY >> plane: calling the method SetProjectionPlaneMode(VTK_BEST_FITTING_PLANE) >> should work, if all of your input points are in the same plane. >> >> - David >> >> >> On Mon, May 11, 2015 at 4:47 AM, Artem Babayan < >> artem.paraview at googlemail.com> wrote: >> >>> Hello, >>> >>> I have >>> >>> 1) vtk_poijnts -- set of 3D points (vtkPoints object) located within the >>> computational 3D box. >>> 2) poly_1 -- std::vector -- connected subset of points from 1) >>> representing non-convex polygon on the side of computational box. E.g. in >>> XZ plane. >>> 3) poly_hole_1, poly_hole_2 -- 2 subsets of points from 1) each >>> representing possibly non-convex hole in poly_1 from 2). >>> >>> How am I visualise it with VTK? >>> >>> I assume that as I have holes in polygon the only choice of I have is to >>> use vtkDelaunay2D? >>> >>> vtkDelaunay2D apparently uses all points from vtk_points for >>> triangulization, while I need only points from poly_1, poly_hole_1 and >>> poly_hole_2 ? >>> >>> I need to tell somehow vtkDelaunay2D than I want to tesselate in XZ >>> plane rather than in XY plane? >>> >>> Thank you >>> Artem >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.melis at surfsara.nl Wed May 13 08:48:08 2015 From: paul.melis at surfsara.nl (Paul Melis) Date: Wed, 13 May 2015 14:48:08 +0200 Subject: [vtkusers] Offscreen rendering (6.2.0+ OpenGL2 backend), empty image depending on interactor Message-ID: <55534808.9090601@surfsara.nl> Hi, First off, the new OpenGL2 backend is great, keep up the good work! The attached offscreen rendering test produces an empty image when using the generic render window interactor, with the regular window interactor the saved image is correct. This only seems to happen for 6.2.0 when using the OpenGL2 backend. Does the generic RWI need some kind of extra initialization? Regards, Paul -- Paul Melis | Groepsleider & Adviseur Visualisatie | SURFsara | | Science Park 140 | 1098 XG Amsterdam | | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | -------------- next part -------------- A non-text attachment was scrubbed... Name: t_offscreen_w2i.py Type: text/x-python Size: 1122 bytes Desc: not available URL: From paul.melis at surfsara.nl Wed May 13 09:00:34 2015 From: paul.melis at surfsara.nl (Paul Melis) Date: Wed, 13 May 2015 15:00:34 +0200 Subject: [vtkusers] [EXTERNAL] Efficiently visualizing duplicate data in biological model In-Reply-To: References: <554211F7.2060605@surfsara.nl> <55424156.9030607@surfsara.nl> Message-ID: <55534AF2.6010107@surfsara.nl> Hi Sankhesh, On 08-05-15 06:32, Sankhesh Jhaveri wrote: > You could create a three component point array of colors on the > polydata. The colors can be mapped from a lookup table based on which > biological cell the pointId belongs to. You can alter the lookup table > based on the variable being color-mapped. Thanks for the tip. What you are suggesting is basically doing manual color-mapping, right? I.e. manually iterating over the polydata points, using the associated biological cell ID to set the point color (using a LUT) in a new separate color array, which then gets displayed. Interesting, hadn't thought of that option. Regards, Paul -- Paul Melis | Groepsleider & Adviseur Visualisatie | SURFsara | | Science Park 140 | 1098 XG Amsterdam | | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl | From axp5530 at psu.edu Wed May 13 12:40:31 2015 From: axp5530 at psu.edu (Alex Pletzer) Date: Wed, 13 May 2015 12:40:31 -0400 Subject: [vtkusers] building vtk without opengl and rendering Message-ID: <55537E7F.4010403@psu.edu> Hi VTK'ians, Is it possible to build VTK without rendering? On a platform that does not have OpenGL? I'm working on a project which uses VTK classes but I'm not producing any picture. The code should run in the cloud, which does not have OpenGL. I have set: VTK_Group_Rendering *OFF When I configure, I get CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindOpenGL.cmake:161 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) Rendering/OpenGL/CMakeLists.txt:196 (find_package) Thanks in advance! --Alex From draktharrblorf at gmail.com Wed May 13 14:59:57 2015 From: draktharrblorf at gmail.com (Drak) Date: Wed, 13 May 2015 11:59:57 -0700 (MST) Subject: [vtkusers] Can I have 2 set of points with vtkGlyph3d? Message-ID: <1431543597848-5731902.post@n5.nabble.com> Let's say I have 2 sets of points (polydata1 and polydata2), one that I want to visualize with arrowsSource and the other with cubeSource. What I've been trying to do is the following: glyphSource = vtkSmartPointer::New(); glyphSource2 = vtkSmartPointer::New(); glyph3D = vtkSmartPointer::New(); glyph3D->SetIndexModeToOff(); glyph3D->SetSourceConnection(0, glyphSource->GetOutputPort()); glyph3D->SetInputData(0, polydata); // FIRST SET OF POINTS glyph3D->SetInputConnection(1, glyphSource2->GetOutputPort()); glyph3D->SetInputData(1, polydata2); // SECOND SET OF POINTS mapper = vtkSmartPointer::New(); mapper->SetInputConnection(glyph3D->GetOutputPort()); actor = vtkActor::New(); actor->SetMapper(mapper); Unfortunately, nothing appears. :( Is there something I've done wrong? The documentation for having several ports/connection really isn't clear and I can't seem to find the problem/solution. Again, I have no problem with one set of points, but if I have more than one set of points, the function setDatainput (int, polydata) doesn't seem to work as intended. -- View this message in context: http://vtk.1045678.n5.nabble.com/Can-I-have-2-set-of-points-with-vtkGlyph3d-tp5731902.html Sent from the VTK - Users mailing list archive at Nabble.com. From chasank at gmail.com Wed May 13 18:03:52 2015 From: chasank at gmail.com (chasank) Date: Wed, 13 May 2015 15:03:52 -0700 (MST) Subject: [vtkusers] Building QT, VTK and ITK on windows 7 (x64) Message-ID: <1431554632090-5731904.post@n5.nabble.com> Hi folks and beginners, I've written a step by step tutorial for building qt, vtk and itk from source 64 bit on a windows os. As I stated at my blog; versions may be a little outdated but as I tested this tutorial for myself for many times. I may say they are working together like a charm. You may replicate this tutorial to newer versions of these sdks. I have not tested with newer versions but approximately process should be same. Note that for building projects I did not use CMAKE. I have handled it with QT's pro files. Blog link: http://blog.chasank.com/building-qt-vtk-and-itk-on-windows-7-x64/ Best regards. May the force be with you. -- View this message in context: http://vtk.1045678.n5.nabble.com/Building-QT-VTK-and-ITK-on-windows-7-x64-tp5731904.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Wed May 13 19:29:22 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 13 May 2015 19:29:22 -0400 Subject: [vtkusers] building vtk without opengl and rendering In-Reply-To: <55537E7F.4010403@psu.edu> References: <55537E7F.4010403@psu.edu> Message-ID: Are tests off? Most of the tests are end to end ones that render some image and compare it against a baseline. This could be why Rendering/OpenGL is being built. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, May 13, 2015 at 12:40 PM, Alex Pletzer wrote: > Hi VTK'ians, > > Is it possible to build VTK without rendering? On a platform that does not > have OpenGL? I'm working on a project which uses VTK classes but I'm not > producing any picture. The code should run in the cloud, which does not > have OpenGL. > > I have set: > > VTK_Group_Rendering *OFF > > When I configure, I get > > CMake Error at > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): > Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) > Call Stack (most recent call first): > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 > (_FPHSA_FAILURE_MESSAGE) > /usr/share/cmake/Modules/FindOpenGL.cmake:161 > (FIND_PACKAGE_HANDLE_STANDARD_ARGS) > Rendering/OpenGL/CMakeLists.txt:196 (find_package) > > Thanks in advance! > > --Alex > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 hedman.filip at gmail.com Wed May 13 20:16:09 2015 From: hedman.filip at gmail.com (vertan) Date: Wed, 13 May 2015 17:16:09 -0700 (MST) Subject: [vtkusers] Coloring "local" elevation Message-ID: <1431562569689-5731906.post@n5.nabble.com> Hi! Imagine this scenario; I have some 3D data from the real world that I want to color according to elevation. There is a flat area on one end, with some kind of small crater. On the other side, there is a higher plateau that also has a crater. If I were to color this with a simple lookup table and vtkElevationFilter, I'd have a red color on the higher plateau and a blue color down on the lower, flat side. However, what I really want is to highlight the craters elevation only, and somehow "ignore" the height around them. I've seen terms like "local elevation" or "relative elevation" before, which sounds like something I want. So I might want to look at the local neighbours when comparing the elevation, rather than the whole global elevation of the 3D object. I've searched around through the VTK documentation, but being new to VTK, I haven't found anything that might suit my needs, so I'm hoping that someone here might have an idea! Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Coloring-local-elevation-tp5731906.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Wed May 13 20:41:49 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 13 May 2015 20:41:49 -0400 Subject: [vtkusers] Coloring "local" elevation In-Reply-To: <1431562569689-5731906.post@n5.nabble.com> References: <1431562569689-5731906.post@n5.nabble.com> Message-ID: One way would be to cut the craters out and render them independently with their own elevation filters. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, May 13, 2015 at 8:16 PM, vertan wrote: > Hi! > > Imagine this scenario; I have some 3D data from the real world that I want > to color according to elevation. There is a flat area on one end, with some > kind of small crater. On the other side, there is a higher plateau that > also > has a crater. If I were to color this with a simple lookup table and > vtkElevationFilter, I'd have a red color on the higher plateau and a blue > color down on the lower, flat side. > > However, what I really want is to highlight the craters elevation only, and > somehow "ignore" the height around them. I've seen terms like "local > elevation" or "relative elevation" before, which sounds like something I > want. So I might want to look at the local neighbours when comparing the > elevation, rather than the whole global elevation of the 3D object. > > I've searched around through the VTK documentation, but being new to VTK, I > haven't found anything that might suit my needs, so I'm hoping that someone > here might have an idea! > > Thanks > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Coloring-local-elevation-tp5731906.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From axp5530 at psu.edu Thu May 14 11:01:30 2015 From: axp5530 at psu.edu (Alex Pletzer) Date: Thu, 14 May 2015 11:01:30 -0400 Subject: [vtkusers] building vtk without opengl and rendering In-Reply-To: References: <55537E7F.4010403@psu.edu> Message-ID: <5554B8CA.7080602@psu.edu> Hi David, Yes, tests and examples are turned off. My settings are: BUILD_DOCUMENTATION OFF BUILD_EXAMPLES OFF BUILD_SHARED_LIBS ON BUILD_TESTING OFF BUILD_USER_DEFINED_LIBS OFF CMAKE_BUILD_TYPE Debug CMAKE_INSTALL_PREFIX /usr/local VTK_ANDROID_BUILD OFF VTK_EXTRA_COMPILER_WARNINGS OFF VTK_Group_Imaging OFF VTK_Group_MPI OFF VTK_Group_Qt OFF VTK_Group_Rendering OFF VTK_Group_StandAlone ON VTK_Group_Tk OFF VTK_Group_Views OFF VTK_Group_Web OFF VTK_IOS_BUILD OFF VTK_PYTHON_VERSION 2 VTK_RENDERING_BACKEND OpenGL VTK_SMP_IMPLEMENTATION_TYPE Sequential VTK_USE_LARGE_DATA OFF VTK_WRAP_JAVA OFF VTK_WRAP_PYTHON OFF VTK_WRAP_TCL OFF Thanks. --Alex On 05/13/2015 07:29 PM, David E DeMarle wrote: > Are tests off? > > Most of the tests are end to end ones that render some image and > compare it against a baseline. This could be why Rendering/OpenGL is > being built. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, May 13, 2015 at 12:40 PM, Alex Pletzer > wrote: > > Hi VTK'ians, > > Is it possible to build VTK without rendering? On a platform that > does not have OpenGL? I'm working on a project which uses VTK > classes but I'm not producing any picture. The code should run in > the cloud, which does not have OpenGL. > > I have set: > > VTK_Group_Rendering *OFF > > When I configure, I get > > CMake Error at > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 > (message): > Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY > OPENGL_INCLUDE_DIR) > Call Stack (most recent call first): > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 > (_FPHSA_FAILURE_MESSAGE) > /usr/share/cmake/Modules/FindOpenGL.cmake:161 > (FIND_PACKAGE_HANDLE_STANDARD_ARGS) > Rendering/OpenGL/CMakeLists.txt:196 (find_package) > > Thanks in advance! > > --Alex > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Alexander Pletzer (pletzer at psu.edu) Office 224G, Computer Building Institute of CyberScience The Pennsylvania State University cell: +1 609 799 7999 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu May 14 11:06:56 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 14 May 2015 11:06:56 -0400 Subject: [vtkusers] building vtk without opengl and rendering In-Reply-To: <5554B8CA.7080602@psu.edu> References: <55537E7F.4010403@psu.edu> <5554B8CA.7080602@psu.edu> Message-ID: In the past, I have done the following: VTK_BUILD_ALL_MODULES_FOR_TESTS:BOOL=OFF VTK_Group_Rendering:BOOL=OFF VTK_Group_StandAlone:BOOL=OFF then I enable the modules I need (e.g.) Module_vtkCommonCore:BOOL=ON Module_vtkFiltersGeneral:BOOL=ON On Thu, May 14, 2015 at 11:01 AM, Alex Pletzer wrote: > Hi David, > > Yes, tests and examples are turned off. My settings are: > > BUILD_DOCUMENTATION OFF > BUILD_EXAMPLES OFF > BUILD_SHARED_LIBS ON > BUILD_TESTING OFF > BUILD_USER_DEFINED_LIBS OFF > CMAKE_BUILD_TYPE Debug > CMAKE_INSTALL_PREFIX /usr/local > VTK_ANDROID_BUILD OFF > VTK_EXTRA_COMPILER_WARNINGS OFF > VTK_Group_Imaging OFF > VTK_Group_MPI OFF > VTK_Group_Qt OFF > VTK_Group_Rendering OFF > VTK_Group_StandAlone ON > VTK_Group_Tk OFF > VTK_Group_Views OFF > VTK_Group_Web OFF > VTK_IOS_BUILD OFF > VTK_PYTHON_VERSION 2 > VTK_RENDERING_BACKEND OpenGL > VTK_SMP_IMPLEMENTATION_TYPE Sequential > VTK_USE_LARGE_DATA OFF > VTK_WRAP_JAVA OFF > VTK_WRAP_PYTHON OFF > VTK_WRAP_TCL OFF > > Thanks. > > --Alex > > > On 05/13/2015 07:29 PM, David E DeMarle wrote: > > Are tests off? > > Most of the tests are end to end ones that render some image and compare it > against a baseline. This could be why Rendering/OpenGL is being built. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, May 13, 2015 at 12:40 PM, Alex Pletzer wrote: >> >> Hi VTK'ians, >> >> Is it possible to build VTK without rendering? On a platform that does not >> have OpenGL? I'm working on a project which uses VTK classes but I'm not >> producing any picture. The code should run in the cloud, which does not have >> OpenGL. >> >> I have set: >> >> VTK_Group_Rendering *OFF >> >> When I configure, I get >> >> CMake Error at >> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): >> Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) >> Call Stack (most recent call first): >> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 >> (_FPHSA_FAILURE_MESSAGE) >> /usr/share/cmake/Modules/FindOpenGL.cmake:161 >> (FIND_PACKAGE_HANDLE_STANDARD_ARGS) >> Rendering/OpenGL/CMakeLists.txt:196 (find_package) >> >> Thanks in advance! >> >> --Alex >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Alexander Pletzer (pletzer at psu.edu) > Office 224G, Computer Building > Institute of CyberScience > The Pennsylvania State University > cell: +1 609 799 7999 > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 marcus.hanwell at kitware.com Thu May 14 11:37:24 2015 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Thu, 14 May 2015 11:37:24 -0400 Subject: [vtkusers] building vtk without opengl and rendering In-Reply-To: References: <55537E7F.4010403@psu.edu> <5554B8CA.7080602@psu.edu> Message-ID: You should be able to leave StandAlone ON, Rendering OFF (that was the point of the rendering group, to separate stand alone from modules requiring OpenGL). It is possible something crept in, I haven't looked into it yet, but if StandAlone currently requires OpenGL we should fix that, and try to add a dashboard that tests this. On Thu, May 14, 2015 at 11:06 AM, Bill Lorensen wrote: > In the past, I have done the following: > VTK_BUILD_ALL_MODULES_FOR_TESTS:BOOL=OFF > VTK_Group_Rendering:BOOL=OFF > VTK_Group_StandAlone:BOOL=OFF > > then I enable the modules I need (e.g.) > Module_vtkCommonCore:BOOL=ON > Module_vtkFiltersGeneral:BOOL=ON > > > On Thu, May 14, 2015 at 11:01 AM, Alex Pletzer wrote: >> Hi David, >> >> Yes, tests and examples are turned off. My settings are: >> >> BUILD_DOCUMENTATION OFF >> BUILD_EXAMPLES OFF >> BUILD_SHARED_LIBS ON >> BUILD_TESTING OFF >> BUILD_USER_DEFINED_LIBS OFF >> CMAKE_BUILD_TYPE Debug >> CMAKE_INSTALL_PREFIX /usr/local >> VTK_ANDROID_BUILD OFF >> VTK_EXTRA_COMPILER_WARNINGS OFF >> VTK_Group_Imaging OFF >> VTK_Group_MPI OFF >> VTK_Group_Qt OFF >> VTK_Group_Rendering OFF >> VTK_Group_StandAlone ON >> VTK_Group_Tk OFF >> VTK_Group_Views OFF >> VTK_Group_Web OFF >> VTK_IOS_BUILD OFF >> VTK_PYTHON_VERSION 2 >> VTK_RENDERING_BACKEND OpenGL >> VTK_SMP_IMPLEMENTATION_TYPE Sequential >> VTK_USE_LARGE_DATA OFF >> VTK_WRAP_JAVA OFF >> VTK_WRAP_PYTHON OFF >> VTK_WRAP_TCL OFF >> >> Thanks. >> >> --Alex >> >> >> On 05/13/2015 07:29 PM, David E DeMarle wrote: >> >> Are tests off? >> >> Most of the tests are end to end ones that render some image and compare it >> against a baseline. This could be why Rendering/OpenGL is being built. >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Wed, May 13, 2015 at 12:40 PM, Alex Pletzer wrote: >>> >>> Hi VTK'ians, >>> >>> Is it possible to build VTK without rendering? On a platform that does not >>> have OpenGL? I'm working on a project which uses VTK classes but I'm not >>> producing any picture. The code should run in the cloud, which does not have >>> OpenGL. >>> >>> I have set: >>> >>> VTK_Group_Rendering *OFF >>> >>> When I configure, I get >>> >>> CMake Error at >>> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): >>> Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) >>> Call Stack (most recent call first): >>> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 >>> (_FPHSA_FAILURE_MESSAGE) >>> /usr/share/cmake/Modules/FindOpenGL.cmake:161 >>> (FIND_PACKAGE_HANDLE_STANDARD_ARGS) >>> Rendering/OpenGL/CMakeLists.txt:196 (find_package) >>> >>> Thanks in advance! >>> >>> --Alex >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> -- >> Alexander Pletzer (pletzer at psu.edu) >> Office 224G, Computer Building >> Institute of CyberScience >> The Pennsylvania State University >> cell: +1 609 799 7999 >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From axp5530 at psu.edu Thu May 14 12:32:22 2015 From: axp5530 at psu.edu (Alex Pletzer) Date: Thu, 14 May 2015 12:32:22 -0400 Subject: [vtkusers] building vtk without opengl and rendering In-Reply-To: References: <55537E7F.4010403@psu.edu> <5554B8CA.7080602@psu.edu> Message-ID: <5554CE16.8090701@psu.edu> Thanks Bill and Marcus. It seems VTK_Group_StandAlone = OFF seems require at this point in time. --Alex On 05/14/2015 11:37 AM, Marcus D. Hanwell wrote: > You should be able to leave StandAlone ON, Rendering OFF (that was the > point of the rendering group, to separate stand alone from modules > requiring OpenGL). It is possible something crept in, I haven't looked > into it yet, but if StandAlone currently requires OpenGL we should fix > that, and try to add a dashboard that tests this. > > On Thu, May 14, 2015 at 11:06 AM, Bill Lorensen wrote: >> In the past, I have done the following: >> VTK_BUILD_ALL_MODULES_FOR_TESTS:BOOL=OFF >> VTK_Group_Rendering:BOOL=OFF >> VTK_Group_StandAlone:BOOL=OFF >> >> then I enable the modules I need (e.g.) >> Module_vtkCommonCore:BOOL=ON >> Module_vtkFiltersGeneral:BOOL=ON >> >> >> On Thu, May 14, 2015 at 11:01 AM, Alex Pletzer wrote: >>> Hi David, >>> >>> Yes, tests and examples are turned off. My settings are: >>> >>> BUILD_DOCUMENTATION OFF >>> BUILD_EXAMPLES OFF >>> BUILD_SHARED_LIBS ON >>> BUILD_TESTING OFF >>> BUILD_USER_DEFINED_LIBS OFF >>> CMAKE_BUILD_TYPE Debug >>> CMAKE_INSTALL_PREFIX /usr/local >>> VTK_ANDROID_BUILD OFF >>> VTK_EXTRA_COMPILER_WARNINGS OFF >>> VTK_Group_Imaging OFF >>> VTK_Group_MPI OFF >>> VTK_Group_Qt OFF >>> VTK_Group_Rendering OFF >>> VTK_Group_StandAlone ON >>> VTK_Group_Tk OFF >>> VTK_Group_Views OFF >>> VTK_Group_Web OFF >>> VTK_IOS_BUILD OFF >>> VTK_PYTHON_VERSION 2 >>> VTK_RENDERING_BACKEND OpenGL >>> VTK_SMP_IMPLEMENTATION_TYPE Sequential >>> VTK_USE_LARGE_DATA OFF >>> VTK_WRAP_JAVA OFF >>> VTK_WRAP_PYTHON OFF >>> VTK_WRAP_TCL OFF >>> >>> Thanks. >>> >>> --Alex >>> >>> >>> On 05/13/2015 07:29 PM, David E DeMarle wrote: >>> >>> Are tests off? >>> >>> Most of the tests are end to end ones that render some image and compare it >>> against a baseline. This could be why Rendering/OpenGL is being built. >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Wed, May 13, 2015 at 12:40 PM, Alex Pletzer wrote: >>>> Hi VTK'ians, >>>> >>>> Is it possible to build VTK without rendering? On a platform that does not >>>> have OpenGL? I'm working on a project which uses VTK classes but I'm not >>>> producing any picture. The code should run in the cloud, which does not have >>>> OpenGL. >>>> >>>> I have set: >>>> >>>> VTK_Group_Rendering *OFF >>>> >>>> When I configure, I get >>>> >>>> CMake Error at >>>> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): >>>> Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) >>>> Call Stack (most recent call first): >>>> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 >>>> (_FPHSA_FAILURE_MESSAGE) >>>> /usr/share/cmake/Modules/FindOpenGL.cmake:161 >>>> (FIND_PACKAGE_HANDLE_STANDARD_ARGS) >>>> Rendering/OpenGL/CMakeLists.txt:196 (find_package) >>>> >>>> Thanks in advance! >>>> >>>> --Alex >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> -- >>> Alexander Pletzer (pletzer at psu.edu) >>> Office 224G, Computer Building >>> Institute of CyberScience >>> The Pennsylvania State University >>> cell: +1 609 799 7999 >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 -- Alexander Pletzer (pletzer at psu.edu) Office 224G, Computer Building Institute of CyberScience The Pennsylvania State University cell: +1 609 799 7999 From danieldaf2000 at gmail.com Thu May 14 16:34:16 2015 From: danieldaf2000 at gmail.com (Daniel Alejandro Fuentes) Date: Thu, 14 May 2015 17:34:16 -0300 Subject: [vtkusers] Export model with texture Message-ID: Hi, I have a simple question, but I can't find how do it. If I have a poly data like that: (https://db.tt/HYaA0zFA) with only one difference, the texture is generated dynamically by vtk (using an array with values inside polydata). I want to export to a file, the texture with his mapping points, to associate it to another cylinder made in other tools outside VTK For instance, create a cylinder in 3DMax, and import the image generated in VTK like a material - and that is other topic, but I'm first only want to export the texture) This is possible? Thanks regards Daniel F. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakota_63124 at yahoo.com Thu May 14 23:41:35 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Thu, 14 May 2015 20:41:35 -0700 (MST) Subject: [vtkusers] rendering voxels from Java Message-ID: <1431661295642-5731920.post@n5.nabble.com> I am attempting to display a 3D voxel array from a java application, by following the example given at http://vtk.1045678.n5.nabble.com/Visualizing-populated-voxels-td4385698.html I have a 3d short[][][] array containing the material index for each cell of a 3D voxel array. My understanding is that I need to convert this to a 1 dimensional array and pass it to a vtkShortArray. The java code is shown below. I think I have made the correct substitutions of java methods for C++ methods, but I do not know where to find the constants VTK_UNSIGNED_CHAR, FIELD_ASSOCIATION_CELLS and SCALARS. Also, I don't understand how to use the vtkInformation object that is needed for the vtkImageData object to SetScalarType(). Can anyone help or point me to a java example? Thanks, Kent public void showExternal(SimExternal external) { short[][][] voxelData = external.matrixData.voxelMatrix; int dimX = voxelData.length; int dimY = voxelData[0].length; int dimZ = voxelData[0][0].length; double[] values = external.getValues(); double voxX = values[3]; double voxY = values[4]; double voxZ = values[5]; double minX = 0.0; double minY = 0.0; double minZ = 0.0; if(dimZ >= 4) { int numSamples = dimX * dimY * dimZ; short[] sampleGrid = new short[numSamples]; for(int i=0, l=0; iSetScalarRange(5,100); voxelMapper.SetScalarModeToUseCellData(); //voxelMapper->SetColorModeToMapScalars(); SimVisualDocumentVTK doc = ((SimVisualDocumentVTK) document); vtkActor impGeoActor = doc.getElementFaceActor(); impGeoActor.SetMapper( voxelMapper ); //impGeoActor->GetProperty()->SetColor( 1.0, 0, 0 ); //impGeoActor->GetProperty()->SetOpacity( alpha ); // int actorId = addActor( impGeoActor ); // voxelMapper->Delete(); // geomFilter->Delete(); // threshold->Delete(); // sampledSpace->Delete(); // sampleData->Delete(); // return actorId; } } -- View this message in context: http://vtk.1045678.n5.nabble.com/rendering-voxels-from-Java-tp5731920.html Sent from the VTK - Users mailing list archive at Nabble.com. From artem.paraview at googlemail.com Fri May 15 08:50:21 2015 From: artem.paraview at googlemail.com (Artem Babayan) Date: Fri, 15 May 2015 13:50:21 +0100 Subject: [vtkusers] Adding data from one vtkCellArray to another Message-ID: Hello, I have to objects of vtkCellArray type: 'result' and 'vtk_cells'. I would like to add all the data from 'result' to existing data in 'vtk_cell'. At the moment I do it as brute force copying: for(int i = 0; i < result->GetNumberOfCells(); ++i) { vtkIdType npts; vtkIdType *pts; result->GetNextCell(npts, pts); vtk_cells->InsertNextCell(npts, pts); } but isn't there another, simpler, way? Best wishes Artem -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeffrey.c.becker at nasa.gov Fri May 15 14:07:43 2015 From: jeffrey.c.becker at nasa.gov (Jeff Becker) Date: Fri, 15 May 2015 11:07:43 -0700 Subject: [vtkusers] segfault when writing large unstructured grid Message-ID: <555635EF.1030500@nasa.gov> Hi. I wrote a small python script to read data from a binary file, and write it out to vtu format for viewing in ParaView. I include it below for reference. The final write command only completes partially before getting a segfault. The resulting file has proper xml at the front: $ head -6 /nobackup/jcbecker/steinBmag.vtu but the file is truncated - when I try to load in ParaView I get: ERROR: In /home/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/XMLParser/vtkXMLParser.cxx, line 483 vtkXMLDataParser (0x5fcc070): Error parsing XML in stream at line 17, column 0, byte index 1132817847: no element found The file size as written is given here: $ ls -l /nobackup/jcbecker/steinBmag.vtu -rw------- 1 jcbecker css 1132817847 May 14 17:03 /nobackup/jcbecker/steinBmag.vtu I'm new to vtk, so I might not have set up the script below correctly. Can anyone see why the write command would seg. fault? Also, please don't hesitate to suggest any other improvements. Thanks. -jeff -------------------------------------------------------------------------------------------------------------------------------------------------------------------- import os import numpy as np import steinmesh as mesh import itertools import vtk from vtk.util import numpy_support in_fname='/nobackupp9/pmoran/stein/mhd48-1/dat/mhd48h1new_670.8.dat' out_fname='/nobackup/jcbecker/steinBmag.vtu' f = open(in_fname,"rb") bx = 6 npoints = mesh.MX*mesh.MY*mesh.MZ f.seek(bx*npoints*np.dtype('f4').itemsize,os.SEEK_SET) steinbmag = np.square(np.fromfile(f,dtype=np.dtype('f4'),count=npoints)) steinbmag += np.square(np.fromfile(f,dtype=np.dtype('f4'),count=npoints)) steinbmag += np.square(np.fromfile(f,dtype=np.dtype('f4'),count=npoints)) steinbmag = np.sqrt(steinbmag) f.close() print 'done reading file' grid = [x for x in itertools.product(mesh.xcoords, mesh.ycoords, mesh.zcoords)] print 'done generating grid' pcoords = vtk.vtkDoubleArray() pcoords.SetNumberOfComponents(3) pcoords.SetNumberOfTuples(npoints) pcells = vtk.vtkCellArray() for i in range(npoints): pcoords.SetTuple3(*((i,) + grid[i])) pcells.InsertNextCell(i) pcells.InsertCellPoint(i) pts = vtk.vtkPoints() pts.SetData(pcoords) print 'done converting to vtk grid' ugrid = vtk.vtkUnstructuredGrid() ugrid.Allocate(npoints) ugrid.SetPoints(pts) ugrid.SetCells(vtk.VTK_VERTEX,pcells) bmagV = numpy_support.numpy_to_vtk(steinbmag,deep=True) bmagV.SetName('B field magnitude') ugrid.GetPointData().SetScalars(bmagV) print 'done setting up ugrid' writer = vtk.vtkXMLUnstructuredGridWriter() writer.SetFileName(out_fname) writer.SetInputData(ugrid) writer.SetDataModeToBinary() writer.Write() From axp5530 at psu.edu Fri May 15 17:25:12 2015 From: axp5530 at psu.edu (Alex Pletzer) Date: Fri, 15 May 2015 17:25:12 -0400 Subject: [vtkusers] building vtk without opengl and rendering In-Reply-To: References: <55537E7F.4010403@psu.edu> <5554B8CA.7080602@psu.edu> Message-ID: <55566438.5050908@psu.edu> Thanks Marcus and Bill! The following settings will be build a lightweight version of vtk, with python wrapping but no rendering and no dependency on opengl: cmake \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/../software \ -DVTK_WRAP_PYTHON:BOOL=ON \ -DVTK_Group_StandAlone:BOOL=OFF \ -DVTK_Group_Rendering:BOOL=OFF \ -DModule_vtkCommonColor:BOOL=ON \ -DModule_vtkCommonComputationalGeometry:BOOL=ON \ -DModule_vtkCommonDataModel:BOOL=ON \ -DModule_vtkCommonExecutionModel:BOOL=ON \ -DModule_vtkCommonMath:BOOL=ON \ -DModule_vtkCommonMisc:BOOL=ON \ -DModule_vtkCommonSystem:BOOL=ON \ -DModule_vtkCommonTransforms:BOOL=ON \ -DModule_vtkFiltersCore:BOOL=ON \ -DModule_vtkFiltersExtraction:BOOL=ON \ -DModule_vtkFiltersGeneral:BOOL=ON \ -DModule_vtkFiltersGeneric:BOOL=ON \ -DModule_vtkFiltersGeometry:BOOL=ON \ -DModule_vtkFiltersPython:BOOL=ON \ -DModule_vtkIOCore:BOOL=ON \ -DModule_vtkIOGeometry:BOOL=ON \ -DModule_vtkIOLegacy:BOOL=ON \ -DModule_vtkWrappingPythonCore:BOOL=ON \ --Alex On 05/14/2015 11:37 AM, Marcus D. Hanwell wrote: > You should be able to leave StandAlone ON, Rendering OFF (that was the > point of the rendering group, to separate stand alone from modules > requiring OpenGL). It is possible something crept in, I haven't looked > into it yet, but if StandAlone currently requires OpenGL we should fix > that, and try to add a dashboard that tests this. > > On Thu, May 14, 2015 at 11:06 AM, Bill Lorensen wrote: >> In the past, I have done the following: >> VTK_BUILD_ALL_MODULES_FOR_TESTS:BOOL=OFF >> VTK_Group_Rendering:BOOL=OFF >> VTK_Group_StandAlone:BOOL=OFF >> >> then I enable the modules I need (e.g.) >> Module_vtkCommonCore:BOOL=ON >> Module_vtkFiltersGeneral:BOOL=ON >> >> >> On Thu, May 14, 2015 at 11:01 AM, Alex Pletzer wrote: >>> Hi David, >>> >>> Yes, tests and examples are turned off. My settings are: >>> >>> BUILD_DOCUMENTATION OFF >>> BUILD_EXAMPLES OFF >>> BUILD_SHARED_LIBS ON >>> BUILD_TESTING OFF >>> BUILD_USER_DEFINED_LIBS OFF >>> CMAKE_BUILD_TYPE Debug >>> CMAKE_INSTALL_PREFIX /usr/local >>> VTK_ANDROID_BUILD OFF >>> VTK_EXTRA_COMPILER_WARNINGS OFF >>> VTK_Group_Imaging OFF >>> VTK_Group_MPI OFF >>> VTK_Group_Qt OFF >>> VTK_Group_Rendering OFF >>> VTK_Group_StandAlone ON >>> VTK_Group_Tk OFF >>> VTK_Group_Views OFF >>> VTK_Group_Web OFF >>> VTK_IOS_BUILD OFF >>> VTK_PYTHON_VERSION 2 >>> VTK_RENDERING_BACKEND OpenGL >>> VTK_SMP_IMPLEMENTATION_TYPE Sequential >>> VTK_USE_LARGE_DATA OFF >>> VTK_WRAP_JAVA OFF >>> VTK_WRAP_PYTHON OFF >>> VTK_WRAP_TCL OFF >>> >>> Thanks. >>> >>> --Alex >>> >>> >>> On 05/13/2015 07:29 PM, David E DeMarle wrote: >>> >>> Are tests off? >>> >>> Most of the tests are end to end ones that render some image and compare it >>> against a baseline. This could be why Rendering/OpenGL is being built. >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Wed, May 13, 2015 at 12:40 PM, Alex Pletzer wrote: >>>> Hi VTK'ians, >>>> >>>> Is it possible to build VTK without rendering? On a platform that does not >>>> have OpenGL? I'm working on a project which uses VTK classes but I'm not >>>> producing any picture. The code should run in the cloud, which does not have >>>> OpenGL. >>>> >>>> I have set: >>>> >>>> VTK_Group_Rendering *OFF >>>> >>>> When I configure, I get >>>> >>>> CMake Error at >>>> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): >>>> Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) >>>> Call Stack (most recent call first): >>>> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 >>>> (_FPHSA_FAILURE_MESSAGE) >>>> /usr/share/cmake/Modules/FindOpenGL.cmake:161 >>>> (FIND_PACKAGE_HANDLE_STANDARD_ARGS) >>>> Rendering/OpenGL/CMakeLists.txt:196 (find_package) >>>> >>>> Thanks in advance! >>>> >>>> --Alex >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> -- >>> Alexander Pletzer (pletzer at psu.edu) >>> Office 224G, Computer Building >>> Institute of CyberScience >>> The Pennsylvania State University >>> cell: +1 609 799 7999 >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 -- Alexander Pletzer (pletzer at psu.edu) Office 224G, Computer Building Institute of CyberScience The Pennsylvania State University cell: +1 609 799 7999 From pattersonnp.work at gmail.com Sat May 16 15:12:49 2015 From: pattersonnp.work at gmail.com (Nick Patterson) Date: Sat, 16 May 2015 20:12:49 +0100 Subject: [vtkusers] Rescaling the voxelised Grid Message-ID: VTK Users, What would be the appropriate way of resampling a DICOM image from 512x512 to something like 128x128? I though I had this worked out, but I generated a test DICOM image (a number of different sized boxes) and noticed that there is some slight offset of the boxes. Is it appropriate to use something like vtkImageResample or vtkImageShrink3D to perform this operation? Regards, Nick. From lijingszu at gmail.com Mon May 18 03:39:43 2015 From: lijingszu at gmail.com (Jing Li) Date: Mon, 18 May 2015 15:39:43 +0800 Subject: [vtkusers] what is the different bewteen two ways of rendering? Message-ID: Hi, all, I found two ways to render the data, but I don't know the different between them. (1) renderWindowInteractor->Initialize(); renderWindowInteractor->Start(); (2) renderWindow->Render(); renderWindowInteractor->Start(); The other compounds of the code are the same. what is the different? Thank you very much! Jing Li -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Mon May 18 04:02:58 2015 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Mon, 18 May 2015 01:02:58 -0700 (MST) Subject: [vtkusers] Calculate the volume size Message-ID: <1431936178264-5731926.post@n5.nabble.com> Hello everyone, I have a 3D contour constructed by the vtkMarching cubes. And I want to calculate the volume surrounded by the contour accurately. Have anyone does this before? Best regards -- View this message in context: http://vtk.1045678.n5.nabble.com/Calculate-the-volume-size-tp5731926.html Sent from the VTK - Users mailing list archive at Nabble.com. From wulihouxiaoshuai at 163.com Mon May 18 06:05:42 2015 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Mon, 18 May 2015 03:05:42 -0700 (MST) Subject: [vtkusers] how to increase the isosurface's resolution Message-ID: <1431943542137-5731928.post@n5.nabble.com> Hello everyone, I have a 3D contour constructed by the vtkMarching cubes. And I want to calculate the volume surrounded using vtkMassProperties. After some simple testing (using cone/cylinder), I found that this method is closely related to the resolution of the surface. Higher resolution can bring accurate result. So I want to increase the resolution of the contour? Does anyone have any ideas? many thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-increase-the-isosurface-s-resolution-tp5731928.html Sent from the VTK - Users mailing list archive at Nabble.com. From pavelkalinnikov at gmail.com Mon May 18 07:14:46 2015 From: pavelkalinnikov at gmail.com (Pavel Kalinnikov) Date: Mon, 18 May 2015 14:14:46 +0300 Subject: [vtkusers] Using QVTKWidget with QT5 on Linux In-Reply-To: <20150511150451.GA10573@megas.kitware.com> References: <20150508214524.GB15229@megas.kitware.com> <20150511150451.GA10573@megas.kitware.com> Message-ID: Hi guys, Any updates? 2015-05-11 18:04 GMT+03:00 Ben Boeckel : > On Sat, May 09, 2015 at 01:03:08 +0300, Pavel Kalinnikov wrote: > > As I said before, I've build and run the "Examples/GUI/Qt/Events" example > > from the VTK-6.2.0 distribution. But I think we can find even simpler > test > > which reproduces the problem. > > I've reproduced the problem with the old OpenGL backend; it crashes with > OpenGL2. It seems to be related to depth peeling (something we > apparently don't test all that well) not working properly with the > context Qt5 is using. I've asked Marcus to look at it (since he's much > more familiar with the Qt/OpenGL codepaths than I). > > Thanks for the report. > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.crozier at medunigraz.at Mon May 18 08:56:04 2015 From: andrew.crozier at medunigraz.at (Andrew Crozier) Date: Mon, 18 May 2015 14:56:04 +0200 Subject: [vtkusers] Closed Surface from Marching Cubes Message-ID: <5559E164.6030900@medunigraz.at> Hi, I am using vtkDiscreteMarchingCubes to generate a surface mesh from a segmented image volume, prior to applying a custom smoothing algorithm and finally rendering a new image volume. The rendering step has problems when the surface mesh is not closed, which occurs when the segmented object meets a side of the image volume. Is there some way that I can generate a closed surface from the marching cubes algorithm, or postprocess the open surface (or contours generated from it by vtkCutter) to close it? Many thanks, Andrew From simon.esneault at gmail.com Mon May 18 09:48:03 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Mon, 18 May 2015 15:48:03 +0200 Subject: [vtkusers] Closed Surface from Marching Cubes In-Reply-To: <5559E164.6030900@medunigraz.at> References: <5559E164.6030900@medunigraz.at> Message-ID: Hello Andrew, One simple solution can be to "Pad" the image by one pixel in every direction, using the vtkImageConstantPad filter before the Marching Cubes. Hence the generated mesh shall be closed. Simon 2015-05-18 14:56 GMT+02:00 Andrew Crozier : > Hi, > > I am using vtkDiscreteMarchingCubes to generate a surface mesh from a > segmented image volume, prior to applying a custom smoothing algorithm and > finally rendering a new image volume. > > The rendering step has problems when the surface mesh is not closed, which > occurs when the segmented object meets a side of the image volume. Is there > some way that I can generate a closed surface from the marching cubes > algorithm, or postprocess the open surface (or contours generated from it > by vtkCutter) to close it? > > Many thanks, > Andrew > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From njx937 at gmail.com Tue May 19 06:47:36 2015 From: njx937 at gmail.com (NIE JUNXIAO) Date: Tue, 19 May 2015 19:47:36 +0900 Subject: [vtkusers] How Message-ID: <555B14C8.5000400@gmail.com> Hello everyone, I am now trying to render some models in front of an active background referring to the BackgroundImage sample. But I think I have came up with some memory leak problem. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/BackgroundImage I create a model renderer and a background renderer, and the y are both added to a renderwindow. When I want to change my background, I create new vtkImageData and new vtkImageImport(to import a cv::mat). Then I create a new vtkImageactor and add it to backgroundrenderer. I can see the image after finishing this but I notice that the memory increases very rapidly. I think that it is because I didnot release memory correctly. Could anybody help me with this memory problem. Thank you very much. Best regards, NIE JUNXIAO void MyGlkview::setupBG(cv::Mat _img){ //import image assert(_img.data != NULL); vtkImageData *imgData = vtkImageData::New(); vtkImageImport *importer = vtkImageImport::New(); importer->SetOutput(imgData); importer->SetDataSpacing(1, 1, 1); importer->SetDataOrigin(0, 0, 0); importer->SetWholeExtent(0, _img.size().width - 1, 0, _img.size().height - 1, 0, 0); importer->SetDataExtentToWholeExtent(); importer->SetDataScalarTypeToUnsignedChar(); importer->SetNumberOfScalarComponents(_img.channels()); importer->SetImportVoidPointer(_img.data); importer->Update(); double origin[3]; double spacing[3]; int extent[6]; imgData->GetOrigin(origin); imgData->GetSpacing(spacing); imgData->GetExtent(extent); //resize image vtkCamera* camera = myBackgroundRenderer->GetActiveCamera(); camera->ParallelProjectionOn(); double xc = origin[0] + 0.5*(extent[0] + extent[1])*spacing[0]; double yc = origin[1] + 0.5*(extent[2] + extent[3])*spacing[1]; //double xd = (extent[1] - extent[0] + 1)*spacing[0]; double yd = (extent[3] - extent[2] + 1)*spacing[1]; double d = camera->GetDistance(); camera->SetParallelScale(0.5*yd); camera->SetFocalPoint(xc, yc, 0.0); camera->SetPosition(xc, yc, d); //here I want to avoid multi-imageactor in the renderer, but the actors number is always 0 if (myBackgroundRenderer->GetActors()->GetNumberOfItems() < 1){ vtkImageActor *imageActor = vtkImageActor::New(); imageActor->SetInputData(imgData); myBackgroundRenderer->AddActor(imageActor); imageActor->Update(); }else{ vtkImageActor *imageActor = (vtkImageActor *)myBackgroundRenderer->GetActors()->GetLastActor(); //myBackgroundRenderer-> imageActor->SetInputData(imgData); imageActor->Update(); } // Render again to set the correct view refresh(); imgData->Delete(); importer->Delete(); } From dirande at ocre.cea.fr Tue May 19 09:16:43 2015 From: dirande at ocre.cea.fr (DIRAND Estelle) Date: Tue, 19 May 2015 15:16:43 +0200 Subject: [vtkusers] vtkThreadedStreamingPipeline removed from VTK 6.1.0 Message-ID: <555B37BB.5020706@ocre.cea.fr> Dear all, I am currently working on VTK's streaming and I found the paper "Streaming-Enabled Parallel Dataflow Architecture for Multicore Systems" in which the implementation of vtkThreadedStreamingPipeline is explained. This class seems to be very interesting to my project but it appears that it was removed from VTK 6.1.0 and above. Does anyone know why it has been removed? Is there something that was implemented to replace it? Thank you very much for your reply! Estelle From dave.demarle at kitware.com Tue May 19 10:56:01 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 19 May 2015 10:56:01 -0400 Subject: [vtkusers] vtkThreadedStreamingPipeline removed from VTK 6.1.0 In-Reply-To: <555B37BB.5020706@ocre.cea.fr> References: <555B37BB.5020706@ocre.cea.fr> Message-ID: We took those out because: * The classes were largely unused by the community and poorly regression tested. * Maintaining them was a hindering other pipeline advancements. * The author's research direction moved beyond them and was no longer using them. $VTKSRC/Examples/ParallelProcessing/SMP is a more recent approach to threaded pipeline parallelism. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, May 19, 2015 at 9:16 AM, DIRAND Estelle wrote: > Dear all, > > I am currently working on VTK's streaming and I found the paper > "Streaming-Enabled Parallel Dataflow Architecture for Multicore Systems" in > which the implementation of vtkThreadedStreamingPipeline is explained. This > class seems to be very interesting to my project but it appears that it was > removed from VTK 6.1.0 and above. Does anyone know why it has been removed? > Is there something that was implemented to replace it? > > Thank you very much for your reply! > > Estelle > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 ninarock at list.ru Tue May 19 12:36:39 2015 From: ninarock at list.ru (Butterfly) Date: Tue, 19 May 2015 09:36:39 -0700 (MST) Subject: [vtkusers] TEXTURE_BUFFER fails : pure OpenGL vs vtkgl ? Message-ID: <1432053399081-5731938.post@n5.nabble.com> Hi, I have a very unpleasant bug and absolutely no idea what am I doing wrong... I try to use Buffer Texture - a functionality that is available in OpenGL since 2006 (so, quite old and reliable). I need to do exactly this because I want to generate data on the CUDA side, and there is no other way (that I know of) except of using buffers. In the simplified example below (without CUDA) I generate simple data and try to connect the texture to the buffer. * vtkgl::TexBufferEXT fails with System.AccessViolationException...* GLuint bufferObject; GLuint _texname; glGenTextures(1, &_texname); vtkgl::ActiveTexture(vtkgl::TEXTURE0+_texname); glBindTexture(vtkgl::TEXTURE_BUFFER_EXT, _texname); vtkgl::GenBuffers(1, &bufferObject); vtkgl::BindBuffer(vtkgl::TEXTURE_BUFFER_EXT, bufferObject); int nWidth = 8; int nHeight = 4; vtkgl::BufferData(vtkgl::TEXTURE_BUFFER_EXT, nWidth*nHeight*sizeof(float), NULL, vtkgl::DYNAMIC_DRAW); float *test = (float *)vtkgl::MapBuffer(vtkgl::TEXTURE_BUFFER_EXT, vtkgl::READ_WRITE); for(int i=0; i References: Message-ID: Hi Nick, If you want to shrink an image with interpolation and antialiasing, then I recommend vtkImageResize: resize = vtkImageResize() resize.SetInputConnection(reader->GetOutputPort()) resize.SetResizeMethodToOutputDimensions() resize.SetOutputDimensions(128, 128, 1) resize.Update() Note that you have to give three output dimensions, so if you have a volume with 40 slices, you would set the third dimension to 40. Or, you could use resize.SetOutputDimensions(128, 128, -1) to tell the filter to leave the third dimension alone (output number of slices will be the same as the input number of slices). I used vtkImageShrink3D before, but like you, I found that I had to shift the images afterwards (e.g. if I shrunk the image by a factor of 4, then I had to shift by 1.5 voxels... by inspecting the code, I found that I needed a shift of 0.5*(N-1) where "N" was my shrink factor. - David On Sat, May 16, 2015 at 1:12 PM, Nick Patterson wrote: > VTK Users, > > What would be the appropriate way of resampling a DICOM image from 512x512 > to something like 128x128? I though I had this worked out, but I generated > a test DICOM image (a number of different sized boxes) and noticed that > there is some slight offset of the boxes. Is it appropriate to use > something like vtkImageResample or vtkImageShrink3D to perform this > operation? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rcockbur at ualberta.ca Wed May 20 15:35:17 2015 From: rcockbur at ualberta.ca (Ross Cockburn) Date: Wed, 20 May 2015 13:35:17 -0600 Subject: [vtkusers] Splitting ImageData Message-ID: Hey everyone, I'm pretty new to VTK, and I'm using python. I'm try to develop a program where a volume can be split in two to view the interior of both halves. Specifically, I am working with ImageData from a DICOM file, and would like to be able to use a cursor plane to set up a cut. Then, I would like to split the volume along the plane and be left with two independently movable volumes. I have taken two approaches so far and run into problems with both of them. 1. My first idea was to use a plane widget to get a cut location, then duplicate the volume, and clip them in opposite directions. The result would be two volumes based on the same ImageData, but with opposite clipping planes for their respective mappers. I am using a TrackballActor interactor style, and the problem is that when I move one of the volumes (which I need to do to see the interior face), the clipping plane stays in the same place, rather than following it's volume. I tried using assemblies to connect the clipping planes with the volumes, but assemblies only accept instances of 3DProp. 2. My second idea starts the same as the first. I use a planewidget to define a cut location, then create an ImageMask using the ImageData and plane as input. Since ImageMasks must be the same extent as their target(my ImageData), I figured I would create a custom ImageData with the same extent as my ImageData, and set the scalars to either 1 (if they are on one side of the plane), or 0 (if they are on the other side). I am not sure how I can create a custom ImageData however, or how I would use a plane (which is in the graphics pipeline) to affect the scalars of the ImageData (which is in the visualization pipeline). Any feedback I could get on either of these approaches (or another approach for splitting volumes), would be greatly appreciated. Ross -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Wed May 20 20:53:16 2015 From: tossin at gmail.com (Evan Kao) Date: Wed, 20 May 2015 17:53:16 -0700 Subject: [vtkusers] VTK Time support Message-ID: Hello vtk-users, What's the best way to store/handle time-varying data with VTK? I found this Wiki page on Time Support, which says it's been implemented, but couldn't find the class vtkTemporalDataSet in the nightly documentation or my current version of VTK (6.1). It does appear in an earlier version though (5.10.0). Is there any reason why it was removed? If there isn't a special class for this, does it make sense to simply add multiple data arrays to a single data object, one for each time point? Or is it better to have a data object for each time point? Thanks, Evan Kao -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed May 20 21:16:07 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 20 May 2015 21:16:07 -0400 Subject: [vtkusers] VTK Time support In-Reply-To: References: Message-ID: It is still there, just that the classnames have morphed repeatedly since it was first introduced. See Filters/General/vtkTimeSourceExample.h and Common/ExecutionModel/Testing/Cxx/TestTemporalSupport.cxx for decent places to start investigating. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, May 20, 2015 at 8:53 PM, Evan Kao wrote: > Hello vtk-users, > > What's the best way to store/handle time-varying data with VTK? I found > this Wiki page on Time > Support, which says it's been implemented, but couldn't find the class > vtkTemporalDataSet in the nightly documentation or my current version of > VTK (6.1). It does appear in an earlier version though (5.10.0). Is there > any reason why it was removed? > > If there isn't a special class for this, does it make sense to simply add > multiple data arrays to a single data object, one for each time point? Or > is it better to have a data object for each time point? > > Thanks, > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucj.valade at gmail.com Thu May 21 03:34:31 2015 From: lucj.valade at gmail.com (Luc Valade) Date: Thu, 21 May 2015 09:34:31 +0200 Subject: [vtkusers] Segmentation fault when trying to export a vtk mesh Message-ID: Hi, I have a problem with the export of vtk meshes using vtkXMLWriter class. Indeed, my project builds without any problem, but during the run, the call of the vtkXMLWriter method Write() generates a segmentation fault. I works on Windows and uses qtcreator and qmake. I uses the version 6.2 of vtk. I've already build tutorial vtk projects using qmake to learn how to well linked projects to vtk dlls, and it worked well. Here is the projet I tried to run without success (.pro and main.cpp file) TEMPLATE = app CONFIG += console CONFIG -= app_bundle CONFIG -= qt SOURCES += main.cpp INCLUDEPATH += "C:\Program Files (x86)\VTK\include\vtk-6.2" LIBS += "-LC:\Program Files (x86)\VTK\lib" LIBS += -lvtkCommonDataModel-6.2.dll \ -lvtkCommonCore-6.2.dll \ -lvtkIOXML-6.2.dll #include #include #include #include #include #include int main ( int, char *[] ) { // Create 10 points. vtkSmartPointer points = vtkSmartPointer::New(); for ( unsigned int i = 0; i < 10; ++i ) { points->InsertNextPoint ( i, i, i ); } // Create a polydata object and add the points to it. vtkSmartPointer polydata = vtkSmartPointer::New(); polydata->SetPoints(points); // Write the file vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("test.vtp"); #if VTK_MAJOR_VERSION <= 5 writer->SetInput(polydata); #else writer->SetInputData(polydata); #endif // Optional - set the mode. The default is binary. //writer->SetDataModeToBinary(); //writer->SetDataModeToAscii(); writer->Write(); return EXIT_SUCCESS; } Thanks in advance for any help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Thu May 21 03:59:25 2015 From: tossin at gmail.com (Evan Kao) Date: Thu, 21 May 2015 00:59:25 -0700 Subject: [vtkusers] VTK Time support In-Reply-To: References: Message-ID: Hi David, I guess more simply/specifically, I was wondering how to set up a data object (in Python) so that it's compatible with temporal filters like vtkTemporalShiftScale, vtkTemporalInterpolator, or vtkTemporalStreamTracer. It seems like these filters take in multi-block data, in which each block represents a different time point, but I have no idea how to specify the time value for each block. Thanks, Evan Kao On Wed, May 20, 2015 at 6:16 PM, David E DeMarle wrote: > It is still there, just that the classnames have morphed repeatedly since > it was first introduced. > > See Filters/General/vtkTimeSourceExample.h > and Common/ExecutionModel/Testing/Cxx/TestTemporalSupport.cxx for decent > places to start investigating. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, May 20, 2015 at 8:53 PM, Evan Kao wrote: > >> Hello vtk-users, >> >> What's the best way to store/handle time-varying data with VTK? I found >> this Wiki page on Time >> Support, which says it's been implemented, but couldn't find the class >> vtkTemporalDataSet in the nightly documentation or my current version of >> VTK (6.1). It does appear in an earlier version though (5.10.0). Is there >> any reason why it was removed? >> >> If there isn't a special class for this, does it make sense to simply add >> multiple data arrays to a single data object, one for each time point? Or >> is it better to have a data object for each time point? >> >> Thanks, >> 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 >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu May 21 07:48:38 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 21 May 2015 07:48:38 -0400 Subject: [vtkusers] Segmentation fault when trying to export a vtk mesh In-Reply-To: References: Message-ID: You haven't called writer->SetFileName() to specify where the file should be saved. That is necessary and may fix your crash - though there should be a more graceful approach to handling an empty file name than crashing, so that may not be it. HTH, Cory On Thu, May 21, 2015 at 3:34 AM, Luc Valade wrote: > Hi, > > > > I have a problem with the export of vtk meshes using vtkXMLWriter class. > Indeed, my project builds without any problem, but during the run, the call > of the vtkXMLWriter method Write() generates a segmentation fault. > > > > I works on Windows and uses qtcreator and qmake. I uses the version 6.2 of > vtk. I've already build tutorial vtk projects using qmake to learn how to > well linked projects to vtk dlls, and it worked well. > > > > Here is the projet I tried to run without success (.pro and main.cpp file) > > > > TEMPLATE = app > > > > CONFIG += console > > CONFIG -= app_bundle > > CONFIG -= qt > > > > SOURCES += main.cpp > > > > INCLUDEPATH += "C:\Program Files (x86)\VTK\include\vtk-6.2" > > LIBS += "-LC:\Program Files (x86)\VTK\lib" > > LIBS += -lvtkCommonDataModel-6.2.dll \ > > -lvtkCommonCore-6.2.dll \ > > -lvtkIOXML-6.2.dll > > > > > > #include > > #include > > #include > > #include > > #include > > #include > > > > int main ( int, char *[] ) > > { > > // Create 10 points. > > vtkSmartPointer points = > > vtkSmartPointer::New(); > > > > for ( unsigned int i = 0; i < 10; ++i ) > > { > > points->InsertNextPoint ( i, i, i ); > > } > > > > // Create a polydata object and add the points to it. > > vtkSmartPointer polydata = > > vtkSmartPointer::New(); > > polydata->SetPoints(points); > > > > // Write the file > > vtkSmartPointer writer = > > vtkSmartPointer::New(); > > writer->SetFileName("test.vtp"); > > #if VTK_MAJOR_VERSION <= 5 > > writer->SetInput(polydata); > > #else > > writer->SetInputData(polydata); > > #endif > > > > // Optional - set the mode. The default is binary. > > //writer->SetDataModeToBinary(); > > //writer->SetDataModeToAscii(); > > > > writer->Write(); > > > > return EXIT_SUCCESS; > > } > > > Thanks in advance for any help. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. From ninarock at list.ru Thu May 21 07:55:45 2015 From: ninarock at list.ru (Butterfly) Date: Thu, 21 May 2015 04:55:45 -0700 (MST) Subject: [vtkusers] TEXTURE_BUFFER fails : pure OpenGL vs vtkgl ? In-Reply-To: <1432053399081-5731938.post@n5.nabble.com> References: <1432053399081-5731938.post@n5.nabble.com> Message-ID: <1432209345012-5731952.post@n5.nabble.com> I found out what exactly causes the error, *but I still do not understand why this is happenning...* Turns out that all function pointers that start with vtkgl::TexBuffer* and vtkgl::TextureBuffer* are not valid function pointers. That is why calling them causes the AccessViolationException (Access violation executing location 0x00000000). I tested the function pointers like this: bool b = false; if (vtkgl::TexBufferEXT) b = true; if (vtkgl::TexBuffer) b = true; if (vtkgl::TexBufferARB) b = true; if (vtkgl::TextureBufferEXT) b = true; After executing the above code, b is false. Other pointers are ok, for example these both return b = true : if (vtkgl::UnmapBuffer) b = true; if (vtkgl::TEXTURE_BUFFER_EXT) b = true; I've read in the Internet that such kind of errors may occur if GLEW is not correctly initialized (https://www.opengl.org/wiki/OpenGL_Loading_Library#GLEW ). *One should set glewExperimental=TRUE and call glewInit(). But how am I supposed to do this using VTKOpenGL? Should I do this at all ?* -- View this message in context: http://vtk.1045678.n5.nabble.com/TEXTURE-BUFFER-fails-pure-OpenGL-vs-vtkgl-tp5731938p5731952.html Sent from the VTK - Users mailing list archive at Nabble.com. From lucj.valade at gmail.com Thu May 21 08:09:10 2015 From: lucj.valade at gmail.com (Luc Valade) Date: Thu, 21 May 2015 14:09:10 +0200 Subject: [vtkusers] Segmentation fault when trying to export a vtk mesh In-Reply-To: References: Message-ID: Hi Cory I already calls writer->SetFileName("test.vtp"). I also prints "writer->GetFileName()" into console to check, and there is no problem here. Luc 2015-05-21 13:48 GMT+02:00 Cory Quammen : > You haven't called writer->SetFileName() to specify where the file > should be saved. That is necessary and may fix your crash - though > there should be a more graceful approach to handling an empty file > name than crashing, so that may not be it. > > HTH, > Cory > > On Thu, May 21, 2015 at 3:34 AM, Luc Valade wrote: > > Hi, > > > > > > > > I have a problem with the export of vtk meshes using vtkXMLWriter class. > > Indeed, my project builds without any problem, but during the run, the > call > > of the vtkXMLWriter method Write() generates a segmentation fault. > > > > > > > > I works on Windows and uses qtcreator and qmake. I uses the version 6.2 > of > > vtk. I've already build tutorial vtk projects using qmake to learn how to > > well linked projects to vtk dlls, and it worked well. > > > > > > > > Here is the projet I tried to run without success (.pro and main.cpp > file) > > > > > > > > TEMPLATE = app > > > > > > > > CONFIG += console > > > > CONFIG -= app_bundle > > > > CONFIG -= qt > > > > > > > > SOURCES += main.cpp > > > > > > > > INCLUDEPATH += "C:\Program Files (x86)\VTK\include\vtk-6.2" > > > > LIBS += "-LC:\Program Files (x86)\VTK\lib" > > > > LIBS += -lvtkCommonDataModel-6.2.dll \ > > > > -lvtkCommonCore-6.2.dll \ > > > > -lvtkIOXML-6.2.dll > > > > > > > > > > > > #include > > > > #include > > > > #include > > > > #include > > > > #include > > > > #include > > > > > > > > int main ( int, char *[] ) > > > > { > > > > // Create 10 points. > > > > vtkSmartPointer points = > > > > vtkSmartPointer::New(); > > > > > > > > for ( unsigned int i = 0; i < 10; ++i ) > > > > { > > > > points->InsertNextPoint ( i, i, i ); > > > > } > > > > > > > > // Create a polydata object and add the points to it. > > > > vtkSmartPointer polydata = > > > > vtkSmartPointer::New(); > > > > polydata->SetPoints(points); > > > > > > > > // Write the file > > > > vtkSmartPointer writer = > > > > vtkSmartPointer::New(); > > > > writer->SetFileName("test.vtp"); > > > > #if VTK_MAJOR_VERSION <= 5 > > > > writer->SetInput(polydata); > > > > #else > > > > writer->SetInputData(polydata); > > > > #endif > > > > > > > > // Optional - set the mode. The default is binary. > > > > //writer->SetDataModeToBinary(); > > > > //writer->SetDataModeToAscii(); > > > > > > > > writer->Write(); > > > > > > > > return EXIT_SUCCESS; > > > > } > > > > > > Thanks in advance for any help. > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu May 21 09:11:33 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 21 May 2015 09:11:33 -0400 Subject: [vtkusers] VTK Time support In-Reply-To: References: Message-ID: Evan, Have you seen this blog post: http://www.kitware.com/blog/home/post/783 On Thu, May 21, 2015 at 3:59 AM, Evan Kao wrote: > Hi David, > > I guess more simply/specifically, I was wondering how to set up a data > object (in Python) so that it's compatible with temporal filters like > vtkTemporalShiftScale, vtkTemporalInterpolator, or > vtkTemporalStreamTracer. It seems like these filters take in multi-block > data, in which each block represents a different time point, but I have no > idea how to specify the time value for each block. > > Thanks, > Evan Kao > > On Wed, May 20, 2015 at 6:16 PM, David E DeMarle > wrote: > >> It is still there, just that the classnames have morphed repeatedly since >> it was first introduced. >> >> See Filters/General/vtkTimeSourceExample.h >> and Common/ExecutionModel/Testing/Cxx/TestTemporalSupport.cxx for decent >> places to start investigating. >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Wed, May 20, 2015 at 8:53 PM, Evan Kao wrote: >> >>> Hello vtk-users, >>> >>> What's the best way to store/handle time-varying data with VTK? I found >>> this Wiki page on Time >>> Support, which says it's been implemented, but couldn't find the class >>> vtkTemporalDataSet in the nightly documentation or my current version of >>> VTK (6.1). It does appear in an earlier version though (5.10.0). Is there >>> any reason why it was removed? >>> >>> If there isn't a special class for this, does it make sense to simply >>> add multiple data arrays to a single data object, one for each time point? >>> Or is it better to have a data object for each time point? >>> >>> Thanks, >>> 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 >>> >>> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu May 21 09:18:20 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 21 May 2015 09:18:20 -0400 Subject: [vtkusers] TEXTURE_BUFFER fails : pure OpenGL vs vtkgl ? In-Reply-To: <1432209345012-5731952.post@n5.nabble.com> References: <1432053399081-5731938.post@n5.nabble.com> <1432209345012-5731952.post@n5.nabble.com> Message-ID: Are you using OpenGL2 backend or 1 - Aashish On Thu, May 21, 2015 at 7:55 AM, Butterfly wrote: > I found out what exactly causes the error, *but I still do not understand > why > this is happenning...* > > Turns out that all function pointers that start with vtkgl::TexBuffer* and > vtkgl::TextureBuffer* are not valid function pointers. That is why calling > them causes the AccessViolationException (Access violation executing > location 0x00000000). > > I tested the function pointers like this: > > bool b = false; > > if (vtkgl::TexBufferEXT) > b = true; > if (vtkgl::TexBuffer) > b = true; > if (vtkgl::TexBufferARB) > b = true; > if (vtkgl::TextureBufferEXT) > b = true; > > After executing the above code, b is false. > > Other pointers are ok, for example these both return b = true : > if (vtkgl::UnmapBuffer) > b = true; > > if (vtkgl::TEXTURE_BUFFER_EXT) > b = true; > > I've read in the Internet that such kind of errors may occur if GLEW is not > correctly initialized > (https://www.opengl.org/wiki/OpenGL_Loading_Library#GLEW ). *One should > set > glewExperimental=TRUE and call glewInit(). But how am I supposed to do this > using VTKOpenGL? Should I do this at all ?* > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/TEXTURE-BUFFER-fails-pure-OpenGL-vs-vtkgl-tp5731938p5731952.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu May 21 09:26:37 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 21 May 2015 09:26:37 -0400 Subject: [vtkusers] Segmentation fault when trying to export a vtk mesh In-Reply-To: References: Message-ID: Luc, Sorry, I didn't see that. I don't see anything else that is obvious. I suggest compiling in debug mode and running it through a debugger to see where it is crashing. Cory On Thu, May 21, 2015 at 8:09 AM, Luc Valade wrote: > Hi Cory > > I already calls writer->SetFileName("test.vtp"). I also prints > "writer->GetFileName()" into console to check, and there is no problem here. > > Luc > > > 2015-05-21 13:48 GMT+02:00 Cory Quammen : >> >> You haven't called writer->SetFileName() to specify where the file >> should be saved. That is necessary and may fix your crash - though >> there should be a more graceful approach to handling an empty file >> name than crashing, so that may not be it. >> >> HTH, >> Cory >> >> On Thu, May 21, 2015 at 3:34 AM, Luc Valade wrote: >> > Hi, >> > >> > >> > >> > I have a problem with the export of vtk meshes using vtkXMLWriter class. >> > Indeed, my project builds without any problem, but during the run, the >> > call >> > of the vtkXMLWriter method Write() generates a segmentation fault. >> > >> > >> > >> > I works on Windows and uses qtcreator and qmake. I uses the version 6.2 >> > of >> > vtk. I've already build tutorial vtk projects using qmake to learn how >> > to >> > well linked projects to vtk dlls, and it worked well. >> > >> > >> > >> > Here is the projet I tried to run without success (.pro and main.cpp >> > file) >> > >> > >> > >> > TEMPLATE = app >> > >> > >> > >> > CONFIG += console >> > >> > CONFIG -= app_bundle >> > >> > CONFIG -= qt >> > >> > >> > >> > SOURCES += main.cpp >> > >> > >> > >> > INCLUDEPATH += "C:\Program Files (x86)\VTK\include\vtk-6.2" >> > >> > LIBS += "-LC:\Program Files (x86)\VTK\lib" >> > >> > LIBS += -lvtkCommonDataModel-6.2.dll \ >> > >> > -lvtkCommonCore-6.2.dll \ >> > >> > -lvtkIOXML-6.2.dll >> > >> > >> > >> > >> > >> > #include >> > >> > #include >> > >> > #include >> > >> > #include >> > >> > #include >> > >> > #include >> > >> > >> > >> > int main ( int, char *[] ) >> > >> > { >> > >> > // Create 10 points. >> > >> > vtkSmartPointer points = >> > >> > vtkSmartPointer::New(); >> > >> > >> > >> > for ( unsigned int i = 0; i < 10; ++i ) >> > >> > { >> > >> > points->InsertNextPoint ( i, i, i ); >> > >> > } >> > >> > >> > >> > // Create a polydata object and add the points to it. >> > >> > vtkSmartPointer polydata = >> > >> > vtkSmartPointer::New(); >> > >> > polydata->SetPoints(points); >> > >> > >> > >> > // Write the file >> > >> > vtkSmartPointer writer = >> > >> > vtkSmartPointer::New(); >> > >> > writer->SetFileName("test.vtp"); >> > >> > #if VTK_MAJOR_VERSION <= 5 >> > >> > writer->SetInput(polydata); >> > >> > #else >> > >> > writer->SetInputData(polydata); >> > >> > #endif >> > >> > >> > >> > // Optional - set the mode. The default is binary. >> > >> > //writer->SetDataModeToBinary(); >> > >> > //writer->SetDataModeToAscii(); >> > >> > >> > >> > writer->Write(); >> > >> > >> > >> > return EXIT_SUCCESS; >> > >> > } >> > >> > >> > Thanks in advance for any help. >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. > > -- Cory Quammen R&D Engineer Kitware, Inc. From lucj.valade at gmail.com Thu May 21 09:35:44 2015 From: lucj.valade at gmail.com (Luc Valade) Date: Thu, 21 May 2015 15:35:44 +0200 Subject: [vtkusers] Segmentation fault when trying to export a vtk mesh In-Reply-To: References: Message-ID: The debugger stops here: 0 libstdc++-6!_ZNSt6localeaSERKS_ 1 libstdc++-6!_ZNSt8ios_base7_M_initEv 2 libstdc++-6!_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E 3 vtkXMLWriter::OpenFile() 4 vtkXMLWriter::OpenStream() 5 vtkXMLUnstructuredDataWriter::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) 6 vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) 7 vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) 8 vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) 9 vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) 10 vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) 11 vtkDemandDrivenPipeline::UpdateData(int) 12 vtkStreamingDemandDrivenPipeline::Update(int) 13 vtkAlgorithm::Update() 14 vtkXMLWriter::Write() 15 main main.cpp 2015-05-21 15:26 GMT+02:00 Cory Quammen : > Luc, > > Sorry, I didn't see that. I don't see anything else that is obvious. I > suggest compiling in debug mode and running it through a debugger to > see where it is crashing. > > Cory > > On Thu, May 21, 2015 at 8:09 AM, Luc Valade wrote: > > Hi Cory > > > > I already calls writer->SetFileName("test.vtp"). I also prints > > "writer->GetFileName()" into console to check, and there is no problem > here. > > > > Luc > > > > > > 2015-05-21 13:48 GMT+02:00 Cory Quammen : > >> > >> You haven't called writer->SetFileName() to specify where the file > >> should be saved. That is necessary and may fix your crash - though > >> there should be a more graceful approach to handling an empty file > >> name than crashing, so that may not be it. > >> > >> HTH, > >> Cory > >> > >> On Thu, May 21, 2015 at 3:34 AM, Luc Valade > wrote: > >> > Hi, > >> > > >> > > >> > > >> > I have a problem with the export of vtk meshes using vtkXMLWriter > class. > >> > Indeed, my project builds without any problem, but during the run, the > >> > call > >> > of the vtkXMLWriter method Write() generates a segmentation fault. > >> > > >> > > >> > > >> > I works on Windows and uses qtcreator and qmake. I uses the version > 6.2 > >> > of > >> > vtk. I've already build tutorial vtk projects using qmake to learn how > >> > to > >> > well linked projects to vtk dlls, and it worked well. > >> > > >> > > >> > > >> > Here is the projet I tried to run without success (.pro and main.cpp > >> > file) > >> > > >> > > >> > > >> > TEMPLATE = app > >> > > >> > > >> > > >> > CONFIG += console > >> > > >> > CONFIG -= app_bundle > >> > > >> > CONFIG -= qt > >> > > >> > > >> > > >> > SOURCES += main.cpp > >> > > >> > > >> > > >> > INCLUDEPATH += "C:\Program Files (x86)\VTK\include\vtk-6.2" > >> > > >> > LIBS += "-LC:\Program Files (x86)\VTK\lib" > >> > > >> > LIBS += -lvtkCommonDataModel-6.2.dll \ > >> > > >> > -lvtkCommonCore-6.2.dll \ > >> > > >> > -lvtkIOXML-6.2.dll > >> > > >> > > >> > > >> > > >> > > >> > #include > >> > > >> > #include > >> > > >> > #include > >> > > >> > #include > >> > > >> > #include > >> > > >> > #include > >> > > >> > > >> > > >> > int main ( int, char *[] ) > >> > > >> > { > >> > > >> > // Create 10 points. > >> > > >> > vtkSmartPointer points = > >> > > >> > vtkSmartPointer::New(); > >> > > >> > > >> > > >> > for ( unsigned int i = 0; i < 10; ++i ) > >> > > >> > { > >> > > >> > points->InsertNextPoint ( i, i, i ); > >> > > >> > } > >> > > >> > > >> > > >> > // Create a polydata object and add the points to it. > >> > > >> > vtkSmartPointer polydata = > >> > > >> > vtkSmartPointer::New(); > >> > > >> > polydata->SetPoints(points); > >> > > >> > > >> > > >> > // Write the file > >> > > >> > vtkSmartPointer writer = > >> > > >> > vtkSmartPointer::New(); > >> > > >> > writer->SetFileName("test.vtp"); > >> > > >> > #if VTK_MAJOR_VERSION <= 5 > >> > > >> > writer->SetInput(polydata); > >> > > >> > #else > >> > > >> > writer->SetInputData(polydata); > >> > > >> > #endif > >> > > >> > > >> > > >> > // Optional - set the mode. The default is binary. > >> > > >> > //writer->SetDataModeToBinary(); > >> > > >> > //writer->SetDataModeToAscii(); > >> > > >> > > >> > > >> > writer->Write(); > >> > > >> > > >> > > >> > return EXIT_SUCCESS; > >> > > >> > } > >> > > >> > > >> > Thanks in advance for any help. > >> > > >> > > >> > _______________________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Please keep messages on-topic and check the VTK FAQ at: > >> > http://www.vtk.org/Wiki/VTK_FAQ > >> > > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/vtkusers > >> > > >> > >> > >> > >> -- > >> Cory Quammen > >> R&D Engineer > >> Kitware, Inc. > > > > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Thu May 21 10:11:05 2015 From: tossin at gmail.com (Evan Kao) Date: Thu, 21 May 2015 07:11:05 -0700 Subject: [vtkusers] VTK Time support In-Reply-To: References: Message-ID: Hi Dan, I haven't yet. That seems really helpful. However, since VTKPythonAlgorithm was developed recently, does that mean the temporal filters (and other streaming filters) are essentially unusable in previous versions of VTK in Python? - Evan On Thu, May 21, 2015 at 6:11 AM, Dan Lipsa wrote: > Evan, > Have you seen this blog post: > > http://www.kitware.com/blog/home/post/783 > > > On Thu, May 21, 2015 at 3:59 AM, Evan Kao wrote: > >> Hi David, >> >> I guess more simply/specifically, I was wondering how to set up a data >> object (in Python) so that it's compatible with temporal filters like >> vtkTemporalShiftScale, vtkTemporalInterpolator, or >> vtkTemporalStreamTracer. It seems like these filters take in multi-block >> data, in which each block represents a different time point, but I have no >> idea how to specify the time value for each block. >> >> Thanks, >> Evan Kao >> >> On Wed, May 20, 2015 at 6:16 PM, David E DeMarle < >> dave.demarle at kitware.com> wrote: >> >>> It is still there, just that the classnames have morphed repeatedly >>> since it was first introduced. >>> >>> See Filters/General/vtkTimeSourceExample.h >>> and Common/ExecutionModel/Testing/Cxx/TestTemporalSupport.cxx for decent >>> places to start investigating. >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Wed, May 20, 2015 at 8:53 PM, Evan Kao wrote: >>> >>>> Hello vtk-users, >>>> >>>> What's the best way to store/handle time-varying data with VTK? I >>>> found this Wiki page on >>>> Time Support, which says it's been implemented, but couldn't find the class >>>> vtkTemporalDataSet in the nightly documentation or my current version of >>>> VTK (6.1). It does appear in an earlier version though (5.10.0). Is there >>>> any reason why it was removed? >>>> >>>> If there isn't a special class for this, does it make sense to simply >>>> add multiple data arrays to a single data object, one for each time point? >>>> Or is it better to have a data object for each time point? >>>> >>>> Thanks, >>>> 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 >>>> >>>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 ninarock at list.ru Thu May 21 10:14:49 2015 From: ninarock at list.ru (Butterfly) Date: Thu, 21 May 2015 07:14:49 -0700 (MST) Subject: [vtkusers] TEXTURE_BUFFER fails : pure OpenGL vs vtkgl ? In-Reply-To: References: <1432053399081-5731938.post@n5.nabble.com> <1432209345012-5731952.post@n5.nabble.com> Message-ID: <1432217689540-5731960.post@n5.nabble.com> The first one, the default. I've built VTK with default options. Did not try VTK_RENDERING_BACKEND OpenGL2. -- View this message in context: http://vtk.1045678.n5.nabble.com/TEXTURE-BUFFER-fails-pure-OpenGL-vs-vtkgl-tp5731938p5731960.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Thu May 21 10:15:58 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 21 May 2015 10:15:58 -0400 Subject: [vtkusers] VTK Time support In-Reply-To: References: Message-ID: You can do it with vtkProgrammableSource (python algorithm's predecessor) too. It just takes a little more effort. What you need to do is provide a function to the RequestInformaiton entry point, and in there announce the time extent information. Likewise in RequestData you have to look at the requested time and provide the appropriate data. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, May 21, 2015 at 10:11 AM, Evan Kao wrote: > Hi Dan, > > I haven't yet. That seems really helpful. However, since > VTKPythonAlgorithm was developed recently, does that mean the temporal > filters (and other streaming filters) are essentially unusable in previous > versions of VTK in Python? > > - Evan > > On Thu, May 21, 2015 at 6:11 AM, Dan Lipsa wrote: > >> Evan, >> Have you seen this blog post: >> >> http://www.kitware.com/blog/home/post/783 >> >> >> On Thu, May 21, 2015 at 3:59 AM, Evan Kao wrote: >> >>> Hi David, >>> >>> I guess more simply/specifically, I was wondering how to set up a data >>> object (in Python) so that it's compatible with temporal filters like >>> vtkTemporalShiftScale, vtkTemporalInterpolator, or >>> vtkTemporalStreamTracer. It seems like these filters take in multi-block >>> data, in which each block represents a different time point, but I have no >>> idea how to specify the time value for each block. >>> >>> Thanks, >>> Evan Kao >>> >>> On Wed, May 20, 2015 at 6:16 PM, David E DeMarle < >>> dave.demarle at kitware.com> wrote: >>> >>>> It is still there, just that the classnames have morphed repeatedly >>>> since it was first introduced. >>>> >>>> See Filters/General/vtkTimeSourceExample.h >>>> and Common/ExecutionModel/Testing/Cxx/TestTemporalSupport.cxx for decent >>>> places to start investigating. >>>> >>>> >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Wed, May 20, 2015 at 8:53 PM, Evan Kao wrote: >>>> >>>>> Hello vtk-users, >>>>> >>>>> What's the best way to store/handle time-varying data with VTK? I >>>>> found this Wiki page on >>>>> Time Support, which says it's been implemented, but couldn't find the class >>>>> vtkTemporalDataSet in the nightly documentation or my current version of >>>>> VTK (6.1). It does appear in an earlier version though (5.10.0). Is there >>>>> any reason why it was removed? >>>>> >>>>> If there isn't a special class for this, does it make sense to simply >>>>> add multiple data arrays to a single data object, one for each time point? >>>>> Or is it better to have a data object for each time point? >>>>> >>>>> Thanks, >>>>> 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 >>>>> >>>>> >>>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 May 21 18:45:03 2015 From: tossin at gmail.com (Evan Kao) Date: Thu, 21 May 2015 15:45:03 -0700 Subject: [vtkusers] VTK Time support In-Reply-To: References: Message-ID: Thanks for the explanation. I had another related question when it comes to reading (and possibly writing) data as a time series. Is it possible to emulate in VTK say a very simple Paraview pipeline, where I basically just apply 2 classes, a reader and a streaming filter e.g. the equivalent of File > Open, Filters > Temporal Interpolator in Paraview? And if so, which readers/file formats could work? -------------- next part -------------- An HTML attachment was scrubbed... URL: From majcjc at gmail.com Thu May 21 21:02:25 2015 From: majcjc at gmail.com (Lin M) Date: Thu, 21 May 2015 21:02:25 -0400 Subject: [vtkusers] How to import vtk in python? Message-ID: Hi all, When I'm trying to import vtk in python 2.7, it showed that >>> import vtk Traceback (most recent call last): File "", line 1, in File "C:\Users\Marlin\Documents\Projects\VTK\VTK-dev\bin\Wrapping\Python\vtk\__init__.py", line 39, in from vtkCommonCore import * File "C:\Users\Marlin\Documents\Projects\VTK\VTK-dev\bin\Wrapping\Python\vtk\vtkCommonCore.py", line 1, in from vtkCommonCorePython import * ImportError: No module named vtkCommonCorePython I have turned the VTK_WRAP_PYTHON on and set the environment variable PYTHONPPATH with BIN_PATH/Wrapping/Python. Does anyone have any idea about that? Thank you very much! Best, Lin -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Thu May 21 21:05:45 2015 From: david.thompson at kitware.com (David Thompson) Date: Thu, 21 May 2015 21:05:45 -0400 Subject: [vtkusers] How to import vtk in python? In-Reply-To: References: Message-ID: <673D537F-E4EB-45B3-AC38-7353551AED74@kitware.com> Hi Lin, This problem is usually caused because VTK libraries and Python files are not installed in Python's default search paths. Try setting the PYTHONPATH environment variable to include VTK's lib and lib/site-packages directories. Alternatively, instead of running Python, run the vtkpython program that gets built as part of VTK. It automatically adds the correct search paths and starts up a Python interpreter for you. David > On May 21, 2015, at 9:02 PM, Lin M wrote: > > Hi all, > > When I'm trying to import vtk in python 2.7, it showed that > > >>> import vtk > Traceback (most recent call last): > File "", line 1, in > File "C:\Users\Marlin\Documents\Projects\VTK\VTK-dev\bin\Wrapping\Python\vtk\__init__.py", line 39, in > from vtkCommonCore import * > File "C:\Users\Marlin\Documents\Projects\VTK\VTK-dev\bin\Wrapping\Python\vtk\vtkCommonCore.py", line 1, in > from vtkCommonCorePython import * > ImportError: No module named vtkCommonCorePython > > I have turned the VTK_WRAP_PYTHON on and set the environment variable PYTHONPPATH with BIN_PATH/Wrapping/Python. > > Does anyone have any idea about that? Thank you very much! > > Best, > Lin > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 david.thompson at kitware.com Thu May 21 21:09:23 2015 From: david.thompson at kitware.com (David Thompson) Date: Thu, 21 May 2015 21:09:23 -0400 Subject: [vtkusers] How to import vtk in python? In-Reply-To: <673D537F-E4EB-45B3-AC38-7353551AED74@kitware.com> References: <673D537F-E4EB-45B3-AC38-7353551AED74@kitware.com> Message-ID: > ... Try setting the PYTHONPATH environment variable to include VTK's lib and lib/site-packages directories. ... Correction: lib/site-packages is the way ParaView organizes things, not VTK. You still need to add lib (and maybe bin on Windows) to PYTHONPATH, in addition to Wrapping/Python. David From majcjc at gmail.com Thu May 21 21:50:50 2015 From: majcjc at gmail.com (Lin M) Date: Thu, 21 May 2015 21:50:50 -0400 Subject: [vtkusers] How to import vtk in python? In-Reply-To: References: <673D537F-E4EB-45B3-AC38-7353551AED74@kitware.com> Message-ID: Hi Dr. Thompson, Thank you! I tried to add lib and bin folder to the PYTHONPATA but it still failed to find the module. Running vtkPython directly leads python command line with correct vtk module but I'm not very clear about how to run the python test in this way. PS. I found two executable files vtkWrapPython-6.3.exe and vtkWrapPythonInit-6.3.exe. What's the use of them? Best, Lin On Thu, May 21, 2015 at 9:09 PM, David Thompson wrote: > > ... Try setting the PYTHONPATH environment variable to include VTK's lib > and lib/site-packages directories. ... > > Correction: lib/site-packages is the way ParaView organizes things, not > VTK. > > You still need to add lib (and maybe bin on Windows) to PYTHONPATH, in > addition to Wrapping/Python. > > David -------------- next part -------------- An HTML attachment was scrubbed... URL: From majcjc at gmail.com Thu May 21 21:57:52 2015 From: majcjc at gmail.com (Lin M) Date: Thu, 21 May 2015 21:57:52 -0400 Subject: [vtkusers] How to import vtk in python? In-Reply-To: References: <673D537F-E4EB-45B3-AC38-7353551AED74@kitware.com> Message-ID: I made a silly mistake. VS creates a subfolder bin/Debug and puts all the executable files there. After adding this folder, it works now. :-) On Thu, May 21, 2015 at 9:50 PM, Lin M wrote: > Hi Dr. Thompson, > > Thank you! > > I tried to add lib and bin folder to the PYTHONPATA but it still failed to > find the module. > > Running vtkPython directly leads python command line with correct vtk > module but I'm not very clear about how to run the python test in this way. > > PS. I found two executable files vtkWrapPython-6.3.exe and > vtkWrapPythonInit-6.3.exe. What's the use of them? > > Best, > Lin > > On Thu, May 21, 2015 at 9:09 PM, David Thompson < > david.thompson at kitware.com> wrote: > >> > ... Try setting the PYTHONPATH environment variable to include VTK's >> lib and lib/site-packages directories. ... >> >> Correction: lib/site-packages is the way ParaView organizes things, not >> VTK. >> >> You still need to add lib (and maybe bin on Windows) to PYTHONPATH, in >> addition to Wrapping/Python. >> >> David > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Thu May 21 22:00:22 2015 From: david.thompson at kitware.com (David Thompson) Date: Thu, 21 May 2015 22:00:22 -0400 Subject: [vtkusers] How to import vtk in python? In-Reply-To: References: <673D537F-E4EB-45B3-AC38-7353551AED74@kitware.com> Message-ID: <9A49133F-C72F-4402-9A8A-F9A504C7F3DF@kitware.com> Hi Lin, > I tried to add lib and bin folder to the PYTHONPATA but it still failed to find the module. Looks like you may need to modify your PATH environment variable as well as PYTHONPATH. See here: http://stackoverflow.com/questions/214852/python-module-dlls for how to do that on Windows. > Running vtkPython directly leads python command line with correct vtk module but I'm not very clear about how to run the python test in this way. You can run "ctest -N -V -R vtkFiltersBezierPython-PatchInterpolation" to see the command line for running the Python test. Note that ctest sets environment variables for the tests it runs but does not list them along with the command line. So running the test with ctest sometimes works when starting things from the command line does not. > > PS. I found two executable files vtkWrapPython-6.3.exe and vtkWrapPythonInit-6.3.exe. What's the use of them? They are used to generate source code that makes VTK classes available in python and prepare a python interpreter. David From david.thompson at kitware.com Thu May 21 22:01:09 2015 From: david.thompson at kitware.com (David Thompson) Date: Thu, 21 May 2015 22:01:09 -0400 Subject: [vtkusers] How to import vtk in python? In-Reply-To: References: <673D537F-E4EB-45B3-AC38-7353551AED74@kitware.com> Message-ID: > I made a silly mistake. VS creates a subfolder bin/Debug and puts all the executable files there. After adding this folder, it works now. :-) Great! I am glad it's working. David From dan.lipsa at kitware.com Fri May 22 10:07:37 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 22 May 2015 10:07:37 -0400 Subject: [vtkusers] VTK Time support In-Reply-To: References: Message-ID: You can see the vtk class used by a particular ParaView filter in ./ParaViewCore/ServerManager/SMApplication/Resources/filters.xml Search for the filter name in name="..." attribute, the class will be specified in class="...". There is also a readers.xml file in the same folder to look for readers. Dan On Thu, May 21, 2015 at 6:45 PM, Evan Kao wrote: > Thanks for the explanation. I had another related question when it comes > to reading (and possibly writing) data as a time series. Is it possible to > emulate in VTK say a very simple Paraview pipeline, where I basically just > apply 2 classes, a reader and a streaming filter e.g. the equivalent of > File > Open, Filters > Temporal Interpolator in Paraview? And if so, which > readers/file formats could work? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.oleary at kitware.com Fri May 22 13:06:29 2015 From: patrick.oleary at kitware.com (Patrick O'Leary) Date: Fri, 22 May 2015 11:06:29 -0600 Subject: [vtkusers] Call for papers: ISAV: In Situ Infrastructures for Enabling Extreme-Scale Message-ID: === Call for papers: ISAV: In Situ Infrastructures for Enabling Extreme-Scale Analysis and Visualization === an SC15 Workshop, Monday afternoon 16 November 2015 Event web page: http://vis.lbl.gov/Events/ISAV-2015/ This workshop brings together researchers, developers and practitioners from industry, academia, and government laboratories who use in situ methods in extreme-scale, high performance computing. The goal is to present existing in-situ infrastructures, reference examples in a range of science and engineering applications, to discuss topics like opportunities presented by new architectures; existing infrastructure needs, requirements, and gaps; and experiences to foster and enable in situ analysis and visualization. The considerable interest in the HPC community regarding in situ analysis and visualization is due to several factors. First is an I/O cost savings, where data is analyzed/visualized while being generated, without first storing to a filesystem. Second is the potential for increased accuracy, where fine temporal sampling of transient analysis might expose some complex behavior missed in coarse temporal sampling. Third is the ability to use all available resources, CPU?s and accelerators, in the computation of analysis products. In Situ processing is still a relatively new idea, and up until recently, most implementations have been ad hoc, proof-of-concept prototypes. However, several in situ infrastructure implementations have emerged. ParaView and VisIt both provide tools for in situ analysis and visualization. ParaView Catalyst can be linked to a simulation, allowing the simulation to share data with Catalyst for visualization. Similar capabilities are available within VisIt with the libsim library. Both Catalyst (through Live) and libsim enable the opposite flow of information, sending data from the client to the simulation, enabling the possibility of simulation steering. ADIOS and GLEAN allow simulations to adopt in situ techniques by leveraging their advanced I/O infrastructures that enable co-analysis pipelines rather than changing the simulator. The non-intrusive integration provide resilience to third party library bugs and possible jitter in the simulation. Participation/Call for Papers We invite short (4-page) papers that identify opportunities, challenges and case studies/best practices for in situ analysis and visualization. These papers could propose actions, or provide position, or experience reports on in situ analysis and visualization. Areas of interest for ISAV, include, but are not limited to: * In situ infrastructures - Current Systems: production quality, research prototypes - Opportunities - Gaps * System resources, hardware, and emerging architectures - Enabling Hardware - Hardware and architectures that provide opportunities for In situ processing, such as burst buffers, staging computations on I/O nodes, sharing cores within a node for both simulation and in situ processing * Examples/Case studies - Best practices - Analysis: feature detection, statistical methods, temporal methods, geometric methods - Visualization: information visualization, scientific visualization, time-varying methods - Data reduction/compression * Simulation - Integration:data modeling, software-engineering - Resilience: error detection, fault recovery - Workflows for supporting complex in situ processing pipelines * Requirements - Preserve important elements - Significantly reduce the data size - Flexibility for post-processing exploration == Submitting Papers == Submissions are limited to 4 pages in the ACM format (see http://www.acm.org/sigs/publications/proceedings-templates). The 4-page limit includes figures, tables, and appendices, but does not include references, for which you may use up to one additional page. Please submit your paper via the ISAV 2015 EasyChair submission page at https://easychair.org/conferences/?conf=isav2015. == Timelines/Important Dates: == 1 August 2015 Paper submission deadline 1 September 2015 Author notification 15 September 2015 Camera ready copy due mid-October 2015 Final program posted to ISAV web page 16 November 2015 ISAV workshop == Organizers/Program Committee == Organizers E. Wes Bethel, ewbethel at lbl.gov, Lawrence Berkeley National Laboratory, USA Venkatram Vishwanath, venkat at anl.gov, Argonne National Laboratory, USA Gunther H. Weber, ghweber at lbl.gov, Lawrence Berkeley National Laboratory, USA Matthew Wolf, mwolf at cc.gatech.edu, Georgia Institute of Technology, USA Program Committee Utkarsh Ayachit, Kitware Inc., USA Earl P.N. Duque, Intelligent Light, USA Nicola Ferrier, Argonne National Laboratory, USA Burlen Loring, Lawrence Berkeley National Laboratory, USA Dmitriy Morozov, Lawrence Berkeley National Laboratory, USA Patrick O?Leary, Kitware Inc., USA Manish Parashar, Rutgers, USA Karsten Schwan, Georgia Institute of Technology, USA Alex Sim, Lawrence Berkeley National Laboratory, USA Brad Whitlock, Intelligent Light, USA Kesheng (John) Wu, Lawrence Berkeley National Laboratory, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Fri May 22 14:13:01 2015 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Fri, 22 May 2015 18:13:01 +0000 Subject: [vtkusers] Volume Cell Picker picking a glyph actor that is no longer there. Message-ID: <46CB11F12B9DC24D860D4082451B318A14F628D3@exchange3.microbrightfield.com> Hey all, Okay, got a weird issue that I'm trying to resolve and not having much luck with it. I have a glyph3D actor that contains 10 points. I can use the picker to pick a glyph3D point and it works great. The number of actors for the picker is 1. I then change the vtkpolydata that is used as data points for the glyph to have 3 points as opposed to 10 points. I do this by taking the first polydata and reducing the number of points to 3, then calling the Update() method and then create a new actor with the remaining 7 points and great a new glyph with the 7 points. Once this is done, I have two actors in my scene (one with 3 points and one with 7 points). The scene looks correct and things are great. Now the weirdness. If I use the picker to pick a point on the second actor (with 7 points), the number of actors that the picker returns is 2. The picker seems to always think that the first, full-size, polydata still exists and returns me a pointer to the new actor AND to the first actor. Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Fri May 22 16:17:17 2015 From: tossin at gmail.com (Evan Kao) Date: Fri, 22 May 2015 13:17:17 -0700 Subject: [vtkusers] VTK Time support In-Reply-To: References: Message-ID: Hello Dan, Thanks for the info. In this case, the VTK counterparts seem to be straightforward, but I think there might be something going on in Paraview behind the scenes that I don't understand, especially since not all readers seem to be able to handle time-dependent data. For instance, reading in time-dependent EnSight data into ParaView and applying the Temporal Interpolator filter is pretty trivial. But I can't figure out how to replicate this in VTK using the related filters vtkGenericEnSightReader and vtkTemporalInterpolator, since the former doesn't seem to innately read time series (it will can 1 timepoint at a time). I'm specifically wondering if I can there is a reader and corresponding data format that exists that would allow me to simply use its output as the input to a streaming filter like: reader = vtk.vtkSomeReader() reader.SetFileName(filename) ti = vtk.vtkTemporalInterpolator() ti.SetInputConnection(reader.GetOutputPort()) ti.Update() But it seems like I probably can't avoid learning the VTK Pipeline and using vtkPythonAlgorithm or vtkProgrammableSource/Filter. On a related note, in my attempts to emulate some Paraview features, I've tried playing around with some of Paraview-specific VTK classes by importing from paraview.pvvtkextensions, but I get a TypeError ("method requires a VTK object") when I attempt to mix and match VTK objects that were created using another VTK library, e.g.: import paraview.pvvvtkextensions as pvvtk import vtk a = pvvtk.vtkPGenericEnsightReader() b = vtk.vtkTemporalInterpolator() b.SetInputConnection(a.GetOutputPort()) TypeError: SetInputData argument 1: method requires a VTK object I noticed this occurs when I try to mix and match VTK versions (e.g. 6.1 and 5.10), but in this case, both versions of VTK are the same (6.1). Paraview and VTK were both installed using binaries. Why does this occur, and is there a way to avoid this? Thanks, Evan Kao On Fri, May 22, 2015 at 7:07 AM, Dan Lipsa wrote: > You can see the vtk class used by a particular ParaView filter in > ./ParaViewCore/ServerManager/SMApplication/Resources/filters.xml > > Search for the filter name in name="..." attribute, the class will be > specified in class="...". > There is also a readers.xml file in the same folder to look for readers. > > Dan > > > > On Thu, May 21, 2015 at 6:45 PM, Evan Kao wrote: > >> Thanks for the explanation. I had another related question when it comes >> to reading (and possibly writing) data as a time series. Is it possible to >> emulate in VTK say a very simple Paraview pipeline, where I basically just >> apply 2 classes, a reader and a streaming filter e.g. the equivalent of >> File > Open, Filters > Temporal Interpolator in Paraview? And if so, which >> readers/file formats could work? >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Fri May 22 17:01:27 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 22 May 2015 17:01:27 -0400 Subject: [vtkusers] VTK Time support In-Reply-To: References: Message-ID: Evan, Probably the easiest route is to directly use ParaView from python, instead of trying to replicate ParaView behavior using VTK. Checkout http://www.paraview.org/paraview-guide/ You'll have to use pvpython so checkout all sections that mention this in their title. For instance section 2.2.1 deals with temporal file series. Dan On Fri, May 22, 2015 at 4:17 PM, Evan Kao wrote: > Hello Dan, > > Thanks for the info. In this case, the VTK counterparts seem to be > straightforward, but I think there might be something going on in Paraview > behind the scenes that I don't understand, especially since not all readers > seem to be able to handle time-dependent data. > > For instance, reading in time-dependent EnSight data into ParaView and > applying the Temporal Interpolator filter is pretty trivial. But I can't > figure out how to replicate this in VTK using the related filters > vtkGenericEnSightReader and vtkTemporalInterpolator, since the former > doesn't seem to innately read time series (it will can 1 timepoint at a > time). > > I'm specifically wondering if I can there is a reader and corresponding > data format that exists that would allow me to simply use its output as the > input to a streaming filter like: > > reader = vtk.vtkSomeReader() > reader.SetFileName(filename) > ti = vtk.vtkTemporalInterpolator() > ti.SetInputConnection(reader.GetOutputPort()) > ti.Update() > > But it seems like I probably can't avoid learning the VTK Pipeline and > using vtkPythonAlgorithm or vtkProgrammableSource/Filter. > > > On a related note, in my attempts to emulate some Paraview features, I've > tried playing around with some of Paraview-specific VTK classes by > importing from paraview.pvvtkextensions, but I get a TypeError ("method > requires a VTK object") when I attempt to mix and match VTK objects that > were created using another VTK library, e.g.: > > import paraview.pvvvtkextensions as pvvtk > import vtk > > a = pvvtk.vtkPGenericEnsightReader() > b = vtk.vtkTemporalInterpolator() > b.SetInputConnection(a.GetOutputPort()) > > TypeError: SetInputData argument 1: method requires a VTK object > > I noticed this occurs when I try to mix and match VTK versions (e.g. 6.1 > and 5.10), but in this case, both versions of VTK are the same (6.1). > Paraview and VTK were both installed using binaries. Why does this occur, > and is there a way to avoid this? > > Thanks, > Evan Kao > > On Fri, May 22, 2015 at 7:07 AM, Dan Lipsa wrote: > >> You can see the vtk class used by a particular ParaView filter in >> ./ParaViewCore/ServerManager/SMApplication/Resources/filters.xml >> >> Search for the filter name in name="..." attribute, the class will be >> specified in class="...". >> There is also a readers.xml file in the same folder to look for readers. >> >> Dan >> >> >> >> On Thu, May 21, 2015 at 6:45 PM, Evan Kao wrote: >> >>> Thanks for the explanation. I had another related question when it >>> comes to reading (and possibly writing) data as a time series. Is it >>> possible to emulate in VTK say a very simple Paraview pipeline, where I >>> basically just apply 2 classes, a reader and a streaming filter e.g. the >>> equivalent of File > Open, Filters > Temporal Interpolator in Paraview? >>> And if so, which readers/file formats could work? >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Sun May 24 00:24:22 2015 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Sat, 23 May 2015 21:24:22 -0700 (MST) Subject: [vtkusers] How to make vtkGPUVolumeRaycastMapper works fast on ubuntu Message-ID: <1432441462911-5731984.post@n5.nabble.com> Hello everyone, I have write a volume rendering demo on linux using the vtkGPUVolumeRaycastMapper, but it works very slowly. I test the same code on windows system, but It works very fast. I dont't know why this happened? Does anyone know how to increase its rendering speed on ubuntu? Many thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-make-vtkGPUVolumeRaycastMapper-works-fast-on-ubuntu-tp5731984.html Sent from the VTK - Users mailing list archive at Nabble.com. From franciscolopezdelafranca at gmail.com Mon May 25 03:54:02 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Mon, 25 May 2015 09:54:02 +0200 Subject: [vtkusers] vtkNIFTIImageReader.h: No such file or directory Message-ID: Hi everybody. I'd like to read a NIFTI image from VTK. I downloaded and compiled VTK 6.1.0, but when I include the vtkNIFTIImageReader header file, the compilation gives the error "No such file or directory". I've searched for the header file into the VTK directory and it is true, there is no such a file. I've tested with vtkImageReader2 and compilation goes fine, but the NIFTI file read does not seem to go well. Does anybody know what the problem could be? Thanks a lot. My best regards. /Francisco P.D.: My CMakeLists.txt contains the next lines: cmake_minimum_required(VERSION 2.8) project(CV_TFM_CONVEX_HULL) # Find VTK. find_package(VTK REQUIRED) include(${VTK_USE_FILE}) set(CV_TFM_CONVEX_HULL_SRC CV_TFM_ConvexHull.cxx) add_executable(CV_TFM_CONVEX_HULL ${CV_TFM_CONVEX_HULL_SRC}) target_link_libraries(CV_TFM_CONVEX_HULL ${VTK_LIBRARIES}) -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 25 08:25:31 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 May 2015 06:25:31 -0600 Subject: [vtkusers] vtkNIFTIImageReader.h: No such file or directory In-Reply-To: References: Message-ID: Hi Francisco, The vtkNIFTIImageReader did not appear until VTK 6.2. There are two options that I can recommend: 1) Use the VTK git master, which has the most recent update to the NIFTI reader (the vtkNIFTIImageReader in VTK 6.2 gives the wrong sform offset in some situations, this is fixed in git master). 2) If you want to keep the VTK you have, then you can get the NIFTI reader separately by building the vtk-dicom package: https://github.com/dgobbi/vtk-dicom (the class is called "vtkNIFTIReader" in vtk-dicom, but is otherwise identical to the one in the VTK git master branch). Cheers, - David On Mon, May 25, 2015 at 1:54 AM, Francisco Lopez de la Franca < franciscolopezdelafranca at gmail.com> wrote: > Hi everybody. > I'd like to read a NIFTI image from VTK. > I downloaded and compiled VTK 6.1.0, but when I include the > vtkNIFTIImageReader header file, the compilation gives the error "No such > file or directory". > I've searched for the header file into the VTK directory and it is true, > there is no such a file. > > I've tested with vtkImageReader2 and compilation goes fine, but the NIFTI > file read does not seem to go well. > > Does anybody know what the problem could be? > > Thanks a lot. > My best regards. > /Francisco > > P.D.: My CMakeLists.txt contains the next lines: > > cmake_minimum_required(VERSION 2.8) > > project(CV_TFM_CONVEX_HULL) > > # Find VTK. > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > > set(CV_TFM_CONVEX_HULL_SRC CV_TFM_ConvexHull.cxx) > > add_executable(CV_TFM_CONVEX_HULL ${CV_TFM_CONVEX_HULL_SRC}) > > target_link_libraries(CV_TFM_CONVEX_HULL ${VTK_LIBRARIES}) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Mon May 25 08:35:49 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Mon, 25 May 2015 14:35:49 +0200 Subject: [vtkusers] vtkNIFTIImageReader.h: No such file or directory In-Reply-To: References: Message-ID: Hi. Thanks a lot. I've just downloaded VTK 6.2.0 and I've realised that there it is what I need. But, I take advantage of this moment to tell about another problem. I read a NIFTI file (abc.nii) through vtkNIFTIImageReader. Its output is passed to either vtkHull or vtkDelaunay3D in order to get the convex hull of the objects in the Nifti image. And, in the end, I write their result with vtkNIFTIImageWriter. The compilation goes right, but the execution (on a Windows system) does not produce anything and I hardly see a "command prompt" window flashing only once, but I am unable to read its content. I think there must be some incompatibility between the output of vtkNifitiImageReader and the input to vtkHull or vtkDelaunay3D, or something similar. Any suggestion on how to read a NIFTI file and get its convex hull and then write it to another Nifti file. Thank you very much. /Francisco 2015-05-25 14:25 GMT+02:00 David Gobbi : > Hi Francisco, > > The vtkNIFTIImageReader did not appear until VTK 6.2. > There are two options that I can recommend: > > 1) Use the VTK git master, which has the most recent update to the NIFTI > reader (the vtkNIFTIImageReader in VTK 6.2 gives the wrong sform offset in > some situations, this is fixed in git master). > > 2) If you want to keep the VTK you have, then you can get the NIFTI reader > separately by building the vtk-dicom package: > https://github.com/dgobbi/vtk-dicom (the class is called "vtkNIFTIReader" > in vtk-dicom, but is otherwise identical to the one in the VTK git master > branch). > > Cheers, > - David > > > > On Mon, May 25, 2015 at 1:54 AM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com> wrote: > >> Hi everybody. >> I'd like to read a NIFTI image from VTK. >> I downloaded and compiled VTK 6.1.0, but when I include the >> vtkNIFTIImageReader header file, the compilation gives the error "No such >> file or directory". >> I've searched for the header file into the VTK directory and it is true, >> there is no such a file. >> >> I've tested with vtkImageReader2 and compilation goes fine, but the NIFTI >> file read does not seem to go well. >> >> Does anybody know what the problem could be? >> >> Thanks a lot. >> My best regards. >> /Francisco >> >> P.D.: My CMakeLists.txt contains the next lines: >> >> cmake_minimum_required(VERSION 2.8) >> >> project(CV_TFM_CONVEX_HULL) >> >> # Find VTK. >> find_package(VTK REQUIRED) >> include(${VTK_USE_FILE}) >> >> set(CV_TFM_CONVEX_HULL_SRC CV_TFM_ConvexHull.cxx) >> >> add_executable(CV_TFM_CONVEX_HULL ${CV_TFM_CONVEX_HULL_SRC}) >> >> target_link_libraries(CV_TFM_CONVEX_HULL ${VTK_LIBRARIES}) >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 25 08:48:27 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 May 2015 06:48:27 -0600 Subject: [vtkusers] vtkNIFTIImageReader.h: No such file or directory In-Reply-To: References: Message-ID: Hi Francisco, The vtkHull and vtkDelaunay3D classes require vtkPolyData as input. I suspect that you need vtkImageMarchingCubes or vtkContourFilter. However, the output of these filters cannot be written to a NIFTI file. In fact, I'm a bit confused when you say "write a convex hull to a NIFTI file". A convex hull is a geometrical surface (e.g. made of polygons), but NIFTI is an image file format. - David On Mon, May 25, 2015 at 6:35 AM, Francisco Lopez de la Franca < franciscolopezdelafranca at gmail.com> wrote: > Hi. > Thanks a lot. I've just downloaded VTK 6.2.0 and I've realised that there > it is what I need. > But, I take advantage of this moment to tell about another problem. > > I read a NIFTI file (abc.nii) through vtkNIFTIImageReader. Its output is > passed to either vtkHull or vtkDelaunay3D in order to get the convex hull > of the objects in the Nifti image. > > And, in the end, I write their result with vtkNIFTIImageWriter. > > The compilation goes right, but the execution (on a Windows system) does > not produce anything and I hardly see a "command prompt" window flashing > only once, but I am unable to read its content. > > I think there must be some incompatibility between the output of > vtkNifitiImageReader and the input to vtkHull or vtkDelaunay3D, or > something similar. > > Any suggestion on how to read a NIFTI file and get its convex hull and > then write it to another Nifti file. > > Thank you very much. > /Francisco > > 2015-05-25 14:25 GMT+02:00 David Gobbi : > >> Hi Francisco, >> >> The vtkNIFTIImageReader did not appear until VTK 6.2. >> There are two options that I can recommend: >> >> 1) Use the VTK git master, which has the most recent update to the NIFTI >> reader (the vtkNIFTIImageReader in VTK 6.2 gives the wrong sform offset in >> some situations, this is fixed in git master). >> >> 2) If you want to keep the VTK you have, then you can get the NIFTI >> reader separately by building the vtk-dicom package: >> https://github.com/dgobbi/vtk-dicom (the class is called >> "vtkNIFTIReader" in vtk-dicom, but is otherwise identical to the one in the >> VTK git master branch). >> >> Cheers, >> - David >> >> >> >> On Mon, May 25, 2015 at 1:54 AM, Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com> wrote: >> >>> Hi everybody. >>> I'd like to read a NIFTI image from VTK. >>> I downloaded and compiled VTK 6.1.0, but when I include the >>> vtkNIFTIImageReader header file, the compilation gives the error "No such >>> file or directory". >>> I've searched for the header file into the VTK directory and it is true, >>> there is no such a file. >>> >>> I've tested with vtkImageReader2 and compilation goes fine, but the >>> NIFTI file read does not seem to go well. >>> >>> Does anybody know what the problem could be? >>> >>> Thanks a lot. >>> My best regards. >>> /Francisco >>> >>> P.D.: My CMakeLists.txt contains the next lines: >>> >>> cmake_minimum_required(VERSION 2.8) >>> >>> project(CV_TFM_CONVEX_HULL) >>> >>> # Find VTK. >>> find_package(VTK REQUIRED) >>> include(${VTK_USE_FILE}) >>> >>> set(CV_TFM_CONVEX_HULL_SRC CV_TFM_ConvexHull.cxx) >>> >>> add_executable(CV_TFM_CONVEX_HULL ${CV_TFM_CONVEX_HULL_SRC}) >>> >>> target_link_libraries(CV_TFM_CONVEX_HULL ${VTK_LIBRARIES}) >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmitrievko at gmail.com Mon May 25 12:35:16 2015 From: dmitrievko at gmail.com (Konstantin) Date: Mon, 25 May 2015 09:35:16 -0700 (MST) Subject: [vtkusers] 3D Volume Registration Message-ID: <1432571716007-5731990.post@n5.nabble.com> Hi everybody, I have a question about registration. I have two 3D CT Scans of the same patient, there are taken at different times (the second one is taken 30 seconds after the first one), but the problem is due to patient movements they are slightly different, so I want to transform one of them to match the other. I'm not really sure where to start. Could you please direct me into the right direction? Thank you. -- View this message in context: http://vtk.1045678.n5.nabble.com/3D-Volume-Registration-tp5731990.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon May 25 13:16:59 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 May 2015 11:16:59 -0600 Subject: [vtkusers] 3D Volume Registration In-Reply-To: <1432571716007-5731990.post@n5.nabble.com> References: <1432571716007-5731990.post@n5.nabble.com> Message-ID: Hi Konstantin, I have some image registration code for VTK on github: https://github.com/dgobbi/AIRS But most people use ITK for image registration, or they use ITK-based command-line tools like ANTs, or they download an image analysis suite like FSL. - David On Mon, May 25, 2015 at 10:35 AM, Konstantin wrote: > Hi everybody, > > I have a question about registration. I have two 3D CT Scans of the same > patient, there are taken at different times (the second one is taken 30 > seconds after the first one), but the problem is due to patient movements > they are slightly different, so I want to transform one of them to match > the > other. > > I'm not really sure where to start. Could you please direct me into the > right direction? > > Thank you. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Boettcher at kleintierklinik.uni-leipzig.de Mon May 25 14:50:07 2015 From: Boettcher at kleintierklinik.uni-leipzig.de (=?iso-8859-1?Q?B=F6ttcher=2C_Prof=2E_Dr=2E_Peter?=) Date: Mon, 25 May 2015 18:50:07 +0000 Subject: [vtkusers] ImageBlending in Compound Mode Message-ID: <6F6862A90839CE478D2A3146C2C31B4F104F29@EMAIL2.ktk.uni-leipzig.de> Dear All I have two vtkImageData which I map to grey and green color using vtkImageMapToWindowLevelColors->SetOutputFormatToRGBA. The two LookUps are manually defined like this: tableGreen->SetTableRange(0,256-1); tableGreen->Build(); for(float i=1; i<256; i++) tableGreen->SetTableValue(i,0,i/(256-1),0.0,1.0); // Green tableGreen->SetTableValue(0,0.0,0.0,0.0,0.0); // Background tableGrey->SetTableRange(0,256-1); tableGrey->Build(); for(float i=0; i<256; i++) tableGrey->SetTableValue(i,i/(256-1),i/(256-1), i/(256-1),1.0); // Grey Using vtkImageBlend I would like to blend both images using different opcity values (0 - 1), but ignoring any black pixel in the green image, by using SetCompoundMode and CompoundThreshold = 0. m_blend_A->SetInput(0, GreyImage); m_blend_A->SetOpacity(0, 0.3); m_blend_A->SetInput(1, GreenImage); m_blend_A->SetOpacity(1, 0.7); m_blend_A->SetBlendModeToCompound(); m_blend_A->SetCompoundThreshold(0); m_blend_A->Update(); Whatever I do, the "black" pixels (background) in the green image are still overlayed on the grey image pixels. However, when I turn the threshold to anything other than 0 no pixel at all are pushed trough the blender (neither the green nor the grey image). Any help would be much appreciated. Thanks - Peter --------------------------------------------------------- Prof. Dr. Peter B?ttcher, DipECVS European Veterinary Specialist in Surgery Fachtierarzt f?r Kleintierchirurgie Klinik f?r Kleintiere Universit?t Leipzig An den Tierkliniken 23 D-04103 Leipzig (Germany) Tel: +49-341-9738700 Fax: +49-341-9738799 Email: boettcher at kleintierklinik.uni-leipzig.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 25 15:44:25 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 May 2015 13:44:25 -0600 Subject: [vtkusers] ImageBlending in Compound Mode In-Reply-To: <6F6862A90839CE478D2A3146C2C31B4F104F29@EMAIL2.ktk.uni-leipzig.de> References: <6F6862A90839CE478D2A3146C2C31B4F104F29@EMAIL2.ktk.uni-leipzig.de> Message-ID: I'm not very familiar with the Compounding mode, but is there any reason why you cannot use the default mode, i.e. alpha-blending? m_blend_A->SetInput(0, GreyImage); m_blend_A->SetInput(1, GreenImage); m_blend_A->SetOpacity(1, 0.7); m_blend_A->Update(); By setting the opacity of the green image to 0.7, the opacity of the "base" image is automatically (1.0 - 0.7). Black pixels in the green image (any pixel with alpha==0) will be completely transparent. - David On Mon, May 25, 2015 at 12:50 PM, B?ttcher, Prof. Dr. Peter < Boettcher at kleintierklinik.uni-leipzig.de> wrote: > Dear All > > > > I have two vtkImageData which I map to grey and green color using > vtkImageMapToWindowLevelColors->SetOutputFormatToRGBA. The two LookUps > are manually defined like this: > > > > tableGreen->SetTableRange(0,256-1); > > tableGreen->Build(); > > for(float i=1; i<256; i++) > > tableGreen->SetTableValue(i,0,i/(256-1),0.0,1.0); // > Green > > tableGreen->SetTableValue(0,0.0,0.0,0.0,0.0); // > Background > > > > tableGrey->SetTableRange(0,256-1); > > tableGrey->Build(); > > for(float i=0; i<256; i++) > > tableGrey->SetTableValue(i,i/(256-1),i/(256-1), > i/(256-1),1.0); // Grey > > > > > > Using vtkImageBlend I would like to blend both images using different > opcity values (0 - 1), but ignoring any black pixel in the green image, by > using SetCompoundMode and CompoundThreshold = 0. > > > > m_blend_A->SetInput(0, GreyImage); > > m_blend_A->SetOpacity(0, 0.3); > > m_blend_A->SetInput(1, GreenImage); > > m_blend_A->SetOpacity(1, 0.7); > > m_blend_A->SetBlendModeToCompound(); > > m_blend_A->SetCompoundThreshold(0); > > m_blend_A->Update(); > > > > Whatever I do, the "black" pixels (background) in the green image are > still overlayed on the grey image pixels. However, when I turn the > threshold to anything other than 0 no pixel at all are pushed trough the > blender (neither the green nor the grey image). > > > > Any help would be much appreciated. > > > > Thanks - Peter > > > > > > > > --------------------------------------------------------- > > Prof. Dr. Peter B?ttcher, DipECVS > > European Veterinary Specialist in Surgery > > Fachtierarzt f?r Kleintierchirurgie > > Klinik f?r Kleintiere > > Universit?t Leipzig > > An den Tierkliniken 23 > > D-04103 Leipzig (Germany) > > Tel: +49-341-9738700 > > Fax: +49-341-9738799 > > Email: boettcher at kleintierklinik.uni-leipzig.de > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmitrievko at gmail.com Mon May 25 16:11:40 2015 From: dmitrievko at gmail.com (Konstantin) Date: Mon, 25 May 2015 13:11:40 -0700 (MST) Subject: [vtkusers] 3D Volume Registration In-Reply-To: References: <1432571716007-5731990.post@n5.nabble.com> Message-ID: <1432584700583-5731994.post@n5.nabble.com> Ah thank you! -- View this message in context: http://vtk.1045678.n5.nabble.com/3D-Volume-Registration-tp5731990p5731994.html Sent from the VTK - Users mailing list archive at Nabble.com. From dakota_63124 at yahoo.com Mon May 25 19:18:58 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Mon, 25 May 2015 16:18:58 -0700 (MST) Subject: [vtkusers] using vtkClipClosedSurface() on a box crashes Message-ID: <1432595938487-5731995.post@n5.nabble.com> I am trying to clip a box constructed as a polydata mesh. I have tried the vtkClipPolyData class based on the quadric surface example in the following link, but have not succeeded. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/SolidClip I found the vtkClipClosedSurface class and it seems like exactly what I am looking for, but I could not find any examples of how to use it. The code below shows my attempt. It crashes when calling the Update() method. Without that call, I get no visible result. Any help would be appreciated! Kent private static void createBox() { float[] points = { 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, }; int[] seq = { 4, 0, 1, 2, 3, 4, 1,5,6,2, 4, 5,4,7,6, 4, 4,0,3,7, 4, 0,1,5,4, 4, 3,2,6,7}; // create a plane for clipping vtkPlane plane = new vtkPlane(); plane.SetOrigin(0.0, 0.0, 0.5); plane.SetNormal(0, 0, 1); // create the box from points and sequence vtkPolyData polyData = new vtkPolyData(); vtkPoints vtkPoints = new vtkPoints(); vtkFloatArray d = new vtkFloatArray(); d.SetJavaArray(points); d.SetNumberOfComponents(3); vtkPoints.SetData(d); polyData.SetPoints(vtkPoints); vtkCellArray vtkCells = new vtkCellArray(); vtkIdTypeArray array = new vtkIdTypeArray(); vtkIntArray intArray = new vtkIntArray(); intArray.SetJavaArray(seq); array.DeepCopy(intArray); vtkCells.SetCells(seq.length, array); polyData.SetPolys(vtkCells); vtkClipClosedSurface clipClosedSurface = new vtkClipClosedSurface(); vtkPlaneCollection planes = new vtkPlaneCollection(); planes.AddItem(plane); clipClosedSurface.SetClippingPlanes(planes); clipClosedSurface.AddInputData(polyData); clipClosedSurface.Update(); // THIS CRASHES vtkDataSetMapper clipMapper = new vtkDataSetMapper(); clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); boxActor = new vtkActor(); boxActor.SetMapper(clipMapper); boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); } -- View this message in context: http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon May 25 20:08:46 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 May 2015 18:08:46 -0600 Subject: [vtkusers] using vtkClipClosedSurface() on a box crashes In-Reply-To: <1432595938487-5731995.post@n5.nabble.com> References: <1432595938487-5731995.post@n5.nabble.com> Message-ID: Hi Kent, Your code for building the polydata looks suspicious. If you put your box polydata directly into the mapper (i.e. without vtkClipClosedSurface) does it display properly? I translated your code into python (I'm not much of a Java programmer), and it ran without any errors: from vtk import * points = [ 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, ] seq = [ 4, 0,1,2,3, 4, 1,5,6,2, 4, 5,4,7,6, 4, 4,0,3,7, 4, 0,1,5,4, 4, 3,2,6,7 ] # create a plane for clipping plane = vtkPlane(); plane.SetOrigin(0.0, 0.0, 0.5); plane.SetNormal(0, 0, 1); # create the box from points and sequence polyData = vtkPolyData(); pts = vtkPoints(); for i in range(8): pts.InsertNextPoint(points[i*3:(i+1)*3]) polyData.SetPoints(pts); cells = vtkCellArray(); for i in range(6): cells.InsertNextCell(4) for j in range(1,5): cells.InsertCellPoint(seq[5*i + j]) polyData.SetPolys(cells); clipClosedSurface = vtkClipClosedSurface(); planes = vtkPlaneCollection(); planes.AddItem(plane); clipClosedSurface.SetClippingPlanes(planes); clipClosedSurface.AddInputData(polyData); clipClosedSurface.Update(); # THIS CRASHES clipMapper = vtkDataSetMapper(); clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); boxActor = vtkActor(); boxActor.SetMapper(clipMapper); boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); ren = vtkRenderer() ren.AddActor(boxActor) win = vtkRenderWindow() win.AddRenderer(ren) iren = vtkRenderWindowInteractor() win.SetInteractor(iren) iren.Initialize() iren.Start() On Mon, May 25, 2015 at 5:18 PM, kent myers via vtkusers wrote: > I am trying to clip a box constructed as a polydata mesh. I have tried the > vtkClipPolyData class based on the quadric surface example in the following > link, but have not succeeded. > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/SolidClip > > I found the vtkClipClosedSurface class and it seems like exactly what I am > looking for, but I could not find any examples of how to use it. The code > below shows my attempt. It crashes when calling the Update() method. > Without that call, I get no visible result. > > Any help would be appreciated! > > Kent > > private static void createBox() { > float[] points = { > 0.0f, 0.0f, 0.0f, > 1.0f, 0.0f, 0.0f, > 1.0f, 1.0f, 0.0f, > 0.0f, 1.0f, 0.0f, > 0.0f, 0.0f, 1.0f, > 1.0f, 0.0f, 1.0f, > 1.0f, 1.0f, 1.0f, > 0.0f, 1.0f, 1.0f, > }; > int[] seq = { > 4, 0, 1, 2, 3, > 4, 1,5,6,2, > 4, 5,4,7,6, > 4, 4,0,3,7, > 4, 0,1,5,4, > 4, 3,2,6,7}; > > > // create a plane for clipping > vtkPlane plane = new vtkPlane(); > plane.SetOrigin(0.0, 0.0, 0.5); > plane.SetNormal(0, 0, 1); > > // create the box from points and sequence > vtkPolyData polyData = new vtkPolyData(); > vtkPoints vtkPoints = new vtkPoints(); > vtkFloatArray d = new vtkFloatArray(); > d.SetJavaArray(points); > d.SetNumberOfComponents(3); > vtkPoints.SetData(d); > polyData.SetPoints(vtkPoints); > vtkCellArray vtkCells = new vtkCellArray(); > vtkIdTypeArray array = new vtkIdTypeArray(); > vtkIntArray intArray = new vtkIntArray(); > intArray.SetJavaArray(seq); > array.DeepCopy(intArray); > vtkCells.SetCells(seq.length, array); > polyData.SetPolys(vtkCells); > > vtkClipClosedSurface clipClosedSurface = new > vtkClipClosedSurface(); > vtkPlaneCollection planes = new vtkPlaneCollection(); > planes.AddItem(plane); > clipClosedSurface.SetClippingPlanes(planes); > clipClosedSurface.AddInputData(polyData); > clipClosedSurface.Update(); // THIS CRASHES > > vtkDataSetMapper clipMapper = new vtkDataSetMapper(); > > clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); > > boxActor = new vtkActor(); > boxActor.SetMapper(clipMapper); > boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); > > } > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakota_63124 at yahoo.com Mon May 25 20:23:29 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Mon, 25 May 2015 17:23:29 -0700 (MST) Subject: [vtkusers] using vtkClipClosedSurface() on a box crashes In-Reply-To: References: <1432595938487-5731995.post@n5.nabble.com> Message-ID: <174177885.1967241.1432599630236.JavaMail.yahoo@mail.yahoo.com> Hi David, I did display the box successfully.? This method was extracted from a complete demo ?application that I submitted to the bug tracker as issue 0015487.? I have attached it here if you want to look at it.? This would not be the first time that the Java API crashes using methods that work in other languages. You said it ran without errors.? Did you get a properly clipped box as a result?? It started out as a cube and I put the clipping plane half the height of the cube. Thanks for taking a look. Kent On Monday, May 25, 2015 5:09 PM, David Gobbi [via VTK] wrote: Hi Kent, Your code for building the polydata looks suspicious.? If you put your box polydata directly into the mapper (i.e. without vtkClipClosedSurface) does it display properly?? I translated your code into python (I'm not much of a Java programmer), and it ran without any errors: from vtk import * points = [? 0.0, 0.0, 0.0,? 1.0, 0.0, 0.0,? 1.0, 1.0, 0.0,? 0.0, 1.0, 0.0,? 0.0, 0.0, 1.0,? 1.0, 0.0, 1.0,? 1.0, 1.0, 1.0,? 0.0, 1.0, 1.0,] seq = [? 4, 0,1,2,3,? 4, 1,5,6,2,? 4, 5,4,7,6,? 4, 4,0,3,7,? 4, 0,1,5,4,? 4, 3,2,6,7] # create a plane for clippingplane = vtkPlane();plane.SetOrigin(0.0, 0.0, 0.5);plane.SetNormal(0, 0, 1); # create the box from points and sequencepolyData = vtkPolyData();pts = vtkPoints();for i in range(8):? ? pts.InsertNextPoint(points[i*3:(i+1)*3])polyData.SetPoints(pts);cells = vtkCellArray();for i in range(6):? ? cells.InsertNextCell(4)? ? for j in range(1,5):? ? ? ? cells.InsertCellPoint(seq[5*i + j])polyData.SetPolys(cells); clipClosedSurface = vtkClipClosedSurface();planes = vtkPlaneCollection();planes.AddItem(plane);clipClosedSurface.SetClippingPlanes(planes);clipClosedSurface.AddInputData(polyData);clipClosedSurface.Update(); ? # THIS CRASHES clipMapper = vtkDataSetMapper();clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); boxActor = vtkActor();boxActor.SetMapper(clipMapper);boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); ren = vtkRenderer()ren.AddActor(boxActor) win = vtkRenderWindow()win.AddRenderer(ren) iren = vtkRenderWindowInteractor()win.SetInteractor(iren) iren.Initialize()iren.Start() On Mon, May 25, 2015 at 5:18 PM, kent myers via vtkusers <[hidden email]> wrote: I am trying to clip a box constructed as a polydata mesh.? I have tried the vtkClipPolyData class based on the quadric surface example in the following link, but have not succeeded. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/SolidClip I found the vtkClipClosedSurface class and it seems like exactly what I am looking for, but I could not find any examples of how to use it.? The code below shows my attempt.? It crashes when calling the Update() method. Without that call, I get no visible result. Any help would be appreciated! Kent ? ? ? ? private static void createBox() { ? ? ? ? ? ? ? ? float[] points = { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 0.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 0.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 1.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 1.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 0.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 0.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 1.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 1.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }; ? ? ? ? ? ? ? ? int[] seq = { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 0, 1, 2, 3, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 1,5,6,2, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 5,4,7,6, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 4,0,3,7, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 0,1,5,4, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 3,2,6,7}; ? ? ? ? ? ? ? ? // create a plane for clipping ? ? ? ? ? ? ? ? vtkPlane plane = new vtkPlane(); ? ? ? ? ? ? ? ? plane.SetOrigin(0.0, 0.0, 0.5); ? ? ? ? ? ? ? ? plane.SetNormal(0, 0, 1); ? ? ? ? ? ? ? ? // create the box from points and sequence ? ? ? ? ? ? ? ? vtkPolyData polyData = new vtkPolyData(); ? ? ? ? ? ? ? ? vtkPoints vtkPoints = new vtkPoints(); ? ? ? ? ? ? ? ? vtkFloatArray d = new vtkFloatArray(); ? ? ? ? ? ? ? ? d.SetJavaArray(points); ? ? ? ? ? ? ? ? d.SetNumberOfComponents(3); ? ? ? ? ? ? ? ? vtkPoints.SetData(d); ? ? ? ? ? ? ? ? polyData.SetPoints(vtkPoints); ? ? ? ? ? ? ? ? vtkCellArray vtkCells = new vtkCellArray(); ? ? ? ? ? ? ? ? vtkIdTypeArray array = new vtkIdTypeArray(); ? ? ? ? ? ? ? ? vtkIntArray intArray = new vtkIntArray(); ? ? ? ? ? ? ? ? intArray.SetJavaArray(seq); ? ? ? ? ? ? ? ? array.DeepCopy(intArray); ? ? ? ? ? ? ? ? vtkCells.SetCells(seq.length, array); ? ? ? ? ? ? ? ? polyData.SetPolys(vtkCells); ? ? ? ? ? ? ? ? vtkClipClosedSurface clipClosedSurface = new vtkClipClosedSurface(); ? ? ? ? ? ? ? ? vtkPlaneCollection planes = new vtkPlaneCollection(); ? ? ? ? ? ? ? ? planes.AddItem(plane); ? ? ? ? ? ? ? ? clipClosedSurface.SetClippingPlanes(planes); ? ? ? ? ? ? ? ? clipClosedSurface.AddInputData(polyData); ? ? ? ? ? ? ? ? clipClosedSurface.Update();? ?// THIS CRASHES ? ? ? ? ? ? ? ? vtkDataSetMapper clipMapper = new vtkDataSetMapper(); ? ? ? ? ? ? ? ? clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); ? ? ? ? ? ? ? ? boxActor = new vtkActor(); ? ? ? ? ? ? ? ? boxActor.SetMapper(clipMapper); ? ? ? ? ? ? ? ? boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); ? ? ? ? } _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5731996.html To unsubscribe from using vtkClipClosedSurface() on a box crashes, click here. NAML vtkCuttingPlane.java (8K) -- View this message in context: http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5731997.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 25 20:32:28 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 May 2015 18:32:28 -0600 Subject: [vtkusers] using vtkClipClosedSurface() on a box crashes In-Reply-To: <174177885.1967241.1432599630236.JavaMail.yahoo@mail.yahoo.com> References: <1432595938487-5731995.post@n5.nabble.com> <174177885.1967241.1432599630236.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Kent, Yes, it displayed half a box (see attached screenshot). Let's just say that code like "vtkPoints vtkPoints = new vtkPoints();" doesn't fill me with confidence. Can you try building the polydata as per my python example and see if that works? - David On Mon, May 25, 2015 at 6:23 PM, kent myers via vtkusers wrote: > Hi David, > > I did display the box successfully. This method was extracted from a > complete demo application that I submitted to the bug tracker as issue > 0015487. I have attached it here if you want to look at it. This would > not be the first time that the Java API crashes using methods that work in > other languages. > > You said it ran without errors. Did you get a properly clipped box as a > result? It started out as a cube and I put the clipping plane half the > height of the cube. > > Thanks for taking a look. > > Kent > > > > > > On Monday, May 25, 2015 5:09 PM, David Gobbi [via VTK] <[hidden email] > > wrote: > > > Hi Kent, > > Your code for building the polydata looks suspicious. If you put your box > polydata directly into the mapper (i.e. without vtkClipClosedSurface) does > it display properly? > > I translated your code into python (I'm not much of a Java programmer), > and it ran without any errors: > > > from vtk import * > > points = [ > 0.0, 0.0, 0.0, > 1.0, 0.0, 0.0, > 1.0, 1.0, 0.0, > 0.0, 1.0, 0.0, > 0.0, 0.0, 1.0, > 1.0, 0.0, 1.0, > 1.0, 1.0, 1.0, > 0.0, 1.0, 1.0, > ] > > seq = [ > 4, 0,1,2,3, > 4, 1,5,6,2, > 4, 5,4,7,6, > 4, 4,0,3,7, > 4, 0,1,5,4, > 4, 3,2,6,7 > ] > > # create a plane for clipping > plane = vtkPlane(); > plane.SetOrigin(0.0, 0.0, 0.5); > plane.SetNormal(0, 0, 1); > > # create the box from points and sequence > polyData = vtkPolyData(); > pts = vtkPoints(); > for i in range(8): > pts.InsertNextPoint(points[i*3:(i+1)*3]) > polyData.SetPoints(pts); > cells = vtkCellArray(); > for i in range(6): > cells.InsertNextCell(4) > for j in range(1,5): > cells.InsertCellPoint(seq[5*i + j]) > polyData.SetPolys(cells); > > clipClosedSurface = vtkClipClosedSurface(); > planes = vtkPlaneCollection(); > planes.AddItem(plane); > clipClosedSurface.SetClippingPlanes(planes); > clipClosedSurface.AddInputData(polyData); > clipClosedSurface.Update(); # THIS CRASHES > > clipMapper = vtkDataSetMapper(); > clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); > > boxActor = vtkActor(); > boxActor.SetMapper(clipMapper); > boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); > > ren = vtkRenderer() > ren.AddActor(boxActor) > > win = vtkRenderWindow() > win.AddRenderer(ren) > > iren = vtkRenderWindowInteractor() > win.SetInteractor(iren) > > iren.Initialize() > iren.Start() > > On Mon, May 25, 2015 at 5:18 PM, kent myers via vtkusers <[hidden email]> > wrote: > > I am trying to clip a box constructed as a polydata mesh. I have tried the > vtkClipPolyData class based on the quadric surface example in the following > link, but have not succeeded. > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/SolidClip > > I found the vtkClipClosedSurface class and it seems like exactly what I am > looking for, but I could not find any examples of how to use it. The code > below shows my attempt. It crashes when calling the Update() method. > Without that call, I get no visible result. > > Any help would be appreciated! > > Kent > > private static void createBox() { > float[] points = { > 0.0f, 0.0f, 0.0f, > 1.0f, 0.0f, 0.0f, > 1.0f, 1.0f, 0.0f, > 0.0f, 1.0f, 0.0f, > 0.0f, 0.0f, 1.0f, > 1.0f, 0.0f, 1.0f, > 1.0f, 1.0f, 1.0f, > 0.0f, 1.0f, 1.0f, > }; > int[] seq = { > 4, 0, 1, 2, 3, > 4, 1,5,6,2, > 4, 5,4,7,6, > 4, 4,0,3,7, > 4, 0,1,5,4, > 4, 3,2,6,7}; > > > // create a plane for clipping > vtkPlane plane = new vtkPlane(); > plane.SetOrigin(0.0, 0.0, 0.5); > plane.SetNormal(0, 0, 1); > > // create the box from points and sequence > vtkPolyData polyData = new vtkPolyData(); > vtkPoints vtkPoints = new vtkPoints(); > vtkFloatArray d = new vtkFloatArray(); > d.SetJavaArray(points); > d.SetNumberOfComponents(3); > vtkPoints.SetData(d); > polyData.SetPoints(vtkPoints); > vtkCellArray vtkCells = new vtkCellArray(); > vtkIdTypeArray array = new vtkIdTypeArray(); > vtkIntArray intArray = new vtkIntArray(); > intArray.SetJavaArray(seq); > array.DeepCopy(intArray); > vtkCells.SetCells(seq.length, array); > polyData.SetPolys(vtkCells); > > vtkClipClosedSurface clipClosedSurface = new > vtkClipClosedSurface(); > vtkPlaneCollection planes = new vtkPlaneCollection(); > planes.AddItem(plane); > clipClosedSurface.SetClippingPlanes(planes); > clipClosedSurface.AddInputData(polyData); > clipClosedSurface.Update(); // THIS CRASHES > > vtkDataSetMapper clipMapper = new vtkDataSetMapper(); > > clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); > > boxActor = new vtkActor(); > boxActor.SetMapper(clipMapper); > boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); > > } > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5731996.html > To unsubscribe from using vtkClipClosedSurface() on a box crashes, click > here. > NAML > > > > > *vtkCuttingPlane.java* (8K) Download Attachment > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ScreenShot.png Type: image/png Size: 22796 bytes Desc: not available URL: From alizamani84 at live.com Mon May 25 21:37:43 2015 From: alizamani84 at live.com (alitimer) Date: Mon, 25 May 2015 18:37:43 -0700 (MST) Subject: [vtkusers] give direction to cylinder In-Reply-To: References: Message-ID: <1432604263913-5731999.post@n5.nabble.com> Hey buddies,Please excuse me if my question is not related to this question!Anyone can give me the data format for plotting 3D cylinder in vtk format to be plotted in parraview containing start point, radius and length;I already did for spheres in UNSTRUCTURED_GRID format (with applying GLYTH filter):# vtk DataFile Version 2.0Unstructured grid legacy vtk file with point scalar dataASCIIDATASET UNSTRUCTURED_GRIDPOINTS 3 double7 16 916 16 2125 34 36POINT_DATA 3SCALARS radii doubleLOOKUP_TABLE default51013It's urgent for my project, if anybody knows how to import the similar format for plotting in parraview I will much appreciate that.Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/give-direction-to-cylinder-tp5714741p5731999.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakota_63124 at yahoo.com Mon May 25 21:55:36 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Mon, 25 May 2015 18:55:36 -0700 (MST) Subject: [vtkusers] using vtkClipClosedSurface() on a box crashes In-Reply-To: References: <1432595938487-5731995.post@n5.nabble.com> <174177885.1967241.1432599630236.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1741900188.1971280.1432605156506.JavaMail.yahoo@mail.yahoo.com> Hi David, Changing to your technique of filling the point and cells did solve the problem.? One reason I did not do it that way is because in my actual application, I have 10's of thousands of points and I do not want to make a Java API call to store every point and every cell connection.? I am afraid the efficiency hit would be very high.? I found the technique?of copying the entire point and cell data arrays in one call in an article that you wrote: http://public.kitware.com/pipermail/vtkusers/2010-January/056525.html Of course it was C++, but?since the methods are in the Java API, I assumed it was a safe method to use.? Do you know of a better way to pass the java points and cell definitions more efficiently than one by one? Thanks, Kent On Monday, May 25, 2015 5:33 PM, David Gobbi [via VTK] wrote: Hi Kent, Yes, it displayed half a box (see attached screenshot). Let's just say that code like "vtkPoints vtkPoints = new vtkPoints();"doesn't fill me with confidence. Can you try building the polydataas per my python example and see if that works? - David On Mon, May 25, 2015 at 6:23 PM, kent myers via vtkusers <[hidden email]> wrote: Hi David, I did display the box successfully.? This method was extracted from a complete demo ?application that I submitted to the bug tracker as issue 0015487.? I have attached it here if you want to look at it.? This would not be the first time that the Java API crashes using methods that work in other languages. You said it ran without errors.? Did you get a properly clipped box as a result?? It started out as a cube and I put the clipping plane half the height of the cube. Thanks for taking a look. Kent On Monday, May 25, 2015 5:09 PM, David Gobbi [via VTK] <[hidden email]> wrote: Hi Kent, Your code for building the polydata looks suspicious.? If you put your box polydata directly into the mapper (i.e. without vtkClipClosedSurface) does it display properly?? I translated your code into python (I'm not much of a Java programmer), and it ran without any errors: from vtk import * points = [? 0.0, 0.0, 0.0,? 1.0, 0.0, 0.0,? 1.0, 1.0, 0.0,? 0.0, 1.0, 0.0,? 0.0, 0.0, 1.0,? 1.0, 0.0, 1.0,? 1.0, 1.0, 1.0,? 0.0, 1.0, 1.0,] seq = [? 4, 0,1,2,3,? 4, 1,5,6,2,? 4, 5,4,7,6,? 4, 4,0,3,7,? 4, 0,1,5,4,? 4, 3,2,6,7] # create a plane for clippingplane = vtkPlane();plane.SetOrigin(0.0, 0.0, 0.5);plane.SetNormal(0, 0, 1); # create the box from points and sequencepolyData = vtkPolyData();pts = vtkPoints();for i in range(8):? ? pts.InsertNextPoint(points[i*3:(i+1)*3])polyData.SetPoints(pts);cells = vtkCellArray();for i in range(6):? ? cells.InsertNextCell(4)? ? for j in range(1,5):? ? ? ? cells.InsertCellPoint(seq[5*i + j])polyData.SetPolys(cells); clipClosedSurface = vtkClipClosedSurface();planes = vtkPlaneCollection();planes.AddItem(plane);clipClosedSurface.SetClippingPlanes(planes);clipClosedSurface.AddInputData(polyData);clipClosedSurface.Update(); ? # THIS CRASHES clipMapper = vtkDataSetMapper();clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); boxActor = vtkActor();boxActor.SetMapper(clipMapper);boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); ren = vtkRenderer()ren.AddActor(boxActor) win = vtkRenderWindow()win.AddRenderer(ren) iren = vtkRenderWindowInteractor()win.SetInteractor(iren) iren.Initialize()iren.Start() On Mon, May 25, 2015 at 5:18 PM, kent myers via vtkusers <[hidden email]> wrote: I am trying to clip a box constructed as a polydata mesh.? I have tried the vtkClipPolyData class based on the quadric surface example in the following link, but have not succeeded. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/SolidClip I found the vtkClipClosedSurface class and it seems like exactly what I am looking for, but I could not find any examples of how to use it.? The code below shows my attempt.? It crashes when calling the Update() method. Without that call, I get no visible result. Any help would be appreciated! Kent ? ? ? ? private static void createBox() { ? ? ? ? ? ? ? ? float[] points = { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 0.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 0.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 1.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 1.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 0.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 0.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 1.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 1.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }; ? ? ? ? ? ? ? ? int[] seq = { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 0, 1, 2, 3, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 1,5,6,2, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 5,4,7,6, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 4,0,3,7, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 0,1,5,4, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 3,2,6,7}; ? ? ? ? ? ? ? ? // create a plane for clipping ? ? ? ? ? ? ? ? vtkPlane plane = new vtkPlane(); ? ? ? ? ? ? ? ? plane.SetOrigin(0.0, 0.0, 0.5); ? ? ? ? ? ? ? ? plane.SetNormal(0, 0, 1); ? ? ? ? ? ? ? ? // create the box from points and sequence ? ? ? ? ? ? ? ? vtkPolyData polyData = new vtkPolyData(); ? ? ? ? ? ? ? ? vtkPoints vtkPoints = new vtkPoints(); ? ? ? ? ? ? ? ? vtkFloatArray d = new vtkFloatArray(); ? ? ? ? ? ? ? ? d.SetJavaArray(points); ? ? ? ? ? ? ? ? d.SetNumberOfComponents(3); ? ? ? ? ? ? ? ? vtkPoints.SetData(d); ? ? ? ? ? ? ? ? polyData.SetPoints(vtkPoints); ? ? ? ? ? ? ? ? vtkCellArray vtkCells = new vtkCellArray(); ? ? ? ? ? ? ? ? vtkIdTypeArray array = new vtkIdTypeArray(); ? ? ? ? ? ? ? ? vtkIntArray intArray = new vtkIntArray(); ? ? ? ? ? ? ? ? intArray.SetJavaArray(seq); ? ? ? ? ? ? ? ? array.DeepCopy(intArray); ? ? ? ? ? ? ? ? vtkCells.SetCells(seq.length, array); ? ? ? ? ? ? ? ? polyData.SetPolys(vtkCells); ? ? ? ? ? ? ? ? vtkClipClosedSurface clipClosedSurface = new vtkClipClosedSurface(); ? ? ? ? ? ? ? ? vtkPlaneCollection planes = new vtkPlaneCollection(); ? ? ? ? ? ? ? ? planes.AddItem(plane); ? ? ? ? ? ? ? ? clipClosedSurface.SetClippingPlanes(planes); ? ? ? ? ? ? ? ? clipClosedSurface.AddInputData(polyData); ? ? ? ? ? ? ? ? clipClosedSurface.Update();? ?// THIS CRASHES ? ? ? ? ? ? ? ? vtkDataSetMapper clipMapper = new vtkDataSetMapper(); ? ? ? ? ? ? ? ? clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); ? ? ? ? ? ? ? ? boxActor = new vtkActor(); ? ? ? ? ? ? ? ? boxActor.SetMapper(clipMapper); ? ? ? ? ? ? ? ? boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); ? ? ? ? } _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5731996.html To unsubscribe from using vtkClipClosedSurface() on a box crashes, click here. NAML vtkCuttingPlane.java (8K) Download Attachment _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ScreenShot.png (30K) Download Attachment If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5731998.html To unsubscribe from using vtkClipClosedSurface() on a box crashes, click here. NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5732000.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 25 22:37:58 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 May 2015 20:37:58 -0600 Subject: [vtkusers] using vtkClipClosedSurface() on a box crashes In-Reply-To: <1741900188.1971280.1432605156506.JavaMail.yahoo@mail.yahoo.com> References: <1432595938487-5731995.post@n5.nabble.com> <174177885.1967241.1432599630236.JavaMail.yahoo@mail.yahoo.com> <1741900188.1971280.1432605156506.JavaMail.yahoo@mail.yahoo.com> Message-ID: Unfortunately, I don't know much about the Java wrappers... I didn't realize the SetJavaArray() method existed until I saw the code you posted. The crash could be due to something as simple as calling d.SetNumberOfComponents(3) after SetJavaArray(), instead of before. Or using a vtkIntArray instead of a vtkIdTypeArray. - David On Mon, May 25, 2015 at 7:55 PM, kent myers via vtkusers wrote: > Hi David, > > Changing to your technique of filling the point and cells did solve the > problem. One reason I did not do it that way is because in my actual > application, I have 10's of thousands of points and I do not want to make a > Java API call to store every point and every cell connection. I am afraid > the efficiency hit would be very high. I found the technique of copying > the entire point and cell data arrays in one call in an article that you > wrote: > > http://public.kitware.com/pipermail/vtkusers/2010-January/056525.html > > Of course it was C++, but since the methods are in the Java API, I assumed > it was a safe method to use. Do you know of a better way to pass the java > points and cell definitions more efficiently than one by one? > > Thanks, > > Kent > > > > On Monday, May 25, 2015 5:33 PM, David Gobbi [via VTK] <[hidden email] > > wrote: > > > Hi Kent, > > Yes, it displayed half a box (see attached screenshot). > > Let's just say that code like "vtkPoints vtkPoints = new vtkPoints();" > doesn't fill me with confidence. Can you try building the polydata > as per my python example and see if that works? > > - David > > > On Mon, May 25, 2015 at 6:23 PM, kent myers via vtkusers <[hidden email]> > wrote: > > Hi David, > > I did display the box successfully. This method was extracted from a > complete demo application that I submitted to the bug tracker as issue > 0015487. I have attached it here if you want to look at it. This would > not be the first time that the Java API crashes using methods that work in > other languages. > > You said it ran without errors. Did you get a properly clipped box as a > result? It started out as a cube and I put the clipping plane half the > height of the cube. > > Thanks for taking a look. > > Kent > > > > > > On Monday, May 25, 2015 5:09 PM, David Gobbi [via VTK] <[hidden email]> > wrote: > > > Hi Kent, > > Your code for building the polydata looks suspicious. If you put your box > polydata directly into the mapper (i.e. without vtkClipClosedSurface) does > it display properly? > > I translated your code into python (I'm not much of a Java programmer), > and it ran without any errors: > > > from vtk import * > > points = [ > 0.0, 0.0, 0.0, > 1.0, 0.0, 0.0, > 1.0, 1.0, 0.0, > 0.0, 1.0, 0.0, > 0.0, 0.0, 1.0, > 1.0, 0.0, 1.0, > 1.0, 1.0, 1.0, > 0.0, 1.0, 1.0, > ] > > seq = [ > 4, 0,1,2,3, > 4, 1,5,6,2, > 4, 5,4,7,6, > 4, 4,0,3,7, > 4, 0,1,5,4, > 4, 3,2,6,7 > ] > > # create a plane for clipping > plane = vtkPlane(); > plane.SetOrigin(0.0, 0.0, 0.5); > plane.SetNormal(0, 0, 1); > > # create the box from points and sequence > polyData = vtkPolyData(); > pts = vtkPoints(); > for i in range(8): > pts.InsertNextPoint(points[i*3:(i+1)*3]) > polyData.SetPoints(pts); > cells = vtkCellArray(); > for i in range(6): > cells.InsertNextCell(4) > for j in range(1,5): > cells.InsertCellPoint(seq[5*i + j]) > polyData.SetPolys(cells); > > clipClosedSurface = vtkClipClosedSurface(); > planes = vtkPlaneCollection(); > planes.AddItem(plane); > clipClosedSurface.SetClippingPlanes(planes); > clipClosedSurface.AddInputData(polyData); > clipClosedSurface.Update(); # THIS CRASHES > > clipMapper = vtkDataSetMapper(); > clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); > > boxActor = vtkActor(); > boxActor.SetMapper(clipMapper); > boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); > > ren = vtkRenderer() > ren.AddActor(boxActor) > > win = vtkRenderWindow() > win.AddRenderer(ren) > > iren = vtkRenderWindowInteractor() > win.SetInteractor(iren) > > iren.Initialize() > iren.Start() > > On Mon, May 25, 2015 at 5:18 PM, kent myers via vtkusers <[hidden email]> > wrote: > > I am trying to clip a box constructed as a polydata mesh. I have tried the > vtkClipPolyData class based on the quadric surface example in the following > link, but have not succeeded. > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/SolidClip > > I found the vtkClipClosedSurface class and it seems like exactly what I am > looking for, but I could not find any examples of how to use it. The code > below shows my attempt. It crashes when calling the Update() method. > Without that call, I get no visible result. > > Any help would be appreciated! > > Kent > > private static void createBox() { > float[] points = { > 0.0f, 0.0f, 0.0f, > 1.0f, 0.0f, 0.0f, > 1.0f, 1.0f, 0.0f, > 0.0f, 1.0f, 0.0f, > 0.0f, 0.0f, 1.0f, > 1.0f, 0.0f, 1.0f, > 1.0f, 1.0f, 1.0f, > 0.0f, 1.0f, 1.0f, > }; > int[] seq = { > 4, 0, 1, 2, 3, > 4, 1,5,6,2, > 4, 5,4,7,6, > 4, 4,0,3,7, > 4, 0,1,5,4, > 4, 3,2,6,7}; > > > // create a plane for clipping > vtkPlane plane = new vtkPlane(); > plane.SetOrigin(0.0, 0.0, 0.5); > plane.SetNormal(0, 0, 1); > > // create the box from points and sequence > vtkPolyData polyData = new vtkPolyData(); > vtkPoints vtkPoints = new vtkPoints(); > vtkFloatArray d = new vtkFloatArray(); > d.SetJavaArray(points); > d.SetNumberOfComponents(3); > vtkPoints.SetData(d); > polyData.SetPoints(vtkPoints); > vtkCellArray vtkCells = new vtkCellArray(); > vtkIdTypeArray array = new vtkIdTypeArray(); > vtkIntArray intArray = new vtkIntArray(); > intArray.SetJavaArray(seq); > array.DeepCopy(intArray); > vtkCells.SetCells(seq.length, array); > polyData.SetPolys(vtkCells); > > vtkClipClosedSurface clipClosedSurface = new > vtkClipClosedSurface(); > vtkPlaneCollection planes = new vtkPlaneCollection(); > planes.AddItem(plane); > clipClosedSurface.SetClippingPlanes(planes); > clipClosedSurface.AddInputData(polyData); > clipClosedSurface.Update(); // THIS CRASHES > > vtkDataSetMapper clipMapper = new vtkDataSetMapper(); > > clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); > > boxActor = new vtkActor(); > boxActor.SetMapper(clipMapper); > boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); > > } > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5731996.html > To unsubscribe from using vtkClipClosedSurface() on a box crashes, click > here. > NAML > > > > > *vtkCuttingPlane.java* (8K) Download Attachment > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > *ScreenShot.png* (30K) Download Attachment > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Mon May 25 22:43:32 2015 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 25 May 2015 23:43:32 -0300 Subject: [vtkusers] 3D Volume Registration In-Reply-To: <1432571716007-5731990.post@n5.nabble.com> References: <1432571716007-5731990.post@n5.nabble.com> Message-ID: Hi, You need to use ITK to do registration. I have a working example that registers two sets of 3D images (CT and MR). Download and compile ITK. The latest version is 4.7.2 You will also need to download cmake to compile ITK. Once you are all set let me know and I will share the code I have. Matias On May 25, 2015 1:35 PM, "Konstantin" wrote: > Hi everybody, > > I have a question about registration. I have two 3D CT Scans of the same > patient, there are taken at different times (the second one is taken 30 > seconds after the first one), but the problem is due to patient movements > they are slightly different, so I want to transform one of them to match > the > other. > > I'm not really sure where to start. Could you please direct me into the > right direction? > > Thank you. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/3D-Volume-Registration-tp5731990.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakota_63124 at yahoo.com Mon May 25 23:02:15 2015 From: dakota_63124 at yahoo.com (kent myers) Date: Mon, 25 May 2015 20:02:15 -0700 (MST) Subject: [vtkusers] using vtkClipClosedSurface() on a box crashes In-Reply-To: References: <1432595938487-5731995.post@n5.nabble.com> <174177885.1967241.1432599630236.JavaMail.yahoo@mail.yahoo.com> <1741900188.1971280.1432605156506.JavaMail.yahoo@mail.yahoo.com> Message-ID: <514197630.1983746.1432609151561.JavaMail.yahoo@mail.yahoo.com> HI David, The order of calling SetNumberOfComponents did not make any difference.? I am using vtkIdTypeArray and filling it with a vtkIntArray. The documentation at http://www.vtk.org/Wiki/VTK/Closed_Surface_Clipping?says that the vtkClipClosedSurface filter "When given a closed surface as input, it will produce a closed surface as output." Do you have any idea why it did not give me a close rectangular box after the clip? Thanks again for you help.? I will keep looking for an efficient way to pass point and sequence data from Java. Kent On Monday, May 25, 2015 7:40 PM, David Gobbi [via VTK] wrote: Unfortunately, I don't know much about the Java wrappers... I didn't realize the SetJavaArray() method existed until I saw the code you posted.? The crash could be due to something as simple as calling d.SetNumberOfComponents(3) after SetJavaArray(), instead of before.? Or using a vtkIntArray instead of a vtkIdTypeArray. ?- David On Mon, May 25, 2015 at 7:55 PM, kent myers via vtkusers <[hidden email]> wrote: Hi David, Changing to your technique of filling the point and cells did solve the problem.? One reason I did not do it that way is because in my actual application, I have 10's of thousands of points and I do not want to make a Java API call to store every point and every cell connection.? I am afraid the efficiency hit would be very high.? I found the technique?of copying the entire point and cell data arrays in one call in an article that you wrote: http://public.kitware.com/pipermail/vtkusers/2010-January/056525.html Of course it was C++, but?since the methods are in the Java API, I assumed it was a safe method to use.? Do you know of a better way to pass the java points and cell definitions more efficiently than one by one? Thanks, Kent On Monday, May 25, 2015 5:33 PM, David Gobbi [via VTK] <[hidden email]> wrote: Hi Kent, Yes, it displayed half a box (see attached screenshot). Let's just say that code like "vtkPoints vtkPoints = new vtkPoints();"doesn't fill me with confidence. Can you try building the polydataas per my python example and see if that works? - David On Mon, May 25, 2015 at 6:23 PM, kent myers via vtkusers <[hidden email]> wrote: Hi David, I did display the box successfully.? This method was extracted from a complete demo ?application that I submitted to the bug tracker as issue 0015487.? I have attached it here if you want to look at it.? This would not be the first time that the Java API crashes using methods that work in other languages. You said it ran without errors.? Did you get a properly clipped box as a result?? It started out as a cube and I put the clipping plane half the height of the cube. Thanks for taking a look. Kent On Monday, May 25, 2015 5:09 PM, David Gobbi [via VTK] <[hidden email]> wrote: Hi Kent, Your code for building the polydata looks suspicious.? If you put your box polydata directly into the mapper (i.e. without vtkClipClosedSurface) does it display properly?? I translated your code into python (I'm not much of a Java programmer), and it ran without any errors: from vtk import * points = [? 0.0, 0.0, 0.0,? 1.0, 0.0, 0.0,? 1.0, 1.0, 0.0,? 0.0, 1.0, 0.0,? 0.0, 0.0, 1.0,? 1.0, 0.0, 1.0,? 1.0, 1.0, 1.0,? 0.0, 1.0, 1.0,] seq = [? 4, 0,1,2,3,? 4, 1,5,6,2,? 4, 5,4,7,6,? 4, 4,0,3,7,? 4, 0,1,5,4,? 4, 3,2,6,7] # create a plane for clippingplane = vtkPlane();plane.SetOrigin(0.0, 0.0, 0.5);plane.SetNormal(0, 0, 1); # create the box from points and sequencepolyData = vtkPolyData();pts = vtkPoints();for i in range(8):? ? pts.InsertNextPoint(points[i*3:(i+1)*3])polyData.SetPoints(pts);cells = vtkCellArray();for i in range(6):? ? cells.InsertNextCell(4)? ? for j in range(1,5):? ? ? ? cells.InsertCellPoint(seq[5*i + j])polyData.SetPolys(cells); clipClosedSurface = vtkClipClosedSurface();planes = vtkPlaneCollection();planes.AddItem(plane);clipClosedSurface.SetClippingPlanes(planes);clipClosedSurface.AddInputData(polyData);clipClosedSurface.Update(); ? # THIS CRASHES clipMapper = vtkDataSetMapper();clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); boxActor = vtkActor();boxActor.SetMapper(clipMapper);boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); ren = vtkRenderer()ren.AddActor(boxActor) win = vtkRenderWindow()win.AddRenderer(ren) iren = vtkRenderWindowInteractor()win.SetInteractor(iren) iren.Initialize()iren.Start() On Mon, May 25, 2015 at 5:18 PM, kent myers via vtkusers <[hidden email]> wrote: I am trying to clip a box constructed as a polydata mesh.? I have tried the vtkClipPolyData class based on the quadric surface example in the following link, but have not succeeded. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/SolidClip I found the vtkClipClosedSurface class and it seems like exactly what I am looking for, but I could not find any examples of how to use it.? The code below shows my attempt.? It crashes when calling the Update() method. Without that call, I get no visible result. Any help would be appreciated! Kent ? ? ? ? private static void createBox() { ? ? ? ? ? ? ? ? float[] points = { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 0.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 0.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 1.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 1.0f, 0.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 0.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 0.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.0f, 1.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.0f, 1.0f, 1.0f, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }; ? ? ? ? ? ? ? ? int[] seq = { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 0, 1, 2, 3, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 1,5,6,2, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 5,4,7,6, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 4,0,3,7, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 0,1,5,4, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4, 3,2,6,7}; ? ? ? ? ? ? ? ? // create a plane for clipping ? ? ? ? ? ? ? ? vtkPlane plane = new vtkPlane(); ? ? ? ? ? ? ? ? plane.SetOrigin(0.0, 0.0, 0.5); ? ? ? ? ? ? ? ? plane.SetNormal(0, 0, 1); ? ? ? ? ? ? ? ? // create the box from points and sequence ? ? ? ? ? ? ? ? vtkPolyData polyData = new vtkPolyData(); ? ? ? ? ? ? ? ? vtkPoints vtkPoints = new vtkPoints(); ? ? ? ? ? ? ? ? vtkFloatArray d = new vtkFloatArray(); ? ? ? ? ? ? ? ? d.SetJavaArray(points); ? ? ? ? ? ? ? ? d.SetNumberOfComponents(3); ? ? ? ? ? ? ? ? vtkPoints.SetData(d); ? ? ? ? ? ? ? ? polyData.SetPoints(vtkPoints); ? ? ? ? ? ? ? ? vtkCellArray vtkCells = new vtkCellArray(); ? ? ? ? ? ? ? ? vtkIdTypeArray array = new vtkIdTypeArray(); ? ? ? ? ? ? ? ? vtkIntArray intArray = new vtkIntArray(); ? ? ? ? ? ? ? ? intArray.SetJavaArray(seq); ? ? ? ? ? ? ? ? array.DeepCopy(intArray); ? ? ? ? ? ? ? ? vtkCells.SetCells(seq.length, array); ? ? ? ? ? ? ? ? polyData.SetPolys(vtkCells); ? ? ? ? ? ? ? ? vtkClipClosedSurface clipClosedSurface = new vtkClipClosedSurface(); ? ? ? ? ? ? ? ? vtkPlaneCollection planes = new vtkPlaneCollection(); ? ? ? ? ? ? ? ? planes.AddItem(plane); ? ? ? ? ? ? ? ? clipClosedSurface.SetClippingPlanes(planes); ? ? ? ? ? ? ? ? clipClosedSurface.AddInputData(polyData); ? ? ? ? ? ? ? ? clipClosedSurface.Update();? ?// THIS CRASHES ? ? ? ? ? ? ? ? vtkDataSetMapper clipMapper = new vtkDataSetMapper(); ? ? ? ? ? ? ? ? clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); ? ? ? ? ? ? ? ? boxActor = new vtkActor(); ? ? ? ? ? ? ? ? boxActor.SetMapper(clipMapper); ? ? ? ? ? ? ? ? boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); ? ? ? ? } _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5731996.html To unsubscribe from using vtkClipClosedSurface() on a box crashes, click here. NAML vtkCuttingPlane.java (8K) Download Attachment _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ScreenShot.png (30K) Download Attachment _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5732001.html To unsubscribe from using vtkClipClosedSurface() on a box crashes, click here. NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/using-vtkClipClosedSurface-on-a-box-crashes-tp5731995p5732003.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From njx937 at gmail.com Mon May 25 23:21:54 2015 From: njx937 at gmail.com (NIE JUNXIAO) Date: Tue, 26 May 2015 12:21:54 +0900 Subject: [vtkusers] VTK memory control while importing data Message-ID: <5563E6D2.2060003@gmail.com> Hello everyone, I am now trying to render some models in front of an active background image referring to the BackgroundImage sample. But I think I have came up with some memory leak problem. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/BackgroundImage I create a model renderer and a background renderer, and they are both added to a renderwindow. When I want to change my background, I create new vtkImageData and new vtkImageImport(to import a cv::mat). Then I create a new vtkImageactor and add it to backgroundrenderer. I can see the image after finishing this but I notice that the memory increases very rapidly. I think that it is because I didnot release memory correctly. Could anybody help me with this memory problem. Thank you very much. Best regards, NIE JUNXIAO void MyGlkview::setupBG(cv::Mat _img){ //import image assert(_img.data != NULL); vtkImageData *imgData = vtkImageData::New(); vtkImageImport *importer = vtkImageImport::New(); importer->SetOutput(imgData); importer->SetDataSpacing(1, 1, 1); importer->SetDataOrigin(0, 0, 0); importer->SetWholeExtent(0, _img.size().width - 1, 0, _img.size().height - 1, 0, 0); importer->SetDataExtentToWholeExtent(); importer->SetDataScalarTypeToUnsignedChar(); importer->SetNumberOfScalarComponents(_img.channels()); importer->SetImportVoidPointer(_img.data); importer->Update(); double origin[3]; double spacing[3]; int extent[6]; imgData->GetOrigin(origin); imgData->GetSpacing(spacing); imgData->GetExtent(extent); //resize image to fit window vtkCamera* camera = myBackgroundRenderer->GetActiveCamera(); camera->ParallelProjectionOn(); double xc = origin[0] + 0.5*(extent[0] + extent[1])*spacing[0]; double yc = origin[1] + 0.5*(extent[2] + extent[3])*spacing[1]; //double xd = (extent[1] - extent[0] + 1)*spacing[0]; double yd = (extent[3] - extent[2] + 1)*spacing[1]; double d = camera->GetDistance(); camera->SetParallelScale(0.5*yd); camera->SetFocalPoint(xc, yc, 0.0); camera->SetPosition(xc, yc, d); //here I want to avoid multi-imageactor in the renderer, but the actors number is always 0 //so there is always a new actor is created. if (myBackgroundRenderer->GetActors()->GetNumberOfItems() < 1){ vtkImageActor *imageActor = vtkImageActor::New(); imageActor->SetInputData(imgData); myBackgroundRenderer->AddActor(imageActor); imageActor->Update(); }else{ vtkImageActor *imageActor = (vtkImageActor *)myBackgroundRenderer->GetActors()->GetLastActor(); //myBackgroundRenderer-> imageActor->SetInputData(imgData); imageActor->Update(); } // Render again to set the correct view refresh(); imgData->Delete(); importer->Delete(); } From david.gobbi at gmail.com Mon May 25 23:22:54 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 May 2015 21:22:54 -0600 Subject: [vtkusers] using vtkClipClosedSurface() on a box crashes In-Reply-To: <514197630.1983746.1432609151561.JavaMail.yahoo@mail.yahoo.com> References: <1432595938487-5731995.post@n5.nabble.com> <174177885.1967241.1432599630236.JavaMail.yahoo@mail.yahoo.com> <1741900188.1971280.1432605156506.JavaMail.yahoo@mail.yahoo.com> <514197630.1983746.1432609151561.JavaMail.yahoo@mail.yahoo.com> Message-ID: The fact that the box was open completely slipped my notice :) It was because of the ordering of the points for the faces, the normals were facing inwards instead of outwards. Therefore the algorithm considered the inside of the box to be the "outside" of the surface. Reverse the faces, and the result is a closed half-box: 4, 3,2,1,0, 4, 2,6,5,1, 4, 6,7,4,5, 4, 7,3,0,4, 4, 4,5,1,0, 4, 7,6,2,3 - David On Mon, May 25, 2015 at 9:02 PM, kent myers via vtkusers wrote: > HI David, > > The order of calling SetNumberOfComponents did not make any difference. I > am using vtkIdTypeArray and filling it with a vtkIntArray. > > The documentation at http://www.vtk.org/Wiki/VTK/Closed_Surface_Clipping says > that the vtkClipClosedSurface filter "When given a closed surface as input, > it will produce a closed surface as output." > > Do you have any idea why it did not give me a close rectangular box after > the clip? > > Thanks again for you help. I will keep looking for an efficient way to > pass point and sequence data from Java. > > Kent > > > > > > On Monday, May 25, 2015 7:40 PM, David Gobbi [via VTK] <[hidden email] > > wrote: > > > Unfortunately, I don't know much about the Java wrappers... I didn't > realize the SetJavaArray() method existed until I saw the code you posted. > The crash could be due to something as simple as calling > d.SetNumberOfComponents(3) after SetJavaArray(), instead of before. Or > using a vtkIntArray instead of a vtkIdTypeArray. > > - David > > > On Mon, May 25, 2015 at 7:55 PM, kent myers via vtkusers <[hidden email]> > wrote: > > Hi David, > > Changing to your technique of filling the point and cells did solve the > problem. One reason I did not do it that way is because in my actual > application, I have 10's of thousands of points and I do not want to make a > Java API call to store every point and every cell connection. I am afraid > the efficiency hit would be very high. I found the technique of copying > the entire point and cell data arrays in one call in an article that you > wrote: > > http://public.kitware.com/pipermail/vtkusers/2010-January/056525.html > > Of course it was C++, but since the methods are in the Java API, I assumed > it was a safe method to use. Do you know of a better way to pass the java > points and cell definitions more efficiently than one by one? > > Thanks, > > Kent > > > > On Monday, May 25, 2015 5:33 PM, David Gobbi [via VTK] <[hidden email]> > wrote: > > > Hi Kent, > > Yes, it displayed half a box (see attached screenshot). > > Let's just say that code like "vtkPoints vtkPoints = new vtkPoints();" > doesn't fill me with confidence. Can you try building the polydata > as per my python example and see if that works? > > - David > > > On Mon, May 25, 2015 at 6:23 PM, kent myers via vtkusers <[hidden email]> > wrote: > > Hi David, > > I did display the box successfully. This method was extracted from a > complete demo application that I submitted to the bug tracker as issue > 0015487. I have attached it here if you want to look at it. This would > not be the first time that the Java API crashes using methods that work in > other languages. > > You said it ran without errors. Did you get a properly clipped box as a > result? It started out as a cube and I put the clipping plane half the > height of the cube. > > Thanks for taking a look. > > Kent > > > > > > On Monday, May 25, 2015 5:09 PM, David Gobbi [via VTK] <[hidden email]> > wrote: > > > Hi Kent, > > Your code for building the polydata looks suspicious. If you put your box > polydata directly into the mapper (i.e. without vtkClipClosedSurface) does > it display properly? > > I translated your code into python (I'm not much of a Java programmer), > and it ran without any errors: > > > from vtk import * > > points = [ > 0.0, 0.0, 0.0, > 1.0, 0.0, 0.0, > 1.0, 1.0, 0.0, > 0.0, 1.0, 0.0, > 0.0, 0.0, 1.0, > 1.0, 0.0, 1.0, > 1.0, 1.0, 1.0, > 0.0, 1.0, 1.0, > ] > > seq = [ > 4, 0,1,2,3, > 4, 1,5,6,2, > 4, 5,4,7,6, > 4, 4,0,3,7, > 4, 0,1,5,4, > 4, 3,2,6,7 > ] > > # create a plane for clipping > plane = vtkPlane(); > plane.SetOrigin(0.0, 0.0, 0.5); > plane.SetNormal(0, 0, 1); > > # create the box from points and sequence > polyData = vtkPolyData(); > pts = vtkPoints(); > for i in range(8): > pts.InsertNextPoint(points[i*3:(i+1)*3]) > polyData.SetPoints(pts); > cells = vtkCellArray(); > for i in range(6): > cells.InsertNextCell(4) > for j in range(1,5): > cells.InsertCellPoint(seq[5*i + j]) > polyData.SetPolys(cells); > > clipClosedSurface = vtkClipClosedSurface(); > planes = vtkPlaneCollection(); > planes.AddItem(plane); > clipClosedSurface.SetClippingPlanes(planes); > clipClosedSurface.AddInputData(polyData); > clipClosedSurface.Update(); # THIS CRASHES > > clipMapper = vtkDataSetMapper(); > clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); > > boxActor = vtkActor(); > boxActor.SetMapper(clipMapper); > boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); > > ren = vtkRenderer() > ren.AddActor(boxActor) > > win = vtkRenderWindow() > win.AddRenderer(ren) > > iren = vtkRenderWindowInteractor() > win.SetInteractor(iren) > > iren.Initialize() > iren.Start() > > On Mon, May 25, 2015 at 5:18 PM, kent myers via vtkusers <[hidden email]> > wrote: > > I am trying to clip a box constructed as a polydata mesh. I have tried the > vtkClipPolyData class based on the quadric surface example in the following > link, but have not succeeded. > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/SolidClip > > I found the vtkClipClosedSurface class and it seems like exactly what I am > looking for, but I could not find any examples of how to use it. The code > below shows my attempt. It crashes when calling the Update() method. > Without that call, I get no visible result. > > Any help would be appreciated! > > Kent > > private static void createBox() { > float[] points = { > 0.0f, 0.0f, 0.0f, > 1.0f, 0.0f, 0.0f, > 1.0f, 1.0f, 0.0f, > 0.0f, 1.0f, 0.0f, > 0.0f, 0.0f, 1.0f, > 1.0f, 0.0f, 1.0f, > 1.0f, 1.0f, 1.0f, > 0.0f, 1.0f, 1.0f, > }; > int[] seq = { > 4, 0, 1, 2, 3, > 4, 1,5,6,2, > 4, 5,4,7,6, > 4, 4,0,3,7, > 4, 0,1,5,4, > 4, 3,2,6,7}; > > > // create a plane for clipping > vtkPlane plane = new vtkPlane(); > plane.SetOrigin(0.0, 0.0, 0.5); > plane.SetNormal(0, 0, 1); > > // create the box from points and sequence > vtkPolyData polyData = new vtkPolyData(); > vtkPoints vtkPoints = new vtkPoints(); > vtkFloatArray d = new vtkFloatArray(); > d.SetJavaArray(points); > d.SetNumberOfComponents(3); > vtkPoints.SetData(d); > polyData.SetPoints(vtkPoints); > vtkCellArray vtkCells = new vtkCellArray(); > vtkIdTypeArray array = new vtkIdTypeArray(); > vtkIntArray intArray = new vtkIntArray(); > intArray.SetJavaArray(seq); > array.DeepCopy(intArray); > vtkCells.SetCells(seq.length, array); > polyData.SetPolys(vtkCells); > > vtkClipClosedSurface clipClosedSurface = new > vtkClipClosedSurface(); > vtkPlaneCollection planes = new vtkPlaneCollection(); > planes.AddItem(plane); > clipClosedSurface.SetClippingPlanes(planes); > clipClosedSurface.AddInputData(polyData); > clipClosedSurface.Update(); // THIS CRASHES > > vtkDataSetMapper clipMapper = new vtkDataSetMapper(); > > clipMapper.SetInputConnection(clipClosedSurface.GetOutputPort()); > > boxActor = new vtkActor(); > boxActor.SetMapper(clipMapper); > boxActor.GetProperty().SetColor(0.8900, 0.8100, 0.3400); > > } > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Tue May 26 07:29:39 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Tue, 26 May 2015 13:29:39 +0200 Subject: [vtkusers] vtkNIFTIImageReader.h: No such file or directory In-Reply-To: References: Message-ID: Hi again. I've already got the convex hull of my Nifti image, and you were right regarding the output image file. I'm saving in VTP format. I have another question. When I read the Nifti image, I also store its spacing, origin and dimension. When displaying the VTP file in 3D Slicer, the convex hull is shifted compared with the original image. How can I do to preserve the original origin and dimension? Neither the vtkImageMarchingCubes nor vtkHull contain the suited methods. I hope the question is clear and makes sense. Thanks a lot. MBR. /Francisco 2015-05-25 14:48 GMT+02:00 David Gobbi : > Hi Francisco, > > The vtkHull and vtkDelaunay3D classes require vtkPolyData as input. I > suspect that you need vtkImageMarchingCubes or vtkContourFilter. > > However, the output of these filters cannot be written to a NIFTI file. > In fact, I'm a bit confused when you say "write a convex hull to a NIFTI > file". A convex hull is a geometrical surface (e.g. made of polygons), but > NIFTI is an image file format. > > - David > > On Mon, May 25, 2015 at 6:35 AM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com> wrote: > >> Hi. >> Thanks a lot. I've just downloaded VTK 6.2.0 and I've realised that there >> it is what I need. >> But, I take advantage of this moment to tell about another problem. >> >> I read a NIFTI file (abc.nii) through vtkNIFTIImageReader. Its output is >> passed to either vtkHull or vtkDelaunay3D in order to get the convex hull >> of the objects in the Nifti image. >> >> And, in the end, I write their result with vtkNIFTIImageWriter. >> >> The compilation goes right, but the execution (on a Windows system) does >> not produce anything and I hardly see a "command prompt" window flashing >> only once, but I am unable to read its content. >> >> I think there must be some incompatibility between the output of >> vtkNifitiImageReader and the input to vtkHull or vtkDelaunay3D, or >> something similar. >> >> Any suggestion on how to read a NIFTI file and get its convex hull and >> then write it to another Nifti file. >> >> Thank you very much. >> /Francisco >> >> 2015-05-25 14:25 GMT+02:00 David Gobbi : >> >>> Hi Francisco, >>> >>> The vtkNIFTIImageReader did not appear until VTK 6.2. >>> There are two options that I can recommend: >>> >>> 1) Use the VTK git master, which has the most recent update to the NIFTI >>> reader (the vtkNIFTIImageReader in VTK 6.2 gives the wrong sform offset in >>> some situations, this is fixed in git master). >>> >>> 2) If you want to keep the VTK you have, then you can get the NIFTI >>> reader separately by building the vtk-dicom package: >>> https://github.com/dgobbi/vtk-dicom (the class is called >>> "vtkNIFTIReader" in vtk-dicom, but is otherwise identical to the one in the >>> VTK git master branch). >>> >>> Cheers, >>> - David >>> >>> >>> >>> On Mon, May 25, 2015 at 1:54 AM, Francisco Lopez de la Franca < >>> franciscolopezdelafranca at gmail.com> wrote: >>> >>>> Hi everybody. >>>> I'd like to read a NIFTI image from VTK. >>>> I downloaded and compiled VTK 6.1.0, but when I include the >>>> vtkNIFTIImageReader header file, the compilation gives the error "No such >>>> file or directory". >>>> I've searched for the header file into the VTK directory and it is >>>> true, there is no such a file. >>>> >>>> I've tested with vtkImageReader2 and compilation goes fine, but the >>>> NIFTI file read does not seem to go well. >>>> >>>> Does anybody know what the problem could be? >>>> >>>> Thanks a lot. >>>> My best regards. >>>> /Francisco >>>> >>>> P.D.: My CMakeLists.txt contains the next lines: >>>> >>>> cmake_minimum_required(VERSION 2.8) >>>> >>>> project(CV_TFM_CONVEX_HULL) >>>> >>>> # Find VTK. >>>> find_package(VTK REQUIRED) >>>> include(${VTK_USE_FILE}) >>>> >>>> set(CV_TFM_CONVEX_HULL_SRC CV_TFM_ConvexHull.cxx) >>>> >>>> add_executable(CV_TFM_CONVEX_HULL ${CV_TFM_CONVEX_HULL_SRC}) >>>> >>>> target_link_libraries(CV_TFM_CONVEX_HULL ${VTK_LIBRARIES}) >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.sejna at pc-progress.com Tue May 26 07:44:38 2015 From: m.sejna at pc-progress.com (Mirek) Date: Tue, 26 May 2015 04:44:38 -0700 (MST) Subject: [vtkusers] Updating scalars without recalculating vtkClipDataSet Message-ID: <1432640678425-5732007.post@n5.nabble.com> Hi, I'm new to VTK and have a problem with updating scalar values on a clipped mesh efficiently (without recalculating the whole mesh geometry). The problem is described below and any advice is welcome. Thank you. Mirek // I have an Unstructured grid and array of values at mesh nodes vtkSmartPointer pMyUGrid = ... my 3D unstructured grid vtkSmartPointer pMyValues = ... my values at mesh nodes vtkSmartPointer pMyPlane = ... my plane used for clipping pMyUGrid // Set pMyValues as Scalars in pMyUGrid pMyUGrid->GetPointData()->SetScalars(pMyValues); // Prepare a clipper vtkSmartPointer pClipper = vtkSmartPointer::New(); pClipper->SetClipFunction(pMyPlane); pClipper->SetInputData(pMyUGrid); // Surface filter (extracts surface mesh of pMyUGrid after clipping) vtkSmartPointer pSurfFilter = vtkSmartPointer::New(); pSurfFilter->SetInputConnection(pClipper->GetOutputPort()); // Clip the 3D mesh and extract its surface mesh pSurfFilter->Update(); vtkSmartPointer pSurfMesh = pSurfFilter->GetOutput(); // Get "MyValues" at nodes of the surface mesh (some values will be interpolated by the clipper) vtkDoubleArray* pMyValuesOnSurface = vtkDoubleArray::SafeDownCast(pSurfMesh->GetPointData()->GetScalars()); // This all works fine. Now I need to change pMyValues and get new scalar values on the clipped surface mesh vtkSmartPointer pMyNewValues = ... some new values pMyUGrid->GetPointData()->SetScalars(pMyNewValues); pSurfFilter->Update(); pSurfMesh = pSurfFilter->GetOutput(); vtkDoubleArray* pMyNewValuesOnSurface = vtkDoubleArray::SafeDownCast(pSurfMesh->GetPointData()->GetScalars()); This also works, however, it forces pClipper and pSurfFilter to recalculate everything (clipping and the surface mesh), which is time-consuming and useless. How to get updated pMyNewValuesOnSurface without recalculating pClipper and pSurfFilter? I was trying to use vtkMergeFilter but I was not able to figure out how to use it correctly (I just started to learn VTK), so it did not work. I also noticed the DATA_GEOMETRY_UNMODIFIED InformationKeyMacro but I don't know how to use it. Is there any example explaining how to correctly solve situations like this one? I'm using VTK 6.1.0. Thank you. -- View this message in context: http://vtk.1045678.n5.nabble.com/Updating-scalars-without-recalculating-vtkClipDataSet-tp5732007.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue May 26 07:47:06 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 26 May 2015 05:47:06 -0600 Subject: [vtkusers] vtkNIFTIImageReader.h: No such file or directory In-Reply-To: References: Message-ID: Use the GetQFormMatrix() method of the reader to get the 4x4 matrix that has the orientation and offset. You can apply this matrix to the hull before you save it. Here's some example code (in python): transform = vtkTransform() transform.SetMatrix(reader.GetQFormMatrix()) tfilter = vtkTransformPolyDataFilter() tfilter.SetTransform(transform) tfilter.SetInputConnection( < the hull data > ) tfilter.Update() Then save the output of the "tfilter" into your vtp file. - David On Tue, May 26, 2015 at 5:29 AM, Francisco Lopez de la Franca < franciscolopezdelafranca at gmail.com> wrote: > Hi again. > I've already got the convex hull of my Nifti image, and you were right > regarding the output image file. I'm saving in VTP format. > I have another question. > When I read the Nifti image, I also store its spacing, origin and > dimension. > When displaying the VTP file in 3D Slicer, the convex hull is shifted > compared with the original image. How can I do to preserve the original > origin and dimension? Neither the vtkImageMarchingCubes nor vtkHull contain > the suited methods. > I hope the question is clear and makes sense. > Thanks a lot. > MBR. > /Francisco > > > 2015-05-25 14:48 GMT+02:00 David Gobbi : > >> Hi Francisco, >> >> The vtkHull and vtkDelaunay3D classes require vtkPolyData as input. I >> suspect that you need vtkImageMarchingCubes or vtkContourFilter. >> >> However, the output of these filters cannot be written to a NIFTI file. >> In fact, I'm a bit confused when you say "write a convex hull to a NIFTI >> file". A convex hull is a geometrical surface (e.g. made of polygons), but >> NIFTI is an image file format. >> >> - David >> >> On Mon, May 25, 2015 at 6:35 AM, Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com> wrote: >> >>> Hi. >>> Thanks a lot. I've just downloaded VTK 6.2.0 and I've realised that >>> there it is what I need. >>> But, I take advantage of this moment to tell about another problem. >>> >>> I read a NIFTI file (abc.nii) through vtkNIFTIImageReader. Its output is >>> passed to either vtkHull or vtkDelaunay3D in order to get the convex hull >>> of the objects in the Nifti image. >>> >>> And, in the end, I write their result with vtkNIFTIImageWriter. >>> >>> The compilation goes right, but the execution (on a Windows system) does >>> not produce anything and I hardly see a "command prompt" window flashing >>> only once, but I am unable to read its content. >>> >>> I think there must be some incompatibility between the output of >>> vtkNifitiImageReader and the input to vtkHull or vtkDelaunay3D, or >>> something similar. >>> >>> Any suggestion on how to read a NIFTI file and get its convex hull and >>> then write it to another Nifti file. >>> >>> Thank you very much. >>> /Francisco >>> >>> 2015-05-25 14:25 GMT+02:00 David Gobbi : >>> >>>> Hi Francisco, >>>> >>>> The vtkNIFTIImageReader did not appear until VTK 6.2. >>>> There are two options that I can recommend: >>>> >>>> 1) Use the VTK git master, which has the most recent update to the >>>> NIFTI reader (the vtkNIFTIImageReader in VTK 6.2 gives the wrong sform >>>> offset in some situations, this is fixed in git master). >>>> >>>> 2) If you want to keep the VTK you have, then you can get the NIFTI >>>> reader separately by building the vtk-dicom package: >>>> https://github.com/dgobbi/vtk-dicom (the class is called >>>> "vtkNIFTIReader" in vtk-dicom, but is otherwise identical to the one in the >>>> VTK git master branch). >>>> >>>> Cheers, >>>> - David >>>> >>>> >>>> >>>> On Mon, May 25, 2015 at 1:54 AM, Francisco Lopez de la Franca < >>>> franciscolopezdelafranca at gmail.com> wrote: >>>> >>>>> Hi everybody. >>>>> I'd like to read a NIFTI image from VTK. >>>>> I downloaded and compiled VTK 6.1.0, but when I include the >>>>> vtkNIFTIImageReader header file, the compilation gives the error "No such >>>>> file or directory". >>>>> I've searched for the header file into the VTK directory and it is >>>>> true, there is no such a file. >>>>> >>>>> I've tested with vtkImageReader2 and compilation goes fine, but the >>>>> NIFTI file read does not seem to go well. >>>>> >>>>> Does anybody know what the problem could be? >>>>> >>>>> Thanks a lot. >>>>> My best regards. >>>>> /Francisco >>>>> >>>>> P.D.: My CMakeLists.txt contains the next lines: >>>>> >>>>> cmake_minimum_required(VERSION 2.8) >>>>> >>>>> project(CV_TFM_CONVEX_HULL) >>>>> >>>>> # Find VTK. >>>>> find_package(VTK REQUIRED) >>>>> include(${VTK_USE_FILE}) >>>>> >>>>> set(CV_TFM_CONVEX_HULL_SRC CV_TFM_ConvexHull.cxx) >>>>> >>>>> add_executable(CV_TFM_CONVEX_HULL ${CV_TFM_CONVEX_HULL_SRC}) >>>>> >>>>> target_link_libraries(CV_TFM_CONVEX_HULL ${VTK_LIBRARIES}) >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Tue May 26 08:18:53 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 26 May 2015 08:18:53 -0400 Subject: [vtkusers] CFP: SC '15 Scientific Visualization Showcase Message-ID: Hi folks, The Call for Participation for the SC '15 Scientific Visualization Showcase is out. This is a great opportunity for the community to highlight the wonderful visualization work going on. Please consider submitting an entry (or more). http://sc15.supercomputing.org/program/scientific-visualization-showcase SC15?s Visualization and Data Analytics Showcase Program provides a forum for the year's most instrumental movies in HPC. Six finalists will compete for the Best Visualization Award, and each finalist will present his or her movie during a dedicated session at SC15 in a 15-minute presentation. Movies are judged based on how their movie illuminates science, by the quality of the movie, and for innovations in the process used for creating the movie. Best, -berk -------------- next part -------------- An HTML attachment was scrubbed... URL: From ninarock at list.ru Tue May 26 11:06:42 2015 From: ninarock at list.ru (Butterfly) Date: Tue, 26 May 2015 08:06:42 -0700 (MST) Subject: [vtkusers] TEXTURE_BUFFER fails : pure OpenGL vs vtkgl ? In-Reply-To: References: <1432053399081-5731938.post@n5.nabble.com> <1432209345012-5731952.post@n5.nabble.com> Message-ID: <1432652802666-5732011.post@n5.nabble.com> I managed to force the needed function pointers to be assigned properly by loading the following extension: renWin->GetExtensionManager()->LoadExtension("GL_EXT_texture_buffer_object"); *It remains unclear why Buffer Textures are still considered as an extension by VTK, although this functionality was included in the core since OpenGL 3.1 (2009)...* -- View this message in context: http://vtk.1045678.n5.nabble.com/TEXTURE-BUFFER-fails-pure-OpenGL-vs-vtkgl-tp5731938p5732011.html Sent from the VTK - Users mailing list archive at Nabble.com. From draktharrblorf at gmail.com Tue May 26 11:37:19 2015 From: draktharrblorf at gmail.com (Drak) Date: Tue, 26 May 2015 08:37:19 -0700 (MST) Subject: [vtkusers] How can I get a 3d disk? Message-ID: <1432654639359-5732012.post@n5.nabble.com> I have no idea how to get a 3d disk with a certain width (or a cylinder with a hole in it, or open cylinder, or tube) I've tried using vtkDiskSource, but there doesn't seem to have any option to make it 3d. I've tried the same with vtkcylinderSource. I've also tried using vtkBooleanOperationPolyDataFilter with this example, but it doesn't seem to work with cylinders. I always get a .it only works with triangles meshes. What should I do to get a tube? Thank you! -- View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-get-a-3d-disk-tp5732012.html Sent from the VTK - Users mailing list archive at Nabble.com. From nishant.taluja at gmail.com Tue May 26 15:53:23 2015 From: nishant.taluja at gmail.com (nishant_rt) Date: Tue, 26 May 2015 12:53:23 -0700 (MST) Subject: [vtkusers] vtkMultiBlockDataSet and vtkCutter Message-ID: <1432670003467-5732015.post@n5.nabble.com> Hi, I am trying to create a slice using vtkCutter on a multiblock dataset from an Ensight reader. I am able to render it on single block of multiblock dataset but not on all the blocks at once. Please see my script below to render the plane using one block: alg = vtk.vtkAlgorithm() cdp = vtk.vtkCompositeDataPipeline() alg.SetExecutive(cdp) alg.SetDefaultExecutivePrototype(cdp) reader = vtk.vtkEnSightGoldBinaryReader() reader.SetCaseFileName('C:\CFD\PROJECTS\SE01-PROJECTS\SE01-A0001\CASES\SE01-A0001-02A\SE01-A0001-02A-its1000.encas') reader.Update() multiblock = reader.GetOutput() pointdata = multiblock.GetBlock(0).GetPointData() pointdata.SetActiveScalars("total_pressure") plane = vtk.vtkPlane() plane.SetOrigin(7, -1.5, 1.5) plane.SetNormal(1, 0, 0) planeCut = vtk.vtkCutter() planeCut.SetCutFunction(plane) planeCut.SetInputData(multiblock.GetBlock(0)) planeCut.Update() lut = vtk.vtkColorTransferFunction() lut.AddRGBPoint(0.0*1531.25, 0.0, 0.0, 1.0) lut.AddRGBPoint(0.083*1531.25, 0.0, 0.333, 1.0) lut.AddRGBPoint(0.167*1531.25, 0.0, 0.666, 1.0) lut.AddRGBPoint(0.25*1531.25, 0.0, 1.0, 1.0) lut.AddRGBPoint(0.333*1531.25, 0.0, 1.0, 0.666) lut.AddRGBPoint(0.417*1531.25, 0.0, 1.0, 0.333) lut.AddRGBPoint(0.5*1531.25, 0.0, 1.0, 0.0) lut.AddRGBPoint(0.583*1531.25, 0.333, 1.0, 0.0) lut.AddRGBPoint(0.667*1531.25, 0.666, 1.0, 0.0) lut.AddRGBPoint(0.75*1531.25, 1.0, 1.0, 0.0) lut.AddRGBPoint(0.833*1531.25, 1.0, 0.666, 0.0) lut.AddRGBPoint(0.917*1531.25, 1.0, 0.333, 0.0) lut.AddRGBPoint(1.0*1531.25, 1.0, 0.0, 0.0) cutMapper = vtk.vtkPolyDataMapper() cutMapper.SetInputConnection(planeCut.GetOutputPort()) cutMapper.SetLookupTable(lut) cutMapper.SetScalarModeToUsePointData() ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.SetBackground(1, 1, 1) renWin.SetSize(400, 300) cutActor = vtk.vtkActor() cutActor.SetMapper(cutMapper) ren.AddActor(cutActor) cutActor.RotateZ(90) cutActor.RotateY(90) iren.Initialize() renWin.Render() iren.Start() I tried using vtkExtractBlock and also vtkCompositeDataGeometryFilter but it did not work. Please help me to render the plane as I am struggling to get the solution for the past few days. Thanks, Nishant -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkMultiBlockDataSet-and-vtkCutter-tp5732015.html Sent from the VTK - Users mailing list archive at Nabble.com. From Boettcher at kleintierklinik.uni-leipzig.de Tue May 26 17:15:13 2015 From: Boettcher at kleintierklinik.uni-leipzig.de (=?iso-8859-1?Q?B=F6ttcher=2C_Prof=2E_Dr=2E_Peter?=) Date: Tue, 26 May 2015 21:15:13 +0000 Subject: [vtkusers] ImageBlending in Compound Mode In-Reply-To: References: <6F6862A90839CE478D2A3146C2C31B4F104F29@EMAIL2.ktk.uni-leipzig.de> Message-ID: <6F6862A90839CE478D2A3146C2C31B4F1054D4@EMAIL2.ktk.uni-leipzig.de> You are correct, this should work but it doesn't. It seems that vtkImageMapToWindowLevelColors sets the alpha value to 255, regardless of the alpha value in the lookup. So, my problem is not related to the blender but to the vtkImageMapToWindowLevelColors. Any ide to solve this? Peter Von: David Gobbi [mailto:david.gobbi at gmail.com] Gesendet: Montag, 25. Mai 2015 21:44 An: B?ttcher, Prof. Dr. Peter Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] ImageBlending in Compound Mode I'm not very familiar with the Compounding mode, but is there any reason why you cannot use the default mode, i.e. alpha-blending? m_blend_A->SetInput(0, GreyImage); m_blend_A->SetInput(1, GreenImage); m_blend_A->SetOpacity(1, 0.7); m_blend_A->Update(); By setting the opacity of the green image to 0.7, the opacity of the "base" image is automatically (1.0 - 0.7). Black pixels in the green image (any pixel with alpha==0) will be completely transparent. - David On Mon, May 25, 2015 at 12:50 PM, B?ttcher, Prof. Dr. Peter > wrote: Dear All I have two vtkImageData which I map to grey and green color using vtkImageMapToWindowLevelColors->SetOutputFormatToRGBA. The two LookUps are manually defined like this: tableGreen->SetTableRange(0,256-1); tableGreen->Build(); for(float i=1; i<256; i++) tableGreen->SetTableValue(i,0,i/(256-1),0.0,1.0); // Green tableGreen->SetTableValue(0,0.0,0.0,0.0,0.0); // Background tableGrey->SetTableRange(0,256-1); tableGrey->Build(); for(float i=0; i<256; i++) tableGrey->SetTableValue(i,i/(256-1),i/(256-1), i/(256-1),1.0); // Grey Using vtkImageBlend I would like to blend both images using different opcity values (0 - 1), but ignoring any black pixel in the green image, by using SetCompoundMode and CompoundThreshold = 0. m_blend_A->SetInput(0, GreyImage); m_blend_A->SetOpacity(0, 0.3); m_blend_A->SetInput(1, GreenImage); m_blend_A->SetOpacity(1, 0.7); m_blend_A->SetBlendModeToCompound(); m_blend_A->SetCompoundThreshold(0); m_blend_A->Update(); Whatever I do, the "black" pixels (background) in the green image are still overlayed on the grey image pixels. However, when I turn the threshold to anything other than 0 no pixel at all are pushed trough the blender (neither the green nor the grey image). Any help would be much appreciated. Thanks - Peter --------------------------------------------------------- Prof. Dr. Peter B?ttcher, DipECVS European Veterinary Specialist in Surgery Fachtierarzt f?r Kleintierchirurgie Klinik f?r Kleintiere Universit?t Leipzig An den Tierkliniken 23 D-04103 Leipzig (Germany) Tel: +49-341-9738700 Fax: +49-341-9738799 Email: boettcher at kleintierklinik.uni-leipzig.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue May 26 17:28:17 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 26 May 2015 15:28:17 -0600 Subject: [vtkusers] ImageBlending in Compound Mode In-Reply-To: <6F6862A90839CE478D2A3146C2C31B4F1054D4@EMAIL2.ktk.uni-leipzig.de> References: <6F6862A90839CE478D2A3146C2C31B4F104F29@EMAIL2.ktk.uni-leipzig.de> <6F6862A90839CE478D2A3146C2C31B4F1054D4@EMAIL2.ktk.uni-leipzig.de> Message-ID: Can you use vtkImageMapToColors instead? You can use the vtkLookupTable's SetRange() method to control the window/level. On Tue, May 26, 2015 at 3:15 PM, B?ttcher, Prof. Dr. Peter < Boettcher at kleintierklinik.uni-leipzig.de> wrote: > You are correct, this should work but it doesn't. It seems that > vtkImageMapToWindowLevelColors sets the alpha value to 255, regardless of > the alpha value in the lookup. So, my problem is not related to the blender > but to the vtkImageMapToWindowLevelColors. > > Any ide to solve this? > > > > Peter > > > > *Von:* David Gobbi [mailto:david.gobbi at gmail.com] > *Gesendet:* Montag, 25. Mai 2015 21:44 > *An:* B?ttcher, Prof. Dr. Peter > *Cc:* vtkusers at vtk.org > *Betreff:* Re: [vtkusers] ImageBlending in Compound Mode > > > > I'm not very familiar with the Compounding mode, but is there any reason > > why you cannot use the default mode, i.e. alpha-blending? > > > > m_blend_A->SetInput(0, GreyImage); > > m_blend_A->SetInput(1, GreenImage); > > m_blend_A->SetOpacity(1, 0.7); > > m_blend_A->Update(); > > > > By setting the opacity of the green image to 0.7, the opacity of the "base" > > image is automatically (1.0 - 0.7). Black pixels in the green image (any > pixel > > with alpha==0) will be completely transparent. > > > > - David > > > > > > > > On Mon, May 25, 2015 at 12:50 PM, B?ttcher, Prof. Dr. Peter < > Boettcher at kleintierklinik.uni-leipzig.de> wrote: > > Dear All > > > > I have two vtkImageData which I map to grey and green color using > vtkImageMapToWindowLevelColors->SetOutputFormatToRGBA. The two LookUps > are manually defined like this: > > > > tableGreen->SetTableRange(0,256-1); > > tableGreen->Build(); > > for(float i=1; i<256; i++) > > tableGreen->SetTableValue(i,0,i/(256-1),0.0,1.0); // > Green > > tableGreen->SetTableValue(0,0.0,0.0,0.0,0.0); // > Background > > > > tableGrey->SetTableRange(0,256-1); > > tableGrey->Build(); > > for(float i=0; i<256; i++) > > tableGrey->SetTableValue(i,i/(256-1),i/(256-1), > i/(256-1),1.0); // Grey > > > > > > Using vtkImageBlend I would like to blend both images using different > opcity values (0 - 1), but ignoring any black pixel in the green image, by > using SetCompoundMode and CompoundThreshold = 0. > > > > m_blend_A->SetInput(0, GreyImage); > > m_blend_A->SetOpacity(0, 0.3); > > m_blend_A->SetInput(1, GreenImage); > > m_blend_A->SetOpacity(1, 0.7); > > m_blend_A->SetBlendModeToCompound(); > > m_blend_A->SetCompoundThreshold(0); > > m_blend_A->Update(); > > > > Whatever I do, the "black" pixels (background) in the green image are > still overlayed on the grey image pixels. However, when I turn the > threshold to anything other than 0 no pixel at all are pushed trough the > blender (neither the green nor the grey image). > > > > Any help would be much appreciated. > > > > Thanks - Peter > > > > > > > > --------------------------------------------------------- > > Prof. Dr. Peter B?ttcher, DipECVS > > European Veterinary Specialist in Surgery > > Fachtierarzt f?r Kleintierchirurgie > > Klinik f?r Kleintiere > > Universit?t Leipzig > > An den Tierkliniken 23 > > D-04103 Leipzig (Germany) > > Tel: +49-341-9738700 > > Fax: +49-341-9738799 > > Email: boettcher at kleintierklinik.uni-leipzig.de > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vianamp at gmail.com Wed May 27 06:24:02 2015 From: vianamp at gmail.com (matheus_viana) Date: Wed, 27 May 2015 03:24:02 -0700 (MST) Subject: [vtkusers] 2D Blurring applied to vtkImageData Message-ID: <1432722242477-5732019.post@n5.nabble.com> Guys, what would be the easiest way to apply a 2D gaussian blur to each slice of a vtkImageData? I tried to use vtkImageGaussianSmooth with SetDimensionality(2), but the resulting image is composed by some kind of repetition of the first 10 slices. Thanks, -- View this message in context: http://vtk.1045678.n5.nabble.com/2D-Blurring-applied-to-vtkImageData-tp5732019.html Sent from the VTK - Users mailing list archive at Nabble.com. From marcin.krotkiewski at gmail.com Wed May 27 08:00:39 2015 From: marcin.krotkiewski at gmail.com (marcin.krotkiewski) Date: Wed, 27 May 2015 14:00:39 +0200 Subject: [vtkusers] shading bug in vtk 6.2? Message-ID: <5565B1E7.6020301@gmail.com> Hi, I have a problem with shading in VTK 6.2 when using OpenGL2. The problem is visible when using lightkit, but not with simple scene light. I have attached pictures that demonstrate the problem. - model.jpg shows the 3D surface I am looking at - three combined gaussians. - shading_flat.jpg and shading_gouraud.jpg show a view from below at a place in the shadows, with steep surface slope. Both pictures are taken at the same camera position. shading_flat.jpg shows a strange patch that seems to me is a shading artifact. In contrast, shading_gouraud.jpg shows a nice, smooth gradient in the shadows. I have tested my code using vtk 6.1 and the result is different, i.e., similar to that shown in shading_gouraud.jpg. It seems also that the artifact is not there (or not visible) when lightkit is switched off. I have played around and I think it is caused by the fill light in the lightkit. Depending on the position of the fill light I can make this artifact patch all black. Could this be a bug related to the new OpenGL2 rendering engine? Thanks, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: model.jpg Type: image/jpeg Size: 40946 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: shading_flat.jpg Type: image/jpeg Size: 46665 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: shading_gouraud.jpg Type: image/jpeg Size: 41895 bytes Desc: not available URL: From aashish.chaudhary at kitware.com Wed May 27 08:58:23 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 27 May 2015 08:58:23 -0400 Subject: [vtkusers] shading bug in vtk 6.2? In-Reply-To: <5565B1E7.6020301@gmail.com> References: <5565B1E7.6020301@gmail.com> Message-ID: Looks like a bug but hard to tell without a sample code that can replicate this behavior on other machines. - Aashish On Wed, May 27, 2015 at 8:00 AM, marcin.krotkiewski < marcin.krotkiewski at gmail.com> wrote: > Hi, > > I have a problem with shading in VTK 6.2 when using OpenGL2. The problem > is visible when using lightkit, but not with simple scene light. I have > attached pictures that demonstrate the problem. > > - model.jpg shows the 3D surface I am looking at - three combined > gaussians. > - shading_flat.jpg and shading_gouraud.jpg show a view from below at a > place in the shadows, with steep surface slope. Both pictures are taken at > the same camera position. > > shading_flat.jpg shows a strange patch that seems to me is a shading > artifact. In contrast, shading_gouraud.jpg shows a nice, smooth gradient in > the shadows. I have tested my code using vtk 6.1 and the result is > different, i.e., similar to that shown in shading_gouraud.jpg. > > It seems also that the artifact is not there (or not visible) when > lightkit is switched off. I have played around and I think it is caused by > the fill light in the lightkit. Depending on the position of the fill light > I can make this artifact patch all black. > > Could this be a bug related to the new OpenGL2 rendering engine? > > Thanks, > > Marcin > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmitrievko at gmail.com Wed May 27 10:52:09 2015 From: dmitrievko at gmail.com (Konstantin) Date: Wed, 27 May 2015 07:52:09 -0700 (MST) Subject: [vtkusers] 3D Volume Registration In-Reply-To: References: <1432571716007-5731990.post@n5.nabble.com> Message-ID: <1432738329306-5732023.post@n5.nabble.com> Hi Matimont, I have already done it. I've also tried /ImageRegistration20.cxx/ example, but it was running so slow, that I couldn't wait for it to finish. Konstantin -- View this message in context: http://vtk.1045678.n5.nabble.com/3D-Volume-Registration-tp5731990p5732023.html Sent from the VTK - Users mailing list archive at Nabble.com. From jose.de.paula at live.com Wed May 27 16:47:45 2015 From: jose.de.paula at live.com (JoseBarretoT) Date: Wed, 27 May 2015 13:47:45 -0700 (MST) Subject: [vtkusers] problems with vtkImageResliceMapper Message-ID: <1432759665285-5732027.post@n5.nabble.com> Good day users, I am using a model similar to this to display DICOM images, http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/ImageProcessing/Python/ImageInteractorReslice.py Instead of vtkImageReader, vtkDICOMImageReader use and settings for standard dicom TBM. The problem I'm having is not loading, the file comes standard viewing axial (Keyboard Z). It is to change this pattern to sagittal (Keyboard X)? or I have to insert the visualzia??o matrix for parasagital as done in http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/ImageProcessing/Cxx/ImageSlicing.cxx ? -- View this message in context: http://vtk.1045678.n5.nabble.com/problems-with-vtkImageResliceMapper-tp5732027.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed May 27 17:51:16 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 27 May 2015 15:51:16 -0600 Subject: [vtkusers] problems with vtkImageResliceMapper In-Reply-To: <1432759665285-5732027.post@n5.nabble.com> References: <1432759665285-5732027.post@n5.nabble.com> Message-ID: For the ImageInteractorReslice example, the view orientation is controlled by the camera, so no visualization matrix is needed, and no visualization matrix should be used. Does this example work for you with the "/headsq/quarter" data? Is it only when you use it with your DICOM data that the "X" does not work? - David On Wed, May 27, 2015 at 2:47 PM, JoseBarretoT wrote: > Good day users, > I am using a model similar to this to display DICOM images, > > > http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/ImageProcessing/Python/ImageInteractorReslice.py > > > Instead of vtkImageReader, vtkDICOMImageReader use and settings for > standard > dicom TBM. > > The problem I'm having is not loading, the file comes standard viewing > axial > (Keyboard Z). > It is to change this pattern to sagittal (Keyboard X)? > or I have to insert the visualzia??o matrix for parasagital as done in > > > http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/ImageProcessing/Cxx/ImageSlicing.cxx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtkmatt at gmail.com Wed May 27 19:41:44 2015 From: vtkmatt at gmail.com (vtk matt) Date: Wed, 27 May 2015 16:41:44 -0700 Subject: [vtkusers] Fwd: Unsure how to use vtkDelaunay3D In-Reply-To: References: Message-ID: Hi all, I have spent the past few days trying to figure out how to use vtkDelaunay3D properly and decided I'd better seek out some help. My goal is relatively straight-forward: Given a set of points in 3D, generate a tetrahedral mesh, and use the results to determine which tetrahedron contains an arbitrary point. In its simplest form I am doing the following: vtkSmartPointer tets = vtkSmartPointer::New(); tets->SetInput(points); tets->Update(); printf("Number of tets: %d\n", tets->GetOutput()->GetNumberOfElements(VTK_TETRA)); The output claims there are zero tetrahedrons. However if I render an actor from tets->GetOutput(), I am able to visualize a wireframe surface mesh, so I know it's doing something. So I guess my questions are the following: Why does the output not contain any tetrahedrons? Why does the mesh only show surface triangles? Ultimately what is the proper way to construct a tetrahedral mesh such that I can query which tetrahedron contains an arbitrary point? Thanks. --Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed May 27 23:17:06 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 27 May 2015 21:17:06 -0600 Subject: [vtkusers] Fwd: Unsure how to use vtkDelaunay3D In-Reply-To: References: Message-ID: Hi Matt, You've been misled by VTK's rather terse documentation: Get the number of elements for a specific attribute type (POINT, CELL, etc.). For a mesh, you can call GetNumberOfElements(vtkDataObject::POINT) or you can call GetNumberOfElements(vtkDataObject::CELL). Those are the only two choices. You can't ask for a particular type of cell, all you can do is ask it to return the total number of cells. - David On Wed, May 27, 2015 at 5:41 PM, vtk matt wrote: > Hi all, > > I have spent the past few days trying to figure out how to use > vtkDelaunay3D properly and decided I'd better seek out some help. My goal > is relatively straight-forward: Given a set of points in 3D, generate a > tetrahedral mesh, and use the results to determine which tetrahedron > contains an arbitrary point. > > In its simplest form I am doing the following: > > vtkSmartPointer tets = > vtkSmartPointer::New(); > tets->SetInput(points); > tets->Update(); > printf("Number of tets: %d\n", > tets->GetOutput()->GetNumberOfElements(VTK_TETRA)); > > The output claims there are zero tetrahedrons. However if I render an > actor from tets->GetOutput(), I am able to visualize a wireframe surface > mesh, so I know it's doing something. > > So I guess my questions are the following: Why does the output not > contain any tetrahedrons? Why does the mesh only show surface triangles? > Ultimately what is the proper way to construct a tetrahedral mesh such that > I can query which tetrahedron contains an arbitrary point? > > Thanks. > > --Matt > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu May 28 04:07:46 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 28 May 2015 04:07:46 -0400 Subject: [vtkusers] How to make vtkGPUVolumeRaycastMapper works fast on ubuntu In-Reply-To: <1432441462911-5731984.post@n5.nabble.com> References: <1432441462911-5731984.post@n5.nabble.com> Message-ID: Hi there, What version of VTK are you using and what OpenGL backend? - Aashish On Sun, May 24, 2015 at 12:24 AM, Emptystack wrote: > Hello everyone, > > I have write a volume rendering demo on linux using the > vtkGPUVolumeRaycastMapper, but it works very slowly. I test the same code > on > windows system, but It works very fast. I dont't know why this happened? > Does anyone know how to increase its rendering speed on ubuntu? > > Many thanks! > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-make-vtkGPUVolumeRaycastMapper-works-fast-on-ubuntu-tp5731984.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Thu May 28 12:50:46 2015 From: jose.de.paula at live.com (JoseBarretoT) Date: Thu, 28 May 2015 09:50:46 -0700 (MST) Subject: [vtkusers] problems with vtkImageResliceMapper In-Reply-To: References: <1432759665285-5732027.post@n5.nabble.com> Message-ID: <1432831846661-5732045.post@n5.nabble.com> Hi David, Thanks for the answer. My problem was actually being with camera settings. Adjusting the Elevation values, Azimuth, Roll, Pitch and Yaw'm being able to display all views. I think now I just have to configure SetParallelScale, SetFocalPoint and setPosition to frame the image in the maximum length of the renderer. Thank you. -- View this message in context: http://vtk.1045678.n5.nabble.com/problems-with-vtkImageResliceMapper-tp5732027p5732045.html Sent from the VTK - Users mailing list archive at Nabble.com. From marcin.krotkiewski at gmail.com Thu May 28 13:28:54 2015 From: marcin.krotkiewski at gmail.com (marcin.krotkiewski) Date: Thu, 28 May 2015 19:28:54 +0200 Subject: [vtkusers] shading bug in vtk 6.2? In-Reply-To: References: <5565B1E7.6020301@gmail.com> Message-ID: <55675056.5020300@gmail.com> I have attached the dataset and a simple MATLAB script that demonstrate the problem. Java bindings are used in the script. With the chosen fill light settings the artifact patches are almost black. They are visible on the high slope parts of the model. Hope this helps, Marcin On 05/27/2015 02:58 PM, Aashish Chaudhary wrote: > Looks like a bug but hard to tell without a sample code that can > replicate this behavior on other machines. > > - Aashish > > On Wed, May 27, 2015 at 8:00 AM, marcin.krotkiewski > > > wrote: > > Hi, > > I have a problem with shading in VTK 6.2 when using OpenGL2. The > problem is visible when using lightkit, but not with simple scene > light. I have attached pictures that demonstrate the problem. > > - model.jpg shows the 3D surface I am looking at - three combined > gaussians. > - shading_flat.jpg and shading_gouraud.jpg show a view from below > at a place in the shadows, with steep surface slope. Both pictures > are taken at the same camera position. > > shading_flat.jpg shows a strange patch that seems to me is a > shading artifact. In contrast, shading_gouraud.jpg shows a nice, > smooth gradient in the shadows. I have tested my code using vtk > 6.1 and the result is different, i.e., similar to that shown in > shading_gouraud.jpg. > > It seems also that the artifact is not there (or not visible) when > lightkit is switched off. I have played around and I think it is > caused by the fill light in the lightkit. Depending on the > position of the fill light I can make this artifact patch all black. > > Could this be a bug related to the new OpenGL2 rendering engine? > > Thanks, > > Marcin > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > /| Aashish Chaudhary > | Technical Leader > | Kitware Inc. > / > /| http://www.kitware.com/company/team/chaudhary.html/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic1.jpg Type: image/jpeg Size: 31327 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic2.jpg Type: image/jpeg Size: 50384 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.vtk.gz Type: application/gzip Size: 66060 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_bug.m Type: text/x-objcsrc Size: 1510 bytes Desc: not available URL: From alejandro.fernandez at bsc.es Thu May 28 14:20:31 2015 From: alejandro.fernandez at bsc.es (=?UTF-8?B?QWxlamFuZHJvIEZlcm7DoW5kZXo=?=) Date: Thu, 28 May 2015 20:20:31 +0200 Subject: [vtkusers] MPI application writing PVTI Message-ID: <55675C6F.3070204@bsc.es> Hello everyone, I have a C++ MPI application that writes the results of a domain-decomposed mesh in different VTI files. Each process writes its own VTI file with the points corresponding to its domain. In order to group all VTI files into a single 3D image in paraview, I want to produce a single PVTI file using XMLPImageDataWriter. However, I have not found any example and do not know how to achieve this result with just the raw class method documentation. Please, can somebody provide me a C++ example or point me to the required documentation? Thank you very much, your help will be much appreciated. -- Alejandro Fern?ndez Su?rez Computer Science Dept. K2M Building - Room 104 - (+34) 934 137 529 Barcelona Supercomputing Center - CNS www.bsc.es From beekmaarten at yahoo.com Thu May 28 15:07:34 2015 From: beekmaarten at yahoo.com (Maarten Beek) Date: Thu, 28 May 2015 19:07:34 +0000 (UTC) Subject: [vtkusers] vtkTransform::Pop() and vtkTransform::Push() Message-ID: <963134947.601449.1432840054628.JavaMail.yahoo@mail.yahoo.com> Hi all, I am looking at the Push() and Pop() functions in the vtkTransform class.I don't understand how the access the top of the concatenation?stack.Could someone shed some light on this for me? Thanks - Maarten ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Thu May 28 16:06:35 2015 From: jose.de.paula at live.com (JoseBarretoT) Date: Thu, 28 May 2015 13:06:35 -0700 (MST) Subject: [vtkusers] Camera settings with DICOm images In-Reply-To: References: Message-ID: <1432843595705-5732049.post@n5.nabble.com> Jothy, you could configure the camera? To focus on full screan DICOM? I can only in AXIAL in sagittal n you. -- View this message in context: http://vtk.1045678.n5.nabble.com/Camera-settings-with-DICOm-images-tp4964269p5732049.html Sent from the VTK - Users mailing list archive at Nabble.com. From zagwin at gmail.com Thu May 28 19:38:20 2015 From: zagwin at gmail.com (zagwin) Date: Thu, 28 May 2015 16:38:20 -0700 (MST) Subject: [vtkusers] vtkImageViewer2 Display problems Message-ID: <1432856300117-5732050.post@n5.nabble.com> Hello VTK-Users, I want to load a dicom image, and display it on a vtkimageviewer2. I found two problems, and can not fix them. any suggestion will be appreciated! First, when I ONLY change the vtkImageData scalar value, and set this image to viewer again. nothing happened in vtkimageviewer2. However, if I generate a new image with the same scalar values, the viewer will show this new image. as coded in the following "ProcessData() function" Second, when I want to adjust the window/level, it will change drastically, not slowly. However, when I use "image_view->GetInteractorStyle()->RemoveAllObservers();" it works. but I don't know who really handle the vtkCommand::WindowLevelEvent? And, even it does adjust the "display", the GetColorWindow/GetColorLevel does NOT give the "changed" value. My codes looks like: //mainwindow.h class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); typedef signed short InputPixelType;//Pixel Type static const unsigned int InputDimension = 2;//Dimension of image private slots: int DICOMseq(); void ProcessData(); private: vtkSmartPointer image_view; vtkSmartPointer m_image; Ui::MainWindow *ui; }; //mainwindow.cpp MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); //Qt Signal slot connect(ui->actionDICOM_Sequence,SIGNAL(triggered()),this, SLOT(DICOMseq())); connect(ui->actionExit,SIGNAL(triggered()),this, SLOT(close())); connect(ui->actionProcess,SIGNAL(triggered()),this, SLOT(ProcessData())); image_view = vtkSmartPointer::New(); //set VTK Viewer to QVTKWidget in Qt's UI ui->qVTK1->SetRenderWindow(image_view->GetRenderWindow()); image_view->SetupInteractor(ui->qVTK1->GetRenderWindow()->GetInteractor()); //image_view->GetInteractorStyle()->RemoveAllObservers(); } int MainWindow::DICOMseq() { typedef itk::Image< InputPixelType, InputDimension > InputImageType;//Image Type typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName("test.dcm"); reader->Update(); typedef itk::ImageToVTKImageFilter ConnectorType; ConnectorType::Pointer connector = ConnectorType::New(); connector->SetInput( reader->GetOutput() ); connector->Update(); m_image = vtkSmartPointer::New(); m_image->DeepCopy(connector->GetOutput()); image_view->SetInputData(m_image); image_view->GetRenderer()->ResetCamera(); image_view->Render(); } void MainWindow::ProcessData() { //vtkSmartPointer image = vtkSmartPointer::New(); //image->DeepCopy(m_image.GetPointer()); //int *dims = image->GetDimensions(); int *dims = m_image->GetDimensions(); for(int z = 0; z < dims[2]; z++) { for (int y = 0; y < dims[1]; y++) { for (int x = 0; x < dims[0]; x++) { InputPixelType *pimg = static_cast(m_image->GetScalarPointer(x,y,z)); pimg[0] = 255; } } } image_view->SetInputData(m_image); image_view->GetRenderer()->ResetCamera(); image_view->Render(); } -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageViewer2-Display-problems-tp5732050.html Sent from the VTK - Users mailing list archive at Nabble.com. From franciscolopezdelafranca at gmail.com Fri May 29 06:40:14 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Fri, 29 May 2015 12:40:14 +0200 Subject: [vtkusers] 3D image as N cubes Message-ID: Hi everybody, I'd like to represent a 3D image as a fixed number of cubes, I mean, something like a spatial occupancy matrix in 3D. Could you, please, recommend me a fast way to do it or does it exist a data structure in VTK to achieve this? I've found the OcTree structure but I donot know if it is valid for this. Thank you very much. My best regards. /Francisco -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Fri May 29 10:50:11 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Fri, 29 May 2015 10:50:11 -0400 Subject: [vtkusers] ANNOUNCE: Kitware is hiring Message-ID: Hi folks, We are looking to hire visualization developers to our Scientific Computing team. If you are a talented visualization researcher and developer with strong C++ skills, please consider applying. You will join a great team and work on many interesting and challenging technical problems - always aiming to deliver robust and widely used software solutions. For the full posting see: http://tinyurl.com/l8sgvzw JOB DESCRIPTION Kitware is seeking to hire highly skilled Research and Development Engineers (R&D Engineers) to join our Scientific Computing team and contribute to our scientific and information visualization efforts. Candidates will work to develop and improve leading visualization software solutions. Kitware collaborates on a multitude of basic and applied research and development projects. Our collaborators include the top universities from around the world, national research labs, medical device manufacturers, car manufacturers, oil and gas companies, financial institutes, and many others. The projects range from extending our open source C++ libraries and applications, such as VTK, ParaView, and CMake, to developing proprietary domain-specific vertical applications for a wide array of platforms including web and mobile devices. By joining our team you will participate in a dynamic work environment with exceptionally talented and friendly coworkers who are committed to high-quality development practices. You will collaborate with esteemed researchers from around the world by: * Designing and developing scalable data analysis and visualization tools for use by researchers and professionals from various domains; * Solving a wide array of problems ranging from developing distributed memory parallel algorithms for data analysis, optimizing distributed parallel codes to compiling and maintaining software on supercomputers. * Designing and developing tools to improve scientific data analysis workflows; * Contributing to and supporting our dynamic open source communities built around several of our open source tools. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nkovac2 at uwo.ca Fri May 29 09:47:53 2015 From: nkovac2 at uwo.ca (Nicole Kovacs) Date: Fri, 29 May 2015 13:47:53 +0000 Subject: [vtkusers] VTK 6 Migration - GetProducerPort in SetNthInputConnection replacement Message-ID: Hi guys, I apologize if this is a basic question, I'm new to VTK and I'm trying to port some VTK code from version 5.x to version 6.x I'm facing various errors regarding GetProducerPort's removal from vtkDataObject. I know that I should be replacing someAlgorithm->SetInputConnection(someDataObject->GetProducerPort()); by someAlgorithm->SetInputData(someDataObject); but the code I have is a bit different, such as: someAlgorithm->SetNthInputConnection(port, index, someDataObject->GetProducerPort()); I thought about looking for some SetNthInputData method that takes as arguments a port and an index and could solve my problem, but haven't found anything that useful. I did find a method called SetInputDataObject(int port, vtkDataObject *data) that has the port, but not the index. Is there a way that I can port this part of my code? Is there a reason that SetInputData methods don't have indices as arguments? I have talked to the author of the code I'm porting and I know that in some cases I don't need to specify the port, only the input index. Is there a method that does that? Thank you for your attention! -------------- next part -------------- An HTML attachment was scrubbed... URL: From zagwin at gmail.com Fri May 29 14:24:20 2015 From: zagwin at gmail.com (zagwin) Date: Fri, 29 May 2015 11:24:20 -0700 (MST) Subject: [vtkusers] vtkImageViewer2 Display problems In-Reply-To: <1432856300117-5732050.post@n5.nabble.com> References: <1432856300117-5732050.post@n5.nabble.com> Message-ID: <1432923860660-5732061.post@n5.nabble.com> I figured out how to solved the first problem. just need to add "m_image->Modified();" I am still confused about the second problem, does anybody can tell me why or give me a suggestion where I can find the answer? Thanks zagwin wrote > void MainWindow::ProcessData() > { > .......... > m_image->Modified(); > ....................... > image_view->SetInputData(m_image); > image_view->GetRenderer()->ResetCamera(); > image_view->Render(); > } -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageViewer2-Display-problems-tp5732050p5732061.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Fri May 29 17:31:34 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 29 May 2015 17:31:34 -0400 Subject: [vtkusers] Volume Rendering Update Message-ID: Folks, We made some recent improvements to VTK volume rendering including fixes to related components. Here is a list of those changes: 1) Now new GPU Volume Mapper respect Interpolation Type (Linear or Nearest). Default is Nearest as in the last GPU mapper. 2) Shading is now twice as fast as before. There will be another branch to make it even faster. 3) Fixed lighting bug (number of lights kept on increasing with change in volume property) 4) Saving and Restoring GL state properly for textures 5) Bias and Scale are now performed in Shader. 6) We changed some GL texture format information to support OpenGL 3 context 7) Fixed extensions were not reported correctly on GL2 context 8) Fixed few failing tests specifically on Mesa 9) Removed VolumeOpenGLNew module as it was not as usable with OpenGL2 getting ready for primetime 10) Added convenience API to SmartVolume Mapper 11) Cleaned up logic for dealing with context changes in Volume Mapper Please let us know if you have any questions. Thanks, -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From rml at ConceptsNrec.com Sat May 30 11:17:23 2015 From: rml at ConceptsNrec.com (Robert M. Ludew) Date: Sat, 30 May 2015 15:17:23 +0000 Subject: [vtkusers] Problem with rendering colors via Remote Desktop Connection Message-ID: Hi all, After upgrading from VTK 5.8 to 6.2 the colors of the rendered volume are all darker and no longer match the color bar (see attachment). This happens only when working via Windows Remote Desktop Connection. What's causing this and is there a way to fix it? Thanks for your help, Robert ________________________________ Please consider the environment before printing this email. ________________________________ The information contained in this communication and any attachment(s) and/or link(s) hereto may contain proprietary and/or confidential information, which may be privileged or otherwise protected from disclosure, and is intended only for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure, or distribution is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message from your computer system. If you have any questions concerning this message, please contact the sender. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk62_rdc.jpg Type: image/jpeg Size: 73459 bytes Desc: vtk62_rdc.jpg URL: From 15891495523 at 126.com Sun May 31 05:48:00 2015 From: 15891495523 at 126.com (zhq) Date: Sun, 31 May 2015 02:48:00 -0700 (MST) Subject: [vtkusers] how to quit VTK when close the MFC single dialog ? In-Reply-To: <1430320442096-5731681.post@n5.nabble.com> References: <1429874862318-5731600.post@n5.nabble.com> <1430320442096-5731681.post@n5.nabble.com> Message-ID: <1433065680588-5732068.post@n5.nabble.com> I have made sense what's wrong with my project. In the function OnClose ( Called when the dialog is closed ) m_pImageData->SetReferenceCount(0); m_pImageViewer->SetReferenceCount(0); m_pRenderWindowInteractor->SetReferenceCount(0); I though it will help me to kill the process. But, in fact, if I delete those code, the process will be killed when the dialog is closed. But I don't know why. -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-quit-VTK-when-close-the-MFC-single-dialog-tp5731600p5732068.html Sent from the VTK - Users mailing list archive at Nabble.com. From waldo.valenzuela at hotmail.com Sun May 31 15:16:20 2015 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Sun, 31 May 2015 21:16:20 +0200 Subject: [vtkusers] About vtkHyperStreamline basic example and DTI Message-ID: Dear All, I am working with DTI images and I want to create a fiber tracking implementation to visualise, fibers created from the tensors from a ITK image. I was looking in the VTK examples about tensors and fibers, and the closest that I found was vtkHyperStreamline, but there is not official example how to use this class. If some one knows about fibers visualisation on VTK, or know about a example on vtkHyperStreamline, I will really appreciate your help on this. Thanks very much for any help. Cheers, Waldo.