From kor1581 at gmail.com Tue Aug 1 03:10:57 2017 From: kor1581 at gmail.com (K O ranjith) Date: Tue, 1 Aug 2017 12:40:57 +0530 Subject: [vtkusers] How to change window level & window width of vtkInteractorStyleImage Message-ID: Hello all, I'm using using vtkImageViewer2 to display dicom images and uses custom interactor inherited from vtkInteractorStyleImage. And uses left mouse button down move event to modify window level and width. I need to manually set window level and window width of the viewing image to custom value. for this I'm using the methods vtkImageViewer2->*SetColorLevel*(double level); vtkImageViewer2->*SetColorWindow*(double width); But, even after setting the values it is not reflecting in vtkInteractorStyleImage, The method, vtkInteractorStyleImage->*GetWindowLevelCurrentPosition*(int windolevel, int windowwidth); returning different values than set in vtkImageViewer2. Have any method to manually modify window level and window values of vtkInteractorStyleImage to custom value. (something like SetColorLevel SetColorWindow of vtkImageViewer2) My intention is to manually modify window values of displaying image. Please help... -------------- next part -------------- An HTML attachment was scrubbed... URL: From rick at pile.com Tue Aug 1 06:51:56 2017 From: rick at pile.com (Rick Dailey) Date: Tue, 1 Aug 2017 03:51:56 -0700 (MST) Subject: [vtkusers] vtkTextureObject bind error In-Reply-To: References: <1501260214312-5744200.post@n5.nabble.com> <1501261737667-5744202.post@n5.nabble.com> <1501498447377-5744215.post@n5.nabble.com> <1501518920479-5744223.post@n5.nabble.com> <1501522915867-5744226.post@n5.nabble.com> Message-ID: <1501584716697-5744234.post@n5.nabble.com> Rendering without a mask works, but of course this is not a solution for us as the mask is an integral part of our product. Is there anything that can be done about this? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744234.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Tue Aug 1 07:43:03 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 1 Aug 2017 07:43:03 -0400 Subject: [vtkusers] How to split large models into smaller pieces when exporting the scene? In-Reply-To: <1501555747988-5744232.post@n5.nabble.com> References: <1501555747988-5744232.post@n5.nabble.com> Message-ID: This example may help: https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/SplitPolyData/ Bill On Mon, Jul 31, 2017 at 10:49 PM, landings wrote: > Hi, I'm using VTK with Unity 3D. > I use vtkX3DExporter to export my VTK scene, and rebuild the meshes in > Unity. > Unity and maybe all game engines don't support single models that have more > than 65536 vertices. I must split large models into smaller pieces. > Is there an existing method to do this, or do I need to implement this > myself? If the latter, could you give me some hints? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-split-large-models-into-smaller-pieces-when-exporting-the-scene-tp5744232.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 alvaro.sanchez at kitware.com Tue Aug 1 09:08:28 2017 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Tue, 1 Aug 2017 09:08:28 -0400 Subject: [vtkusers] vtkTextureObject bind error In-Reply-To: <1501584716697-5744234.post@n5.nabble.com> References: <1501260214312-5744200.post@n5.nabble.com> <1501261737667-5744202.post@n5.nabble.com> <1501498447377-5744215.post@n5.nabble.com> <1501518920479-5744223.post@n5.nabble.com> <1501522915867-5744226.post@n5.nabble.com> <1501584716697-5744234.post@n5.nabble.com> Message-ID: There is on-going work to support streaming with masks on. It is too early to try the branch however, I will keep you posted. The only solution I see for now (as Ken suggested earlier) would be to resize your input volume (and masks). You could use vtkImageResize for this, have a look at the following test as an example . On Tue, Aug 1, 2017 at 6:51 AM, Rick Dailey wrote: > Rendering without a mask works, but of course this is not a solution for us > as the mask is an integral part of our product. > > Is there anything that can be done about this? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/vtkTextureObject-bind-error-tp5744068p5744234.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 > -- Alvaro Sanchez Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Aug 1 09:13:49 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 1 Aug 2017 09:13:49 -0400 Subject: [vtkusers] vtkTextureObject bind error In-Reply-To: References: <1501260214312-5744200.post@n5.nabble.com> <1501261737667-5744202.post@n5.nabble.com> <1501498447377-5744215.post@n5.nabble.com> <1501518920479-5744223.post@n5.nabble.com> <1501522915867-5744226.post@n5.nabble.com> <1501584716697-5744234.post@n5.nabble.com> Message-ID: Here is an example of vtkImageResize https://lorensen.github.io/VTKExamples/site/Cxx/Images/ResizeImage/ Bill On Tue, Aug 1, 2017 at 9:08 AM, Alvaro Sanchez wrote: > There is on-going work to support streaming with masks on. It is too early > to try the branch > however, I will keep you posted. > > The only solution I see for now (as Ken suggested earlier) would be to > resize your input > volume (and masks). You could use vtkImageResize for this, have a look at > the following > test as an example. > > On Tue, Aug 1, 2017 at 6:51 AM, Rick Dailey wrote: >> >> Rendering without a mask works, but of course this is not a solution for >> us >> as the mask is an integral part of our product. >> >> Is there anything that can be done about this? >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744234.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 > > > > > -- > Alvaro Sanchez > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4901 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 arw.tyx-ouy_mz at ezweb.ne.jp Tue Aug 1 11:12:26 2017 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Tue, 1 Aug 2017 08:12:26 -0700 (MST) Subject: [vtkusers] Normals at intersection point Message-ID: <1501600346634-5744238.post@n5.nabble.com> Hi, all I want to get normals at intersection point between ellipse and line. I could get the intersection point, but I don't know how to get normals at that point. That part of My code is below. Please help me! ======================================== double angle = 0; double long_r, short_r; vtkIdType id = 0; double CenterX, CenterY, CenterZ; double z_length = 50.0; long_r = 50; short_r = 30; CenterX = 0.0; CenterY = 0.0, CenterZ = 0.0; vtkSmartPointer points = vtkSmartPointer::New(); points->SetNumberOfPoints(2 * NUM_OF_DIVIDE); while (angle <= 2.0 * vtkMath::Pi() + (vtkMath::Pi() / NUM_OF_DIVIDE)) { points->InsertPoint(id, long_r * cos(angle) + CenterX, short_r * sin(angle) + CenterY, CenterZ); angle = angle + (vtkMath::Pi() / NUM_OF_DIVIDE); id++; } vtkSmartPointer line = vtkSmartPointer::New(); line->GetPointIds()->SetNumberOfIds(id); for (int k = 0; k < id; ++k) { line->GetPointIds()->SetId(k, k); } vtkSmartPointer lines = vtkSmartPointer::New(); lines->InsertNextCell(line); vtkSmartPointer ellipse = vtkSmartPointer::New(); ellipse->GlobalReleaseDataFlagOff(); ellipse->Allocate(1, 1); ellipse->SetPoints(points); ellipse->SetLines(lines); // 3??? vtkSmartPointer extrude = vtkSmartPointer::New(); extrude->SetInputData(ellipse); extrude->SetExtrusionTypeToNormalExtrusion(); extrude->SetScaleFactor(1.0); extrude->SetVector(0, 0, z_length); extrude->Update(); vtkSmartPointer triangles = vtkSmartPointer::New(); triangles->SetInputConnection(extrude->GetOutputPort()); triangles->Update(); auto numberOfSubdivisions = 2; vtkSmartPointer subdivision = vtkSmartPointer::New(); subdivision->SetInputConnection(triangles->GetOutputPort()); subdivision->SetNumberOfSubdivisions(numberOfSubdivisions); subdivision->Update(); /////////////////// Omit /////////////////////////// double lineP0[3] = {TARGET_X, TARGET_Y, TARGET_Z}; double lineP1[3] = {surfacePoints[minId][0] + directionVector[minId][0], surfacePoints[minId][1] + directionVector[minId][1], surfacePoints[minId][2] + directionVector[minId][2]}; vtkSmartPointer intersectPoints = vtkSmartPointer::New(); vtkSmartPointer tree = vtkSmartPointer::New(); tree->SetDataSet(subdivision->GetOutput()); tree->BuildLocator(); tree->IntersectWithLine(lineP0, lineP1, intersectPoints, NULL); std::cout << "NumPoints: " << intersectPoints->GetNumberOfPoints() << std::endl; double intersection[3]; for (int i = 0; i < intersectPoints->GetNumberOfPoints(); i++) { intersectPoints->GetPoint(i, intersection); std::cout << "Intersection " << i << ":" << intersection[0] << ", " << intersection[1] << ", " << intersection[2] << std::endl; } ==================================================== -- View this message in context: http://vtk.1045678.n5.nabble.com/Normals-at-intersection-point-tp5744238.html Sent from the VTK - Users mailing list archive at Nabble.com. From olivier.commowick at inria.fr Tue Aug 1 13:49:31 2017 From: olivier.commowick at inria.fr (Olivier Commowick) Date: Tue, 1 Aug 2017 19:49:31 +0200 Subject: [vtkusers] QVTKOpenGLWidget and vtkImageViewer Message-ID: <30267CAC-1276-4387-A1E8-51055FB49FAA@inria.fr> Hi everyone, I have been struggling with using QVTKOpenGLWidget to display an image with the vtkImageViewer. My problem is basically that the image is loaded and everything created but it seems the rendering is never triggered and thus the display is black. To summarize what I?ve done, I?ve created a vtkImageViewer3 which is the same as vtkImageViewer from VTK, only changing the vtkRenderWindow to be a vtkGenericOpenGLRenderWindow (required by the QVTKOpenGLWidget). I have then modified the ImageViewer example from VTK to match these new classes which gives the following code (see at the end). Oh, and I am using Qt5.7, and VTK 8.0 release. Would anyone have any clue on what could make this work (i.e. actually render something and display it) ? Thanks in advance Olivier ?? Main.cxx code: #include #include "vtkImageViewer3.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" #include "vtkPNGReader.h" #include "QVTKOpenGLWidget.h" #include int main(int argc, char** argv) { QSurfaceFormat format = QVTKOpenGLWidget::defaultFormat(); format.setSamples(0); QApplication app(argc, argv); QVTKOpenGLWidget widget; widget.setFormat(format); widget.setEnableHiDPI(true); widget.resize(256,256); vtkPNGReader* reader = vtkPNGReader::New(); std::string fname = argv[1]; reader->SetFileName(fname.c_str()); vtkImageViewer3* image_view = vtkImageViewer3::New(); image_view->SetInputConnection(reader->GetOutputPort()); widget.SetRenderWindow(image_view->GetRenderWindow()); image_view->SetupInteractor(widget.GetRenderWindow()->GetInteractor()); image_view->SetColorLevel(138.5); image_view->SetColorWindow(233); widget.show(); app.exec(); image_view->Delete(); reader->Delete(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Tue Aug 1 14:04:50 2017 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 1 Aug 2017 14:04:50 -0400 Subject: [vtkusers] QVTKOpenGLWidget and vtkImageViewer In-Reply-To: <30267CAC-1276-4387-A1E8-51055FB49FAA@inria.fr> References: <30267CAC-1276-4387-A1E8-51055FB49FAA@inria.fr> Message-ID: I can see one thing missing, right of the bat. You need to do the following before QApplication in instantiated. *QSurfaceFormat::setDefaultFormat*(format); Utkarsh On Tue, Aug 1, 2017 at 1:49 PM, Olivier Commowick < olivier.commowick at inria.fr> wrote: > Hi everyone, > > I have been struggling with using QVTKOpenGLWidget to display an image > with the vtkImageViewer. My problem is basically that the image is loaded > and everything created but it seems the rendering is never triggered and > thus the display is black. > > To summarize what I?ve done, I?ve created a vtkImageViewer3 which is the > same as vtkImageViewer from VTK, only changing the vtkRenderWindow to be a > vtkGenericOpenGLRenderWindow (required by the QVTKOpenGLWidget). I have > then modified the ImageViewer example from VTK to match these new classes > which gives the following code (see at the end). Oh, and I am using Qt5.7, > and VTK 8.0 release. > > Would anyone have any clue on what could make this work (i.e. actually > render something and display it) ? > > Thanks in advance > Olivier > > ?? > > Main.cxx code: > > #include > > > #include "vtkImageViewer3.h" > > #include "vtkRenderWindowInteractor.h" > > #include "vtkRenderer.h" > > #include "vtkPNGReader.h" > > > #include "QVTKOpenGLWidget.h" > > #include > > > int main(int argc, char** argv) > > { > > QSurfaceFormat format = QVTKOpenGLWidget::defaultFormat(); > > format.setSamples(0); > > > QApplication app(argc, argv); > > > QVTKOpenGLWidget widget; > > widget.setFormat(format); > > widget.setEnableHiDPI(true); > > widget.resize(256,256); > > > vtkPNGReader* reader = vtkPNGReader::New(); > > std::string fname = argv[1]; > > reader->SetFileName(fname.c_str()); > > > vtkImageViewer3* image_view = vtkImageViewer3::New(); > > image_view->SetInputConnection(reader->GetOutputPort()); > > > widget.SetRenderWindow(image_view->GetRenderWindow()); > > image_view->SetupInteractor(widget.GetRenderWindow()->GetInteractor()); > > > image_view->SetColorLevel(138.5); > > image_view->SetColorWindow(233); > > > widget.show(); > > > app.exec(); > > > image_view->Delete(); > > reader->Delete(); > > > return 0; > > } > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivier.commowick at inria.fr Tue Aug 1 14:12:46 2017 From: olivier.commowick at inria.fr (Olivier Commowick) Date: Tue, 1 Aug 2017 20:12:46 +0200 Subject: [vtkusers] QVTKOpenGLWidget and vtkImageViewer References: <216E03A3-6288-4501-9AD4-D27FD24BE16D@inria.fr> Message-ID: <8C79D697-5825-44A3-9801-27BC7781A2A7@inria.fr> Thanks for the answer, it actually solves the problem, but I do not get completely why. In my code I had set the format of the widget to the right one. Would you have an explanation of that difference ? Basically why putting it before the QApplication instanciation is important ? Thanks again Olivier > Le 1 ao?t 2017 ? 20:04, Utkarsh Ayachit > a ?crit : > > I can see one thing missing, right of the bat. You need to do the following before QApplication in instantiated. > > QSurfaceFormat::setDefaultFormat(format); > > Utkarsh > > On Tue, Aug 1, 2017 at 1:49 PM, Olivier Commowick > wrote: > Hi everyone, > > I have been struggling with using QVTKOpenGLWidget to display an image with the vtkImageViewer. My problem is basically that the image is loaded and everything created but it seems the rendering is never triggered and thus the display is black. > > To summarize what I?ve done, I?ve created a vtkImageViewer3 which is the same as vtkImageViewer from VTK, only changing the vtkRenderWindow to be a vtkGenericOpenGLRenderWindow (required by the QVTKOpenGLWidget). I have then modified the ImageViewer example from VTK to match these new classes which gives the following code (see at the end). Oh, and I am using Qt5.7, and VTK 8.0 release. > > Would anyone have any clue on what could make this work (i.e. actually render something and display it) ? > > Thanks in advance > Olivier > > ?? > > Main.cxx code: > > #include > > #include "vtkImageViewer3.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkRenderer.h" > #include "vtkPNGReader.h" > > #include "QVTKOpenGLWidget.h" > #include > > int main(int argc, char** argv) > { > QSurfaceFormat format = QVTKOpenGLWidget::defaultFormat(); > format.setSamples(0); > > QApplication app(argc, argv); > > QVTKOpenGLWidget widget; > widget.setFormat(format); > widget.setEnableHiDPI(true); > widget.resize(256,256); > > vtkPNGReader* reader = vtkPNGReader::New(); > std::string fname = argv[1]; > reader->SetFileName(fname.c_str()); > > vtkImageViewer3* image_view = vtkImageViewer3::New(); > image_view->SetInputConnection(reader->GetOutputPort()); > > widget.SetRenderWindow(image_view->GetRenderWindow()); > image_view->SetupInteractor(widget.GetRenderWindow()->GetInteractor()); > > image_view->SetColorLevel(138.5); > image_view->SetColorWindow(233); > > widget.show(); > > app.exec(); > > image_view->Delete(); > reader->Delete(); > > return 0; > } > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Tue Aug 1 16:58:48 2017 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 1 Aug 2017 16:58:48 -0400 Subject: [vtkusers] QVTKOpenGLWidget and vtkImageViewer In-Reply-To: <8C79D697-5825-44A3-9801-27BC7781A2A7@inria.fr> References: <216E03A3-6288-4501-9AD4-D27FD24BE16D@inria.fr> <8C79D697-5825-44A3-9801-27BC7781A2A7@inria.fr> Message-ID: What operating system is this on? I think it's some platform specific code in Qt that causes OpenGL context to be initialized before the QVTKOpenGLWidget is created and since it defaults to OpenGL 2.1, it doesn't end up providing correct OpenGL context for VTK's rendering. But I haven't looking into it too deeply. On Tue, Aug 1, 2017 at 2:12 PM, Olivier Commowick < olivier.commowick at inria.fr> wrote: > Thanks for the answer, it actually solves the problem, but I do not get > completely why. In my code I had set the format of the widget to the right > one. Would you have an explanation of that difference ? Basically why > putting it before the QApplication instanciation is important ? > > Thanks again > Olivier > > Le 1 ao?t 2017 ? 20:04, Utkarsh Ayachit a > ?crit : > > I can see one thing missing, right of the bat. You need to do the > following before QApplication in instantiated. > > *QSurfaceFormat::setDefaultFormat*(format); > > Utkarsh > > On Tue, Aug 1, 2017 at 1:49 PM, Olivier Commowick < > olivier.commowick at inria.fr> wrote: > >> Hi everyone, >> >> I have been struggling with using QVTKOpenGLWidget to display an image >> with the vtkImageViewer. My problem is basically that the image is loaded >> and everything created but it seems the rendering is never triggered and >> thus the display is black. >> >> To summarize what I?ve done, I?ve created a vtkImageViewer3 which is the >> same as vtkImageViewer from VTK, only changing the vtkRenderWindow to be a >> vtkGenericOpenGLRenderWindow (required by the QVTKOpenGLWidget). I have >> then modified the ImageViewer example from VTK to match these new classes >> which gives the following code (see at the end). Oh, and I am using Qt5.7, >> and VTK 8.0 release. >> >> Would anyone have any clue on what could make this work (i.e. actually >> render something and display it) ? >> >> Thanks in advance >> Olivier >> >> ?? >> >> Main.cxx code: >> >> #include >> >> >> #include "vtkImageViewer3.h" >> >> #include "vtkRenderWindowInteractor.h" >> >> #include "vtkRenderer.h" >> >> #include "vtkPNGReader.h" >> >> >> #include "QVTKOpenGLWidget.h" >> >> #include >> >> >> int main(int argc, char** argv) >> >> { >> >> QSurfaceFormat format = QVTKOpenGLWidget::defaultFormat(); >> >> format.setSamples(0); >> >> >> QApplication app(argc, argv); >> >> >> QVTKOpenGLWidget widget; >> >> widget.setFormat(format); >> >> widget.setEnableHiDPI(true); >> >> widget.resize(256,256); >> >> >> vtkPNGReader* reader = vtkPNGReader::New(); >> >> std::string fname = argv[1]; >> >> reader->SetFileName(fname.c_str()); >> >> >> vtkImageViewer3* image_view = vtkImageViewer3::New(); >> >> image_view->SetInputConnection(reader->GetOutputPort()); >> >> >> widget.SetRenderWindow(image_view->GetRenderWindow()); >> >> image_view->SetupInteractor(widget.GetRenderWindow()->GetInteractor()); >> >> >> image_view->SetColorLevel(138.5); >> >> image_view->SetColorWindow(233); >> >> >> widget.show(); >> >> >> app.exec(); >> >> >> image_view->Delete(); >> >> reader->Delete(); >> >> >> return 0; >> >> } >> >> >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 chenshaoqiang at buaa.edu.cn Tue Aug 1 20:18:47 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Wed, 2 Aug 2017 08:18:47 +0800 Subject: [vtkusers] Is it possible to make the VTKTextbook.pdf better? In-Reply-To: <017801d30ad7$4e20b890$ea6229b0$@stlcc.org> References: <8963ED62896641DEA819B1963E997040@chensqPC> <017801d30ad7$4e20b890$ea6229b0$@stlcc.org> Message-ID: <4B2AE9B8DDC045A88B4FF3DE1DEFABAE@chensqPC> It means a mess, such as chen From: Bob Palank Sent: Tuesday, August 01, 2017 11:03 PM To: 'chensq' Subject: RE: [vtkusers] Is it possible to make the VTKTextbook.pdf better? What does disordered mean ? Bob From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of chensq Sent: Monday, July 31, 2017 9:18 PM To: vtkusers Subject: [vtkusers] Is it possible to make the VTKTextbook.pdf better? All of the formulas are disordered. Sincerely Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image[1].png Type: image/png Size: 105524 bytes Desc: not available URL: From zhang07101 at 126.com Wed Aug 2 04:51:37 2017 From: zhang07101 at 126.com (zhang qiang) Date: Wed, 2 Aug 2017 01:51:37 -0700 (MST) Subject: [vtkusers] How to understand the slab thickness, slab resolution, spacing In-Reply-To: References: <1501227167522-5744188.post@n5.nabble.com> <1501319189185-5744208.post@n5.nabble.com> Message-ID: <1501663897654-5744246.post@n5.nabble.com> Dear David: Something still make me confused. vtkImageReslice is used to reslice the image, and the output spacing is setted as (0.4, 0.4, 0.4). The SlabNumberOfSlices is default 1, so the thickness of the resliced image is 0.4? But what if the thickness of original image is 0.8? I think the thickness of original image is 0.8. And if the slab number of slice is n, the thickness of resliced image should be 0.8*n. Is that right. In this way, if the thickness of original image is 0.8, the thickness of resliced image must be 0.8*n? zhang qiang -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-understand-the-slab-thickness-slab-resolution-spacing-tp5744188p5744246.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Aug 2 09:58:24 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 2 Aug 2017 07:58:24 -0600 Subject: [vtkusers] How to understand the slab thickness, slab resolution, spacing In-Reply-To: <1501663897654-5744246.post@n5.nabble.com> References: <1501227167522-5744188.post@n5.nabble.com> <1501319189185-5744208.post@n5.nabble.com> <1501663897654-5744246.post@n5.nabble.com> Message-ID: Hi Zhang, Note that vtkImageReslice does not know the thickness of the input slices. It only knows the spacing of the input slices. There is no "thickness" information in vtkImageData. So in your example, if the input spacing is 0.8mm, then vtkImageReslice still does not know the true "thickness" of the input slices. When you call SetSlabNumberOfSlices(n), the thickness of the output slabs is n*(output spacing). It is up to you to compute the number "n" that provides the output thickness that you need. - David On Wed, Aug 2, 2017 at 2:51 AM, zhang qiang wrote: > Dear David: > > Something still make me confused. > > vtkImageReslice is used to reslice the image, and the output spacing > is setted as (0.4, 0.4, 0.4). The SlabNumberOfSlices is default 1, so the > thickness of the resliced image is 0.4? But what if the thickness of > original image is 0.8? I think the thickness of original image is 0.8. And > if the slab number of slice is n, the thickness of resliced image should be > 0.8*n. Is that right. > > In this way, if the thickness of original image is 0.8, the thickness > of resliced image must be 0.8*n? > > zhang qiang > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimi_vtk at foxmail.com Wed Aug 2 10:09:55 2017 From: jimi_vtk at foxmail.com (=?gb18030?B?cHA=?=) Date: Wed, 2 Aug 2017 22:09:55 +0800 Subject: [vtkusers] How to display different axis slice for drawing contours Message-ID: Hi all, I have displayed dicom image in three view: axial, coronal, and sagittal using vtkImageReslice. Now I draw several contours about eyeball based on dicom slices in axial view. I have used vtkVoxelContoursToSurfaceFilter to display in 3D by drawing contours. But I don't know how to display the formed 3D model by drawing contours in other arbitrary plane, such as in coronal and sagittal view. Dose anyone has any suggestion? If there are examples, that would be better. Thanks. Best regards, Jimi -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Wed Aug 2 10:24:43 2017 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Wed, 2 Aug 2017 07:24:43 -0700 (MST) Subject: [vtkusers] Error by compiling vtk 8.0 Message-ID: <1501683883782-5744252.post@n5.nabble.com> Hello users, I'm trying to compile vtk 8.0 with Visual Studio 2012 on Windows 10 64Bit. But it crashes with 282! error messages... You can see a part of the messages in the screenshot. Any hints are welcome. Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-by-compiling-vtk-8-0-tp5744252.html Sent from the VTK - Users mailing list archive at Nabble.com. From ben.boeckel at kitware.com Wed Aug 2 10:30:25 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 2 Aug 2017 10:30:25 -0400 Subject: [vtkusers] Error by compiling vtk 8.0 In-Reply-To: <1501683883782-5744252.post@n5.nabble.com> References: <1501683883782-5744252.post@n5.nabble.com> Message-ID: <20170802143025.GB14195@megas.kitware.com> On Wed, Aug 02, 2017 at 07:24:43 -0700, -Daniel- wrote: > I'm trying to compile vtk 8.0 with Visual Studio 2012 on Windows 10 64Bit. > But it crashes with 282! error messages... > > You can see a part of the messages in the screenshot. > > > Any hints are welcome. Thanks! 2012's C++11 support is insufficient. Visual Studio 2013 is the minimum for VTK 8.0: https://gitlab.kitware.com/vtk/vtk#requirements --Ben From zhang07101 at 126.com Wed Aug 2 10:39:19 2017 From: zhang07101 at 126.com (zhang qiang) Date: Wed, 2 Aug 2017 07:39:19 -0700 (MST) Subject: [vtkusers] How to understand the slab thickness, slab resolution, spacing In-Reply-To: References: <1501227167522-5744188.post@n5.nabble.com> <1501319189185-5744208.post@n5.nabble.com> <1501663897654-5744246.post@n5.nabble.com> Message-ID: <1501684759177-5744255.post@n5.nabble.com> Dear David: Thanks a lot. And the vtkImageData also do not record the thickness information. I wonder why VTK ignore the thickness information? I think the thickness information is quite important for DICOM image. My guess is that we can not obtain the image whose thickness is 0.4 from the image whose thickness is 0.8. So, the thickness information is useless in vtkImageData? Am I right? zhang qiang -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-understand-the-slab-thickness-slab-resolution-spacing-tp5744188p5744255.html Sent from the VTK - Users mailing list archive at Nabble.com. From chemicalx001 at gmail.com Wed Aug 2 10:44:55 2017 From: chemicalx001 at gmail.com (anti) Date: Wed, 2 Aug 2017 07:44:55 -0700 (MST) Subject: [vtkusers] VTK with PCL, link errors? Message-ID: <1501685095855-5744256.post@n5.nabble.com> I am trying to compile a project that uses PCL and VTK. I have VTK libs linked, as well as PCL, but I get these errors: 1>pcl_visualization_release.lib(vtkVertexBufferObjectMapper.obj) : error LNK2001: unresolved external symbol __imp_glPointSize 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glColorPointer 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glDisableClientState 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glEnableClientState 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glIndexPointer 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glNormalPointer 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glVertexPointer 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::BindBuffer)(unsigned int,unsigned int)" (?BindBuffer at vtkgl@@3P6AXII at ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::DeleteBuffers)(int,unsigned int const *)" (?DeleteBuffers at vtkgl@@3P6AXHPEBI at ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::GenBuffers)(int,unsigned int *)" (?GenBuffers at vtkgl@@3P6AXHPEAI at ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::BufferData)(unsigned int,__int64,void const *,unsigned int)" (?BufferData at vtkgl@@3P6AXI_JPEBXI at ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::DisableVertexAttribArray)(unsigned int)" (?DisableVertexAttribArray at vtkgl@@3P6AXI at ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::EnableVertexAttribArray)(unsigned int)" (?EnableVertexAttribArray at vtkgl@@3P6AXI at ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::VertexAttribPointer)(unsigned int,int,unsigned int,unsigned char,int,void const *)" (?VertexAttribPointer at vtkgl@@3P6AXIHIEHPEBX at ZEA) 1>../bin\bslam.exe : fatal error LNK1120: 14 unresolved externals What linkage am I missing here? Thank you. (my first post was not accepted, I am now subscribed correctly, apologies for the double post) -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-with-PCL-link-errors-tp5744256.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Wed Aug 2 10:48:11 2017 From: DLRdave at aol.com (David Cole) Date: Wed, 2 Aug 2017 10:48:11 -0400 Subject: [vtkusers] How to understand the slab thickness, slab resolution, spacing In-Reply-To: <1501684759177-5744255.post@n5.nabble.com> References: <1501227167522-5744188.post@n5.nabble.com> <1501319189185-5744208.post@n5.nabble.com> <1501663897654-5744246.post@n5.nabble.com> <1501684759177-5744255.post@n5.nabble.com> Message-ID: vtkImageData is a regularly spaced collection of *point* samples, there is no "thickness"... Please refer to the classic "A Pixel Is Not A Little Square" : http://alvyray.com/Memos/CG/Microsoft/6_pixel.pdf Also, a shorter summary here: http://graphics.cs.wisc.edu/WP/cs559-fall2014/2014/08/29/what-is-a-pixel-and-what-is-a-point-sample/ HTH, David C. On Wed, Aug 2, 2017 at 10:39 AM, zhang qiang wrote: > Dear David: > > Thanks a lot. And the vtkImageData also do not record the thickness > information. I wonder why VTK ignore the thickness information? I think the > thickness information is quite important for DICOM image. My guess is that > we can not obtain the image whose thickness is 0.4 from the image whose > thickness is 0.8. So, the thickness information is useless in vtkImageData? > Am I right? > > zhang qiang > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-understand-the-slab-thickness-slab-resolution-spacing-tp5744188p5744255.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 david.gobbi at gmail.com Wed Aug 2 11:26:59 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 2 Aug 2017 09:26:59 -0600 Subject: [vtkusers] How to understand the slab thickness, slab resolution, spacing In-Reply-To: References: <1501227167522-5744188.post@n5.nabble.com> <1501319189185-5744208.post@n5.nabble.com> <1501663897654-5744246.post@n5.nabble.com> <1501684759177-5744255.post@n5.nabble.com> Message-ID: Hi Zhang, The links in David Cole's email get to the heart of the issue, so please read them. I think that we are using different definitions of "spacing" and "thickness". The reason I think this, is because of your statement "obtain the image whose thickness is 0.4 from the image whose thickness is 0.8", which makes no sense to me. Let us start with my definitions of "spacing" and "thickness": The "spacing" is sample spacing, e.g. the distance from the center of one slice to the center of the next slice. The "thickness" refers to the collimated X-ray beam width in CT, or to the selection slice thickness in 2D MRI. Usually "thickness" is only approximate, because the slice profile is not uniform. Essentially, the "slice profile" is the point-spread function in the slice direction, and "slice thickness" is a measure of the width of the slice profile. Do you agree with these definitions? So if a CT is acquired with a slice thickness of 0.8 mm, it is impossible to convert it to 0.4 mm. that would break the laws of physics, so to speak. It is possible to increase the slice thickness by averaging slices together or by applying other filtering operations, but decreasing the thickness is not possible. The operations that vtkImageReslice can do are: 1) increasing or decreasing the spacing (by resampling with interpolation), and 2) increasing the thickness (by averaging, or by maximum intensity projection). - David On Wed, Aug 2, 2017 at 8:48 AM, David Cole via vtkusers wrote: > vtkImageData is a regularly spaced collection of *point* samples, > there is no "thickness"... > > Please refer to the classic "A Pixel Is Not A Little Square" : > http://alvyray.com/Memos/CG/Microsoft/6_pixel.pdf > > Also, a shorter summary here: > http://graphics.cs.wisc.edu/WP/cs559-fall2014/2014/08/29/ > what-is-a-pixel-and-what-is-a-point-sample/ > > > HTH, > David C. > > > > On Wed, Aug 2, 2017 at 10:39 AM, zhang qiang wrote: > > Dear David: > > > > Thanks a lot. And the vtkImageData also do not record the thickness > > information. I wonder why VTK ignore the thickness information? I think > the > > thickness information is quite important for DICOM image. My guess is > that > > we can not obtain the image whose thickness is 0.4 from the image whose > > thickness is 0.8. So, the thickness information is useless in > vtkImageData? > > Am I right? > > > > zhang qiang > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Wed Aug 2 12:55:31 2017 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Wed, 2 Aug 2017 09:55:31 -0700 (MST) Subject: [vtkusers] Error by compiling vtk 8.0 In-Reply-To: <20170802143025.GB14195@megas.kitware.com> References: <1501683883782-5744252.post@n5.nabble.com> <20170802143025.GB14195@megas.kitware.com> Message-ID: <1501692931084-5744260.post@n5.nabble.com> Okay, thank you! -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-by-compiling-vtk-8-0-tp5744252p5744260.html Sent from the VTK - Users mailing list archive at Nabble.com. From joaolsvieira at gmail.com Wed Aug 2 13:37:45 2017 From: joaolsvieira at gmail.com (=?UTF-8?Q?Jo=C3=A3o_Luis?=) Date: Wed, 2 Aug 2017 13:37:45 -0400 Subject: [vtkusers] Normals at intersection point Message-ID: Hi arwtyxouymz vtkBestFitPlane could help you, or just using the following code (input array of points or one point) void computeBestFitNormal(std::vector v, int n/* vector size*/, vtkVector3d& vNormal) { double resultX; double resultY; double resultZ; const double *p = v[n - 1].GetData(); const double *c; // Iterate through the vertices for (int i = 0; i < n; i++){ // Get shortcut to the "current" vertex c = v[i].GetData(); // Add in edge vector products appropriately resultX += (p[2] + c[2])*(p[1] - c[1]); resultY += (p[0] + c[0])*(p[2] - c[2]); resultZ += (p[1] + c[1])*(p[0] - c[0]); // Next vertex p = c; } vNormal.Set(resultX,resultY,resultZ); vNormal.Normalize(); p = nullptr; c = nullptr; } On Tue, Aug 1, 2017 at 12:00 PM, wrote: > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://public.kitware.com/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. Re: vtkTextureObject bind error (Rick Dailey) > 2. Re: vtkTextureObject bind error (Alvaro Sanchez) > 3. Re: vtkTextureObject bind error (Rick Dailey) > 4. Re: VTK Development Survey (Robert Maynard) > 5. Re: vtkTextureObject bind error (Alvaro Sanchez) > 6. Re: image rendering speed (mikewithascarf) > 7. Is it possible to make the VTKTextbook.pdf better? (chensq) > 8. How to split large models into smaller pieces when exporting > the scene? (landings) > 9. How to change window level & window width of > vtkInteractorStyleImage (K O ranjith) > 10. Re: vtkTextureObject bind error (Rick Dailey) > 11. Re: How to split large models into smaller pieces when > exporting the scene? (Bill Lorensen) > 12. Re: vtkTextureObject bind error (Alvaro Sanchez) > 13. Re: vtkTextureObject bind error (Bill Lorensen) > 14. Normals at intersection point (arwtyxouymz) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 31 Jul 2017 09:35:20 -0700 (MST) > From: Rick Dailey > To: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkTextureObject bind error > Message-ID: <1501518920479-5744223.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > I tried running ctest but no matter what I do it always says "No tests were > found!!!" I tried running it from several folders (bin, testing, etc.) but > still the same message. It seems that I have built VTK with testing > enabled > (BUILD_TESTING check set) so a I am out of ideas. What is the correct way > of running ctest? > > The latest stack trace: > > > ucrtbased.dll!common_assert_to_message_box(const wchar_t > * const > expression, const wchar_t * const file_name, const unsigned int > line_number, > void * const return_address) Line 351 C++ > ucrtbased.dll!common_assert(const wchar_t * const > expression, > const wchar_t * const file_name, const unsigned int line_number, void * > const return_address) Line 386 C++ > ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * > file_name, unsigned int line_number) Line 404 C++ > vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Bind() Line 546 > C++ > vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Activate() Line > 491 C++ > vtkRenderingVolumeOpenGL2-8.1.dll!vtkVolumeMask::Activate() Line > 64 C++ > > vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMappe > r::DoGPURender(vtkRenderer > * ren, vtkVolume * vol, vtkOpenGLCamera * cam, vtkShaderProgram * prog, int > noOfComponents, int independentComponents) Line 3739 C++ > > vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMappe > r::GPURender(vtkRenderer > * ren, vtkVolume * vol) Line 3610 C++ > vtkRenderingVolume-8.1.dll!vtkGPUVolumeRayCastMapper::Render(vtkRenderer > * > ren, vtkVolume * vol) Line 154 C++ > vtkRenderingCore-8.1.dll!vtkVolume::RenderVolumetricGeometry(vtkViewport > * > vp) Line 370 C++ > vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::UpdateGeometry() > Line 273 > C++ > vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::DeviceRender() > Line 170 C++ > vtkRenderingCore-8.1.dll!vtkRenderer::Render() Line 351 C++ > vtkRenderingCore-8.1.dll!vtkRendererCollection::Render() Line 51 > C++ > vtkRenderingCore-8.1.dll!vtkRenderWindow::DoStereoRender() Line > 781 C++ > vtkRenderingCore-8.1.dll!vtkRenderWindow::DoFDRender() Line 747 > C++ > vtkRenderingCore-8.1.dll!vtkRenderWindow::DoAARender() Line 626 > C++ > vtkRenderingCore-8.1.dll!vtkRenderWindow::Render() Line 439 > C++ > PDI-TOMO.exe!vtkControlBase::Render(HDC * dc, const wchar_t * > location) > Line 694 C++ > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/vtkTextureObject-bind-error-tp5744068p5744223.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 2 > Date: Mon, 31 Jul 2017 10:32:33 -0700 > From: Alvaro Sanchez > To: Rick Dailey > Cc: VTK Users > Subject: Re: [vtkusers] vtkTextureObject bind error > Message-ID: > mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > If you built vtk with BUILD_TESTING checked then you should be able to > run it from the build directory as > > C:\YOUR_VS_SOLUTION_DIR>ctest -R TextureStreaming -C Debug > > Change the last parameter to your particular configuration. > > Are you setting a volume mask or are you only rendering input data? > > On Mon, Jul 31, 2017 at 9:35 AM, Rick Dailey wrote: > > > I tried running ctest but no matter what I do it always says "No tests > were > > found!!!" I tried running it from several folders (bin, testing, etc.) > but > > still the same message. It seems that I have built VTK with testing > > enabled > > (BUILD_TESTING check set) so a I am out of ideas. What is the correct > way > > of running ctest? > > > > The latest stack trace: > > > > > ucrtbased.dll!common_assert_to_message_box(const > wchar_t > > * const > > expression, const wchar_t * const file_name, const unsigned int > > line_number, > > void * const return_address) Line 351 C++ > > ucrtbased.dll!common_assert(const wchar_t * const > > expression, > > const wchar_t * const file_name, const unsigned int line_number, void * > > const return_address) Line 386 C++ > > ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t > * > > file_name, unsigned int line_number) Line 404 C++ > > vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Bind() Line 546 > > C++ > > vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Activate() Line > > 491 C++ > > vtkRenderingVolumeOpenGL2-8.1.dll!vtkVolumeMask::Activate() Line > > 64 C++ > > > > vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMappe > > r::DoGPURender(vtkRenderer > > * ren, vtkVolume * vol, vtkOpenGLCamera * cam, vtkShaderProgram * prog, > int > > noOfComponents, int independentComponents) Line 3739 C++ > > > > vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMappe > > r::GPURender(vtkRenderer > > * ren, vtkVolume * vol) Line 3610 C++ > > vtkRenderingVolume-8.1.dll!vtkGPUVolumeRayCastMapper:: > Render(vtkRenderer > > * > > ren, vtkVolume * vol) Line 154 C++ > > vtkRenderingCore-8.1.dll!vtkVolume::RenderVolumetricGeometry( > vtkViewport > > * > > vp) Line 370 C++ > > vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::UpdateGeometry() > > Line 273 > > C++ > > vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::DeviceRender() > > Line 170 C++ > > vtkRenderingCore-8.1.dll!vtkRenderer::Render() Line 351 C++ > > vtkRenderingCore-8.1.dll!vtkRendererCollection::Render() Line 51 > > C++ > > vtkRenderingCore-8.1.dll!vtkRenderWindow::DoStereoRender() Line > > 781 C++ > > vtkRenderingCore-8.1.dll!vtkRenderWindow::DoFDRender() Line 747 > > C++ > > vtkRenderingCore-8.1.dll!vtkRenderWindow::DoAARender() Line 626 > > C++ > > vtkRenderingCore-8.1.dll!vtkRenderWindow::Render() Line 439 > > C++ > > PDI-TOMO.exe!vtkControlBase::Render(HDC * dc, const wchar_t * > > location) > > Line 694 C++ > > > > > > > > > > -- > > View this message in context: http://vtk.1045678.n5.nabble. > > com/vtkTextureObject-bind-error-tp5744068p5744223.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 > > > > > > -- > Alvaro Sanchez > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4901 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20170731/cc2ae9a2/attachment-0001.html> > > ------------------------------ > > Message: 3 > Date: Mon, 31 Jul 2017 10:41:55 -0700 (MST) > From: Rick Dailey > To: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkTextureObject bind error > Message-ID: <1501522915867-5744226.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > With the additional information you supplied I was able to successfully run > ctest. > > 100% tests passed, 0 tests failed out of 1 > > Yes, I am using a volume mask. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/vtkTextureObject-bind-error-tp5744068p5744226.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 4 > Date: Mon, 31 Jul 2017 14:25:26 -0400 > From: Robert Maynard > To: vtk vtk > Subject: Re: [vtkusers] VTK Development Survey > Message-ID: > gmail.com> > Content-Type: text/plain; charset="UTF-8" > > I would like to remind everyone that the survey closes tomorrow. > > On Fri, Jul 28, 2017 at 9:21 AM, Robert Maynard > wrote: > > Hi Everybody, > > > > I would like to remind everyone that the developer survey is closing > > in 4 days so please respond. > > > > On Tue, Jul 18, 2017 at 11:32 AM, Robert Maynard > > wrote: > >> Hi Everybody, > >> > >> The VTK team is always looking to attract new developers and improve > >> the experience of developing VTK. > >> > >> To further that, we are putting out an anonymous survey to collect > >> data on people's thoughts about the current software development > >> process for VTK. We would love to hear all your rants ( or raves ) on > >> the development process. We will gather the results after August 1'st. > >> > >> https://goo.gl/forms/WlqyiF0sBTZT7klJ3 > >> > >> Thank you for your inputs. > > > ------------------------------ > > Message: 5 > Date: Mon, 31 Jul 2017 14:29:48 -0400 > From: Alvaro Sanchez > To: Rick Dailey > Cc: VTK Users > Subject: Re: [vtkusers] vtkTextureObject bind error > Message-ID: > gmail.com> > Content-Type: text/plain; charset="utf-8" > > Using masks with streaming enabled might be the issue. Currently, only the > input supports > texture streaming. Could you try rendering without any masks? > > On Mon, Jul 31, 2017 at 1:41 PM, Rick Dailey wrote: > > > With the additional information you supplied I was able to successfully > run > > ctest. > > > > 100% tests passed, 0 tests failed out of 1 > > > > Yes, I am using a volume mask. > > > > > > > > -- > > View this message in context: http://vtk.1045678.n5.nabble. > > com/vtkTextureObject-bind-error-tp5744068p5744226.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 > > > > > > -- > Alvaro Sanchez > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4901 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20170731/a20286db/attachment-0001.html> > > ------------------------------ > > Message: 6 > Date: Mon, 31 Jul 2017 14:43:45 -0700 (MST) > From: mikewithascarf > To: vtkusers at vtk.org > Subject: Re: [vtkusers] image rendering speed > Message-ID: <1501537425830-5744230.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > Thanks Ken. Unfortunately vtkRenderTimerLog doesn't appear to be in VTK as > far as I can tell? I'm using VTK 7.1.0. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/image-rendering-speed-tp5744115p5744230.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 7 > Date: Tue, 1 Aug 2017 10:18:08 +0800 > From: "chensq" > To: "vtkusers" > Subject: [vtkusers] Is it possible to make the VTKTextbook.pdf better? > Message-ID: <8963ED62896641DEA819B1963E997040 at chensqPC> > Content-Type: text/plain; charset="gb2312" > > All of the formulas are disordered. > Sincerely Chen > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20170801/fc1242d7/attachment-0001.html> > > ------------------------------ > > Message: 8 > Date: Mon, 31 Jul 2017 19:49:07 -0700 (MST) > From: landings > To: vtkusers at vtk.org > Subject: [vtkusers] How to split large models into smaller pieces when > exporting the scene? > Message-ID: <1501555747988-5744232.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > Hi, I'm using VTK with Unity 3D. > I use vtkX3DExporter to export my VTK scene, and rebuild the meshes in > Unity. > Unity and maybe all game engines don't support single models that have more > than 65536 vertices. I must split large models into smaller pieces. > Is there an existing method to do this, or do I need to implement this > myself? If the latter, could you give me some hints? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/How-to-split-large-models-into-smaller-pieces-when- > exporting-the-scene-tp5744232.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 9 > Date: Tue, 1 Aug 2017 12:40:57 +0530 > From: K O ranjith > To: vtkusers > Subject: [vtkusers] How to change window level & window width of > vtkInteractorStyleImage > Message-ID: > gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello all, > > I'm using using vtkImageViewer2 > to display dicom images and uses custom interactor inherited from > vtkInteractorStyleImage. > > And uses left mouse button down move event to modify window level and > width. > > I need to manually set window level > and window width of the viewing image to custom value. > > for this I'm using the methods > > > vtkImageViewer2->*SetColorLevel*(double level); > > vtkImageViewer2->*SetColorWindow*(double width); > > But, even after setting the values > it is not reflecting in vtkInteractorStyleImage, > > The method, > > vtkInteractorStyleImage->*GetWindowLevelCurrentPosition*(int > windolevel, int windowwidth); > > returning different values than set in vtkImageViewer2. > > Have any method to manually modify > window level and window values of vtkInteractorStyleImage to custom value. > > (something like SetColorLevel > SetColorWindow of vtkImageViewer2) > > My intention is to manually modify > window values of displaying image. > > Please help... > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20170801/51154bb1/attachment-0001.html> > > ------------------------------ > > Message: 10 > Date: Tue, 1 Aug 2017 03:51:56 -0700 (MST) > From: Rick Dailey > To: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkTextureObject bind error > Message-ID: <1501584716697-5744234.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > Rendering without a mask works, but of course this is not a solution for us > as the mask is an integral part of our product. > > Is there anything that can be done about this? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/vtkTextureObject-bind-error-tp5744068p5744234.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 11 > Date: Tue, 1 Aug 2017 07:43:03 -0400 > From: Bill Lorensen > To: landings > Cc: VTK Users > Subject: Re: [vtkusers] How to split large models into smaller pieces > when exporting the scene? > Message-ID: > A at mail.gmail.com> > Content-Type: text/plain; charset="UTF-8" > > This example may help: > https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/SplitPolyData/ > > Bill > > On Mon, Jul 31, 2017 at 10:49 PM, landings wrote: > > Hi, I'm using VTK with Unity 3D. > > I use vtkX3DExporter to export my VTK scene, and rebuild the meshes in > > Unity. > > Unity and maybe all game engines don't support single models that have > more > > than 65536 vertices. I must split large models into smaller pieces. > > Is there an existing method to do this, or do I need to implement this > > myself? If the latter, could you give me some hints? > > > > > > > > -- > > View this message in context: http://vtk.1045678.n5.nabble. > com/How-to-split-large-models-into-smaller-pieces-when- > exporting-the-scene-tp5744232.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 > > > ------------------------------ > > Message: 12 > Date: Tue, 1 Aug 2017 09:08:28 -0400 > From: Alvaro Sanchez > To: Rick Dailey > Cc: VTK Users > Subject: Re: [vtkusers] vtkTextureObject bind error > Message-ID: > FtUw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > There is on-going work to support streaming with masks on. It is too early > to try the branch > however, I will keep you posted. > > The only solution I see for now (as Ken suggested earlier) would be to > resize your input > volume (and masks). You could use vtkImageResize for this, have a look at > the following > test as an example > Volume/Testing/Cxx/TestGPURayCastTextureStreaming.cxx#L61> > . > > On Tue, Aug 1, 2017 at 6:51 AM, Rick Dailey wrote: > > > Rendering without a mask works, but of course this is not a solution for > us > > as the mask is an integral part of our product. > > > > Is there anything that can be done about this? > > > > > > > > -- > > View this message in context: http://vtk.1045678.n5.nabble. > > com/vtkTextureObject-bind-error-tp5744068p5744234.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 > > > > > > -- > Alvaro Sanchez > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4901 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20170801/8e8e2412/attachment-0001.html> > > ------------------------------ > > Message: 13 > Date: Tue, 1 Aug 2017 09:13:49 -0400 > From: Bill Lorensen > To: Alvaro Sanchez > Cc: VTK Users , Rick Dailey > Subject: Re: [vtkusers] vtkTextureObject bind error > Message-ID: > gmail.com> > Content-Type: text/plain; charset="UTF-8" > > Here is an example of vtkImageResize > https://lorensen.github.io/VTKExamples/site/Cxx/Images/ResizeImage/ > > Bill > > On Tue, Aug 1, 2017 at 9:08 AM, Alvaro Sanchez > wrote: > > There is on-going work to support streaming with masks on. It is too > early > > to try the branch > > however, I will keep you posted. > > > > The only solution I see for now (as Ken suggested earlier) would be to > > resize your input > > volume (and masks). You could use vtkImageResize for this, have a look > at > > the following > > test as an example. > > > > On Tue, Aug 1, 2017 at 6:51 AM, Rick Dailey wrote: > >> > >> Rendering without a mask works, but of course this is not a solution for > >> us > >> as the mask is an integral part of our product. > >> > >> Is there anything that can be done about this? > >> > >> > >> > >> -- > >> View this message in context: > >> http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind- > error-tp5744068p5744234.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 > > > > > > > > > > -- > > Alvaro Sanchez > > Kitware, Inc. > > Senior R&D Engineer > > 21 Corporate Drive > > Clifton Park, NY 12065-8662 > > Phone: 518-881-4901 > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 > > > ------------------------------ > > Message: 14 > Date: Tue, 1 Aug 2017 08:12:26 -0700 (MST) > From: arwtyxouymz > To: vtkusers at vtk.org > Subject: [vtkusers] Normals at intersection point > Message-ID: <1501600346634-5744238.post at n5.nabble.com> > Content-Type: text/plain; charset=UTF-8 > > Hi, all > > I want to get normals at intersection point between ellipse and line. > I could get the intersection point, but I don't know how to get normals at > that point. > That part of My code is below. > > Please help me! > > ======================================== > double angle = 0; > double long_r, short_r; > vtkIdType id = 0; > double CenterX, CenterY, CenterZ; > double z_length = 50.0; > long_r = 50; > short_r = 30; > CenterX = 0.0; CenterY = 0.0, CenterZ = 0.0; > > vtkSmartPointer points = > vtkSmartPointer::New(); > points->SetNumberOfPoints(2 * NUM_OF_DIVIDE); > while (angle <= 2.0 * vtkMath::Pi() + (vtkMath::Pi() / NUM_OF_DIVIDE)) > { > points->InsertPoint(id, long_r * cos(angle) + CenterX, short_r * > sin(angle) + CenterY, CenterZ); > angle = angle + (vtkMath::Pi() / NUM_OF_DIVIDE); > id++; > } > > vtkSmartPointer line = > vtkSmartPointer::New(); > line->GetPointIds()->SetNumberOfIds(id); > for (int k = 0; k < id; ++k) { > line->GetPointIds()->SetId(k, k); > } > > vtkSmartPointer lines = > vtkSmartPointer::New(); > lines->InsertNextCell(line); > > vtkSmartPointer ellipse = > vtkSmartPointer::New(); > ellipse->GlobalReleaseDataFlagOff(); > ellipse->Allocate(1, 1); > ellipse->SetPoints(points); > ellipse->SetLines(lines); > > // 3??? > vtkSmartPointer extrude = > vtkSmartPointer::New(); > extrude->SetInputData(ellipse); > extrude->SetExtrusionTypeToNormalExtrusion(); > extrude->SetScaleFactor(1.0); > extrude->SetVector(0, 0, z_length); > extrude->Update(); > > vtkSmartPointer triangles = > vtkSmartPointer::New(); > triangles->SetInputConnection(extrude->GetOutputPort()); > triangles->Update(); > > auto numberOfSubdivisions = 2; > vtkSmartPointer subdivision = > vtkSmartPointer::New(); > subdivision->SetInputConnection(triangles->GetOutputPort()); > subdivision->SetNumberOfSubdivisions(numberOfSubdivisions); > subdivision->Update(); > > /////////////////// Omit /////////////////////////// > > double lineP0[3] = {TARGET_X, TARGET_Y, TARGET_Z}; > double lineP1[3] = {surfacePoints[minId][0] + > directionVector[minId][0], > surfacePoints[minId][1] + > directionVector[minId][1], > surfacePoints[minId][2] + > directionVector[minId][2]}; > vtkSmartPointer intersectPoints = > vtkSmartPointer::New(); > vtkSmartPointer tree = > vtkSmartPointer::New(); > tree->SetDataSet(subdivision->GetOutput()); > tree->BuildLocator(); > tree->IntersectWithLine(lineP0, lineP1, intersectPoints, NULL); > std::cout << "NumPoints: " << intersectPoints->GetNumberOfPoints() << > std::endl; > double intersection[3]; > for (int i = 0; i < intersectPoints->GetNumberOfPoints(); i++) > { > intersectPoints->GetPoint(i, intersection); > std::cout << "Intersection " << i << ":" > << intersection[0] << ", " > << intersection[1] << ", " > << intersection[2] << std::endl; > } > ==================================================== > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Normals-at-intersection-point-tp5744238.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > ------------------------------ > > End of vtkusers Digest, Vol 160, Issue 1 > **************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmanvortex at gmail.com Wed Aug 2 15:43:17 2017 From: zmanvortex at gmail.com (Donny Zimmerman) Date: Wed, 2 Aug 2017 14:43:17 -0500 Subject: [vtkusers] Texture Mapping PolyData Broke In VTK 8.0?? Message-ID: *The following code works in VTK 7.1 but does not work in VTK 8.0 using the same PC and compiled with Visual Studio 2015. I have attached the XML .vti image file and also the .txt file used for the lookup table.* #include "stdafx.h" #include "vtkAutoInit.h" #define vtkRenderingCore_AUTOINIT 3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL2) #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL2) #include "vtkXMLImageDataReader.h" #include "vtkImageData.h" #include "vtkImageViewer2.h" #include "vtkLookupTable.h" #include "vtkRenderer.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderWindow.h" #include "vtkImageResize.h" #include "vtkImageMapToWindowLevelColors.h" #include "vtkTransformPolyDataFilter.h" #include "vtkFloatArray.h" #include "vtkMath.h" #include "vtkTriangle.h" #include "vtkPointData.h" #include "vtkTexture.h" #include "vtkTransform.h" #include "vtkPolyDataMapper.h" #include "vtkProperty.h" #include // std::cout #include // std::istringstream #include // std::string #include int main() { double imgfact = 2.0; vtkSmartPointer lookuptable = vtkSmartPointer::New(); lookuptable->GetTable()->Reset(); lookuptable->SetNumberOfColors(256); lookuptable->SetRange(0, 255.0); std::ifstream infile; std::string line; int ind = 0; double r = 0, g = 0, b = 0, a = 0; std::string sind, sr, sg, sb, sa; infile.open("lutable.txt", ifstream::in); if (infile.is_open()) { while (infile.good() && ind < 255) { std::getline(infile, line); std::istringstream is(line); std::getline(is, sind, ','); std::getline(is, sr, ','); std::getline(is, sg, ','); std::getline(is, sb, ','); std::getline(is, sa); ind = std::stoi(sind); r = std::stod(sr); g = std::stod(sg); b = std::stod(sb); a = std::stod(sa); lookuptable->SetTableValue(ind, r, g, b, a); } infile.close(); } else { cout << "Error opening file"; } lookuptable->Build(); vtkSmartPointer imgdat = vtkSmartPointer::New(); imgdat->SetFileName("testimage.vti"); imgdat->ReleaseDataFlagOn(); imgdat->Update(); int dims[3]; imgdat->GetOutput()->GetDimensions(dims); int img_res_x = dims[0]; int img_res_y = dims[1]; vtkSmartPointer resize1 = vtkSmartPointer::New(); resize1->SetInputConnection(imgdat->GetOutputPort()); resize1->SetOutputDimensions(img_res_x / imgfact, img_res_y / imgfact, 1); resize1->SetResizeMethodToOutputDimensions(); resize1->ReleaseDataFlagOn(); vtkSmartPointer resize2 = vtkSmartPointer::New(); resize2->SetInputConnection(resize1->GetOutputPort()); resize2->SetOutputDimensions(img_res_x, img_res_y, 1); resize2->SetResizeMethodToOutputDimensions(); resize2->ReleaseDataFlagOn(); vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer triangles = vtkSmartPointer::New(); vtkSmartPointer textureCoordinates = vtkSmartPointer::New(); textureCoordinates->SetNumberOfComponents(3); textureCoordinates->SetName("TextureCoordinates"); float xval, yval, x, y, z; double sinang = sin(vtkMath::RadiansFromDegrees(19.0)); z = sinang * 1000.0; int ptIdIndex = 0; for (int rrad = 0; rrad < 360; rrad++) { vtkSmartPointer triangle = vtkSmartPointer::New(); triangle->GetPointIds()->SetNumberOfIds(3); // Point 1 points->InsertNextPoint(1000.0, 1000.0, 0.0); textureCoordinates->InsertNextTuple3(.5, .5, 0); triangle->GetPointIds()->SetId(0, ptIdIndex++); // Point 2 xval = (float)(sin(((float)rrad * vtkMath::Pi()) / 180.0)); yval = (float)(cos(((float)rrad * vtkMath::Pi()) / 180.0)); x = 1000.0 + (1000.0 * xval); y = 1000.0 + (1000.0 * yval); points->InsertNextPoint(x, y, z); textureCoordinates->InsertNextTuple3(x / 2000.0, y / 2000.0, 0); triangle->GetPointIds()->SetId(1, ptIdIndex++); // Point 3 xval = (float)(sin(((float)(rrad + 1) * vtkMath::Pi()) / 180.0)); yval = (float)(cos(((float)(rrad + 1) * vtkMath::Pi()) / 180.0)); x = 1000.0 + (1000.0 * xval); y = 1000.0 + (1000.0 * yval); points->InsertNextPoint(x, y, z); textureCoordinates->InsertNextTuple3(x / 2000.0, y / 2000.0, 0); triangle->GetPointIds()->SetId(2, ptIdIndex++); triangles->InsertNextCell(triangle); } vtkSmartPointer polyData = vtkSmartPointer::New(); polyData->SetPoints(points); polyData->SetPolys(triangles); polyData->GetPointData()->SetTCoords(textureCoordinates); vtkSmartPointer texture = vtkSmartPointer::New(); texture->MapColorScalarsThroughLookupTableOn(); texture->SetLookupTable(lookuptable); texture->InterpolateOff(); texture->SetInputConnection(resize2->GetOutputPort()); vtkSmartPointer tf = vtkSmartPointer::New(); tf->SetInputData(polyData); double xfmscale = 250.0; vtkSmartPointer pdxfm = vtkSmartPointer::New(); pdxfm->Scale(xfmscale, xfmscale, xfmscale); pdxfm->Translate(-img_res_x / 2, -img_res_y / 2, 0); tf->SetTransform(pdxfm); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(tf->GetOutputPort()); mapper->ScalarVisibilityOff(); vtkSmartPointer radarActor = vtkSmartPointer::New(); radarActor->SetMapper(mapper); radarActor->SetTexture(texture); radarActor->GetProperty()->LightingOff(); radarActor->GetProperty()->ShadingOff(); vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderer->AddActor(radarActor); renderWindow->Render(); renderWindowInteractor->Start(); return 0; } *In 7.1 I see the texture rendered on the polydata correctly, but in 8.0 I only see the white shaded polydata. Any idea what may have changed in 8.0 that would prevent this from working.* *Thanks.* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- 0,0,0,0,0 1,0,0,0,0 2,0.8,0.8,0.8,0 3,0.8,0.8,0.8,0 4,0.8,0.8,0.8,0 5,0.8,0.8,0.8,0 6,0.772549019607843,0.772549019607843,0.772549019607843,0 7,0.772549019607843,0.772549019607843,0.772549019607843,0 8,0.772549019607843,0.772549019607843,0.772549019607843,0 9,0.772549019607843,0.772549019607843,0.772549019607843,0 10,0.772549019607843,0.772549019607843,0.772549019607843,0 11,0.745098039215686,0.745098039215686,0.745098039215686,0 12,0.745098039215686,0.745098039215686,0.745098039215686,0 13,0.745098039215686,0.745098039215686,0.745098039215686,0 14,0.745098039215686,0.745098039215686,0.745098039215686,0 15,0.745098039215686,0.745098039215686,0.745098039215686,0 16,0.717647058823529,0.717647058823529,0.717647058823529,0 17,0.717647058823529,0.717647058823529,0.717647058823529,0 18,0.717647058823529,0.717647058823529,0.717647058823529,0 19,0.717647058823529,0.717647058823529,0.717647058823529,0 20,0.717647058823529,0.717647058823529,0.717647058823529,0 21,0.690196078431373,0.690196078431373,0.690196078431373,1 22,0.690196078431373,0.690196078431373,0.690196078431373,1 23,0.690196078431373,0.690196078431373,0.690196078431373,1 24,0.690196078431373,0.690196078431373,0.690196078431373,1 25,0.690196078431373,0.690196078431373,0.690196078431373,1 26,0.662745098039216,0.662745098039216,0.662745098039216,1 27,0.662745098039216,0.662745098039216,0.662745098039216,1 28,0.662745098039216,0.662745098039216,0.662745098039216,1 29,0.662745098039216,0.662745098039216,0.662745098039216,1 30,0.662745098039216,0.662745098039216,0.662745098039216,1 31,0.635294117647059,0.635294117647059,0.635294117647059,1 32,0.635294117647059,0.635294117647059,0.635294117647059,1 33,0.635294117647059,0.635294117647059,0.635294117647059,1 34,0.635294117647059,0.635294117647059,0.635294117647059,1 35,0.635294117647059,0.635294117647059,0.635294117647059,1 36,0.607843137254902,0.607843137254902,0.607843137254902,1 37,0.607843137254902,0.607843137254902,0.607843137254902,1 38,0.607843137254902,0.607843137254902,0.607843137254902,1 39,0.607843137254902,0.607843137254902,0.607843137254902,1 40,0.607843137254902,0.607843137254902,0.607843137254902,1 41,0.580392156862745,0.580392156862745,0.580392156862745,1 42,0.580392156862745,0.580392156862745,0.580392156862745,1 43,0.580392156862745,0.580392156862745,0.580392156862745,1 44,0.580392156862745,0.580392156862745,0.580392156862745,1 45,0.580392156862745,0.580392156862745,0.580392156862745,1 46,0.552941176470588,0.552941176470588,0.552941176470588,1 47,0.552941176470588,0.552941176470588,0.552941176470588,1 48,0.552941176470588,0.552941176470588,0.552941176470588,1 49,0.552941176470588,0.552941176470588,0.552941176470588,1 50,0.552941176470588,0.552941176470588,0.552941176470588,1 51,0.525490196078431,0.525490196078431,0.525490196078431,1 52,0.525490196078431,0.525490196078431,0.525490196078431,1 53,0.525490196078431,0.525490196078431,0.525490196078431,1 54,0.525490196078431,0.525490196078431,0.525490196078431,1 55,0.525490196078431,0.525490196078431,0.525490196078431,1 56,0.498039215686275,0.498039215686275,0.498039215686275,1 57,0.498039215686275,0.498039215686275,0.498039215686275,1 58,0.498039215686275,0.498039215686275,0.498039215686275,1 59,0.498039215686275,0.498039215686275,0.498039215686275,1 60,0.498039215686275,0.498039215686275,0.498039215686275,1 61,0.470588235294118,0.470588235294118,0.470588235294118,1 62,0.470588235294118,0.470588235294118,0.470588235294118,1 63,0.470588235294118,0.470588235294118,0.470588235294118,1 64,0.470588235294118,0.470588235294118,0.470588235294118,1 65,0.470588235294118,0.470588235294118,0.470588235294118,1 66,0.443137254901961,0.443137254901961,0.443137254901961,1 67,0.443137254901961,0.443137254901961,0.443137254901961,1 68,0.443137254901961,0.443137254901961,0.443137254901961,1 69,0.443137254901961,0.443137254901961,0.443137254901961,1 70,0.443137254901961,0.443137254901961,0.443137254901961,1 71,0.376470588235294,0.376470588235294,0.376470588235294,1 72,0.376470588235294,0.376470588235294,0.376470588235294,1 73,0.376470588235294,0.376470588235294,0.376470588235294,1 74,0.376470588235294,0.376470588235294,0.376470588235294,1 75,0.376470588235294,0.376470588235294,0.376470588235294,1 76,0.125490196078431,0.376470588235294,0.501960784313725,1 77,0.125490196078431,0.376470588235294,0.501960784313725,1 78,0.129411764705882,0.407843137254902,0.537254901960784,1 79,0.129411764705882,0.407843137254902,0.537254901960784,1 80,0.133333333333333,0.43921568627451,0.572549019607843,1 81,0.133333333333333,0.43921568627451,0.572549019607843,1 82,0.137254901960784,0.470588235294118,0.607843137254902,1 83,0.137254901960784,0.470588235294118,0.607843137254902,1 84,0.145098039215686,0.501960784313725,0.643137254901961,1 85,0.145098039215686,0.501960784313725,0.643137254901961,1 86,0.149019607843137,0.533333333333333,0.682352941176471,1 87,0.149019607843137,0.533333333333333,0.682352941176471,1 88,0.152941176470588,0.564705882352941,0.717647058823529,1 89,0.152941176470588,0.564705882352941,0.717647058823529,1 90,0.156862745098039,0.596078431372549,0.752941176470588,1 91,0.156862745098039,0.596078431372549,0.752941176470588,1 92,0.16078431372549,0.627450980392157,0.788235294117647,1 93,0.16078431372549,0.627450980392157,0.788235294117647,1 94,0.168627450980392,0.658823529411765,0.823529411764706,1 95,0.168627450980392,0.658823529411765,0.823529411764706,1 96,0.172549019607843,0.690196078431373,0.858823529411765,1 97,0.172549019607843,0.690196078431373,0.858823529411765,1 98,0.176470588235294,0.72156862745098,0.894117647058824,1 99,0.176470588235294,0.72156862745098,0.894117647058824,1 100,0.180392156862745,0.752941176470588,0.929411764705882,1 101,0.180392156862745,0.752941176470588,0.929411764705882,1 102,0.184313725490196,0.784313725490196,0.964705882352941,1 103,0.184313725490196,0.784313725490196,0.964705882352941,1 104,0.188235294117647,0.815686274509804,1,1 105,0.188235294117647,0.815686274509804,1,1 106,0,1,0,1 107,0,1,0,1 108,0,0.964705882352941,0,1 109,0,0.964705882352941,0,1 110,0,0.925490196078431,0,1 111,0,0.925490196078431,0,1 112,0,0.890196078431373,0,1 113,0,0.890196078431373,0,1 114,0,0.850980392156863,0,1 115,0,0.850980392156863,0,1 116,0,0.815686274509804,0,1 117,0,0.815686274509804,0,1 118,0,0.776470588235294,0,1 119,0,0.776470588235294,0,1 120,0,0.741176470588235,0,1 121,0,0.741176470588235,0,1 122,0,0.705882352941177,0,1 123,0,0.705882352941177,0,1 124,0,0.666666666666667,0,1 125,0,0.666666666666667,0,1 126,0,0.631372549019608,0,1 127,0,0.631372549019608,0,1 128,0,0.592156862745098,0,1 129,0,0.592156862745098,0,1 130,0,0.556862745098039,0,1 131,0,0.556862745098039,0,1 132,0,0.52156862745098,0,1 133,0,0.52156862745098,0,1 134,0,0.482352941176471,0,1 135,0,0.482352941176471,0,1 136,0,0.447058823529412,0,1 137,0,0.447058823529412,0,1 138,0,0.407843137254902,0,1 139,0,0.407843137254902,0,1 140,0,0.372549019607843,0,1 141,0,0.372549019607843,0,1 142,0,0.333333333333333,0,1 143,0,0.333333333333333,0,1 144,0,0.298039215686275,0,1 145,0,0.298039215686275,0,1 146,1,0.901960784313726,0,1 147,1,0.901960784313726,0,1 148,1,0.858823529411765,0,1 149,1,0.858823529411765,0,1 150,1,0.811764705882353,0,1 151,1,0.811764705882353,0,1 152,1,0.768627450980392,0,1 153,1,0.768627450980392,0,1 154,1,0.725490196078431,0,1 155,1,0.725490196078431,0,1 156,1,0.67843137254902,0,1 157,1,0.67843137254902,0,1 158,1,0.635294117647059,0,1 159,1,0.635294117647059,0,1 160,1,0.592156862745098,0,1 161,1,0.592156862745098,0,1 162,1,0.545098039215686,0,1 163,1,0.545098039215686,0,1 164,1,0.501960784313725,0,1 165,1,0.501960784313725,0,1 166,1,0,0,1 167,1,0,0,1 168,0.929411764705882,0,0,1 169,0.929411764705882,0,0,1 170,0.862745098039216,0,0,1 171,0.862745098039216,0,0,1 172,0.792156862745098,0,0,1 173,0.792156862745098,0,0,1 174,0.72156862745098,0,0,1 175,0.72156862745098,0,0,1 176,0.654901960784314,0,0,1 177,0.654901960784314,0,0,1 178,0.584313725490196,0,0,1 179,0.584313725490196,0,0,1 180,0.513725490196078,0,0,1 181,0.513725490196078,0,0,1 182,0.447058823529412,0,0,1 183,0.447058823529412,0,0,1 184,0.376470588235294,0,0,1 185,0.376470588235294,0,0,1 186,1,1,1,1 187,1,1,1,1 188,1,1,1,1 189,1,1,1,1 190,1,1,1,1 191,1,1,1,1 192,1,1,1,1 193,1,1,1,1 194,1,1,1,1 195,1,1,1,1 196,0.564705882352941,0.188235294117647,0.815686274509804,1 197,0.564705882352941,0.188235294117647,0.815686274509804,1 198,0.564705882352941,0.188235294117647,0.815686274509804,1 199,0.564705882352941,0.188235294117647,0.815686274509804,1 200,0.564705882352941,0.188235294117647,0.815686274509804,1 201,0.564705882352941,0.188235294117647,0.815686274509804,1 202,0.564705882352941,0.188235294117647,0.815686274509804,1 203,0.564705882352941,0.188235294117647,0.815686274509804,1 204,0.564705882352941,0.188235294117647,0.815686274509804,1 205,0.564705882352941,0.188235294117647,0.815686274509804,1 206,1,0.125490196078431,1,1 207,1,0.125490196078431,1,1 208,1,0.125490196078431,1,1 209,1,0.125490196078431,1,1 210,1,0.125490196078431,1,1 211,1,0.125490196078431,1,1 212,1,0.125490196078431,1,1 213,1,0.125490196078431,1,1 214,1,0.125490196078431,1,1 215,1,0.125490196078431,1,1 216,1,0,0.501960784313725,1 217,1,0,0.501960784313725,1 218,1,0,0.501960784313725,1 219,1,0,0.501960784313725,1 220,1,0,0.501960784313725,1 221,1,0,0.501960784313725,1 222,1,0,0.501960784313725,1 223,1,0,0.501960784313725,1 224,1,0,0.501960784313725,1 225,1,0,0.501960784313725,1 226,0.882352941176471,0.490196078431373,0.588235294117647,1 227,0.882352941176471,0.490196078431373,0.588235294117647,1 228,0.882352941176471,0.490196078431373,0.588235294117647,1 229,0.882352941176471,0.490196078431373,0.588235294117647,1 230,0.882352941176471,0.490196078431373,0.588235294117647,1 231,0.882352941176471,0.490196078431373,0.588235294117647,1 232,0.882352941176471,0.490196078431373,0.588235294117647,1 233,0.882352941176471,0.490196078431373,0.588235294117647,1 234,0.882352941176471,0.490196078431373,0.588235294117647,1 235,0.882352941176471,0.490196078431373,0.588235294117647,1 236,0.882352941176471,0.490196078431373,0.588235294117647,1 237,0.882352941176471,0.490196078431373,0.588235294117647,1 238,0.882352941176471,0.490196078431373,0.588235294117647,1 239,0.882352941176471,0.490196078431373,0.588235294117647,1 240,0.882352941176471,0.490196078431373,0.588235294117647,1 241,0.882352941176471,0.490196078431373,0.588235294117647,1 242,0.882352941176471,0.490196078431373,0.588235294117647,1 243,0.882352941176471,0.490196078431373,0.588235294117647,1 244,0.882352941176471,0.490196078431373,0.588235294117647,1 245,0.882352941176471,0.490196078431373,0.588235294117647,1 246,0.882352941176471,0.490196078431373,0.588235294117647,1 247,0.882352941176471,0.490196078431373,0.588235294117647,1 248,0.882352941176471,0.490196078431373,0.588235294117647,1 249,0.882352941176471,0.490196078431373,0.588235294117647,1 250,0.882352941176471,0.490196078431373,0.588235294117647,1 251,0.882352941176471,0.490196078431373,0.588235294117647,1 252,0.882352941176471,0.490196078431373,0.588235294117647,1 253,0.882352941176471,0.490196078431373,0.588235294117647,1 254,0.882352941176471,0.490196078431373,0.588235294117647,1 255,0.882352941176471,0.490196078431373,0.588235294117647,1 -------------- next part -------------- A non-text attachment was scrubbed... Name: testimage.vti Type: application/octet-stream Size: 474540 bytes Desc: not available URL: From rccm.kyoshimi at gmail.com Wed Aug 2 19:21:05 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Thu, 3 Aug 2017 08:21:05 +0900 Subject: [vtkusers] VTK with PCL, link errors? In-Reply-To: <1501685095855-5744256.post@n5.nabble.com> References: <1501685095855-5744256.post@n5.nabble.com> Message-ID: Hi anti, You are probably missing at least opengl32.lib and glu32.lib. Thanks 2017-08-02 23:44 GMT+09:00 anti : > I am trying to compile a project that uses PCL and VTK. I have VTK libs > linked, as well as PCL, but I get these errors: > > 1>pcl_visualization_release.lib(vtkVertexBufferObjectMapper.obj) : error > LNK2001: unresolved external symbol __imp_glPointSize > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glColorPointer > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glDisableClientState > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glEnableClientState > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glIndexPointer > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glNormalPointer > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glVertexPointer > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* vtkgl::BindBuffer)(unsigned > int,unsigned int)" (?BindBuffer at vtkgl@@3P6AXII at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* > vtkgl::DeleteBuffers)(int,unsigned int const *)" > (?DeleteBuffers at vtkgl@@3P6AXHPEBI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* vtkgl::GenBuffers)(int,unsigned > int *)" (?GenBuffers at vtkgl@@3P6AXHPEAI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* vtkgl::BufferData)(unsigned > int,__int64,void const *,unsigned int)" > (?BufferData at vtkgl@@3P6AXI_JPEBXI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* > vtkgl::DisableVertexAttribArray)(unsigned int)" > (?DisableVertexAttribArray at vtkgl@@3P6AXI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* > vtkgl::EnableVertexAttribArray)(unsigned int)" > (?EnableVertexAttribArray at vtkgl@@3P6AXI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* > vtkgl::VertexAttribPointer)(unsigned int,int,unsigned int,unsigned > char,int,void const *)" (?VertexAttribPointer at vtkgl@@3P6AXIHIEHPEBX at ZEA) > 1>../bin\bslam.exe : fatal error LNK1120: 14 unresolved externals > > What linkage am I missing here? > > Thank you. > > > (my first post was not accepted, I am now subscribed correctly, apologies > for the double post) > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/VTK-with-PCL-link-errors-tp5744256.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 yangmin_hust at 126.com Thu Aug 3 03:32:21 2017 From: yangmin_hust at 126.com (minyang) Date: Thu, 3 Aug 2017 00:32:21 -0700 (MST) Subject: [vtkusers] [vtkDistanceWidget] 2D point handle does not follow mouse interaction In-Reply-To: <1389692545456-5725355.post@n5.nabble.com> References: <1389692545456-5725355.post@n5.nabble.com> Message-ID: <1501745541401-5744267.post@n5.nabble.com> Hi Shinya, I met the same problem. Is there any solution for it? thanks, min -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDistanceWidget-2D-point-handle-does-not-follow-mouse-interaction-tp5725355p5744267.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Thu Aug 3 11:32:13 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 3 Aug 2017 11:32:13 -0400 Subject: [vtkusers] Texture Mapping PolyData Broke In VTK 8.0?? In-Reply-To: References: Message-ID: You can fix the issue by using 2D texture coordinates with a 2D texture map (better memory and performance as well). Apparently the old version accepted 3D tcoords even when the texturemap was 2D. On Wed, Aug 2, 2017 at 3:43 PM, Donny Zimmerman wrote: > *The following code works in VTK 7.1 but does not work in VTK 8.0 using > the same PC and compiled with Visual Studio 2015. I have attached the XML > .vti image file and also the .txt file used for the lookup table.* > > #include "stdafx.h" > > #include "vtkAutoInit.h" > #define vtkRenderingCore_AUTOINIT 3(vtkInteractionStyle, > vtkRenderingFreeType,vtkRenderingOpenGL2) > #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL2) > > #include "vtkXMLImageDataReader.h" > #include "vtkImageData.h" > #include "vtkImageViewer2.h" > #include "vtkLookupTable.h" > #include "vtkRenderer.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkRenderWindow.h" > #include "vtkImageResize.h" > #include "vtkImageMapToWindowLevelColors.h" > #include "vtkTransformPolyDataFilter.h" > #include "vtkFloatArray.h" > #include "vtkMath.h" > #include "vtkTriangle.h" > #include "vtkPointData.h" > #include "vtkTexture.h" > #include "vtkTransform.h" > #include "vtkPolyDataMapper.h" > #include "vtkProperty.h" > > #include // std::cout > #include // std::istringstream > #include // std::string > #include > > int main() > { > double imgfact = 2.0; > > vtkSmartPointer lookuptable = vtkSmartPointer< > vtkLookupTable>::New(); > lookuptable->GetTable()->Reset(); > lookuptable->SetNumberOfColors(256); > lookuptable->SetRange(0, 255.0); > > std::ifstream infile; > std::string line; > > int ind = 0; > double r = 0, g = 0, b = 0, a = 0; > std::string sind, sr, sg, sb, sa; > > infile.open("lutable.txt", ifstream::in); > if (infile.is_open()) > { > while (infile.good() && ind < 255) > { > std::getline(infile, line); > std::istringstream is(line); > std::getline(is, sind, ','); > std::getline(is, sr, ','); > std::getline(is, sg, ','); > std::getline(is, sb, ','); > std::getline(is, sa); > ind = std::stoi(sind); > r = std::stod(sr); > g = std::stod(sg); > b = std::stod(sb); > a = std::stod(sa); > > lookuptable->SetTableValue(ind, r, g, b, a); > > } > infile.close(); > } > else > { > cout << "Error opening file"; > } > > lookuptable->Build(); > > vtkSmartPointer imgdat = vtkSmartPointer< > vtkXMLImageDataReader>::New(); > imgdat->SetFileName("testimage.vti"); > imgdat->ReleaseDataFlagOn(); > imgdat->Update(); > > int dims[3]; > imgdat->GetOutput()->GetDimensions(dims); > > int img_res_x = dims[0]; > int img_res_y = dims[1]; > > vtkSmartPointer resize1 = vtkSmartPointer< > vtkImageResize>::New(); > resize1->SetInputConnection(imgdat->GetOutputPort()); > resize1->SetOutputDimensions(img_res_x / imgfact, img_res_y / imgfact, 1); > resize1->SetResizeMethodToOutputDimensions(); > resize1->ReleaseDataFlagOn(); > > vtkSmartPointer resize2 = vtkSmartPointer< > vtkImageResize>::New(); > resize2->SetInputConnection(resize1->GetOutputPort()); > resize2->SetOutputDimensions(img_res_x, img_res_y, 1); > resize2->SetResizeMethodToOutputDimensions(); > resize2->ReleaseDataFlagOn(); > > vtkSmartPointer points = vtkSmartPointer::New(); > vtkSmartPointer triangles = vtkSmartPointer: > :New(); > vtkSmartPointer textureCoordinates = > vtkSmartPointer::New(); > textureCoordinates->SetNumberOfComponents(3); > textureCoordinates->SetName("TextureCoordinates"); > > float xval, yval, x, y, z; > > double sinang = sin(vtkMath::RadiansFromDegrees(19.0)); > z = sinang * 1000.0; > > int ptIdIndex = 0; > > for (int rrad = 0; rrad < 360; rrad++) > { > vtkSmartPointer triangle = vtkSmartPointer:: > New(); > triangle->GetPointIds()->SetNumberOfIds(3); > > // Point 1 > points->InsertNextPoint(1000.0, 1000.0, 0.0); > textureCoordinates->InsertNextTuple3(.5, .5, 0); > triangle->GetPointIds()->SetId(0, ptIdIndex++); > > // Point 2 > xval = (float)(sin(((float)rrad * vtkMath::Pi()) / 180.0)); > yval = (float)(cos(((float)rrad * vtkMath::Pi()) / 180.0)); > x = 1000.0 + (1000.0 * xval); > y = 1000.0 + (1000.0 * yval); > points->InsertNextPoint(x, y, z); > textureCoordinates->InsertNextTuple3(x / 2000.0, y / 2000.0, 0); > triangle->GetPointIds()->SetId(1, ptIdIndex++); > > // Point 3 > xval = (float)(sin(((float)(rrad + 1) * vtkMath::Pi()) / 180.0)); > yval = (float)(cos(((float)(rrad + 1) * vtkMath::Pi()) / 180.0)); > x = 1000.0 + (1000.0 * xval); > y = 1000.0 + (1000.0 * yval); > points->InsertNextPoint(x, y, z); > textureCoordinates->InsertNextTuple3(x / 2000.0, y / 2000.0, 0); > triangle->GetPointIds()->SetId(2, ptIdIndex++); > > triangles->InsertNextCell(triangle); > > } > > vtkSmartPointer polyData = vtkSmartPointer:: > New(); > polyData->SetPoints(points); > polyData->SetPolys(triangles); > polyData->GetPointData()->SetTCoords(textureCoordinates); > > vtkSmartPointer texture = vtkSmartPointer::New(); > texture->MapColorScalarsThroughLookupTableOn(); > texture->SetLookupTable(lookuptable); > texture->InterpolateOff(); > texture->SetInputConnection(resize2->GetOutputPort()); > > vtkSmartPointer tf = vtkSmartPointer< > vtkTransformPolyDataFilter>::New(); > tf->SetInputData(polyData); > double xfmscale = 250.0; > > vtkSmartPointer pdxfm = vtkSmartPointer: > :New(); > pdxfm->Scale(xfmscale, xfmscale, xfmscale); > pdxfm->Translate(-img_res_x / 2, -img_res_y / 2, 0); > tf->SetTransform(pdxfm); > > vtkSmartPointer mapper = vtkSmartPointer< > vtkPolyDataMapper>::New(); > mapper->SetInputConnection(tf->GetOutputPort()); > mapper->ScalarVisibilityOff(); > > vtkSmartPointer radarActor = vtkSmartPointer::New(); > radarActor->SetMapper(mapper); > radarActor->SetTexture(texture); > radarActor->GetProperty()->LightingOff(); > radarActor->GetProperty()->ShadingOff(); > > vtkSmartPointer renderer = vtkSmartPointer:: > New(); > vtkSmartPointer renderWindow = vtkSmartPointer< > vtkRenderWindow>::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > renderer->AddActor(radarActor); > > renderWindow->Render(); > renderWindowInteractor->Start(); > > return 0; > } > > *In 7.1 I see the texture rendered on the polydata correctly, but in 8.0 I > only see the white shaded polydata. Any idea what may have changed in 8.0 > that would prevent this from working.* > > *Thanks.* > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmanvortex at gmail.com Thu Aug 3 13:09:14 2017 From: zmanvortex at gmail.com (Donny Zimmerman) Date: Thu, 3 Aug 2017 12:09:14 -0500 Subject: [vtkusers] Texture Mapping PolyData Broke In VTK 8.0?? In-Reply-To: References: Message-ID: *Thank you Ken. That fixed it. I changed the following function calls to make it work:* textureCoordinates->SetNumberOfComponents(2); *and* textureCoordinates->InsertNextTuple2(x, y); On Thu, Aug 3, 2017 at 10:32 AM, Ken Martin wrote: > You can fix the issue by using 2D texture coordinates with a 2D texture > map (better memory and performance as well). Apparently the old version > accepted 3D tcoords even when the texturemap was 2D. > > > > On Wed, Aug 2, 2017 at 3:43 PM, Donny Zimmerman > wrote: > >> *The following code works in VTK 7.1 but does not work in VTK 8.0 using >> the same PC and compiled with Visual Studio 2015. I have attached the XML >> .vti image file and also the .txt file used for the lookup table.* >> >> #include "stdafx.h" >> >> #include "vtkAutoInit.h" >> #define vtkRenderingCore_AUTOINIT 3(vtkInteractionStyle,vtkRende >> ringFreeType,vtkRenderingOpenGL2) >> #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL2) >> >> #include "vtkXMLImageDataReader.h" >> #include "vtkImageData.h" >> #include "vtkImageViewer2.h" >> #include "vtkLookupTable.h" >> #include "vtkRenderer.h" >> #include "vtkRenderWindowInteractor.h" >> #include "vtkRenderWindow.h" >> #include "vtkImageResize.h" >> #include "vtkImageMapToWindowLevelColors.h" >> #include "vtkTransformPolyDataFilter.h" >> #include "vtkFloatArray.h" >> #include "vtkMath.h" >> #include "vtkTriangle.h" >> #include "vtkPointData.h" >> #include "vtkTexture.h" >> #include "vtkTransform.h" >> #include "vtkPolyDataMapper.h" >> #include "vtkProperty.h" >> >> #include // std::cout >> #include // std::istringstream >> #include // std::string >> #include >> >> int main() >> { >> double imgfact = 2.0; >> >> vtkSmartPointer lookuptable = >> vtkSmartPointer::New(); >> lookuptable->GetTable()->Reset(); >> lookuptable->SetNumberOfColors(256); >> lookuptable->SetRange(0, 255.0); >> >> std::ifstream infile; >> std::string line; >> >> int ind = 0; >> double r = 0, g = 0, b = 0, a = 0; >> std::string sind, sr, sg, sb, sa; >> >> infile.open("lutable.txt", ifstream::in); >> if (infile.is_open()) >> { >> while (infile.good() && ind < 255) >> { >> std::getline(infile, line); >> std::istringstream is(line); >> std::getline(is, sind, ','); >> std::getline(is, sr, ','); >> std::getline(is, sg, ','); >> std::getline(is, sb, ','); >> std::getline(is, sa); >> ind = std::stoi(sind); >> r = std::stod(sr); >> g = std::stod(sg); >> b = std::stod(sb); >> a = std::stod(sa); >> >> lookuptable->SetTableValue(ind, r, g, b, a); >> >> } >> infile.close(); >> } >> else >> { >> cout << "Error opening file"; >> } >> >> lookuptable->Build(); >> >> vtkSmartPointer imgdat = >> vtkSmartPointer::New(); >> imgdat->SetFileName("testimage.vti"); >> imgdat->ReleaseDataFlagOn(); >> imgdat->Update(); >> >> int dims[3]; >> imgdat->GetOutput()->GetDimensions(dims); >> >> int img_res_x = dims[0]; >> int img_res_y = dims[1]; >> >> vtkSmartPointer resize1 = vtkSmartPointer> >::New(); >> resize1->SetInputConnection(imgdat->GetOutputPort()); >> resize1->SetOutputDimensions(img_res_x / imgfact, img_res_y / imgfact, >> 1); >> resize1->SetResizeMethodToOutputDimensions(); >> resize1->ReleaseDataFlagOn(); >> >> vtkSmartPointer resize2 = vtkSmartPointer> >::New(); >> resize2->SetInputConnection(resize1->GetOutputPort()); >> resize2->SetOutputDimensions(img_res_x, img_res_y, 1); >> resize2->SetResizeMethodToOutputDimensions(); >> resize2->ReleaseDataFlagOn(); >> >> vtkSmartPointer points = vtkSmartPointer::New(); >> vtkSmartPointer triangles = vtkSmartPointer: >> :New(); >> vtkSmartPointer textureCoordinates = >> vtkSmartPointer::New(); >> textureCoordinates->SetNumberOfComponents(3); >> textureCoordinates->SetName("TextureCoordinates"); >> >> float xval, yval, x, y, z; >> >> double sinang = sin(vtkMath::RadiansFromDegrees(19.0)); >> z = sinang * 1000.0; >> >> int ptIdIndex = 0; >> >> for (int rrad = 0; rrad < 360; rrad++) >> { >> vtkSmartPointer triangle = vtkSmartPointer:: >> New(); >> triangle->GetPointIds()->SetNumberOfIds(3); >> >> // Point 1 >> points->InsertNextPoint(1000.0, 1000.0, 0.0); >> textureCoordinates->InsertNextTuple3(.5, .5, 0); >> triangle->GetPointIds()->SetId(0, ptIdIndex++); >> >> // Point 2 >> xval = (float)(sin(((float)rrad * vtkMath::Pi()) / 180.0)); >> yval = (float)(cos(((float)rrad * vtkMath::Pi()) / 180.0)); >> x = 1000.0 + (1000.0 * xval); >> y = 1000.0 + (1000.0 * yval); >> points->InsertNextPoint(x, y, z); >> textureCoordinates->InsertNextTuple3(x / 2000.0, y / 2000.0, 0); >> triangle->GetPointIds()->SetId(1, ptIdIndex++); >> >> // Point 3 >> xval = (float)(sin(((float)(rrad + 1) * vtkMath::Pi()) / 180.0)); >> yval = (float)(cos(((float)(rrad + 1) * vtkMath::Pi()) / 180.0)); >> x = 1000.0 + (1000.0 * xval); >> y = 1000.0 + (1000.0 * yval); >> points->InsertNextPoint(x, y, z); >> textureCoordinates->InsertNextTuple3(x / 2000.0, y / 2000.0, 0); >> triangle->GetPointIds()->SetId(2, ptIdIndex++); >> >> triangles->InsertNextCell(triangle); >> >> } >> >> vtkSmartPointer polyData = vtkSmartPointer:: >> New(); >> polyData->SetPoints(points); >> polyData->SetPolys(triangles); >> polyData->GetPointData()->SetTCoords(textureCoordinates); >> >> vtkSmartPointer texture = vtkSmartPointer::New(); >> texture->MapColorScalarsThroughLookupTableOn(); >> texture->SetLookupTable(lookuptable); >> texture->InterpolateOff(); >> texture->SetInputConnection(resize2->GetOutputPort()); >> >> vtkSmartPointer tf = >> vtkSmartPointer::New(); >> tf->SetInputData(polyData); >> double xfmscale = 250.0; >> >> vtkSmartPointer pdxfm = vtkSmartPointer: >> :New(); >> pdxfm->Scale(xfmscale, xfmscale, xfmscale); >> pdxfm->Translate(-img_res_x / 2, -img_res_y / 2, 0); >> tf->SetTransform(pdxfm); >> >> vtkSmartPointer mapper = >> vtkSmartPointer::New(); >> mapper->SetInputConnection(tf->GetOutputPort()); >> mapper->ScalarVisibilityOff(); >> >> vtkSmartPointer radarActor = vtkSmartPointer::New(); >> radarActor->SetMapper(mapper); >> radarActor->SetTexture(texture); >> radarActor->GetProperty()->LightingOff(); >> radarActor->GetProperty()->ShadingOff(); >> >> vtkSmartPointer renderer = vtkSmartPointer:: >> New(); >> vtkSmartPointer renderWindow = >> vtkSmartPointer::New(); >> renderWindow->AddRenderer(renderer); >> vtkSmartPointer renderWindowInteractor = >> vtkSmartPointer::New(); >> renderWindowInteractor->SetRenderWindow(renderWindow); >> >> renderer->AddActor(radarActor); >> >> renderWindow->Render(); >> renderWindowInteractor->Start(); >> >> return 0; >> } >> >> *In 7.1 I see the texture rendered on the polydata correctly, but in 8.0 >> I only see the white shaded polydata. Any idea what may have changed in 8.0 >> that would prevent this from working.* >> >> *Thanks.* >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chemicalx001 at gmail.com Thu Aug 3 18:38:14 2017 From: chemicalx001 at gmail.com (anti) Date: Thu, 3 Aug 2017 15:38:14 -0700 (MST) Subject: [vtkusers] VTK with PCL, link errors? In-Reply-To: References: <1501685095855-5744256.post@n5.nabble.com> Message-ID: Thanks for your reply. I already have those linked also. What else might it be? On 3 Aug 2017 00:21, "kenichiro yoshimi [via VTK]" < ml+s1045678n5744266h83 at n5.nabble.com> wrote: Hi anti, You are probably missing at least opengl32.lib and glu32.lib. Thanks 2017-08-02 23:44 GMT+09:00 anti <[hidden email] >: > I am trying to compile a project that uses PCL and VTK. I have VTK libs > linked, as well as PCL, but I get these errors: > > 1>pcl_visualization_release.lib(vtkVertexBufferObjectMapper.obj) : error > LNK2001: unresolved external symbol __imp_glPointSize > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glColorPointer > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glDisableClientState > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glEnableClientState > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glIndexPointer > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glNormalPointer > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol __imp_glVertexPointer > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* vtkgl::BindBuffer)(unsigned > int,unsigned int)" (?BindBuffer at vtkgl@@3P6AXII at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* > vtkgl::DeleteBuffers)(int,unsigned int const *)" > (?DeleteBuffers at vtkgl@@3P6AXHPEBI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* vtkgl::GenBuffers)(int,unsigned > int *)" (?GenBuffers at vtkgl@@3P6AXHPEAI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* vtkgl::BufferData)(unsigned > int,__int64,void const *,unsigned int)" > (?BufferData at vtkgl@@3P6AXI_JPEBXI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* > vtkgl::DisableVertexAttribArray)(unsigned int)" > (?DisableVertexAttribArray at vtkgl@@3P6AXI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* > vtkgl::EnableVertexAttribArray)(unsigned int)" > (?EnableVertexAttribArray at vtkgl@@3P6AXI at ZEA) > 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: > unresolved external symbol "void (__cdecl* > vtkgl::VertexAttribPointer)(unsigned int,int,unsigned int,unsigned > char,int,void const *)" (?VertexAttribPointer at vtkgl@@3P6AXIHIEHPEBX at ZEA) > 1>../bin\bslam.exe : fatal error LNK1120: 14 unresolved externals > > What linkage am I missing here? > > Thank you. > > > (my first post was not accepted, I am now subscribed correctly, apologies > for the double post) > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. com/VTK-with-PCL-link-errors-tp5744256.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ------------------------------ If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/VTK-with-PCL-link-errors- tp5744256p5744266.html To unsubscribe from VTK with PCL, link errors?, click here . NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-with-PCL-link-errors-tp5744256p5744278.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Thu Aug 3 23:29:33 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 4 Aug 2017 12:29:33 +0900 Subject: [vtkusers] VTK with PCL, link errors? In-Reply-To: References: <1501685095855-5744256.post@n5.nabble.com> Message-ID: Hi anti, Do you use CMake to generate your project? I tried to build and run pcl_visualizer_demo with CMake and this worked. At that time the linked libraries are listed below: kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib G:boost_1_61_0\lib64-msvc-14.0\boost_system-vc140-mt-gd-1_61.lib G:boost_1_61_0\lib64-msvc-14.0\boost_filesystem-vc140-mt-gd-1_61.lib G:boost_1_61_0\lib64-msvc-14.0\libboost_thread-vc140-mt-gd-1_61.lib G:boost_1_61_0\lib64-msvc-14.0\boost_date_time-vc140-mt-gd-1_61.lib G:boost_1_61_0\lib64-msvc-14.0\boost_iostreams-vc140-mt-gd-1_61.lib G:boost_1_61_0\lib64-msvc-14.0\boost_serialization-vc140-mt-gd-1_61.lib G:boost_1_61_0\lib64-msvc-14.0\boost_chrono-vc140-mt-gd-1_61.lib G:boost_1_61_0\lib64-msvc-14.0\boost_atomic-vc140-mt-gd-1_61.lib G:boost_1_61_0\lib64-msvc-14.0\boost_regex-vc140-mt-gd-1_61.lib G:\pcl\lib\pcl_common_debug.lib G:\pcl\lib\pcl_octree_debug.lib G:\VTK-8.0.0\lib\Debug\vtkChartsCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkCommonColor-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkCommonCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtksys-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkCommonDataModel-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkCommonMath-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkCommonMisc-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkCommonSystem-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkCommonTransforms-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkCommonExecutionModel-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersGeneral-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkCommonComputationalGeometry-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkInfovisCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersExtraction-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersStatistics-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingFourier-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkalglib-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingContext2D-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersGeometry-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersSources-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingFreeType-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkfreetype-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkzlib-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkDICOMParser-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkDomainsChemistry-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOLegacy-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtklz4-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOXMLParser-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkexpat-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkDomainsChemistryOpenGL2-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingOpenGL2-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkglew-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersAMR-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOXML-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkParallelCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersFlowPaths-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersGeneric-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersHybrid-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingSources-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersHyperTree-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersImaging-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingGeneral-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersModeling-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersParallel-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersParallelImaging-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersPoints-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersProgrammable-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersSMP-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersSelection-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersTexture-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersTopology-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkFiltersVerdict-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkverdict-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkGUISupportQt-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkInteractionStyle-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkGUISupportQtSQL-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOSQL-8.0.lib G:\VTK-8.0.0\lib\Debug\vtksqlite-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkGeovisCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOImage-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkmetaio-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkjpeg-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkpng-8.0.lib G:\VTK-8.0.0\lib\Debug\vtktiff-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkInfovisLayout-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingHybrid-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkInteractionWidgets-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingColor-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingAnnotation-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingVolume-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkViewsCore-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkproj4-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOAMR-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkhdf5_hl-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkhdf5-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOEnSight-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOExodus-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkexoIIc-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkNetCDF-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOExport-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingGL2PSOpenGL2-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkgl2ps-8.0.lib G:\VTK-8.0.0\lib\Debug\vtklibharu-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOExportOpenGL2-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOGeometry-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOImport-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOInfovis-8.0.lib G:\VTK-8.0.0\lib\Debug\vtklibxml2-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOLSDyna-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOMINC-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOMovie-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkoggtheora-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIONetCDF-8.0.lib G:\VTK-8.0.0\lib\Debug\vtknetcdf_c++.lib G:\VTK-8.0.0\lib\Debug\vtkIOPLY-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOParallel-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkjsoncpp-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOParallelXML-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOTecplotTable-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkIOVideo-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingMath-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingMorphological-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingStatistics-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkImagingStencil-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkInteractionImage-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingContextOpenGL2-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingImage-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingLOD-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingLabel-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingQt-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkRenderingVolumeOpenGL2-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkViewsContext2D-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkViewsInfovis-8.0.lib G:\VTK-8.0.0\lib\Debug\vtkViewsQt-8.0.lib G:\pcl\lib\pcl_io_debug.lib G:\flann\lib\flann_cpp_s-gd.lib G:\pcl\lib\pcl_kdtree_debug.lib G:\pcl\lib\pcl_search_debug.lib G:\pcl\lib\pcl_sample_consensus_debug.lib G:\pcl\lib\pcl_filters_debug.lib G:\pcl\lib\pcl_features_debug.lib G:\pcl\lib\pcl_ml_debug.lib G:\pcl\lib\pcl_segmentation_debug.lib G:\pcl\lib\pcl_visualization_debug.lib G:\pcl\lib\pcl_surface_debug.lib G:\pcl\lib\pcl_registration_debug.lib G:\pcl\lib\pcl_keypoints_debug.lib G:\pcl\lib\pcl_tracking_debug.lib G:\pcl\lib\pcl_recognition_debug.lib G:\pcl\lib\pcl_stereo_debug.lib G:\pcl\lib\pcl_apps_debug.lib G:\pcl\lib\pcl_outofcore_debug.lib G:\pcl\lib\pcl_people_debug.lib G:\Qt5.8.0-msvc2015\5.8\msvc2015_64\lib\Qt5Sqld.lib vfw32.lib glu32.lib opengl32.lib comctl32.lib wsock32.lib ws2_32.lib Psapi.lib G:\Qt5.8.0-msvc2015\5.8\msvc2015_64\lib\Qt5Widgetsd.lib G:\Qt5.8.0-msvc2015\5.8\msvc2015_64\lib\Qt5Guid.lib G:\Qt5.8.0-msvc2015\5.8\msvc2015_64\lib\Qt5Cored.lib Thanks 2017-08-04 7:38 GMT+09:00 anti : > Thanks for your reply. I already have those linked also. What else might it > be? > > On 3 Aug 2017 00:21, "kenichiro yoshimi [via VTK]" <[hidden email]> wrote: > > Hi anti, > > You are probably missing at least opengl32.lib and glu32.lib. > > Thanks > > 2017-08-02 23:44 GMT+09:00 anti <[hidden email]>: > >> I am trying to compile a project that uses PCL and VTK. I have VTK libs >> linked, as well as PCL, but I get these errors: >> >> 1>pcl_visualization_release.lib(vtkVertexBufferObjectMapper.obj) : error >> LNK2001: unresolved external symbol __imp_glPointSize >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol __imp_glColorPointer >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol __imp_glDisableClientState >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol __imp_glEnableClientState >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol __imp_glIndexPointer >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol __imp_glNormalPointer >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol __imp_glVertexPointer >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol "void (__cdecl* vtkgl::BindBuffer)(unsigned >> int,unsigned int)" (?BindBuffer at vtkgl@@3P6AXII at ZEA) >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol "void (__cdecl* >> vtkgl::DeleteBuffers)(int,unsigned int const *)" >> (?DeleteBuffers at vtkgl@@3P6AXHPEBI at ZEA) >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol "void (__cdecl* vtkgl::GenBuffers)(int,unsigned >> int *)" (?GenBuffers at vtkgl@@3P6AXHPEAI at ZEA) >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol "void (__cdecl* vtkgl::BufferData)(unsigned >> int,__int64,void const *,unsigned int)" >> (?BufferData at vtkgl@@3P6AXI_JPEBXI at ZEA) >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol "void (__cdecl* >> vtkgl::DisableVertexAttribArray)(unsigned int)" >> (?DisableVertexAttribArray at vtkgl@@3P6AXI at ZEA) >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol "void (__cdecl* >> vtkgl::EnableVertexAttribArray)(unsigned int)" >> (?EnableVertexAttribArray at vtkgl@@3P6AXI at ZEA) >> 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error >> LNK2001: >> unresolved external symbol "void (__cdecl* >> vtkgl::VertexAttribPointer)(unsigned int,int,unsigned int,unsigned >> char,int,void const *)" (?VertexAttribPointer at vtkgl@@3P6AXIHIEHPEBX at ZEA) >> 1>../bin\bslam.exe : fatal error LNK1120: 14 unresolved externals >> >> What linkage am I missing here? >> >> Thank you. >> >> >> (my first post was not accepted, I am now subscribed correctly, apologies >> for the double post) >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/VTK-with-PCL-link-errors-tp5744256.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://vtk.1045678.n5.nabble.com/VTK-with-PCL-link-errors-tp5744256p5744266.html > To unsubscribe from VTK with PCL, link errors?, click here. > NAML > > > > ________________________________ > View this message in context: Re: VTK with PCL, link errors? > > 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 landinghere at 163.com Fri Aug 4 07:44:21 2017 From: landinghere at 163.com (landings) Date: Fri, 4 Aug 2017 04:44:21 -0700 (MST) Subject: [vtkusers] How to split large models into smaller pieces when exporting the scene? In-Reply-To: References: <1501555747988-5744232.post@n5.nabble.com> Message-ID: <1501847061059-5744280.post@n5.nabble.com> Thank you very much! -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-split-large-models-into-smaller-pieces-when-exporting-the-scene-tp5744232p5744280.html Sent from the VTK - Users mailing list archive at Nabble.com. From mjordan at live.at Fri Aug 4 10:00:58 2017 From: mjordan at live.at (M. Jordan) Date: Fri, 4 Aug 2017 14:00:58 +0000 Subject: [vtkusers] Automatically change radius of sphere when a variable changes its value Message-ID: Hello, I have a scene with many spheres (about 100) in my QVTK-Widget. Now I would like to achieve that the radii of the spheres change automatically when a variable changes its value. Right now I add the spheres to the scene, start a timer and in the timer callback I change the radius of the SphereSources depending on the variable. Finally, I call qvtkwidget->update(); to update the spheres in my scene. It works, but i would like to improve the speed. Any ideas how to update spheres faster? Is there any possibility to only "re-render" one sphere and not the whole scene? Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Aug 4 10:28:16 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 4 Aug 2017 10:28:16 -0400 Subject: [vtkusers] Automatically change radius of sphere when a variable changes its value In-Reply-To: References: Message-ID: 1) actor->SetScale(...) instead of changing the sphere source or 2) use a Glyph3DMapper with a scale array to control the scale of each sphere or 3) vtkOpenGLSphereMapper with a scale array Which solution works best depends on the specifics of your use case, ala is only one sphere changing radius?, are they all?, are they all changing by the same amount? one actor? 100 actors? etc. On Fri, Aug 4, 2017 at 10:00 AM, M. Jordan wrote: > Hello, > > I have a scene with many spheres (about 100) in my QVTK-Widget. > Now I would like to achieve that the radii of the spheres change > automatically when a variable changes its value. > > Right now I add the spheres to the scene, start a timer and in the timer > callback I change the radius of the SphereSources depending on the > variable. Finally, I call qvtkwidget->update(); to update the spheres in > my scene. > > It works, but i would like to improve the speed. Any ideas how to update > spheres faster? Is there any possibility to only "re-render" one sphere and > not the whole scene? > > Thank you! > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruvva at yahoo.com Fri Aug 4 10:44:23 2017 From: ruvva at yahoo.com (Koteswara Rao Ruvva) Date: Fri, 4 Aug 2017 14:44:23 +0000 (UTC) Subject: [vtkusers] Contour shrinking and expanding (Dilation and erosion) References: <1566261867.348404.1501857863098.ref@mail.yahoo.com> Message-ID: <1566261867.348404.1501857863098@mail.yahoo.com> Hello All, For a given contour of points, how do I shrink or expand by certain offset? Is there a VTK filter or function to get the new contour. Thank you Koteswara Rao Ruvva -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Aug 4 11:04:55 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 4 Aug 2017 11:04:55 -0400 Subject: [vtkusers] Automatically change radius of sphere when a variable changes its value In-Reply-To: References: Message-ID: If you already have 100 actors try option 1 and see if that meets your needs. On Fri, Aug 4, 2017 at 10:59 AM, M. Jordan wrote: > Ideally I would like to change 100 spheres depending on an array of > doubles (all spheres are changing radius). > Moreover, I have to change the opacity and color of every sphere > individually, whereby i need 100 actors. > > Any idea which solution ist the best for my problem? > Thank you very much for your help! > ------------------------------ > *Von:* Ken Martin > *Gesendet:* Freitag, 04. August 2017 16:28 > *An:* M. Jordan > *Cc:* vtkusers at vtk.org > *Betreff:* Re: [vtkusers] Automatically change radius of sphere when a > variable changes its value > > 1) actor->SetScale(...) instead of changing the sphere source > > or > > 2) use a Glyph3DMapper with a scale array to control the scale of each > sphere > > or > > 3) vtkOpenGLSphereMapper with a scale array > > Which solution works best depends on the specifics of your use case, ala > is only one sphere changing radius?, are they all?, are they all changing > by the same amount? one actor? 100 actors? etc. > > > > > > > On Fri, Aug 4, 2017 at 10:00 AM, M. Jordan wrote: > >> Hello, >> >> I have a scene with many spheres (about 100) in my QVTK-Widget. >> Now I would like to achieve that the radii of the spheres change >> automatically when a variable changes its value. >> >> Right now I add the spheres to the scene, start a timer and in the timer >> callback I change the radius of the SphereSources depending on the >> variable. Finally, I call qvtkwidget->update(); to update the spheres in >> my scene. >> >> It works, but i would like to improve the speed. Any ideas how to update >> spheres faster? Is there any possibility to only "re-render" one sphere and >> not the whole scene? >> >> Thank you! >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Aug 4 14:35:15 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 4 Aug 2017 14:35:15 -0400 Subject: [vtkusers] Deprecating AAFrames/SubFrame/DOFFrames Message-ID: I am thinking about removing/deprecating these three features from VTK and wanted to check if they are in active use and if so in what use case. The goal being to reduce some code and prep for moving towards using a render pass by default. Currently AAFrames is better handled with SetMultiSamples, SSAA or FXAA and for DOF there is now a render pass that uses modern approaches. Thanks Ken -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mlr at gmx.de Fri Aug 4 15:29:16 2017 From: j.mlr at gmx.de (vtkBeginner) Date: Fri, 4 Aug 2017 12:29:16 -0700 (MST) Subject: [vtkusers] vtkContextView: No text renderer available Message-ID: <1501874956104-5744294.post@n5.nabble.com> Hi, I am trying to get the example http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Charts/Cxx/QScalarsToColors.cxx running on my mac book (with retina display), osx 10.11.6, Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin15.6.0 VTK 8.0.1, backend openGL Qt 5.6.2 Build after adding #include VTK_MODULE_INIT(vtkRenderingOpenGL) VTK_MODULE_INIT(vtkRenderingContextOpenGL) The program runs, but the chart title and numbers at the axes are missing. It continuously complains ERROR: In /VTK/VTK-8.0.0/Rendering/ContextOpenGL/vtkOpenGLContextDevice2D.cxx, line 1470 vtkOpenGL2ContextDevice2D (0x7fb6d9c8a320): No text renderer available. Link to vtkRenderingFreeType to get the default implementation. Additional, minor problem: the rubber band (right mouse button / ctrl+left button) seems to be displaced by half of the window size - probably the pixel density of the retina display is not recognized. Any help how this can be fixed is appreciated - thanks ! Jorg -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkContextView-No-text-renderer-available-tp5744294.html Sent from the VTK - Users mailing list archive at Nabble.com. From allison.vacanti at kitware.com Fri Aug 4 16:22:55 2017 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Fri, 4 Aug 2017 13:22:55 -0700 Subject: [vtkusers] vtkContextView: No text renderer available In-Reply-To: <1501874956104-5744294.post@n5.nabble.com> References: <1501874956104-5744294.post@n5.nabble.com> Message-ID: On Fri, Aug 4, 2017 at 12:29 PM, vtkBeginner wrote: > Link to vtkRenderingFreeType to get the default implementation. Link to the vtkRenderingFreeType library to use text rendering in your application. From chenshaoqiang at buaa.edu.cn Fri Aug 4 19:29:24 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Sat, 5 Aug 2017 07:29:24 +0800 Subject: [vtkusers] Is it possible to make the VTKTextbook.pdf better? In-Reply-To: <017801d30ad7$4e20b890$ea6229b0$@stlcc.org> References: <8963ED62896641DEA819B1963E997040@chensqPC> <017801d30ad7$4e20b890$ea6229b0$@stlcc.org> Message-ID: <2D9D12668E084245906B1BA14E53B027@chensqPC> Please see the picture in accessory for the situation. I hope that vtk.org could rerelease the VTKTextbook.pdf for clear formula. It is important! at least for me. Chen From: Bob Palank Sent: Tuesday, August 01, 2017 11:03 PM To: 'chensq' Subject: RE: [vtkusers] Is it possible to make the VTKTextbook.pdf better? What does disordered mean ? Bob From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of chensq Sent: Monday, July 31, 2017 9:18 PM To: vtkusers Subject: [vtkusers] Is it possible to make the VTKTextbook.pdf better? All of the formulas are disordered. Sincerely Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mess.png Type: image/png Size: 105524 bytes Desc: not available URL: From iamdpak at gmail.com Fri Aug 4 21:52:55 2017 From: iamdpak at gmail.com (vinmean) Date: Fri, 4 Aug 2017 18:52:55 -0700 (MST) Subject: [vtkusers] How to rotate and transform object imported using vtkOBJImporter class? Message-ID: <1501897975671-5744300.post@n5.nabble.com> I am new to vtk. I am using it along with pcl (point cloud library). I have been trying to import an .obj file along with texture information. I was able to do that using the below code. But I want to rotate and transform this object that I imported. How do I do it in vtk? I know to rotate and transform an mesh in pcl. Should I convert this object into pcl data type (pcl::TextureMesh) ? If so how do I do it? #include #include #include #include #include #include #include #include #include #include "vtksys/SystemTools.hxx" #include int main(int argc, char** argv) { vtkNew importer; std::string filenameOBJ("mesh.obj"); std::string filenameMTL("mesh.mtl"); std::string texfile1; std::string texture_path1 = vtksys::SystemTools::GetFilenamePath("mesh_material0000_map_Kd.png"); importer->SetFileName(filenameOBJ.data()); importer->SetFileNameMTL(filenameMTL.data()); importer->SetTexturePath(texture_path1.data()); boost::shared_ptr result_view(new pcl::visualization::PCLVisualizer("Viewer")); importer->SetRenderWindow(result_view->getRenderWindow()); importer->Update(); vtkSmartPointer renderer =result_view->getRenderWindow()->GetRenderers()->GetFirstRenderer(); renderer->ResetCamera(); result_view->spin(); return 0; } -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-rotate-and-transform-object-imported-using-vtkOBJImporter-class-tp5744300.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Fri Aug 4 22:01:35 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 4 Aug 2017 22:01:35 -0400 Subject: [vtkusers] How to rotate and transform object imported using vtkOBJImporter class? In-Reply-To: <1501897975671-5744300.post@n5.nabble.com> References: <1501897975671-5744300.post@n5.nabble.com> Message-ID: This may help... https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ On Fri, Aug 4, 2017 at 9:52 PM, vinmean wrote: > I am new to vtk. I am using it along with pcl (point cloud library). I have > been trying to import an .obj file along with texture information. I was > able to do that using the below code. But I want to rotate and transform > this object that I imported. How do I do it in vtk? I know to rotate and > transform an mesh in pcl. Should I convert this object into pcl data type > (pcl::TextureMesh) ? If so how do I do it? > > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include "vtksys/SystemTools.hxx" > #include > > int main(int argc, char** argv) > { > vtkNew importer; > std::string filenameOBJ("mesh.obj"); > std::string filenameMTL("mesh.mtl"); > std::string texfile1; > std::string texture_path1 = > vtksys::SystemTools::GetFilenamePath("mesh_material0000_map_Kd.png"); > > importer->SetFileName(filenameOBJ.data()); > importer->SetFileNameMTL(filenameMTL.data()); > importer->SetTexturePath(texture_path1.data()); > > boost::shared_ptr > result_view(new pcl::visualization::PCLVisualizer("Viewer")); > > importer->SetRenderWindow(result_view->getRenderWindow()); > importer->Update(); > > vtkSmartPointer renderer > =result_view->getRenderWindow()->GetRenderers()->GetFirstRenderer(); > renderer->ResetCamera(); > > result_view->spin(); > > return 0; > } > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-rotate-and-transform-object-imported-using-vtkOBJImporter-class-tp5744300.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 weiherer.maximilian at gmx.de Sat Aug 5 09:43:54 2017 From: weiherer.maximilian at gmx.de (Maximilian Weiherer) Date: Sat, 5 Aug 2017 15:43:54 +0200 Subject: [vtkusers] New Algorithm Pipeline in VTK Message-ID: <002901d30df0$e28e8720$a7ab9560$@gmx.de> Hi all, I am trying to set up a new pipeline in VTK. Therefore I specified a custom class to represent poly data, named Mesh which inherits from vtkPolyData. Further, I implemented a class MeshAlgorithm which inerhits from vtkAlgorithm. The new algorithm class should only accept Mesh objects as inputs and only produce Mesh objects as outputs. At last a third class MeshReader inherits from MeshAlgorithm. MeshReader takes 0 input arguments and produces 1 output object of type Mesh. I used the example that can be found here http://www.vtk.org/Wiki/VTK/Examples/Cxx/Developers/AlgorithmFilter in order to set up my pipeline. However, the execution gives me the following error (and generic warning): Generic Warning: In L:\VTK_7_1_1\VTK_7_1_1\Common\DataModel\vtkDataObjectTypes.cxx, line 304 NewDataObject(): You are trying to instantiate DataObjectType "Mesh" which does not exist. ERROR: In L:\VTK_7_1_1\VTK_7_1_1\Common\ExecutionModel\vtkDemandDrivenPipeline.cxx, line 653 vtkCompositeDataPipeline (000001FA9B0E5090): Algorithm MeshReader(000001FA9B0AB6D0) did not create output for port 0 when asked by REQUEST_DATA_OBJECT and does not specify a concrete DATA_TYPE_NAME. In MeshAlgorithm I have int MeshAlgorithm::FillOutputPortInformation( int vtkNotUsed(port), vtkInformation* info) { // now add our info info->Set(vtkDataObject::DATA_TYPE_NAME(), "Mesh"); return 1; } //-------------------------------------------------------------------------- -- int MeshAlgorithm::FillInputPortInformation( int vtkNotUsed(port), vtkInformation* info) { info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "Mesh"); return 1; } and in MeshReader int MeshReader::FillOutputPortInformation(int port, vtkInformation* info) { info->Set(vtkDataObject::DATA_TYPE_NAME(), "Mesh"); return 1; }. Any suggestions why this error occurs? Best regards Maximilian --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Sun Aug 6 12:59:28 2017 From: alican1812 at hotmail.com (alican) Date: Sun, 6 Aug 2017 09:59:28 -0700 (MST) Subject: [vtkusers] Is there a filter to inflate vtkPolyData, an opposite to vtkShrinkPolyData? Message-ID: <1502038768411-5744305.post@n5.nabble.com> I cannot find one. If there isn't one, how should I go about it? And what should I do if I need to inflate only a part of the polydata? I have tried to move each point in the selected data set alongside its normal, but it is very slow and doesn't work as expected. I am getting some results for planes or nearly flat surfaces, or even spheres, but nothing works for surfaces with folds (concave parts). Any advice? I have spent a week on this, and I am just stuck. Excuse my ignorance if I miss something obvious, it is my first project with VTK. Thanks, AC -- View this message in context: http://vtk.1045678.n5.nabble.com/Is-there-a-filter-to-inflate-vtkPolyData-an-opposite-to-vtkShrinkPolyData-tp5744305.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Sun Aug 6 13:12:56 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 6 Aug 2017 13:12:56 -0400 Subject: [vtkusers] Is there a filter to inflate vtkPolyData, an opposite to vtkShrinkPolyData? In-Reply-To: <1502038768411-5744305.post@n5.nabble.com> References: <1502038768411-5744305.post@n5.nabble.com> Message-ID: Try this: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/WarpSurface/ On Sun, Aug 6, 2017 at 12:59 PM, alican wrote: > I cannot find one. If there isn't one, how should I go about it? > And what should I do if I need to inflate only a part of the polydata? > > I have tried to move each point in the selected data set alongside its > normal, > but it is very slow and doesn't work as expected. > I am getting some results for planes or nearly flat surfaces, or even > spheres, > but nothing works for surfaces with folds (concave parts). > > Any advice? I have spent a week on this, and I am just stuck. > Excuse my ignorance if I miss something obvious, it is my first project with > VTK. > > Thanks, > AC > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Is-there-a-filter-to-inflate-vtkPolyData-an-opposite-to-vtkShrinkPolyData-tp5744305.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 mjordan at live.at Mon Aug 7 08:30:40 2017 From: mjordan at live.at (M. Jordan) Date: Mon, 7 Aug 2017 12:30:40 +0000 Subject: [vtkusers] Automatically change radius of sphere when a variable changes its value In-Reply-To: References: , Message-ID: Hello, i tried to use the ->SetScale() options but it turned out that this changes the position as well. My goal is to find the fastest way to change the radius of the spheres, without affecting their positions. Any idea how to solve this issue? Thank you very much! ________________________________ Von: Ken Martin Gesendet: Freitag, 04. August 2017 16:28 An: M. Jordan Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Automatically change radius of sphere when a variable changes its value 1) actor->SetScale(...) instead of changing the sphere source or 2) use a Glyph3DMapper with a scale array to control the scale of each sphere or 3) vtkOpenGLSphereMapper with a scale array Which solution works best depends on the specifics of your use case, ala is only one sphere changing radius?, are they all?, are they all changing by the same amount? one actor? 100 actors? etc. On Fri, Aug 4, 2017 at 10:00 AM, M. Jordan > wrote: Hello, I have a scene with many spheres (about 100) in my QVTK-Widget. Now I would like to achieve that the radii of the spheres change automatically when a variable changes its value. Right now I add the spheres to the scene, start a timer and in the timer callback I change the radius of the SphereSources depending on the variable. Finally, I call qvtkwidget->update(); to update the spheres in my scene. It works, but i would like to improve the speed. Any ideas how to update spheres faster? Is there any possibility to only "re-render" one sphere and not the whole scene? Thank you! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Aug 7 09:16:45 2017 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 7 Aug 2017 09:16:45 -0400 Subject: [vtkusers] Automatically change radius of sphere when a variable changes its value In-Reply-To: References: Message-ID: Position your spheres using the Actor's SetPosition, I am guessing you are changing the spheres' centers in the SphereSource which is the issue. On Mon, Aug 7, 2017 at 8:30 AM, M. Jordan wrote: > Hello, > > i tried to use the ->SetScale() options but it turned out that this > changes the position as well. > My goal is to find the fastest way to change the radius of the spheres, > without affecting their positions. > Any idea how to solve this issue? > > Thank you very much! > > > ------------------------------ > *Von:* Ken Martin > *Gesendet:* Freitag, 04. August 2017 16:28 > *An:* M. Jordan > *Cc:* vtkusers at vtk.org > *Betreff:* Re: [vtkusers] Automatically change radius of sphere when a > variable changes its value > > 1) actor->SetScale(...) instead of changing the sphere source > > or > > 2) use a Glyph3DMapper with a scale array to control the scale of each > sphere > > or > > 3) vtkOpenGLSphereMapper with a scale array > > Which solution works best depends on the specifics of your use case, ala > is only one sphere changing radius?, are they all?, are they all changing > by the same amount? one actor? 100 actors? etc. > > > > > > > On Fri, Aug 4, 2017 at 10:00 AM, M. Jordan wrote: > >> Hello, >> >> I have a scene with many spheres (about 100) in my QVTK-Widget. >> Now I would like to achieve that the radii of the spheres change >> automatically when a variable changes its value. >> >> Right now I add the spheres to the scene, start a timer and in the timer >> callback I change the radius of the SphereSources depending on the >> variable. Finally, I call qvtkwidget->update(); to update the spheres in >> my scene. >> >> It works, but i would like to improve the speed. Any ideas how to update >> spheres faster? Is there any possibility to only "re-render" one sphere and >> not the whole scene? >> >> Thank you! >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jreileyclark at gmail.com Mon Aug 7 13:03:57 2017 From: jreileyclark at gmail.com (Justin Clark) Date: Mon, 7 Aug 2017 10:03:57 -0700 Subject: [vtkusers] Plot Tubular Paths from xyz Message-ID: <2BFE3A9B-D5A1-4C06-8545-11982ACE193A@gmail.com> Hi all, Total vtk newbie here trying to figure out a solution in vtk python. I would like to plot multiple tubular paths defined by a set of (x, y, z) data. Multiple paths. I'm trying to plot wellbores. Once the wellbores are plotted I intend to use them as sources and sinks for simulation and streamline purposes. Any guidance would be helpful! Using existing examples I believe I need to insert my xyz's into a vtkPoints object. Then interpolate using a spline, and use the spline to define my tube path? Thanks! From bill.lorensen at gmail.com Mon Aug 7 15:05:26 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 7 Aug 2017 15:05:26 -0400 Subject: [vtkusers] Plot Tubular Paths from xyz In-Reply-To: <2BFE3A9B-D5A1-4C06-8545-11982ACE193A@gmail.com> References: <2BFE3A9B-D5A1-4C06-8545-11982ACE193A@gmail.com> Message-ID: Here is a C++ example: https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/TubesFromSplines/ On Mon, Aug 7, 2017 at 1:03 PM, Justin Clark wrote: > > > Hi all, > > Total vtk newbie here trying to figure out a solution in vtk python. I would like to plot multiple tubular paths defined by a set of (x, y, z) data. Multiple paths. I'm trying to plot wellbores. Once the wellbores are plotted I intend to use them as sources and sinks for simulation and streamline purposes. Any guidance would be helpful! > > Using existing examples I believe I need to insert my xyz's into a vtkPoints object. Then interpolate using a spline, and use the spline to define my tube path? > > Thanks! > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From siva.yedithi at gmail.com Mon Aug 7 20:04:43 2017 From: siva.yedithi at gmail.com (Neel Patel 0-0-0) Date: Mon, 7 Aug 2017 17:04:43 -0700 (MST) Subject: [vtkusers] Clarification and help using vtkLookupTable Message-ID: <1502150683321-5744313.post@n5.nabble.com> Hi All, I'm trying to use vtkLookupTable to add color in my image, something like what they show on the weather forecasts. From what I understand, SetRange(0,255) means that any pixel value in the image that is in between the min and max, will be assigned a value that has been set by SetTableValue(0, 0, 0, 0, 0) and SetTableValue(255, 255, 255, 255, 1). To test this out I made a simple lookupTable where everything except for 0 was given a rgb value of 255, 0, 0; vtkLookupTable table = vtkLookupTable.New(); table.SetRange(0, 255); table.SetTableValue(0, 0, 0, 0, 0); for (int i = 1; i < 255; i++) { table.SetTableValue(i, 255, 0, 0, 0.3); } table.SetRampToLinear(); table.Build(); This however still gives me and image with red, green, and blue showing up instead of just red. Also just to note this is on top of a black/white image, so there aren't any other places from which the colors could come from. Any help would be appreciated. Thanks. Regards, Neel Patel -- View this message in context: http://vtk.1045678.n5.nabble.com/Clarification-and-help-using-vtkLookupTable-tp5744313.html Sent from the VTK - Users mailing list archive at Nabble.com. From jreileyclark at gmail.com Mon Aug 7 23:22:00 2017 From: jreileyclark at gmail.com (Justin Clark) Date: Mon, 7 Aug 2017 20:22:00 -0700 Subject: [vtkusers] Plot Tubular Paths from xyz In-Reply-To: References: <2BFE3A9B-D5A1-4C06-8545-11982ACE193A@gmail.com> Message-ID: <004801d30ff5$800c24c0$80246e40$@gmail.com> Sorry, Not a C++ programmer. I'm confused by multiple parts so far in the code. double r; for (unsigned int i = 0; i < n; ++i) { double t = (tMax - tMin) / (n - 1) * i + tMin; interpolatedRadius->InterpolateTuple(t, &r); tubeRadius->SetTuple1(i, r); } What does "&r" mean above? We instantiate r as a double, but we don't assign it a value. Then we interpolate between t and the memory address of r? Any help converting this into python? So far I have... import vtk points = vtk.vtkPoints() points.InsertPoint(0,1,0,0) points.InsertPoint(1,2,0,0) points.InsertPoint(2,3,1,0) points.InsertPoint(3,4,1,0) points.InsertPoint(4,5,0,0) points.InsertPoint(5,6,0,0) spline = vtk.vtkParametricSpline() spline.SetPoints(points) functionSource = vtk.vtkParametricFunctionSource() functionSource.SetParametricFunction(spline) functionSource.SetUResolution(10*points.GetNumberOfPoints()) functionSource.Update() interpolatedRadius = vtk.vtkTupleInterpolator() interpolatedRadius.SetInterpolationTypetoLinear() interpolatedRadius.SetNumberOfComponents(1) interpolatedRadius.AddTuple(0,0.2) interpolatedRadius.AddTuple(0,0.2) interpolatedRadius.AddTuple(0,0.2) interpolatedRadius.AddTuple(0,0.1) interpolatedRadius.AddTuple(0,0.1) interpolatedRadius.AddTuple(0,0.1) n = functionSource.GetUresolution() tubeRadius = vtk.vtkDoubleArray() tubeRadius.SetNumberOfValues(n) tmin = interpolatedRadius.GetMinimumT() tmax = interpolatedRadius.GetMaximumT() for i in range(n): t = ((tmax - tmin)/(n-1))*i + tmin interpolatedRadius.InterpolateTuple(t,???) -----Original Message----- From: Bill Lorensen [mailto:bill.lorensen at gmail.com] Sent: Monday, August 7, 2017 12:05 PM To: Justin Clark Cc: VTK Users Subject: Re: [vtkusers] Plot Tubular Paths from xyz Here is a C++ example: https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/TubesFromSplines/ On Mon, Aug 7, 2017 at 1:03 PM, Justin Clark > wrote: > > > Hi all, > > Total vtk newbie here trying to figure out a solution in vtk python. I would like to plot multiple tubular paths defined by a set of (x, y, z) data. Multiple paths. I'm trying to plot wellbores. Once the wellbores are plotted I intend to use them as sources and sinks for simulation and streamline purposes. Any guidance would be helpful! > > Using existing examples I believe I need to insert my xyz's into a vtkPoints object. Then interpolate using a spline, and use the spline to define my tube path? > > Thanks! > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jreileyclark at gmail.com Tue Aug 8 00:22:46 2017 From: jreileyclark at gmail.com (Justin Clark) Date: Mon, 7 Aug 2017 21:22:46 -0700 Subject: [vtkusers] Plot Tubular Paths from xyz In-Reply-To: References: <2BFE3A9B-D5A1-4C06-8545-11982ACE193A@gmail.com> Message-ID: <005301d30ffd$fd623290$f82697b0$@gmail.com> Also, "interpolatedRadius.AddTuple(0,0.2)" fails in python. The kernel completely crashes. I've tried tuple and list arguments as well. Nothing works. -----Original Message----- From: Bill Lorensen [mailto:bill.lorensen at gmail.com] Sent: Monday, August 7, 2017 12:05 PM To: Justin Clark Cc: VTK Users Subject: Re: [vtkusers] Plot Tubular Paths from xyz Here is a C++ example: https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/TubesFromSplines/ On Mon, Aug 7, 2017 at 1:03 PM, Justin Clark wrote: > > > Hi all, > > Total vtk newbie here trying to figure out a solution in vtk python. I would like to plot multiple tubular paths defined by a set of (x, y, z) data. Multiple paths. I'm trying to plot wellbores. Once the wellbores are plotted I intend to use them as sources and sinks for simulation and streamline purposes. Any guidance would be helpful! > > Using existing examples I believe I need to insert my xyz's into a vtkPoints object. Then interpolate using a spline, and use the spline to define my tube path? > > Thanks! > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From mjordan at live.at Tue Aug 8 03:40:57 2017 From: mjordan at live.at (M. Jordan) Date: Tue, 8 Aug 2017 07:40:57 +0000 Subject: [vtkusers] Automatically change radius of sphere when a variable changes its value In-Reply-To: References: , Message-ID: Thank you! Now it works. My scene also includes a big polydata object which does not change by time. Nevertheless, if the object is visible, the time to re-render the scene increases enormously. So updating the spheres is not the time issue. Is it possible to only update the spheres and not the polydata object? ________________________________ Von: Ken Martin Gesendet: Montag, 07. August 2017 15:16 An: M. Jordan Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Automatically change radius of sphere when a variable changes its value Position your spheres using the Actor's SetPosition, I am guessing you are changing the spheres' centers in the SphereSource which is the issue. On Mon, Aug 7, 2017 at 8:30 AM, M. Jordan > wrote: Hello, i tried to use the ->SetScale() options but it turned out that this changes the position as well. My goal is to find the fastest way to change the radius of the spheres, without affecting their positions. Any idea how to solve this issue? Thank you very much! ________________________________ Von: Ken Martin > Gesendet: Freitag, 04. August 2017 16:28 An: M. Jordan Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Automatically change radius of sphere when a variable changes its value 1) actor->SetScale(...) instead of changing the sphere source or 2) use a Glyph3DMapper with a scale array to control the scale of each sphere or 3) vtkOpenGLSphereMapper with a scale array Which solution works best depends on the specifics of your use case, ala is only one sphere changing radius?, are they all?, are they all changing by the same amount? one actor? 100 actors? etc. On Fri, Aug 4, 2017 at 10:00 AM, M. Jordan > wrote: Hello, I have a scene with many spheres (about 100) in my QVTK-Widget. Now I would like to achieve that the radii of the spheres change automatically when a variable changes its value. Right now I add the spheres to the scene, start a timer and in the timer callback I change the radius of the SphereSources depending on the variable. Finally, I call qvtkwidget->update(); to update the spheres in my scene. It works, but i would like to improve the speed. Any ideas how to update spheres faster? Is there any possibility to only "re-render" one sphere and not the whole scene? Thank you! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Aug 8 05:45:49 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 8 Aug 2017 05:45:49 -0400 Subject: [vtkusers] Clarification and help using vtkLookupTable In-Reply-To: <1502150683321-5744313.post@n5.nabble.com> References: <1502150683321-5744313.post@n5.nabble.com> Message-ID: Take out the calls to set ramp and especially build. Build replaces all of the value:colors you've set with automatically generated ones. On Aug 7, 2017 8:04 PM, "Neel Patel 0-0-0" wrote: > Hi All, > > I'm trying to use vtkLookupTable to add color in my image, something > like what they show on the weather forecasts. From what I understand, > SetRange(0,255) means that any pixel value in the image that is in between > the min and max, will be assigned a value that has been set by > SetTableValue(0, 0, 0, 0, 0) and SetTableValue(255, 255, 255, 255, 1). To > test this out I made a simple lookupTable where everything except for 0 was > given a rgb value of 255, 0, 0; > > vtkLookupTable table = vtkLookupTable.New(); > table.SetRange(0, 255); > table.SetTableValue(0, 0, 0, 0, 0); > > for (int i = 1; i < 255; i++) > { > table.SetTableValue(i, 255, 0, 0, 0.3); > } > table.SetRampToLinear(); > table.Build(); > > This however still gives me and image with red, green, and blue showing up > instead of just red. Also just to note this is on top of a black/white > image, so there aren't any other places from which the colors could come > from. Any help would be appreciated. Thanks. > > Regards, > Neel Patel > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Clarification-and-help-using-vtkLookupTable-tp5744313.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 peer9802 at gmail.com Tue Aug 8 09:52:25 2017 From: peer9802 at gmail.com (Eric Petersen) Date: Tue, 8 Aug 2017 08:52:25 -0500 Subject: [vtkusers] Plot Tubular Paths from xyz In-Reply-To: <005301d30ffd$fd623290$f82697b0$@gmail.com> References: <2BFE3A9B-D5A1-4C06-8545-11982ACE193A@gmail.com> <005301d30ffd$fd623290$f82697b0$@gmail.com> Message-ID: <9C407B49-5935-4936-B0F6-5C5B49086D78@gmail.com> Below is a "TubesFromSpline" example that works with Python 3.6 and VTK 7. import vtk ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) iren.SetRenderWindow(renWin) iren.Initialize() points = vtk.vtkPoints() points.InsertPoint(0, 1, 0, 0) points.InsertPoint(1, 2, 0, 0) points.InsertPoint(2, 3, 1, 0) points.InsertPoint(3, 4, 1, 0) points.InsertPoint(4, 5, 0, 0) points.InsertPoint(5, 6, 0, 0) # Fit a spline to the points spline = vtk.vtkParametricSpline() spline.SetPoints(points) functionSource = vtk.vtkParametricFunctionSource() functionSource.SetParametricFunction(spline) functionSource.SetUResolution(10 * points.GetNumberOfPoints()) functionSource.Update() # Interpolate the scalars interpolatedRadius = vtk.vtkTupleInterpolator() interpolatedRadius.SetInterpolationTypeToLinear() interpolatedRadius.SetNumberOfComponents(1) interpolatedRadius.AddTuple(0, [0.2,]) interpolatedRadius.AddTuple(1, (0.2,)) interpolatedRadius.AddTuple(2, (0.2,)) interpolatedRadius.AddTuple(3, (0.1,)) interpolatedRadius.AddTuple(4, (0.1,)) interpolatedRadius.AddTuple(5, (0.1,)) # Generate the radius scalars tubeRadius = vtk.vtkDoubleArray() n = functionSource.GetOutput().GetNumberOfPoints() tubeRadius.SetNumberOfTuples(n) tubeRadius.SetName("TubeRadius") tMin = interpolatedRadius.GetMinimumT() tMax = interpolatedRadius.GetMaximumT() for i in range(n): t = (tMax - tMin) / (n - 1) * i + tMin r = list([1.0]) interpolatedRadius.InterpolateTuple(t, r) tubeRadius.SetTuple1(i, r[0]) # Add the scalars to the polydata tubePolyData = functionSource.GetOutput() tubePolyData.GetPointData().AddArray(tubeRadius) tubePolyData.GetPointData().SetActiveScalars("TubeRadius") # Create the tubes tuber = vtk.vtkTubeFilter() tuber.SetInputData(tubePolyData) tuber.SetNumberOfSides(20) tuber.SetVaryRadiusToVaryRadiusByAbsoluteScalar() # Setup actors and mappers lineMapper = vtk.vtkPolyDataMapper() lineMapper.SetInputData(tubePolyData) lineMapper.SetScalarRange(tubePolyData.GetScalarRange()) tubeMapper = vtk.vtkPolyDataMapper() tubeMapper.SetInputConnection(tuber.GetOutputPort()) tubeMapper.SetScalarRange(tubePolyData.GetScalarRange()) lineActor = vtk.vtkActor() lineActor.SetMapper(lineMapper) tubeActor = vtk.vtkActor() tubeActor.SetMapper(tubeMapper) ren.AddActor(tubeActor) ren.AddActor(lineActor) ren.SetBackground(.4,.5,.6) renWin.Render() iren.Start() Eric Sent from my iPhone > On Aug 7, 2017, at 11:22 PM, Justin Clark wrote: > > Also, > > "interpolatedRadius.AddTuple(0,0.2)" fails in python. The kernel completely crashes. I've tried tuple and list arguments as well. Nothing works. > > -----Original Message----- > From: Bill Lorensen [mailto:bill.lorensen at gmail.com] > Sent: Monday, August 7, 2017 12:05 PM > To: Justin Clark > Cc: VTK Users > Subject: Re: [vtkusers] Plot Tubular Paths from xyz > > Here is a C++ example: > https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/TubesFromSplines/ > > >> On Mon, Aug 7, 2017 at 1:03 PM, Justin Clark wrote: >> >> >> Hi all, >> >> Total vtk newbie here trying to figure out a solution in vtk python. I would like to plot multiple tubular paths defined by a set of (x, y, z) data. Multiple paths. I'm trying to plot wellbores. Once the wellbores are plotted I intend to use them as sources and sinks for simulation and streamline purposes. Any guidance would be helpful! >> >> Using existing examples I believe I need to insert my xyz's into a vtkPoints object. Then interpolate using a spline, and use the spline to define my tube path? >> >> Thanks! >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> 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 siva.yedithi at gmail.com Tue Aug 8 10:32:04 2017 From: siva.yedithi at gmail.com (Neel Patel 0-0-0) Date: Tue, 8 Aug 2017 07:32:04 -0700 (MST) Subject: [vtkusers] Clarification and help using vtkLookupTable In-Reply-To: References: <1502150683321-5744313.post@n5.nabble.com> Message-ID: <1502202724381-5744320.post@n5.nabble.com> Got it. I assumed that build created the table with all the set values. Thanks David! -- View this message in context: http://vtk.1045678.n5.nabble.com/Clarification-and-help-using-vtkLookupTable-tp5744313p5744320.html Sent from the VTK - Users mailing list archive at Nabble.com. From mihail.isakov at googlemail.com Tue Aug 8 11:00:52 2017 From: mihail.isakov at googlemail.com (Mihail Isakov) Date: Tue, 8 Aug 2017 17:00:52 +0200 Subject: [vtkusers] segfault during opening buggy OBJ file Message-ID: Hello, how i could avoid segmentation fault during processing of buggy OBJ file? VTK version is 7.1.1, unfortunately VTK 8.0.0 is currently not an option for me, i have to support older compilers, so i have not tested VTK 8.0.0. ------------------------------------------------------------------- #include #include #include #include int main(int argc, char * argv[]) { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(argv[1]); reader->Update(); vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputConnection(reader->GetOutputPort()); normals->Update(); return 0; } ------------------------------------------------------------------- r at deb:~/test0/build$ ./test0 ../vhmale_1024_skel_tri_1_gf_1.obj Segmentation fault Crash is here: VTK-7.1.1/Common/DataModel/vtkCellLinks.h 193 inline void vtkCellLinks::InsertCellReference(vtkIdType ptId, 194 unsigned short pos, 195 vtkIdType cellId) 196 { 197 this->Array[ptId].cells[pos] = cellId; <------------------ 198 } Min. project with OBJ file is here: https://drive.google.com/file/d/0ByBLJ2-U1t9xODZHeThSWnpkaEk/view?usp=sharing Important were just to avoid crash somehow... Thank you. Regards, Mihail From ken.martin at kitware.com Tue Aug 8 13:08:12 2017 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 8 Aug 2017 13:08:12 -0400 Subject: [vtkusers] Automatically change radius of sphere when a variable changes its value In-Reply-To: References: Message-ID: Sounds like it might be valuable to have someone should look at what you are trying to accomplish overall and suggest the best approaches etc. Kitware does offer support contracts to that end as part of their support offerings. Others of course may jump in as well. On Tue, Aug 8, 2017 at 3:40 AM, M. Jordan wrote: > Thank you! Now it works. > > My scene also includes a big polydata object which does not change by time. > > Nevertheless, if the object is visible, the time to re-render the scene > increases enormously. > So updating the spheres is not the time issue. > > Is it possible to only update the spheres and not the polydata object? > > ------------------------------ > *Von:* Ken Martin > *Gesendet:* Montag, 07. August 2017 15:16 > *An:* M. Jordan > *Cc:* vtkusers at vtk.org > *Betreff:* Re: [vtkusers] Automatically change radius of sphere when a > variable changes its value > > Position your spheres using the Actor's SetPosition, I am guessing you are > changing the spheres' centers in the SphereSource which is the issue. > > On Mon, Aug 7, 2017 at 8:30 AM, M. Jordan wrote: > >> Hello, >> >> i tried to use the ->SetScale() options but it turned out that this >> changes the position as well. >> My goal is to find the fastest way to change the radius of the spheres, >> without affecting their positions. >> Any idea how to solve this issue? >> >> Thank you very much! >> >> >> ------------------------------ >> *Von:* Ken Martin >> *Gesendet:* Freitag, 04. August 2017 16:28 >> *An:* M. Jordan >> *Cc:* vtkusers at vtk.org >> *Betreff:* Re: [vtkusers] Automatically change radius of sphere when a >> variable changes its value >> >> 1) actor->SetScale(...) instead of changing the sphere source >> >> or >> >> 2) use a Glyph3DMapper with a scale array to control the scale of each >> sphere >> >> or >> >> 3) vtkOpenGLSphereMapper with a scale array >> >> Which solution works best depends on the specifics of your use case, ala >> is only one sphere changing radius?, are they all?, are they all changing >> by the same amount? one actor? 100 actors? etc. >> >> >> >> >> >> >> On Fri, Aug 4, 2017 at 10:00 AM, M. Jordan wrote: >> >>> Hello, >>> >>> I have a scene with many spheres (about 100) in my QVTK-Widget. >>> Now I would like to achieve that the radii of the spheres change >>> automatically when a variable changes its value. >>> >>> Right now I add the spheres to the scene, start a timer and in the timer >>> callback I change the radius of the SphereSources depending on the >>> variable. Finally, I call qvtkwidget->update(); to update the spheres >>> in my scene. >>> >>> It works, but i would like to improve the speed. Any ideas how to update >>> spheres faster? Is there any possibility to only "re-render" one sphere and >>> not the whole scene? >>> >>> Thank you! >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Ken Martin PhD >> Distinguished Engineer >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mlr at gmx.de Tue Aug 8 14:50:34 2017 From: j.mlr at gmx.de (vtkBeginner) Date: Tue, 8 Aug 2017 11:50:34 -0700 (MST) Subject: [vtkusers] vtkContextView: No text renderer available In-Reply-To: References: <1501874956104-5744294.post@n5.nabble.com> Message-ID: <1502218234729-5744323.post@n5.nabble.com> Thanks Allie, Unfortunately I still do not understand the linking problem: my .pro file comprises LIBS += -L/usr/local/VTK/VTK-8.0.0/lib \ # folder to your VTK library -lvtkChartsCore-8.0 \ -lvtkCommonCore-8.0 \ -lvtkGUISupportQt-8.0 \ -lvtkCommonDataModel-8.0 \ -lvtkRenderingContext2D-8.0 \ -lvtkRenderingContextOpenGL-8.0 \ -lvtkRenderingOpenGL-8.0 \ -lvtkRenderingCore-8.0 \ -lvtkRenderingLabel-8.0 \ -lvtkViewsContext2D-8.0 \ -lvtkRenderingFreeType-8.0 What else do I have to do in order to link to vtkRenderingFreeType? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkContextView-No-text-renderer-available-tp5744294p5744323.html Sent from the VTK - Users mailing list archive at Nabble.com. From chenshaoqiang at buaa.edu.cn Tue Aug 8 19:47:39 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Wed, 9 Aug 2017 07:47:39 +0800 Subject: [vtkusers] How to change Character Set to Unicode? Message-ID: When I changed my vtk-vc project?s Character Set property from Multi-Byte to Unicode, the compiler reports some problems. I changed the code and makes the problems dispeared. But when I start runing the program , it breaks down. I have looked the VTK solution, all of its projects use Multi-Byte Character Set. The vc compiler always recommend to use Unicode Character Set, so I want to know how to deal with this situation. Whether I have to change the VTK solution to use Unicode Character Set first(But how to do it, there are so many projects in the solution),Or just change my own appliction? Thanks for any suggestion. Sincerely Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From yangmin_hust at 126.com Tue Aug 8 21:44:53 2017 From: yangmin_hust at 126.com (minyang) Date: Tue, 8 Aug 2017 18:44:53 -0700 (MST) Subject: [vtkusers] Endpoints not follow distance line when moving Message-ID: <1502243093715-5744325.post@n5.nabble.com> Hi VTK User, My VTK version is 7.1. I use /vtkDistanceWidget + vtkDistanceRepresentation2D + vtkPointHandleRepresentation2D/ to do measurement. *After adjust endpoints*, then move distance line by move mouse with holding left mouse button, the endpoints *not follow the line*, as below snapshot. When release the left mouse button, endpoints catch up with the line. Any one know how to make the endpoints follow with distance line when moving? Best Wishes, min -- View this message in context: http://vtk.1045678.n5.nabble.com/Endpoints-not-follow-distance-line-when-moving-tp5744325.html Sent from the VTK - Users mailing list archive at Nabble.com. From rccm.kyoshimi at gmail.com Wed Aug 9 02:04:34 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Wed, 9 Aug 2017 15:04:34 +0900 Subject: [vtkusers] segfault during opening buggy OBJ file In-Reply-To: References: Message-ID: Hi Mihail, I guess one way to avoid crashes with a segmentation fault is to use the vtkCleanPolyData. ----- #include #include #include #include #include int main(int argc, char * argv[]) { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(argv[1]); reader->Update(); vtkSmartPointer cleaner = vtkSmartPointer::New(); cleaner->SetInputConnection(reader->GetOutputPort()); cleaner->Update(); vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputConnection(cleaner->GetOutputPort()); normals->Update(); return 0; } ------ Thanks, yoshimi 2017-08-09 0:00 GMT+09:00 Mihail Isakov via vtkusers : > Hello, > how i could avoid segmentation fault during processing of buggy OBJ file? > VTK version is 7.1.1, unfortunately VTK 8.0.0 is currently not an option for me, > i have to support older compilers, so i have not tested VTK 8.0.0. > > ------------------------------------------------------------------- > #include > #include > #include > #include > > int main(int argc, char * argv[]) > { > vtkSmartPointer reader = vtkSmartPointer::New(); > reader->SetFileName(argv[1]); > reader->Update(); > vtkSmartPointer normals = > vtkSmartPointer::New(); > normals->SetInputConnection(reader->GetOutputPort()); > normals->Update(); > return 0; > } > ------------------------------------------------------------------- > > r at deb:~/test0/build$ ./test0 ../vhmale_1024_skel_tri_1_gf_1.obj > Segmentation fault > > Crash is here: VTK-7.1.1/Common/DataModel/vtkCellLinks.h > > 193 inline void vtkCellLinks::InsertCellReference(vtkIdType ptId, > 194 unsigned short pos, > 195 vtkIdType cellId) > 196 { > 197 this->Array[ptId].cells[pos] = cellId; <------------------ > 198 } > > Min. project with OBJ file is here: > > https://drive.google.com/file/d/0ByBLJ2-U1t9xODZHeThSWnpkaEk/view?usp=sharing > > > Important were just to avoid crash somehow... > Thank you. > > Regards, > Mihail > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 sunxiasx at foxmail.com Wed Aug 9 07:08:19 2017 From: sunxiasx at foxmail.com (Summer Sun) Date: Wed, 9 Aug 2017 04:08:19 -0700 (MST) Subject: [vtkusers] How to set vtkImageViewer2 not rotate when click and drag? Message-ID: <1502276899700-5744327.post@n5.nabble.com> I have a dicom image rendered in vtkImageViewer2. But each time I left click and drag the renderer, the slice rotates, I do not want this behavior, how may I avoid this? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-set-vtkImageViewer2-not-rotate-when-click-and-drag-tp5744327.html Sent from the VTK - Users mailing list archive at Nabble.com. From mihail.isakov at googlemail.com Wed Aug 9 09:14:52 2017 From: mihail.isakov at googlemail.com (Mihail Isakov) Date: Wed, 9 Aug 2017 15:14:52 +0200 Subject: [vtkusers] segfault during opening buggy OBJ file In-Reply-To: References: Message-ID: On Wed, Aug 9, 2017 at 8:04 AM, kenichiro yoshimi wrote: > I guess one way to avoid crashes with a segmentation fault is to use > the vtkCleanPolyData. Thank you very much. Regards, Mikhail From allison.vacanti at kitware.com Wed Aug 9 09:45:14 2017 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Wed, 9 Aug 2017 09:45:14 -0400 Subject: [vtkusers] vtkContextView: No text renderer available In-Reply-To: <1502218234729-5744323.post@n5.nabble.com> References: <1501874956104-5744294.post@n5.nabble.com> <1502218234729-5744323.post@n5.nabble.com> Message-ID: On Tue, Aug 8, 2017 at 2:50 PM, vtkBeginner wrote: > Thanks Allie, > Unfortunately I still do not understand the linking problem: my .pro file > comprises > LIBS += -L/usr/local/VTK/VTK-8.0.0/lib \ # folder to your VTK library > -lvtkChartsCore-8.0 \ > -lvtkCommonCore-8.0 \ > -lvtkGUISupportQt-8.0 \ > -lvtkCommonDataModel-8.0 \ > -lvtkRenderingContext2D-8.0 \ > -lvtkRenderingContextOpenGL-8.0 \ > -lvtkRenderingOpenGL-8.0 \ > -lvtkRenderingCore-8.0 \ > -lvtkRenderingLabel-8.0 \ > -lvtkViewsContext2D-8.0 \ > -lvtkRenderingFreeType-8.0 > > What else do I have to do in order to link to vtkRenderingFreeType? I'm not terribly familiar with using VTK outside of CMake, but I think what you have is correct for qmake. The issue is that vtkRenderingFreeType provides an object-factory override for the vtkTextRenderer class, but it's not getting registered with the object factory at runtime. I believe this is what the VTK_MODULE_INIT macros do (someone correct me if I'm wrong). I think adding a VTK_MODULE_INIT(...) for each of the linked VTK libraries should fix this. HTH, Allie From weiherer.maximilian at gmx.de Wed Aug 9 11:50:17 2017 From: weiherer.maximilian at gmx.de (Maximilian Weiherer) Date: Wed, 9 Aug 2017 17:50:17 +0200 Subject: [vtkusers] SafeDownCast does not work properly Message-ID: <001801d31127$33395b30$99ac1190$@gmx.de> Hi all, I defined my own mesh class (named Mesh) by inheriting from vtkPolyData. Now I am struggling with the SafeDownCast method in order to cast a vtkPolyData object into a Mesh object. Whenever I am applying a SafeDownCast to a vtkPolyData object, NULL is returned. The Mesh class looks as follows: class Mesh : public vtkPolyData { public: static Mesh* New(); vtkTypeMacro(Mesh, vtkPolyData); void PrintSelf(ostream& os, vtkIndent indent); protected: Mesh(); ~Mesh(); private: Mesh(const Mesh&); // Not implemented. void operator=(const Mesh&); // Not implemented. }; .and this is the cast that does not work properly: Mesh* mesh = Mesh::SafeDownCast(); // mesh always equals NULL Any help would be appreciated. Thanks! Best regards Maximilian --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Wed Aug 9 11:53:26 2017 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 9 Aug 2017 11:53:26 -0400 Subject: [vtkusers] SafeDownCast does not work properly In-Reply-To: <001801d31127$33395b30$99ac1190$@gmx.de> References: <001801d31127$33395b30$99ac1190$@gmx.de> Message-ID: Maximilian, I am confused why any arbitrary vtkPolyData object would be castable to "Mesh". It will only return non-null, if it's is indeed created as a Mesh. Is it? Where's the "" coming from? Utkarsh On Wed, Aug 9, 2017 at 11:50 AM, Maximilian Weiherer < weiherer.maximilian at gmx.de> wrote: > Hi all, > > > > I defined my own mesh class (named *Mesh*) by inheriting from > vtkPolyData. Now I am struggling with the SafeDownCast method in order to > cast a vtkPolyData object into a *Mesh* object. Whenever I am applying a > SafeDownCast to a vtkPolyData object, NULL is returned. > > > > The *Mesh* class looks as follows: > > > > class Mesh : public vtkPolyData > > { > > public: > > static Mesh* New(); > > vtkTypeMacro(Mesh, vtkPolyData); > > void PrintSelf(ostream& os, vtkIndent indent); > > > > protected: > > Mesh(); > > ~Mesh(); > > private: > > Mesh(const Mesh&); // Not implemented. > > void operator=(const Mesh&); // Not implemented. > > }; > > > > ?and this is the cast that does not work properly: > > > > Mesh* mesh = Mesh::SafeDownCast(); // mesh always > equals NULL > > > > Any help would be appreciated. Thanks! > > > > Best regards > > Maximilian > > > Virenfrei. > www.avast.com > > <#m_3987841914009693506_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 rustem.khabetdinov at gmail.com Wed Aug 9 12:00:26 2017 From: rustem.khabetdinov at gmail.com (Rustem Khabetdinov) Date: Wed, 9 Aug 2017 19:00:26 +0300 Subject: [vtkusers] Ellipsoids intersection Message-ID: Hello, We have n(10,100,1000) ellipsoids in space and we should be able to know which of them intersect so that we could group them into one object. Is there any algorithm that can help me with this problem? I tried to write my own algorithm but it works really slow on 1000 ellipsoids. -------------- next part -------------- An HTML attachment was scrubbed... URL: From amit112amit at yahoo.co.in Wed Aug 9 14:18:31 2017 From: amit112amit at yahoo.co.in (Amit) Date: Wed, 9 Aug 2017 11:18:31 -0700 Subject: [vtkusers] Convex hull of spherical point cloud has holes Message-ID: <74af6337-1906-3c2e-9dba-f23a787bdede@yahoo.co.in> Dear all. I have a point cloud made up of points lying on surface of a unit sphere stored in a vtkPolyData. I want to get the convex hull of this point cloud using the vtkDelaunay3D filter. Then using vtkDataSetSurfaceFilter I want to extract the surface of the convex hull. This way, I can get a triangulation of the point cloud as a hollow spherical shell. Kindly open the attached UnstructuredGrid file in Paraview. It represents the output of vtkDelaunay3D filter made up of tetrahedrons. But the surface of the convex-hull has some missing triangles. Using the SpreadSheet View, I can see that cells with Ids 60, 61, 64 have triangular faces in the missing region. Hence, I would not have expected these "hole" in the surface. Can somebody explain why the triangles are not being rendered? When I extract surface from this unstructured grid I get a spherical shell with missing triangles as holes. Regards, Amit -------------- next part -------------- # vtk DataFile Version 4.1 vtk output ASCII DATASET UNSTRUCTURED_GRID POINTS 72 float 0.970744 0.153449 -0.184687 0.763096 0.298245 -0.573353 0.78863 0.579535 -0.205429 0.492756 0.674421 -0.549861 0.395823 0.337832 -0.853928 0.0749938 0.656482 -0.750605 -0.217123 0.972747 -0.0813657 0.139611 0.917425 -0.372613 -0.290352 0.810005 -0.509498 0.290441 0.809973 0.509498 0.21723 0.972723 0.0813657 -0.13951 0.91744 0.372613 0.63989 0.511667 0.573357 0.89625 0.393107 0.205433 0.618346 0.763896 0.184691 -0.618262 0.763964 -0.184691 -0.639834 0.511737 -0.573357 -0.896207 0.393206 -0.205433 -0.0749218 0.65649 0.750605 -0.492682 0.674475 0.549861 -0.395786 0.337876 0.853928 -0.788567 0.579622 0.205429 -0.970727 0.153556 0.184687 -0.763064 0.298329 0.573353 0.0487208 0.263327 0.963476 -0.252412 -0.0894677 0.963475 0.203683 -0.173859 0.963476 0.490499 0.173821 0.853931 0.605995 -0.263363 0.750607 0.830452 0.089436 0.549865 -0.337774 -0.763911 0.549862 -0.0947193 -0.511697 0.853929 -0.531079 -0.393127 0.750603 0.123169 -0.809995 0.573356 -0.107685 -0.972729 0.20543 0.35238 -0.917452 0.18469 0.556235 -0.656517 0.509499 0.733788 -0.674489 0.0813671 0.86428 -0.337901 0.372615 -0.846679 -0.153456 0.509495 -0.951019 -0.298235 0.0813625 -0.724773 -0.579539 0.372611 -0.123258 -0.809982 -0.573356 0.107578 -0.972741 -0.20543 -0.35248 -0.917413 -0.18469 -0.556307 -0.656456 -0.509499 -0.733862 -0.674408 -0.0813671 -0.864317 -0.337807 -0.372615 0.0946632 -0.511707 -0.853929 0.531036 -0.393186 -0.750603 0.33769 -0.763949 -0.549862 0.950986 -0.298339 -0.0813625 0.724709 -0.579618 -0.372611 0.846663 -0.153549 -0.509495 -0.203702 -0.173837 -0.963476 -0.0486919 0.263332 -0.963476 0.252402 -0.0894953 -0.963475 -0.606024 -0.263296 -0.750607 -0.830442 0.0895271 -0.549865 -0.490479 0.173875 -0.853931 -0.3035 0.525748 -0.794655 -0.303558 -0.525714 -0.794655 -0.982246 5.38771e-05 -0.187595 0.607064 -3.32895e-05 -0.794653 0.982246 -5.38765e-05 0.187595 0.491077 -0.850678 -0.187591 -0.491171 -0.850624 0.187591 -0.607064 3.32923e-05 0.794653 0.3035 -0.525748 0.794655 0.303558 0.525714 0.794655 -0.491077 0.850678 0.187591 0.491171 0.850624 -0.187591 CELLS 179 895 4 46 47 40 66 4 1 51 2 71 4 11 10 9 18 4 12 10 9 14 4 2 3 1 71 4 3 4 1 5 4 30 31 25 32 4 31 33 30 68 4 23 21 19 70 4 10 12 9 18 4 29 18 12 71 4 8 15 5 71 4 10 14 12 71 4 3 5 1 71 4 36 38 18 68 4 58 54 57 59 4 8 5 7 71 4 23 22 21 70 4 18 12 9 69 4 51 49 1 53 4 13 14 2 71 4 3 7 5 71 4 6 8 7 71 4 2 51 13 71 4 15 21 17 22 4 47 46 42 66 4 20 19 18 23 4 12 14 13 71 4 18 27 26 29 4 40 58 22 71 4 56 5 55 60 4 22 51 40 71 4 11 6 10 70 4 10 18 11 70 4 6 15 10 70 4 18 19 11 70 4 42 57 47 58 4 70 23 22 71 4 42 49 1 51 4 30 40 36 51 4 12 18 10 71 4 21 22 15 70 4 10 70 15 71 4 37 42 36 51 4 27 28 26 29 4 5 42 1 71 4 39 23 32 40 4 24 25 18 26 4 50 49 42 51 4 20 23 18 25 4 18 24 20 25 4 51 29 38 64 4 30 36 23 68 4 39 40 32 41 4 24 26 18 27 4 13 27 12 29 4 27 28 12 29 4 12 28 13 29 4 12 27 13 28 4 35 34 33 36 4 12 27 18 29 4 28 27 13 29 4 13 51 29 71 4 25 30 23 68 4 29 12 13 71 4 6 15 8 71 4 38 18 29 71 4 38 28 29 68 4 58 16 15 60 4 29 28 26 68 4 36 30 33 68 4 30 25 23 32 4 32 25 23 67 4 23 39 22 40 4 25 31 30 68 4 38 36 28 68 4 40 30 32 41 4 37 50 42 51 4 13 2 0 51 4 22 17 15 58 4 46 44 42 66 4 7 10 6 71 4 26 31 25 68 4 32 23 30 40 4 38 37 36 51 4 22 58 15 71 4 34 30 33 66 4 18 36 23 38 4 51 40 42 66 4 23 25 20 67 4 0 2 1 51 4 15 6 10 71 4 36 30 23 40 4 15 58 5 71 4 58 42 5 71 4 51 50 49 52 4 45 46 42 47 4 42 58 40 71 4 40 47 42 66 4 33 42 34 66 4 33 36 34 42 4 40 51 42 71 4 58 15 5 60 4 36 35 34 43 4 37 35 36 43 4 34 42 36 43 4 36 42 37 43 4 54 48 42 61 4 15 17 16 58 4 45 44 42 46 4 41 46 40 66 4 40 51 30 66 4 30 41 40 66 4 47 40 42 58 4 59 58 54 60 4 42 49 48 56 4 43 42 37 50 4 48 49 42 50 4 5 4 1 49 4 1 42 5 49 4 50 51 37 52 4 18 38 23 51 4 23 38 36 51 4 36 40 23 51 4 23 40 22 51 4 42 51 1 71 4 29 51 38 71 4 0 51 1 53 4 43 37 35 65 4 52 49 51 53 4 48 54 42 56 4 55 59 54 60 4 4 49 5 56 4 5 55 4 56 4 54 56 55 60 4 5 49 42 56 4 5 15 8 60 4 45 47 42 57 4 54 57 42 58 4 18 51 23 71 4 51 22 23 71 4 51 18 38 71 4 15 16 8 60 4 59 16 58 60 4 5 56 42 60 4 56 54 42 60 4 54 58 42 60 4 42 58 5 60 4 45 57 42 61 4 57 54 42 61 4 58 47 40 62 4 17 58 22 62 4 58 40 22 62 4 1 53 49 63 4 49 4 1 63 4 56 4 49 63 4 29 51 13 64 4 13 51 0 64 4 50 37 43 65 4 52 37 50 65 4 42 43 34 66 4 43 44 34 66 4 44 43 42 66 4 30 51 36 66 4 51 42 36 66 4 30 36 33 66 4 36 42 33 66 4 23 39 32 67 4 23 36 18 68 4 29 26 18 68 4 18 38 29 68 4 18 25 23 68 4 26 25 18 68 4 24 27 18 69 4 18 27 12 69 4 23 19 18 70 4 15 70 22 71 4 23 70 18 71 4 18 70 10 71 CELL_TYPES 179 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 POINT_DATA 72 SCALARS PointIds vtkIdType LOOKUP_TABLE default 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 From DLRdave at aol.com Wed Aug 9 14:30:54 2017 From: DLRdave at aol.com (David Cole) Date: Wed, 9 Aug 2017 14:30:54 -0400 Subject: [vtkusers] Convex hull of spherical point cloud has holes In-Reply-To: <74af6337-1906-3c2e-9dba-f23a787bdede@yahoo.co.in> References: <74af6337-1906-3c2e-9dba-f23a787bdede@yahoo.co.in> Message-ID: Are you using vtkCleanPolyData on your input data as shown in this example? http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Modelling/Cxx/Delaunay3D.cxx Have you read carefully the docs starting here? http://www.vtk.org/doc/nightly/html/classvtkDelaunay3D.html#details If so, ... then hopefully somebody else chimes in, able to address your specific question about the cells. Are those cells maybe specified in an opposite direction to the rest of the cells that do render properly? HTH, David C. On Wed, Aug 9, 2017 at 2:18 PM, Amit via vtkusers wrote: > Dear all. > I have a point cloud made up of points lying on surface of a unit sphere > stored in a vtkPolyData. I want to get the convex hull of this point cloud > using the vtkDelaunay3D filter. Then using vtkDataSetSurfaceFilter I want to > extract the surface of the convex hull. This way, I can get a triangulation > of the point cloud as a hollow spherical shell. Kindly open the attached > UnstructuredGrid file in Paraview. It represents the output of vtkDelaunay3D > filter made up of tetrahedrons. But the surface of the convex-hull has some > missing triangles. Using the SpreadSheet View, I can see that cells with Ids > 60, 61, 64 have triangular faces in the missing region. Hence, I would not > have expected these "hole" in the surface. Can somebody explain why the > triangles are not being rendered? When I extract surface from this > unstructured grid I get a spherical shell with missing triangles as holes. > Regards, > Amit > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 jonathan.borduas at caboma.com Wed Aug 9 15:06:39 2017 From: jonathan.borduas at caboma.com (Jonathan Borduas) Date: Wed, 9 Aug 2017 19:06:39 +0000 Subject: [vtkusers] New bug : Issue #17101 - vtkConnectivityFilter - SetExtractionModeToSpecifiedRegions keep points from other regions. Message-ID: Hi everyone, I added a new bug on the gitlab repo: Issue #17101 The GetNumberOfPoints is the same as before the extraction (bad), while the GetNumberOfCells has only the cell count of the specified regions (good). Example code: vtkSmartPointer connectivity = vtkSmartPointer::New(); connectivity->SetInputData(inputpolydata->GetOutput()); connectivity->SetExtractionModeToAllRegions(); connectivity->Update(); for (int i = 0; i < connectivity->GetNumberOfExtractedRegions(); ++i) { ??connectivity->SetExtractionModeToSpecifiedRegions(); ??connectivity->InitializeSpecifiedRegionList(); ??connectivity->AddSpecifiedRegion(i); ??connectivity->Modified(); ??connectivity->Update(); ??vtkSmartPointer extractedRegion = vtkSmartPointer::New(); ??extractedRegion->DeepCopy(connectivity->GetOutput()); ??cout << "points extracted region: " << extractedRegion->GetNumberOfPoints() << endl; ??cout << "cells extracted region: " << extractedRegion->GetNumberOfCells() << endl; -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Aug 9 16:56:26 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 9 Aug 2017 16:56:26 -0400 Subject: [vtkusers] Convex hull of spherical point cloud has holes In-Reply-To: <74af6337-1906-3c2e-9dba-f23a787bdede@yahoo.co.in> References: <74af6337-1906-3c2e-9dba-f23a787bdede@yahoo.co.in> Message-ID: I assume Alpha=0.0 for the Delaunay filter? Can you post a small, standalone compilable program that produces this output? Bill On Wed, Aug 9, 2017 at 2:18 PM, Amit via vtkusers wrote: > Dear all. > I have a point cloud made up of points lying on surface of a unit sphere > stored in a vtkPolyData. I want to get the convex hull of this point cloud > using the vtkDelaunay3D filter. Then using vtkDataSetSurfaceFilter I want to > extract the surface of the convex hull. This way, I can get a triangulation > of the point cloud as a hollow spherical shell. Kindly open the attached > UnstructuredGrid file in Paraview. It represents the output of vtkDelaunay3D > filter made up of tetrahedrons. But the surface of the convex-hull has some > missing triangles. Using the SpreadSheet View, I can see that cells with Ids > 60, 61, 64 have triangular faces in the missing region. Hence, I would not > have expected these "hole" in the surface. Can somebody explain why the > triangles are not being rendered? When I extract surface from this > unstructured grid I get a spherical shell with missing triangles as holes. > Regards, > Amit > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 utkarsh.ayachit at kitware.com Wed Aug 9 17:17:03 2017 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 9 Aug 2017 17:17:03 -0400 Subject: [vtkusers] SafeDownCast does not work properly In-Reply-To: <006c01d3114d$679490e0$36bdb2a0$@gmx.de> References: <001801d31127$33395b30$99ac1190$@gmx.de> <003c01d3113b$074918d0$15db4a70$@gmx.de> <006c01d3114d$679490e0$36bdb2a0$@gmx.de> Message-ID: Maximillian, > *a downcast is required in order to convert a vtkPolyData object into a * *Mesh object* Not true. A downcast is required to convert a *pointer* of type vtkPolyData to *pointer* of type Mesh, but it need not succeed i.e. return non-null. The cast will only succeed if the the object pointed to via the vtkPolyData pointer is indeed of type Mesh. vtkSTLReader will never create Mesh, it will only create vtkPolyData. As a result you cannot "downcast" it to Mesh with success. > *why do dynamic_cast work just fine whereas SafeDownCast don?t* Hopefully the attached C++ code helps. Utkarsh On Wed, Aug 9, 2017 at 4:23 PM, Maximilian Weiherer < weiherer.maximilian at gmx.de> wrote: > Hi Utkarsh, > > as *Mesh* *is a* vtkPolyData, a downcast is required in order to convert > a vtkPolyData object into a *Mesh* object. I still don?t know why > SafeDownCast do not work properly. As far as I know, the parent class > (vtkPolyData) must be downcasted to *Mesh*? . If a dynamic_cast is > essentially the same as SafeDownCast, why do dynamic_cast work just fine > whereas SafeDownCast don?t? > > Best regards > Maximilian > > *Von:* Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com] > *Gesendet:* Mittwoch, 9. August 2017 20:33 > *An:* Maximilian Weiherer ; ParaView < > paraview at paraview.org> > > *Betreff:* Re: [vtkusers] SafeDownCast does not work properly > > > > Maximilian, > > > > That's not a reasonable expectation. Mesh **isa** vtkPolyData, and not > vice-versa. Look at docs for dynamic_cast in C++. In spirit, SafeDownCast > is essentially the same thing. > > > > Utkarsh > > > > On Wed, Aug 9, 2017 at 2:12 PM, Maximilian Weiherer < > weiherer.maximilian at gmx.de> wrote: > > Hi Utkarsh, > > > > thanks for your reply. I created the custom mesh class in order to add > some new functionality (e.g. a method to check whether a mesh intersects > another mesh). The vtkPolyData object which should be casted is the output > of a vtkSTLReader, i.e. > > Mesh* mesh = Mesh::SafeDownCast(reader->GetOutput()); // mesh always > equals NULL > > Best regards > > Maximilian > > > > *Von:* Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com] > *Gesendet:* Mittwoch, 9. August 2017 17:53 > *An:* Maximilian Weiherer > *Cc:* vtk > *Betreff:* Re: [vtkusers] SafeDownCast does not work properly > > > > Maximilian, > > > > I am confused why any arbitrary vtkPolyData object would be castable to > "Mesh". It will only return non-null, if it's is indeed created as a Mesh. > Is it? Where's the "" coming from? > > > > Utkarsh > > > > On Wed, Aug 9, 2017 at 11:50 AM, Maximilian Weiherer < > weiherer.maximilian at gmx.de> wrote: > > Hi all, > > > > I defined my own mesh class (named *Mesh*) by inheriting from > vtkPolyData. Now I am struggling with the SafeDownCast method in order to > cast a vtkPolyData object into a *Mesh* object. Whenever I am applying a > SafeDownCast to a vtkPolyData object, NULL is returned. > > > > The *Mesh* class looks as follows: > > > > class Mesh : public vtkPolyData > > { > > public: > > static Mesh* New(); > > vtkTypeMacro(Mesh, vtkPolyData); > > void PrintSelf(ostream& os, vtkIndent indent); > > > > protected: > > Mesh(); > > ~Mesh(); > > private: > > Mesh(const Mesh&); // Not implemented. > > void operator=(const Mesh&); // Not implemented. > > }; > > > > ?and this is the cast that does not work properly: > > > > Mesh* mesh = Mesh::SafeDownCast(); // mesh always > equals NULL > > > > Any help would be appreciated. Thanks! > > > > Best regards > > Maximilian > > > > [image: Das Bild wurde vom Absender entfernt.] > > > Virenfrei. www.avast.com > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: code.cpp Type: text/x-c++src Size: 539 bytes Desc: not available URL: From bill.lorensen at gmail.com Wed Aug 9 19:03:34 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 9 Aug 2017 19:03:34 -0400 Subject: [vtkusers] Convex hull of spherical point cloud has holes In-Reply-To: References: <74af6337-1906-3c2e-9dba-f23a787bdede@yahoo.co.in> Message-ID: If you save your polydata in a .vtp file you can try this example: https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/Delaunay3D/ It reports the # of verts, lines, triangles and tets. On Wed, Aug 9, 2017 at 4:56 PM, Bill Lorensen wrote: > I assume Alpha=0.0 for the Delaunay filter? > > Can you post a small, standalone compilable program that produces this output? > > Bill > > > On Wed, Aug 9, 2017 at 2:18 PM, Amit via vtkusers wrote: >> Dear all. >> I have a point cloud made up of points lying on surface of a unit sphere >> stored in a vtkPolyData. I want to get the convex hull of this point cloud >> using the vtkDelaunay3D filter. Then using vtkDataSetSurfaceFilter I want to >> extract the surface of the convex hull. This way, I can get a triangulation >> of the point cloud as a hollow spherical shell. Kindly open the attached >> UnstructuredGrid file in Paraview. It represents the output of vtkDelaunay3D >> filter made up of tetrahedrons. But the surface of the convex-hull has some >> missing triangles. Using the SpreadSheet View, I can see that cells with Ids >> 60, 61, 64 have triangular faces in the missing region. Hence, I would not >> have expected these "hole" in the surface. Can somebody explain why the >> triangles are not being rendered? When I extract surface from this >> unstructured grid I get a spherical shell with missing triangles as holes. >> Regards, >> Amit >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 rccm.kyoshimi at gmail.com Wed Aug 9 21:01:23 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Thu, 10 Aug 2017 10:01:23 +0900 Subject: [vtkusers] How to change Character Set to Unicode? In-Reply-To: References: Message-ID: Hi Chen, To build the VTK library in unicode mode using CMake you may append the c++ compiler flags with something like: SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /UMBCS /D_UNICODE /DUNICODE") (Of course, you can edit using the CMake GUI.) Regards, yoshimi 2017-08-09 8:47 GMT+09:00 chensq : > When I changed my vtk-vc project?s Character Set property from Multi-Byte to > Unicode, the compiler reports some problems. > I changed the code and makes the problems dispeared. > But when I start runing the program , it breaks down. > I have looked the VTK solution, all of its projects use Multi-Byte Character > Set. > The vc compiler always recommend to use Unicode Character Set, so I want to > know how to deal with this situation. > Whether I have to change the VTK solution to use Unicode Character Set > first(But how to do it, there are so many projects in the solution),Or just > change my own appliction? > Thanks for any suggestion. > Sincerely Chen > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From amit112amit at yahoo.co.in Wed Aug 9 23:34:19 2017 From: amit112amit at yahoo.co.in (Amit) Date: Wed, 9 Aug 2017 20:34:19 -0700 Subject: [vtkusers] Convex hull of spherical point cloud has holes In-Reply-To: References: <74af6337-1906-3c2e-9dba-f23a787bdede@yahoo.co.in> Message-ID: Thank you Bill and David for your replies. David: I did not use vtkCleanPolyData. I had read the doc multiple times but I did not have the patience to understand the significance of alpha. Bill: You are right. I was using the default value of alpha=0.0. Just out of trial and error I set alpha=1.0 and the issue got resolved. I think that as I am working with unit spheres, alpha_radius=1.0 is sufficiently large value so that all faces of all tetrahedron get included in the output convex hull. Thanks once again for the pointers. Regards, Amit On 08/09/2017 04:03 PM, Bill Lorensen wrote: > If you save your polydata in a .vtp file you can try this example: > https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/Delaunay3D/ > > It reports the # of verts, lines, triangles and tets. > > > On Wed, Aug 9, 2017 at 4:56 PM, Bill Lorensen wrote: >> I assume Alpha=0.0 for the Delaunay filter? >> >> Can you post a small, standalone compilable program that produces this output? >> >> Bill >> >> >> On Wed, Aug 9, 2017 at 2:18 PM, Amit via vtkusers wrote: >>> Dear all. >>> I have a point cloud made up of points lying on surface of a unit sphere >>> stored in a vtkPolyData. I want to get the convex hull of this point cloud >>> using the vtkDelaunay3D filter. Then using vtkDataSetSurfaceFilter I want to >>> extract the surface of the convex hull. This way, I can get a triangulation >>> of the point cloud as a hollow spherical shell. Kindly open the attached >>> UnstructuredGrid file in Paraview. It represents the output of vtkDelaunay3D >>> filter made up of tetrahedrons. But the surface of the convex-hull has some >>> missing triangles. Using the SpreadSheet View, I can see that cells with Ids >>> 60, 61, 64 have triangular faces in the missing region. Hence, I would not >>> have expected these "hole" in the surface. Can somebody explain why the >>> triangles are not being rendered? When I extract surface from this >>> unstructured grid I get a spherical shell with missing triangles as holes. >>> Regards, >>> Amit >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 allison.vacanti at kitware.com Thu Aug 10 09:09:19 2017 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Thu, 10 Aug 2017 09:09:19 -0400 Subject: [vtkusers] SafeDownCast does not work properly In-Reply-To: References: <001801d31127$33395b30$99ac1190$@gmx.de> <003c01d3113b$074918d0$15db4a70$@gmx.de> <006c01d3114d$679490e0$36bdb2a0$@gmx.de> Message-ID: Put another way, for SafeDownCast/dynamic_cast to work in this case, the object being pointed to must be allocated and constructed as a Mesh (or a subclass of Mesh). The object in question is being allocated as a vtkPolyData by the file reader. Base classes cannot be converted to derived classes by casting -- when an object is allocated as a vtkPolyData, it will always be a vtkPolyData only, and never a Mesh. This is why the casts are returning NULL -- SafeDownCast checks the object's class name (which is vtkPolyData) and knows that it's not a Mesh, and thus returns NULL. dynamic_cast does the same thing by querying RTTI. In both cases, the PolyData object is not a Mesh as it lacks the additional fields and members that a Mesh would be expected to have, and cannot be safely treated as a Mesh. What you probably want to do here instead of casting is construct a Mesh object from the PolyData object. Look at the ShallowCopy and CopyStructure methods of most VTK datasets to see how you can copy the bulk of the PolyData internals into your new Mesh without actually making new copies of the data in memory. Also, please be sure to "reply to all" when responding to mailing lists -- otherwise the conversation will not be archived or visible to the rest of the list's members. HTH Allie On Wed, Aug 9, 2017 at 5:17 PM, Utkarsh Ayachit wrote: > Maximillian, > > > *a downcast is required in order to convert a vtkPolyData object into > a **Mesh object* > > Not true. A downcast is required to convert a *pointer* of type > vtkPolyData to *pointer* of type Mesh, but it need not succeed i.e. > return non-null. The cast will only succeed if the the object pointed to > via the vtkPolyData pointer is indeed of type Mesh. vtkSTLReader will never > create Mesh, it will only create vtkPolyData. As a result you cannot > "downcast" it to Mesh with success. > > > *why do dynamic_cast work just fine whereas SafeDownCast don?t* > > Hopefully the attached C++ code helps. > > Utkarsh > > > On Wed, Aug 9, 2017 at 4:23 PM, Maximilian Weiherer < > weiherer.maximilian at gmx.de> wrote: > >> Hi Utkarsh, >> >> as *Mesh* *is a* vtkPolyData, a downcast is required in order to convert >> a vtkPolyData object into a *Mesh* object. I still don?t know why >> SafeDownCast do not work properly. As far as I know, the parent class >> (vtkPolyData) must be downcasted to *Mesh*? . If a dynamic_cast is >> essentially the same as SafeDownCast, why do dynamic_cast work just fine >> whereas SafeDownCast don?t? >> >> Best regards >> Maximilian >> >> *Von:* Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com] >> *Gesendet:* Mittwoch, 9. August 2017 20:33 >> *An:* Maximilian Weiherer ; ParaView < >> paraview at paraview.org> >> >> *Betreff:* Re: [vtkusers] SafeDownCast does not work properly >> >> >> >> Maximilian, >> >> >> >> That's not a reasonable expectation. Mesh **isa** vtkPolyData, and not >> vice-versa. Look at docs for dynamic_cast in C++. In spirit, SafeDownCast >> is essentially the same thing. >> >> >> >> Utkarsh >> >> >> >> On Wed, Aug 9, 2017 at 2:12 PM, Maximilian Weiherer < >> weiherer.maximilian at gmx.de> wrote: >> >> Hi Utkarsh, >> >> >> >> thanks for your reply. I created the custom mesh class in order to add >> some new functionality (e.g. a method to check whether a mesh intersects >> another mesh). The vtkPolyData object which should be casted is the output >> of a vtkSTLReader, i.e. >> >> Mesh* mesh = Mesh::SafeDownCast(reader->GetOutput()); // mesh always >> equals NULL >> >> Best regards >> >> Maximilian >> >> >> >> *Von:* Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com] >> *Gesendet:* Mittwoch, 9. August 2017 17:53 >> *An:* Maximilian Weiherer >> *Cc:* vtk >> *Betreff:* Re: [vtkusers] SafeDownCast does not work properly >> >> >> >> Maximilian, >> >> >> >> I am confused why any arbitrary vtkPolyData object would be castable to >> "Mesh". It will only return non-null, if it's is indeed created as a Mesh. >> Is it? Where's the "" coming from? >> >> >> >> Utkarsh >> >> >> >> On Wed, Aug 9, 2017 at 11:50 AM, Maximilian Weiherer < >> weiherer.maximilian at gmx.de> wrote: >> >> Hi all, >> >> >> >> I defined my own mesh class (named *Mesh*) by inheriting from >> vtkPolyData. Now I am struggling with the SafeDownCast method in order to >> cast a vtkPolyData object into a *Mesh* object. Whenever I am applying a >> SafeDownCast to a vtkPolyData object, NULL is returned. >> >> >> >> The *Mesh* class looks as follows: >> >> >> >> class Mesh : public vtkPolyData >> >> { >> >> public: >> >> static Mesh* New(); >> >> vtkTypeMacro(Mesh, vtkPolyData); >> >> void PrintSelf(ostream& os, vtkIndent indent); >> >> >> >> protected: >> >> Mesh(); >> >> ~Mesh(); >> >> private: >> >> Mesh(const Mesh&); // Not implemented. >> >> void operator=(const Mesh&); // Not implemented. >> >> }; >> >> >> >> ?and this is the cast that does not work properly: >> >> >> >> Mesh* mesh = Mesh::SafeDownCast(); // mesh always >> equals NULL >> >> >> >> Any help would be appreciated. Thanks! >> >> >> >> Best regards >> >> Maximilian >> >> >> >> [image: Das Bild wurde vom Absender entfernt.] >> >> >> Virenfrei. www.avast.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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 350 bytes Desc: not available URL: From mjordan at live.at Thu Aug 10 10:47:56 2017 From: mjordan at live.at (M. Jordan) Date: Thu, 10 Aug 2017 14:47:56 +0000 Subject: [vtkusers] Subclass vtkSphereSource to set the radius by a pointer Message-ID: Hello, instead of using the "->setRadius(double)" option, i would like to subClass the vtkSphereSource in such a way that it is possible to pass a pointer (double*) to it. The goal is to simply assign a pointer once and the sphere should automatically change its radius when the double value, which the pointer is pointing to, changes. I just want to call the "->update()" option of the Qt widget but avoid changing the radius manually. Is this possible? Any ideas how to subclass the vtkSource? Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Aug 10 11:31:57 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 10 Aug 2017 11:31:57 -0400 Subject: [vtkusers] Ellipsoids intersection In-Reply-To: References: Message-ID: This example might be helpful: https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractClusters/ On Wed, Aug 9, 2017 at 12:00 PM, Rustem Khabetdinov wrote: > Hello, > We have n(10,100,1000) ellipsoids in space and we should be able to know > which of them intersect so that we could group them into one object. > Is there any algorithm that can help me with this problem? > > I tried to write my own algorithm but it works really slow on 1000 > ellipsoids. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 madsmh at gmail.com Thu Aug 10 14:59:01 2017 From: madsmh at gmail.com (Mads M. Hansen) Date: Thu, 10 Aug 2017 20:59:01 +0200 Subject: [vtkusers] Placement of actors in world coordinate system wierdness Message-ID: Hello, I am attempting to placed number of actors (spheres) at various positions throughout the scene with the following routine for (int i = 0; i < radii.size(); ++i) { vtkSmartPointer sphereSource = vtkSmartPointer::New(); sphereSource->SetRadius(radii[i]); sphereSource->SetPhiResolution(100); sphereSource->SetThetaResolution(100); sphereSource->Update(); vtkSmartPointer sphereMapper = vtkSmartPointer::New(); sphereMapper->SetInputConnection(sphereSource->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetPosition(start_pos[i].x(), start_pos[i].y(), start_pos[i].z()); actor->SetMapper(sphereMapper); actor->GetProperty()->SetInterpolationToFlat(); actor->GetProperty()->SetFrontfaceCulling(true); actors.push_back(actor); } //Set up renderer vtkSmartPointer renderer = vtkSmartPointer::New(); // Create new camera vtkSmartPointer camera = vtkSmartPointer::New(); renderer->SetActiveCamera(camera); for (int j = 0; j < radii.size(); ++j) { renderer->AddActor(actors[j]); } //Set up renderer vtkSmartPointer renderer = vtkSmartPointer::New(); // Create new camera vtkSmartPointer camera = vtkSmartPointer::New(); renderer->SetActiveCamera(camera); for (int j = 0; j < radii.size(); ++j) { renderer->AddActor(actors[j]); } ... this->ui->widget->GetRenderWindow()->AddRenderer(renderer); } But when rendered I get all spheres superimposed on top of each other and when the camera movies they appear to turn about their individual origins - which is not the desired outcome, rather that they should be placed at their respective coordinates in 3D space. Any help with this would be greatly appreciated .. Mads -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Aug 10 15:11:04 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 10 Aug 2017 15:11:04 -0400 Subject: [vtkusers] Placement of actors in world coordinate system wierdness In-Reply-To: References: Message-ID: Looks OK to me. Have your printed the startpos elements? On Thu, Aug 10, 2017 at 2:59 PM, Mads M. Hansen wrote: > Hello, I am attempting to placed number of actors (spheres) at various > positions throughout the scene with the following routine > > for (int i = 0; i < radii.size(); ++i) { > vtkSmartPointer sphereSource = > vtkSmartPointer::New(); > sphereSource->SetRadius(radii[i]); > sphereSource->SetPhiResolution(100); > sphereSource->SetThetaResolution(100); > sphereSource->Update(); > > vtkSmartPointer sphereMapper = > vtkSmartPointer::New(); > sphereMapper->SetInputConnection(sphereSource->GetOutputPort()); > > vtkSmartPointer actor = vtkSmartPointer::New(); > actor->SetPosition(start_pos[i].x(), start_pos[i].y(), > start_pos[i].z()); > actor->SetMapper(sphereMapper); > actor->GetProperty()->SetInterpolationToFlat(); > actor->GetProperty()->SetFrontfaceCulling(true); > > actors.push_back(actor); > > } > > //Set up renderer > vtkSmartPointer renderer = > vtkSmartPointer::New(); > > > // Create new camera > vtkSmartPointer camera = vtkSmartPointer::New(); > renderer->SetActiveCamera(camera); > > for (int j = 0; j < radii.size(); ++j) { > renderer->AddActor(actors[j]); > } > //Set up renderer > vtkSmartPointer renderer = > vtkSmartPointer::New(); > > > // Create new camera > vtkSmartPointer camera = vtkSmartPointer::New(); > renderer->SetActiveCamera(camera); > > for (int j = 0; j < radii.size(); ++j) { > renderer->AddActor(actors[j]); > } > > ... > > this->ui->widget->GetRenderWindow()->AddRenderer(renderer); > } > > But when rendered I get all spheres superimposed on top of each other and > when the camera movies they appear to turn about their individual origins - > which is not the desired outcome, rather that they should be placed at their > respective coordinates in 3D space. > > Any help with this would be greatly appreciated > > .. Mads > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From Apoorva.Ajay at UTSouthwestern.edu Thu Aug 10 18:30:36 2017 From: Apoorva.Ajay at UTSouthwestern.edu (Apoorva Ajay) Date: Thu, 10 Aug 2017 22:30:36 +0000 Subject: [vtkusers] Erros while building VTK Message-ID: <1502404236236.75972@UTSouthwestern.edu> Hi, I get the below mentioned error when I try building ITKApps, which inturn builds VTK. Kindly help me resolve this. CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: OPENGL_INCLUDE_DIR (ADVANCED) used as include directory in directory /ITKApps_build/VTK/Geovis/Core -- Configuring incomplete, errors occurred! See also "/ITKApps_build/VTK/CMakeFiles/CMakeOutput.log". See also "/ITKApps_build/VTK/CMakeFiles/CMakeError.log". make[2]: *** [VTK-prefix/src/VTK-stamp/VTK-configure] Error 1 make[1]: *** [CMakeFiles/VTK.dir/all] Error 2 make: *** [all] Error 2 How can I find OPENGL_INCLUDE_DIR on my system, please advice. Thanks and Best Regards, Apoorva.D.A ________________________________ UT Southwestern Medical Center The future of medicine, today. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenshaoqiang at buaa.edu.cn Thu Aug 10 19:59:21 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Fri, 11 Aug 2017 07:59:21 +0800 Subject: [vtkusers] [SPAM] Re: How to change Character Set to Unicode? In-Reply-To: References: Message-ID: <0F82A4A4129E43CD8DDB622CABAB9C0B@chensqPC> Thank you so much kenichiro. I'll try in the GUI. Chen. -----????----- From: kenichiro yoshimi Sent: Thursday, August 10, 2017 9:01 AM To: chensq Cc: vtkusers Subject: [SPAM] Re: [vtkusers] How to change Character Set to Unicode? Hi Chen, To build the VTK library in unicode mode using CMake you may append the c++ compiler flags with something like: SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /UMBCS /D_UNICODE /DUNICODE") (Of course, you can edit using the CMake GUI.) Regards, yoshimi 2017-08-09 8:47 GMT+09:00 chensq : > When I changed my vtk-vc project?s Character Set property from Multi-Byte > to > Unicode, the compiler reports some problems. > I changed the code and makes the problems dispeared. > But when I start runing the program , it breaks down. > I have looked the VTK solution, all of its projects use Multi-Byte > Character > Set. > The vc compiler always recommend to use Unicode Character Set, so I want > to > know how to deal with this situation. > Whether I have to change the VTK solution to use Unicode Character Set > first(But how to do it, there are so many projects in the solution),Or > just > change my own appliction? > Thanks for any suggestion. > Sincerely Chen > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From mdrahos at aurisrobotics.com Thu Aug 10 21:04:22 2017 From: mdrahos at aurisrobotics.com (Miroslav Drahos) Date: Fri, 11 Aug 2017 01:04:22 +0000 Subject: [vtkusers] graphics driver version: build vs run Message-ID: Hi all, I have a couple of build/deployment related questions. In a situation where build machine is different than the deployed machine where the software is run: 1. How important is it to have the graphics driver version on the build machine match the graphics driver on the target machine? 2. How important is it to have the graphics hardware on the build machine match the graphics hardware on the target machine? I am only working with NVIDIA graphics hardware/drivers, but would be curious to hear about other vendors too. Thank you!! Miro -------------- next part -------------- An HTML attachment was scrubbed... URL: From amit112amit at yahoo.co.in Thu Aug 10 22:22:50 2017 From: amit112amit at yahoo.co.in (Amit) Date: Thu, 10 Aug 2017 19:22:50 -0700 Subject: [vtkusers] Convex hull of spherical point cloud has holes In-Reply-To: References: <74af6337-1906-3c2e-9dba-f23a787bdede@yahoo.co.in> Message-ID: I am sorry. I think I spoke too soon that my problem is solved. My code is part of a larger C++ project. I am generate several point clouds based on an optimization criteria. I triangulate every point cloud. But the issue of missing triangles does not happen for all the point clouds consistently. It happens only for a few of them. Changing the alpha value to something non-zero helped resolve the issue in one of the point-clouds but it started happening in some other ones. I tried multiple alpha-values but I am not able to figure out one that works for all. Sometimes, if I print out the point cloud data for which I get missing triangles to a VTK file and open it in Paraview, when I apply my triangulation algorithm using a programmable filter, it works there. So I suspect there may also be some floating point corner case which gets resolved when writing to a file and re-reading in paraview. I am only guessing. It was hard to generate a minimum working example. Finally, I think I have a minimum working Python code. Please find attached two files: 1. Sample.vtk -- contains a culprit point cloud 2. MinWorkingEx.py -- a Python code to triangulate the point cloud by projecting them to a unit sphere first Repeating my question: Since I am trying to generate a convex hull on points located on a unit sphere, why should there be any missing triangles ever? Regards, Amit On 08/09/2017 08:34 PM, Amit wrote: > Thank you Bill and David for your replies. > > David: I did not use vtkCleanPolyData. I had read the doc multiple > times but I did not have the patience to understand the significance > of alpha. > > Bill: You are right. I was using the default value of alpha=0.0. Just > out of trial and error I set alpha=1.0 and the issue got resolved. I > think that as I am working with unit spheres, alpha_radius=1.0 is > sufficiently large value so that all faces of all tetrahedron get > included in the output convex hull. > > Thanks once again for the pointers. > > Regards, > Amit > > > On 08/09/2017 04:03 PM, Bill Lorensen wrote: >> If you save your polydata in a .vtp file you can try this example: >> https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/Delaunay3D/ >> >> It reports the # of verts, lines, triangles and tets. >> >> >> On Wed, Aug 9, 2017 at 4:56 PM, Bill Lorensen >> wrote: >>> I assume Alpha=0.0 for the Delaunay filter? >>> >>> Can you post a small, standalone compilable program that produces >>> this output? >>> >>> Bill >>> >>> >>> On Wed, Aug 9, 2017 at 2:18 PM, Amit via vtkusers >>> wrote: >>>> Dear all. >>>> I have a point cloud made up of points lying on surface of a unit >>>> sphere >>>> stored in a vtkPolyData. I want to get the convex hull of this >>>> point cloud >>>> using the vtkDelaunay3D filter. Then using vtkDataSetSurfaceFilter >>>> I want to >>>> extract the surface of the convex hull. This way, I can get a >>>> triangulation >>>> of the point cloud as a hollow spherical shell. Kindly open the >>>> attached >>>> UnstructuredGrid file in Paraview. It represents the output of >>>> vtkDelaunay3D >>>> filter made up of tetrahedrons. But the surface of the convex-hull >>>> has some >>>> missing triangles. Using the SpreadSheet View, I can see that cells >>>> with Ids >>>> 60, 61, 64 have triangular faces in the missing region. Hence, I >>>> would not >>>> have expected these "hole" in the surface. Can somebody explain why >>>> the >>>> triangles are not being rendered? When I extract surface from this >>>> unstructured grid I get a spherical shell with missing triangles as >>>> holes. >>>> Regards, >>>> Amit >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: MinWorkingEx.py Type: text/x-python Size: 1839 bytes Desc: not available URL: -------------- next part -------------- # vtk DataFile Version 4.1 vtk output ASCII DATASET POLYDATA POINTS 72 float 2.09299 0.33088 -0.39825 1.6453 0.643098 -1.23616 1.70037 1.2495 -0.442911 1.06241 1.45408 -1.18558 0.853381 0.728438 -1.84114 0.161724 1.41545 -1.61834 -0.468113 2.09732 -0.175458 0.300949 1.97804 -0.803411 -0.626043 1.74646 -1.09847 0.6262 1.7464 1.09847 0.468301 2.09728 0.175458 -0.300772 1.97807 0.803411 1.37968 1.10319 1.23617 1.93236 0.847638 0.442921 1.33319 1.64702 0.398259 -1.33304 1.64714 -0.398259 -1.37958 1.10332 -1.23617 -1.93228 0.847812 -0.442921 -0.161597 1.41546 1.61834 -1.06228 1.45418 1.18558 -0.853316 0.728514 1.84114 -1.70026 1.24965 0.442911 -2.09296 0.331068 0.39825 -1.64524 0.643246 1.23616 0.104999 0.567724 2.07734 -0.544171 -0.192925 2.07734 0.439155 -0.374799 2.07734 1.05756 0.374732 1.84115 1.30662 -0.567787 1.61835 1.79049 0.192869 1.18559 -0.72822 -1.64705 1.18559 -0.204261 -1.10325 1.84114 -1.14503 -0.847674 1.61834 0.265547 -1.74644 1.23617 -0.232105 -2.09729 0.442915 0.759764 -1.97809 0.398258 1.19932 -1.41551 1.09848 1.58215 -1.4542 0.175461 1.86344 -0.728559 0.803416 -1.82553 -0.330892 1.09847 -2.05045 -0.64308 0.175451 -1.56267 -1.24951 0.803407 -0.265704 -1.74642 -1.23617 0.231917 -2.09731 -0.442915 -0.759942 -1.97802 -0.398258 -1.19945 -1.4154 -1.09848 -1.58228 -1.45406 -0.175461 -1.8635 -0.728392 -0.803417 0.204162 -1.10326 -1.84114 1.14496 -0.847776 -1.61834 0.728073 -1.64711 -1.18559 2.05039 -0.643264 -0.175451 1.56256 -1.24965 -0.803407 1.8255 -0.331056 -1.09847 -0.439188 -0.374759 -2.07734 -0.104949 0.567733 -2.07734 0.544154 -0.192973 -2.07734 -1.30667 -0.56767 -1.61835 -1.79047 0.193029 -1.18559 -1.05753 0.374827 -1.84115 -0.760634 1.3176 -1.99154 -0.760752 -1.31754 -1.99154 -2.46167 0.000110329 -0.470145 1.5214 -6.81525e-05 -1.99153 2.46167 -0.000110335 0.470145 1.23074 -2.13193 -0.470134 -1.23093 -2.13182 0.470134 -1.5214 6.81664e-05 1.99153 0.760634 -1.3176 1.99154 0.760752 1.31754 1.99154 -1.23074 2.13193 0.470134 1.23093 2.13182 -0.470134 POINT_DATA 72 NORMALS PointNormals double 0.94553368432 0.18910660529 -0.26496177771 0.78405862855 0.35773532998 -0.50722529579 0.83862196559 0.50312372408 -0.20875755577 0.47835764175 0.62004070162 -0.62187096324 0.34064025315 0.41025176095 -0.84596554928 0.16203922386 0.66872894226 -0.72563413076 -0.15139105539 0.97783566905 -0.14463109167 0.053678257752 0.91341969646 -0.40346388037 -0.27685262676 0.85789740302 -0.43285640684 0.27692932868 0.85787207687 0.43285753621 0.15147913613 0.97782196711 0.144631504 -0.05359830278 0.91342422147 0.40346426554 0.70187687409 0.50008703194 0.50722954775 0.85507145162 0.47462740128 0.20876216749 0.63660095473 0.72424583112 0.26496641397 -0.63653687657 0.72430226382 -0.26496610234 -0.70183511182 0.5001458299 -0.507229361 -0.85502805043 0.47470557246 -0.20876219114 -0.16197141142 0.66874499688 0.72563447481 -0.4783016704 0.62008456354 0.62187028081 -0.34060898817 0.41027308652 0.84596779587 -0.83857597135 0.50320039033 0.20875753267 -0.94551685553 0.18919030769 0.26496207916 -0.78402859711 0.35780088238 0.50722547992 -0.0082788878824 0.19407405734 0.98095194596 -0.16393765474 -0.10420444477 0.98095151718 0.17220848886 -0.089869640139 0.98095243725 0.52560794361 0.089837476351 0.84597016345 0.66013288875 -0.19410287148 0.72563671659 0.77615727195 0.10417763286 0.62187370906 -0.29786070719 -0.7242622139 0.621870762 -0.18500590095 -0.5001105867 0.84596821317 -0.49816743492 -0.47464214579 0.72563354403 0.082147558581 -0.85788792856 0.507227839 -0.01649719425 -0.97782779752 0.2087597686 0.3089137252 -0.91343614623 0.2649655018 0.604472574 -0.66876490414 0.43285841827 0.77107850318 -0.62009610852 0.14463318472 0.81784607861 -0.41029558084 0.40346663808 -0.88140545654 -0.18910718492 0.43285435632 -0.92255882689 -0.3577258627 0.14462855211 -0.76425108836 -0.50312865194 0.40346230746 -0.082219353166 -0.85788114612 -0.50722767778 0.01640779864 -0.97782929073 -0.20875981975 -0.3089946325 -0.91340886168 -0.26496522128 -0.60453285212 -0.66871112812 -0.43285731811 -0.77113440767 -0.62002667498 -0.14463280273 -0.8178821308 -0.41022406378 -0.40346627815 0.18497178599 -0.50012697611 -0.84596598404 0.49811961313 -0.47469282558 -0.72563322164 0.29779472569 -0.72428873818 -0.62187146992 0.92252665033 -0.35780898992 -0.14462816516 0.76420718541 -0.50319562125 -0.4034619493 0.88138903144 -0.18918626232 -0.43285324696 -0.17221875164 -0.089849688021 -0.98095246324 0.0083012803662 0.19407299549 -0.9809519668 0.16392552278 -0.10422327973 -0.98095154363 -0.66015287986 -0.19403609608 -0.72563638872 -0.77614726197 0.10424805402 -0.62187440129 -0.52560509432 0.089875239119 -0.84596792269 -0.30351736748 0.52573663949 -0.79465602214 -0.30353934114 -0.52572393812 -0.79465603204 -0.98224647852 4.4937898655e-05 -0.18759491839 0.60706322495 -1.2678738313e-05 -0.79465353504 0.98224637254 -4.430574591e-05 0.1875954735 0.491085093 -0.85067331443 -0.1875908941 -0.4911623247 -0.8506286058 0.18759143312 -0.60706405439 2.7283884489e-05 0.79465290103 0.30350513 -0.5257446625 0.79465538815 0.30355239996 0.52571735629 0.79465539813 -0.49108558792 0.85067290629 0.18759144928 0.49116292465 0.85062838182 -0.18759087797 From iamdpak at gmail.com Fri Aug 11 03:35:23 2017 From: iamdpak at gmail.com (vinmean) Date: Fri, 11 Aug 2017 00:35:23 -0700 (MST) Subject: [vtkusers] Need to find occupied and not occupied regions in rendered image Message-ID: <1502436923005-5744370.post@n5.nabble.com> I have a vtk renderwindow with few actors. In my application, I need to find the background region and the foreground region in the rendered image. I mean, I want a binary image that has the foreground and background regions marked. What is the best way to do this? -- View this message in context: http://vtk.1045678.n5.nabble.com/Need-to-find-occupied-and-not-occupied-regions-in-rendered-image-tp5744370.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Fri Aug 11 07:58:45 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 11 Aug 2017 07:58:45 -0400 Subject: [vtkusers] Modifying vtkSphereSource In-Reply-To: References: Message-ID: Please keep the discussion on list... I do not recommend modifying the vtkSphereSource. Why not write a small procedure to do what you want to do and call that from your application? On Fri, Aug 11, 2017 at 3:47 AM, M. Jordan wrote: > Hello Bill, > > can you tell me where the vtkSphereSource is "created" actually. > I have to make it possible to pass a double pointer to the source. > After calling modified(), or updated() or something, the sphere should be > redrawn with a radius > which is equal to the value which the pointer is pointing too. > > Thank you very much. You seem to be the author of the code and I would be > very grateful if you can > give me some hints. > > Best Regards, > Michael > -- Unpaid intern in BillsBasement at noware dot com From vtk12af6bc42 at kant.sophonet.de Fri Aug 11 08:20:32 2017 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Fri, 11 Aug 2017 14:20:32 +0200 Subject: [vtkusers] Qt5/VTK application does not start correctly (with X11 forwarding) Message-ID: <4678b4ccc938ece8adaef55a93fd1895@kant.sophonet.de> Hi list, an application using VTK 8.0.0 and Qt 5.9.1 (built with -opengl desktop) does not start correctly (using X11 forwarding). After displaying an error message "failed to get the current screen resources", there is another error message vtkXOpenGLRenderWindow (0x55f891d77a80): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2. However, my Ubuntu 17.04 system has Mesa 17.0.7, glxgears works fine (using X11 forwarding) and glxinfo shows (among other things) the correct driver - see below, so I am a bit puzzled what is going on. Any hints? Thanks, sophonet P.S.: The first call in my application's main() function is QSurfaceFormat::setDefaultFormat, see below. The same application runs fine and without problems on Windows. #if QT_VERSION >= 0x050500 // before initializing QApplication, set the default surface format, see documentation QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); #endif GLX version: 1.2 GLX extensions: GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGI_make_current_read Extended renderer info (GLX_MESA_query_renderer): Vendor: VMware, Inc. (0xffffffff) Device: llvmpipe (LLVM 4.0, 128 bits) (0xffffffff) Version: 17.0.7 Accelerated: no Video memory: 3949MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 3.3 Max compat profile version: 3.0 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.0 OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits) OpenGL version string: 3.0 Mesa 17.0.7 OpenGL shading language version string: 1.30 From david.gobbi at gmail.com Fri Aug 11 08:31:06 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 11 Aug 2017 06:31:06 -0600 Subject: [vtkusers] Qt5/VTK application does not start correctly (with X11 forwarding) In-Reply-To: <4678b4ccc938ece8adaef55a93fd1895@kant.sophonet.de> References: <4678b4ccc938ece8adaef55a93fd1895@kant.sophonet.de> Message-ID: How are you doing the X11 forwarding? Are you using "ssh -Y"? On Fri, Aug 11, 2017 at 6:20 AM, Sophonet wrote: > Hi list, > > an application using VTK 8.0.0 and Qt 5.9.1 (built with -opengl desktop) > does not start correctly (using X11 forwarding). After displaying an error > message "failed to get the current screen resources", there is another > error message > > vtkXOpenGLRenderWindow (0x55f891d77a80): GL version 2.1 with the > gpu_shader4 extension is not supported by your graphics driver but is > required for the new OpenGL rendering backend. Please update your OpenGL > driver. If you are using Mesa please make sure you have version 10.6.5 or > later and make sure your driver in Mesa supports OpenGL 3.2. > > However, my Ubuntu 17.04 system has Mesa 17.0.7, glxgears works fine > (using X11 forwarding) and glxinfo shows (among other things) the correct > driver - see below, so I am a bit puzzled what is going on. Any hints? > > Thanks, > > sophonet > > P.S.: The first call in my application's main() function is > QSurfaceFormat::setDefaultFormat, see below. The same application runs > fine and without problems on Windows. > > #if QT_VERSION >= 0x050500 > // before initializing QApplication, set the default surface > format, see documentation > QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFo > rmat()); > #endif > > > > GLX version: 1.2 > GLX extensions: > GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, > GLX_EXT_visual_info, GLX_EXT_visual_rating, > GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, > GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, > GLX_SGI_make_current_read > Extended renderer info (GLX_MESA_query_renderer): > Vendor: VMware, Inc. (0xffffffff) > Device: llvmpipe (LLVM 4.0, 128 bits) (0xffffffff) > Version: 17.0.7 > Accelerated: no > Video memory: 3949MB > Unified memory: no > Preferred profile: core (0x1) > Max core profile version: 3.3 > Max compat profile version: 3.0 > Max GLES1 profile version: 1.1 > Max GLES[23] profile version: 3.0 > OpenGL vendor string: VMware, Inc. > OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits) > OpenGL version string: 3.0 Mesa 17.0.7 > OpenGL shading language version string: 1.30 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayavardhanravi at outlook.com Fri Aug 11 09:38:42 2017 From: jayavardhanravi at outlook.com (Jay) Date: Fri, 11 Aug 2017 06:38:42 -0700 (MST) Subject: [vtkusers] Is there a way to disable the keyboard shortcuts related to VtkRenderInteractorWindow Message-ID: <1502458722680-5744374.post@n5.nabble.com> I am trying to disable the keyboard shortcuts that come by default with the vtkRenderWindowInteractor like disable 'q','w','r','t','j'... for various events. I intent only to disable the keyboard shortcuts but not to disable the mouse interaction. I tried using /interactor.Disable();/ but this disables the mouse interaction. I also tried to remap the keys using the callback event but I was looking for much simpler ways, if they exists Sample pseudo code that I wrote is: /tSource = vtksphersource::New(); tsource.setRadius(10); tSource.Update(); tPolyMapper = vtkPolyDataMapper::New(); tPolyMapper.setInputConnection(tSource.getOutputPort()); tActor = vtkActor::New(); tActor.setMapper(tPolyMapper); ren = vtkRenderer::New(); window = vtkRenderWindow::New(); interactor = vtkRenderWindownteractor::New(); window.addRenderer(ren); interactor.setRenderWindow(window); ren.render(); interactor.Start();/ Any suggestion or ideas would be helpful. Regards -- View this message in context: http://vtk.1045678.n5.nabble.com/Is-there-a-way-to-disable-the-keyboard-shortcuts-related-to-VtkRenderInteractorWindow-tp5744374.html Sent from the VTK - Users mailing list archive at Nabble.com. From vtk12af6bc42 at kant.sophonet.de Fri Aug 11 09:52:57 2017 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Fri, 11 Aug 2017 15:52:57 +0200 Subject: [vtkusers] Qt5/VTK application does not start correctly (with X11 forwarding) In-Reply-To: References: <4678b4ccc938ece8adaef55a93fd1895@kant.sophonet.de> Message-ID: Yes, well, I am using a Windows machine and putty. Putty has an option in it's configuration dialog. I don't know whether the X connection is encrypted (-X) or not (-Y). On 2017-08-11 14:31, David Gobbi wrote: > How are you doing the X11 forwarding? Are you using "ssh -Y"? > > On Fri, Aug 11, 2017 at 6:20 AM, Sophonet > wrote: > >> Hi list, >> >> an application using VTK 8.0.0 and Qt 5.9.1 (built with -opengl >> desktop) does not start correctly (using X11 forwarding). After >> displaying an error message "failed to get the current screen >> resources", there is another error message >> >> vtkXOpenGLRenderWindow (0x55f891d77a80): GL version 2.1 with the >> gpu_shader4 extension is not supported by your graphics driver but >> is required for the new OpenGL rendering backend. Please update your >> OpenGL driver. If you are using Mesa please make sure you have >> version 10.6.5 or later and make sure your driver in Mesa supports >> OpenGL 3.2. >> >> However, my Ubuntu 17.04 system has Mesa 17.0.7, glxgears works fine >> (using X11 forwarding) and glxinfo shows (among other things) the >> correct driver - see below, so I am a bit puzzled what is going on. >> Any hints? >> >> Thanks, >> >> sophonet >> >> P.S.: The first call in my application's main() function is >> QSurfaceFormat::setDefaultFormat, see below. The same application >> runs fine and without problems on Windows. >> >> #if QT_VERSION >= 0x050500 >> // before initializing QApplication, set the default surface >> format, see documentation >> >> QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); >> #endif >> >> GLX version: 1.2 >> GLX extensions: >> GLX_ARB_get_proc_address, GLX_ARB_multisample, >> GLX_EXT_import_context, >> GLX_EXT_visual_info, GLX_EXT_visual_rating, >> GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, >> GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, >> GLX_SGI_make_current_read >> Extended renderer info (GLX_MESA_query_renderer): >> Vendor: VMware, Inc. (0xffffffff) >> Device: llvmpipe (LLVM 4.0, 128 bits) (0xffffffff) >> Version: 17.0.7 >> Accelerated: no >> Video memory: 3949MB >> Unified memory: no >> Preferred profile: core (0x1) >> Max core profile version: 3.3 >> Max compat profile version: 3.0 >> Max GLES1 profile version: 1.1 >> Max GLES[23] profile version: 3.0 >> OpenGL vendor string: VMware, Inc. >> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits) >> OpenGL version string: 3.0 Mesa 17.0.7 >> OpenGL shading language version string: 1.30 From madsmh at gmail.com Fri Aug 11 09:57:18 2017 From: madsmh at gmail.com (Mads M. Hansen) Date: Fri, 11 Aug 2017 15:57:18 +0200 Subject: [vtkusers] Planet sized objects and distances on the scale of the Solar System Message-ID: Hi list, I am currently writing what I hope is to be a realistic simulation of the Solar System in C++ and to visualize it in 3D with VTK. However when I try to render the objects (which er spheres) I get either a black screen or when I scale the distances/radii a bit the object shown, until I click with the mouse and then it disappears. You can see the code attached. Do you have any suggestions on how to solve this issue? Thanks, Mads. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mainwindow.cpp Type: text/x-c++src Size: 3832 bytes Desc: not available URL: From david.gobbi at gmail.com Fri Aug 11 10:13:02 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 11 Aug 2017 08:13:02 -0600 Subject: [vtkusers] Qt5/VTK application does not start correctly (with X11 forwarding) In-Reply-To: References: <4678b4ccc938ece8adaef55a93fd1895@kant.sophonet.de> Message-ID: The "-X" vs "-Y" doesn't mean encrypted vs. non-encrypted. See the ssh man page here: https://man.openbsd.org/ssh Specifically: -Y Enables trusted X11 forwarding. The "-Y" gives the client access to the GPU, and is necessary for all but the most basic rendering. I'm not sure if putty provides this option, since I do nearly all of my work on Linux or Mac. - David On Fri, Aug 11, 2017 at 7:52 AM, Sophonet wrote: > Yes, well, I am using a Windows machine and putty. Putty has an option in > it's configuration dialog. I don't know whether the X connection is > encrypted (-X) or not (-Y). > > > > On 2017-08-11 14:31, David Gobbi wrote: > >> How are you doing the X11 forwarding? Are you using "ssh -Y"? >> >> On Fri, Aug 11, 2017 at 6:20 AM, Sophonet >> wrote: >> >> Hi list, >>> >>> an application using VTK 8.0.0 and Qt 5.9.1 (built with -opengl >>> desktop) does not start correctly (using X11 forwarding). After >>> displaying an error message "failed to get the current screen >>> resources", there is another error message >>> >>> vtkXOpenGLRenderWindow (0x55f891d77a80): GL version 2.1 with the >>> gpu_shader4 extension is not supported by your graphics driver but >>> is required for the new OpenGL rendering backend. Please update your >>> OpenGL driver. If you are using Mesa please make sure you have >>> version 10.6.5 or later and make sure your driver in Mesa supports >>> OpenGL 3.2. >>> >>> However, my Ubuntu 17.04 system has Mesa 17.0.7, glxgears works fine >>> (using X11 forwarding) and glxinfo shows (among other things) the >>> correct driver - see below, so I am a bit puzzled what is going on. >>> Any hints? >>> >>> Thanks, >>> >>> sophonet >>> >>> P.S.: The first call in my application's main() function is >>> QSurfaceFormat::setDefaultFormat, see below. The same application >>> runs fine and without problems on Windows. >>> >>> #if QT_VERSION >= 0x050500 >>> // before initializing QApplication, set the default surface >>> format, see documentation >>> >>> QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); >>> #endif >>> >>> GLX version: 1.2 >>> GLX extensions: >>> GLX_ARB_get_proc_address, GLX_ARB_multisample, >>> GLX_EXT_import_context, >>> GLX_EXT_visual_info, GLX_EXT_visual_rating, >>> GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, >>> GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, >>> GLX_SGI_make_current_read >>> Extended renderer info (GLX_MESA_query_renderer): >>> Vendor: VMware, Inc. (0xffffffff) >>> Device: llvmpipe (LLVM 4.0, 128 bits) (0xffffffff) >>> Version: 17.0.7 >>> Accelerated: no >>> Video memory: 3949MB >>> Unified memory: no >>> Preferred profile: core (0x1) >>> Max core profile version: 3.3 >>> Max compat profile version: 3.0 >>> Max GLES1 profile version: 1.1 >>> Max GLES[23] profile version: 3.0 >>> OpenGL vendor string: VMware, Inc. >>> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits) >>> OpenGL version string: 3.0 Mesa 17.0.7 >>> OpenGL shading language version string: 1.30 >>> >> _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Aug 11 10:18:33 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 11 Aug 2017 10:18:33 -0400 Subject: [vtkusers] Is there a way to disable the keyboard shortcuts related to VtkRenderInteractorWindow In-Reply-To: <1502458722680-5744374.post@n5.nabble.com> References: <1502458722680-5744374.post@n5.nabble.com> Message-ID: Look at this example: https://lorensen.github.io/VTKExamples/site/Cxx/Interaction/KeypressEvents/ It subclasses and interactor to handle key press events. At the end of the class it // Forward events vtkInteractorStyleTrackballCamera::OnKeyPress(); It you don't forward the event, you will be ignoring key presses... On Fri, Aug 11, 2017 at 9:38 AM, Jay wrote: > I am trying to disable the keyboard shortcuts that come by default with the > vtkRenderWindowInteractor like disable 'q','w','r','t','j'... for various > events. I intent only to disable the keyboard shortcuts but not to disable > the mouse interaction. > > I tried using /interactor.Disable();/ but this disables the mouse > interaction. > > I also tried to remap the keys using the callback event but I was looking > for much simpler ways, if they exists > > Sample pseudo code that I wrote is: > > /tSource = vtksphersource::New(); > tsource.setRadius(10); > tSource.Update(); > tPolyMapper = vtkPolyDataMapper::New(); > tPolyMapper.setInputConnection(tSource.getOutputPort()); > tActor = vtkActor::New(); > tActor.setMapper(tPolyMapper); > > ren = vtkRenderer::New(); > window = vtkRenderWindow::New(); > interactor = vtkRenderWindownteractor::New(); > > window.addRenderer(ren); > interactor.setRenderWindow(window); > > ren.render(); > interactor.Start();/ > > Any suggestion or ideas would be helpful. > > Regards > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Is-there-a-way-to-disable-the-keyboard-shortcuts-related-to-VtkRenderInteractorWindow-tp5744374.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 vtk12af6bc42 at kant.sophonet.de Fri Aug 11 10:25:50 2017 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Fri, 11 Aug 2017 16:25:50 +0200 Subject: [vtkusers] Qt5/VTK application does not start correctly (with X11 forwarding) In-Reply-To: References: <4678b4ccc938ece8adaef55a93fd1895@kant.sophonet.de> Message-ID: <7ec59c506886faa5b2044c56a97b61a3@kant.sophonet.de> Ah okay, this was not clear to me. But see bottom my first e-mail: Mesa is doing software rendering (llvmpipe), no GPU should be required. On 2017-08-11 16:13, David Gobbi wrote: > The "-X" vs "-Y" doesn't mean encrypted vs. non-encrypted. See the > ssh man page here: > > https://man.openbsd.org/ssh > > Specifically: -Y Enables trusted X11 forwarding. > > The "-Y" gives the client access to the GPU, and is necessary for all > but the most basic rendering. I'm not sure if putty provides this > option, since I do nearly all of my work on Linux or Mac. > > - David > > On Fri, Aug 11, 2017 at 7:52 AM, Sophonet > wrote: > >> Yes, well, I am using a Windows machine and putty. Putty has an >> option in it's configuration dialog. I don't know whether the X >> connection is encrypted (-X) or not (-Y). >> >> On 2017-08-11 14:31, David Gobbi wrote: >> How are you doing the X11 forwarding? Are you using "ssh -Y"? >> >> On Fri, Aug 11, 2017 at 6:20 AM, Sophonet >> wrote: >> >> Hi list, >> >> an application using VTK 8.0.0 and Qt 5.9.1 (built with -opengl >> desktop) does not start correctly (using X11 forwarding). After >> displaying an error message "failed to get the current screen >> resources", there is another error message >> >> vtkXOpenGLRenderWindow (0x55f891d77a80): GL version 2.1 with the >> gpu_shader4 extension is not supported by your graphics driver but >> is required for the new OpenGL rendering backend. Please update your >> OpenGL driver. If you are using Mesa please make sure you have >> version 10.6.5 or later and make sure your driver in Mesa supports >> OpenGL 3.2. >> >> However, my Ubuntu 17.04 system has Mesa 17.0.7, glxgears works fine >> (using X11 forwarding) and glxinfo shows (among other things) the >> correct driver - see below, so I am a bit puzzled what is going on. >> Any hints? >> >> Thanks, >> >> sophonet >> >> P.S.: The first call in my application's main() function is >> QSurfaceFormat::setDefaultFormat, see below. The same application >> runs fine and without problems on Windows. >> >> #if QT_VERSION >= 0x050500 >> // before initializing QApplication, set the default surface >> format, see documentation >> >> QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); >> #endif >> >> GLX version: 1.2 >> GLX extensions: >> GLX_ARB_get_proc_address, GLX_ARB_multisample, >> GLX_EXT_import_context, >> GLX_EXT_visual_info, GLX_EXT_visual_rating, >> GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, >> GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, >> GLX_SGI_make_current_read >> Extended renderer info (GLX_MESA_query_renderer): >> Vendor: VMware, Inc. (0xffffffff) >> Device: llvmpipe (LLVM 4.0, 128 bits) (0xffffffff) >> Version: 17.0.7 >> Accelerated: no >> Video memory: 3949MB >> Unified memory: no >> Preferred profile: core (0x1) >> Max core profile version: 3.3 >> Max compat profile version: 3.0 >> Max GLES1 profile version: 1.1 >> Max GLES[23] profile version: 3.0 >> OpenGL vendor string: VMware, Inc. >> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits) >> OpenGL version string: 3.0 Mesa 17.0.7 >> OpenGL shading language version string: 1.30 > > _______________________________________________ > Powered by www.kitware.com [1] > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html [2] > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ [3] > > Search the list archives at: http://markmail.org/search/?q=vtkusers > [4] > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers [5] > > > > Links: > ------ > [1] http://www.kitware.com > [2] http://www.kitware.com/opensource/opensource.html > [3] http://www.vtk.org/Wiki/VTK_FAQ > [4] http://markmail.org/search/?q=vtkusers > [5] http://public.kitware.com/mailman/listinfo/vtkusers From david.gobbi at gmail.com Fri Aug 11 11:09:17 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 11 Aug 2017 09:09:17 -0600 Subject: [vtkusers] Qt5/VTK application does not start correctly (with X11 forwarding) In-Reply-To: <7ec59c506886faa5b2044c56a97b61a3@kant.sophonet.de> References: <4678b4ccc938ece8adaef55a93fd1895@kant.sophonet.de> <7ec59c506886faa5b2044c56a97b61a3@kant.sophonet.de> Message-ID: Ah, I missed that. On the linux system, use "ldd" to verify that the VTK libraries are linked to the correct OpenGL libraries: ldd /path/to/vtk/library.so Also, as an alternative to X11 forwarding, you can try using VNC. In the past, I've set up Xvnc to allow multiple users to connect to a linux server and get a graphical linux desktop: http://www.hep.phy.cam.ac.uk/vnc_docs/xvnc.html - David On Fri, Aug 11, 2017 at 8:25 AM, Sophonet wrote: > Ah okay, this was not clear to me. But see bottom my first e-mail: Mesa is > doing software rendering (llvmpipe), no GPU should be required. > > > > On 2017-08-11 16:13, David Gobbi wrote: > >> The "-X" vs "-Y" doesn't mean encrypted vs. non-encrypted. See the >> ssh man page here: >> >> https://man.openbsd.org/ssh >> >> Specifically: -Y Enables trusted X11 forwarding. >> >> The "-Y" gives the client access to the GPU, and is necessary for all >> but the most basic rendering. I'm not sure if putty provides this >> option, since I do nearly all of my work on Linux or Mac. >> >> - David >> >> On Fri, Aug 11, 2017 at 7:52 AM, Sophonet >> wrote: >> >> Yes, well, I am using a Windows machine and putty. Putty has an >>> option in it's configuration dialog. I don't know whether the X >>> connection is encrypted (-X) or not (-Y). >>> >>> On 2017-08-11 14:31, David Gobbi wrote: >>> How are you doing the X11 forwarding? Are you using "ssh -Y"? >>> >>> On Fri, Aug 11, 2017 at 6:20 AM, Sophonet >>> wrote: >>> >>> Hi list, >>> >>> an application using VTK 8.0.0 and Qt 5.9.1 (built with -opengl >>> desktop) does not start correctly (using X11 forwarding). After >>> displaying an error message "failed to get the current screen >>> resources", there is another error message >>> >>> vtkXOpenGLRenderWindow (0x55f891d77a80): GL version 2.1 with the >>> gpu_shader4 extension is not supported by your graphics driver but >>> is required for the new OpenGL rendering backend. Please update your >>> OpenGL driver. If you are using Mesa please make sure you have >>> version 10.6.5 or later and make sure your driver in Mesa supports >>> OpenGL 3.2. >>> >>> However, my Ubuntu 17.04 system has Mesa 17.0.7, glxgears works fine >>> (using X11 forwarding) and glxinfo shows (among other things) the >>> correct driver - see below, so I am a bit puzzled what is going on. >>> Any hints? >>> >>> Thanks, >>> >>> sophonet >>> >>> P.S.: The first call in my application's main() function is >>> QSurfaceFormat::setDefaultFormat, see below. The same application >>> runs fine and without problems on Windows. >>> >>> #if QT_VERSION >= 0x050500 >>> // before initializing QApplication, set the default surface >>> format, see documentation >>> >>> QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); >>> #endif >>> >>> GLX version: 1.2 >>> GLX extensions: >>> GLX_ARB_get_proc_address, GLX_ARB_multisample, >>> GLX_EXT_import_context, >>> GLX_EXT_visual_info, GLX_EXT_visual_rating, >>> GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, >>> GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, >>> GLX_SGI_make_current_read >>> Extended renderer info (GLX_MESA_query_renderer): >>> Vendor: VMware, Inc. (0xffffffff) >>> Device: llvmpipe (LLVM 4.0, 128 bits) (0xffffffff) >>> Version: 17.0.7 >>> Accelerated: no >>> Video memory: 3949MB >>> Unified memory: no >>> Preferred profile: core (0x1) >>> Max core profile version: 3.3 >>> Max compat profile version: 3.0 >>> Max GLES1 profile version: 1.1 >>> Max GLES[23] profile version: 3.0 >>> OpenGL vendor string: VMware, Inc. >>> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits) >>> OpenGL version string: 3.0 Mesa 17.0.7 >>> OpenGL shading language version string: 1.30 >>> >> >> ______________________________________________ >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mlr at gmx.de Fri Aug 11 11:43:04 2017 From: j.mlr at gmx.de (vtkBeginner) Date: Fri, 11 Aug 2017 08:43:04 -0700 (MST) Subject: [vtkusers] vtkContextView: No text renderer available In-Reply-To: References: <1501874956104-5744294.post@n5.nabble.com> <1502218234729-5744323.post@n5.nabble.com> Message-ID: <1502466184088-5744381.post@n5.nabble.com> Thanks a lot ! VTK_MODULE_INIT(vtkRenderingFreeType) fixed it. Jorg -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkContextView-No-text-renderer-available-tp5744294p5744381.html Sent from the VTK - Users mailing list archive at Nabble.com. From zmanvortex at gmail.com Fri Aug 11 13:53:07 2017 From: zmanvortex at gmail.com (zmantorn) Date: Fri, 11 Aug 2017 10:53:07 -0700 (MST) Subject: [vtkusers] Placement of actors in world coordinate system wierdness In-Reply-To: References: Message-ID: <1502473987111-5744382.post@n5.nabble.com> Bill Lorensen wrote > Looks OK to me. Have your printed the startpos elements? > > > On Thu, Aug 10, 2017 at 2:59 PM, Mads M. Hansen < > madsmh@ > > wrote: >> Hello, I am attempting to placed number of actors (spheres) at various >> positions throughout the scene with the following routine >> >> for (int i = 0; i < radii.size(); ++i) { >> vtkSmartPointer > > sphereSource = >> vtkSmartPointer > > ::New(); >> sphereSource->SetRadius(radii[i]); >> sphereSource->SetPhiResolution(100); >> sphereSource->SetThetaResolution(100); >> sphereSource->Update(); >> >> vtkSmartPointer > > sphereMapper = >> vtkSmartPointer > > ::New(); >> sphereMapper->SetInputConnection(sphereSource->GetOutputPort()); >> >> vtkSmartPointer > > actor = vtkSmartPointer > > ::New(); >> actor->SetPosition(start_pos[i].x(), start_pos[i].y(), >> start_pos[i].z()); >> actor->SetMapper(sphereMapper); >> actor->GetProperty()->SetInterpolationToFlat(); >> actor->GetProperty()->SetFrontfaceCulling(true); >> >> actors.push_back(actor); >> >> } >> >> //Set up renderer >> vtkSmartPointer > > renderer = >> vtkSmartPointer > > ::New(); >> >> >> // Create new camera >> vtkSmartPointer > > camera = vtkSmartPointer > > ::New(); >> renderer->SetActiveCamera(camera); >> >> for (int j = 0; j < radii.size(); ++j) { >> renderer->AddActor(actors[j]); >> } >> //Set up renderer >> vtkSmartPointer > > renderer = >> vtkSmartPointer > > ::New(); >> >> >> // Create new camera >> vtkSmartPointer > > camera = vtkSmartPointer > > ::New(); >> renderer->SetActiveCamera(camera); >> >> for (int j = 0; j < radii.size(); ++j) { >> renderer->AddActor(actors[j]); >> } >> >> ... >> >> this->ui->widget->GetRenderWindow()->AddRenderer(renderer); >> } >> >> But when rendered I get all spheres superimposed on top of each other and >> when the camera movies they appear to turn about their individual origins >> - >> which is not the desired outcome, rather that they should be placed at >> their >> respective coordinates in 3D space. >> >> Any help with this would be greatly appreciated >> >> .. Mads >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > 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 It looks like you have doubled up creating renderer, camera, and adding actors to the renderer. Look at the duplicated code at the end of your code snippet. -- View this message in context: http://vtk.1045678.n5.nabble.com/Placement-of-actors-in-world-coordinate-system-wierdness-tp5744363p5744382.html Sent from the VTK - Users mailing list archive at Nabble.com. From rccm.kyoshimi at gmail.com Sat Aug 12 00:17:31 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sat, 12 Aug 2017 13:17:31 +0900 Subject: [vtkusers] Endpoints not follow distance line when moving In-Reply-To: <1502243093715-5744325.post@n5.nabble.com> References: <1502243093715-5744325.post@n5.nabble.com> Message-ID: Hi min, Could you substitute vtkLineWidget2 + vtkLineRepresentation for vtkDistanceWidget, etc.? I am not familiar with them, but as far as I tried the following example the endpoints of vtkLineRepresentation seemed to follow the line properly. (Notice that there are options for distance annotation in the vtkLineRepresentation) https://lorensen.github.io/VTKExamples/site/Cxx/Widgets/LineWidget2/ Thanks, yoshimi 2017-08-09 10:44 GMT+09:00 minyang : > Hi VTK User, > > My VTK version is 7.1. I use /vtkDistanceWidget + > vtkDistanceRepresentation2D + vtkPointHandleRepresentation2D/ to do > measurement. *After adjust endpoints*, then move distance line by move mouse > with holding left mouse button, the endpoints *not follow the line*, as > below snapshot. When release the left mouse button, endpoints catch up with > the line. > > Any one know how to make the endpoints follow with distance line when > moving? > > Best Wishes, > min > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Endpoints-not-follow-distance-line-when-moving-tp5744325.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 vtk12af6bc42 at kant.sophonet.de Sat Aug 12 05:05:53 2017 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Sat, 12 Aug 2017 11:05:53 +0200 Subject: [vtkusers] Qt5/VTK application does not start correctly (with X11 forwarding) In-Reply-To: References: <4678b4ccc938ece8adaef55a93fd1895@kant.sophonet.de> <7ec59c506886faa5b2044c56a97b61a3@kant.sophonet.de> Message-ID: <1b7ba8f0d814b649fe9ee7b60c4b4176@kant.sophonet.de> I think I found the problem: My XMing version (6.9.0.31 from 2007, the last free version) seemed to be too old. I have switched to Cygnus/X, and when turning off native OpenGL, the application starts fine. Thanks for pointing me to the right direction. On 2017-08-11 17:09, David Gobbi wrote: > Ah, I missed that. On the linux system, use "ldd" to verify that the > VTK libraries are linked to the correct OpenGL libraries: > > ldd /path/to/vtk/library.so > > Also, as an alternative to X11 forwarding, you can try using VNC. In > the past, I've set up Xvnc to allow multiple users to connect to a > linux server and get a graphical linux desktop: > > http://www.hep.phy.cam.ac.uk/vnc_docs/xvnc.html > > - David > > On Fri, Aug 11, 2017 at 8:25 AM, Sophonet > wrote: > >> Ah okay, this was not clear to me. But see bottom my first e-mail: >> Mesa is doing software rendering (llvmpipe), no GPU should be >> required. >> >> On 2017-08-11 16:13, David Gobbi wrote: >> >> The "-X" vs "-Y" doesn't mean encrypted vs. non-encrypted. See the >> ssh man page here: >> >> https://man.openbsd.org/ssh >> >> Specifically: -Y Enables trusted X11 forwarding. >> >> The "-Y" gives the client access to the GPU, and is necessary for >> all >> but the most basic rendering. I'm not sure if putty provides this >> option, since I do nearly all of my work on Linux or Mac. >> >> - David >> >> On Fri, Aug 11, 2017 at 7:52 AM, Sophonet >> wrote: >> >> Yes, well, I am using a Windows machine and putty. Putty has an >> option in it's configuration dialog. I don't know whether the X >> connection is encrypted (-X) or not (-Y). >> >> On 2017-08-11 14:31, David Gobbi wrote: >> How are you doing the X11 forwarding? Are you using "ssh -Y"? >> >> On Fri, Aug 11, 2017 at 6:20 AM, Sophonet >> wrote: >> >> Hi list, >> >> an application using VTK 8.0.0 and Qt 5.9.1 (built with -opengl >> desktop) does not start correctly (using X11 forwarding). After >> displaying an error message "failed to get the current screen >> resources", there is another error message >> >> vtkXOpenGLRenderWindow (0x55f891d77a80): GL version 2.1 with the >> gpu_shader4 extension is not supported by your graphics driver but >> is required for the new OpenGL rendering backend. Please update your >> OpenGL driver. If you are using Mesa please make sure you have >> version 10.6.5 or later and make sure your driver in Mesa supports >> OpenGL 3.2. >> >> However, my Ubuntu 17.04 system has Mesa 17.0.7, glxgears works fine >> (using X11 forwarding) and glxinfo shows (among other things) the >> correct driver - see below, so I am a bit puzzled what is going on. >> Any hints? >> >> Thanks, >> >> sophonet >> >> P.S.: The first call in my application's main() function is >> QSurfaceFormat::setDefaultFormat, see below. The same application >> runs fine and without problems on Windows. >> >> #if QT_VERSION >= 0x050500 >> // before initializing QApplication, set the default surface >> format, see documentation >> >> QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); >> #endif >> >> GLX version: 1.2 >> GLX extensions: >> GLX_ARB_get_proc_address, GLX_ARB_multisample, >> GLX_EXT_import_context, >> GLX_EXT_visual_info, GLX_EXT_visual_rating, >> GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, >> GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, >> GLX_SGI_make_current_read >> Extended renderer info (GLX_MESA_query_renderer): >> Vendor: VMware, Inc. (0xffffffff) >> Device: llvmpipe (LLVM 4.0, 128 bits) (0xffffffff) >> Version: 17.0.7 >> Accelerated: no >> Video memory: 3949MB >> Unified memory: no >> Preferred profile: core (0x1) >> Max core profile version: 3.3 >> Max compat profile version: 3.0 >> Max GLES1 profile version: 1.1 >> Max GLES[23] profile version: 3.0 >> OpenGL vendor string: VMware, Inc. >> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits) >> OpenGL version string: 3.0 Mesa 17.0.7 >> OpenGL shading language version string: 1.30 >> >> ______________________________________________ From Andx_roo at live.com Sun Aug 13 04:28:03 2017 From: Andx_roo at live.com (Andaharoo) Date: Sun, 13 Aug 2017 01:28:03 -0700 (MST) Subject: [vtkusers] Trouble blending two 3d images Message-ID: <1502612883149-5744385.post@n5.nabble.com> I have two 3d images that I'd like to blend and then display in imageViewer2. Here's the code: // Create the mask image based off input maskImage = vtkSmartPointer::New(); maskImage->SetDimensions(inputImage->GetDimensions()); maskImage->SetSpacing(inputImage->GetSpacing()); maskImage->SetOrigin(inputImage->GetOrigin()); maskImage->AllocateScalars(VTK_UNSIGNED_CHAR, 3); int* dim = maskImage->GetDimensions(); // Get pointer to beginning of image unsigned char* ptr = static_cast(maskImage->GetScalarPointer(0, 0, 0)); for (int i = 0; i < dim[0] * dim[1] * dim[2]; i++) { // Set and advance the pixel *ptr++ = 255; *ptr++ = 0; *ptr++ = 0; } blendFilter = vtkSmartPointer::New(); blendFilter->AddInputData(inputImage); blendFilter->AddInputData(maskImage); blendFilter->SetOpacity(0, 1.0); blendFilter->SetOpacity(1, 0.5); blendFilter->Update(); Unfortunately my program just freezes and pulls up the vtkOutputWindow with nothing in it. Also does type matter when using these? I'm trying to blend a grayscale (single float image) with an rgb image (uchar). -- View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-blending-two-3d-images-tp5744385.html Sent from the VTK - Users mailing list archive at Nabble.com. From chenshaoqiang at buaa.edu.cn Sun Aug 13 07:36:55 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Sun, 13 Aug 2017 19:36:55 +0800 Subject: [vtkusers] What does the mean? x64 and win32 Message-ID: <22FCE09E8EFE4027990CD380125D5340@chensqPC> My vtk works very well. But today I noticed that every project in my vtk is builed with x64 and win32 as shown in the accessory. I was confused what this mean? I used to think that win32 should go with x86 while x64 should go with win64. I want to know that in this situation how much memory I could use? Thank you in advance. Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.png Type: image/png Size: 195974 bytes Desc: not available URL: From DLRdave at aol.com Sun Aug 13 12:43:28 2017 From: DLRdave at aol.com (David Cole) Date: Sun, 13 Aug 2017 12:43:28 -0400 Subject: [vtkusers] What does the mean? x64 and win32 In-Reply-To: <22FCE09E8EFE4027990CD380125D5340@chensqPC> References: <22FCE09E8EFE4027990CD380125D5340@chensqPC> Message-ID: WIN32 is defined even in x64 builds. You are building 64-bit libraries and executables, and can use however much memory a system has based on 64-bit limits. That is, you shouldn't find any limitation like 2G or 3G of memory as you do in a 32-bit app. HTH, David C. On Sun, Aug 13, 2017 at 7:36 AM, chensq wrote: > My vtk works very well. But today I noticed that every project in my vtk is > builed with x64 and win32 as shown in the accessory. > I was confused what this mean? I used to think that win32 should go with x86 > while x64 should go with win64. > I want to know that in this situation how much memory I could use? > Thank you in advance. > Chen > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From chenshaoqiang at buaa.edu.cn Sun Aug 13 18:38:11 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Mon, 14 Aug 2017 06:38:11 +0800 Subject: [vtkusers] [SPAM] Re: What does the mean? x64 and win32 In-Reply-To: References: <22FCE09E8EFE4027990CD380125D5340@chensqPC> Message-ID: Thank you for your explanation David. You makes me calm. Chen -----????----- From: David Cole Sent: Monday, August 14, 2017 12:43 AM To: chensq Cc: vtkusers Subject: [SPAM] Re: [vtkusers] What does the mean? x64 and win32 WIN32 is defined even in x64 builds. You are building 64-bit libraries and executables, and can use however much memory a system has based on 64-bit limits. That is, you shouldn't find any limitation like 2G or 3G of memory as you do in a 32-bit app. HTH, David C. On Sun, Aug 13, 2017 at 7:36 AM, chensq wrote: > My vtk works very well. But today I noticed that every project in my vtk > is > builed with x64 and win32 as shown in the accessory. > I was confused what this mean? I used to think that win32 should go with > x86 > while x64 should go with win64. > I want to know that in this situation how much memory I could use? > Thank you in advance. > Chen > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From yangmin_hust at 126.com Mon Aug 14 03:47:48 2017 From: yangmin_hust at 126.com (minyang) Date: Mon, 14 Aug 2017 00:47:48 -0700 (MST) Subject: [vtkusers] Endpoints not follow distance line when moving In-Reply-To: References: <1502243093715-5744325.post@n5.nabble.com> Message-ID: <1502696868931-5744389.post@n5.nabble.com> Hi Yoshimi, Thanks for your replication. vtkLineWidget2 + vtkLineRepresentation could be a workaround. Thanks, min -- View this message in context: http://vtk.1045678.n5.nabble.com/Endpoints-not-follow-distance-line-when-moving-tp5744325p5744389.html Sent from the VTK - Users mailing list archive at Nabble.com. From rick at pile.com Mon Aug 14 07:34:07 2017 From: rick at pile.com (Rick Dailey) Date: Mon, 14 Aug 2017 04:34:07 -0700 (MST) Subject: [vtkusers] vtkTextureObject bind error In-Reply-To: References: <1501261737667-5744202.post@n5.nabble.com> <1501498447377-5744215.post@n5.nabble.com> <1501518920479-5744223.post@n5.nabble.com> <1501522915867-5744226.post@n5.nabble.com> <1501584716697-5744234.post@n5.nabble.com> Message-ID: <1502710447044-5744390.post@n5.nabble.com> We are now informing customers that we are relying on a third-party (Kitware) to update the graphics libraries before we can fix the bug in our software. Please understand that work-arounds and hacks we have attempted have not been especially useful. We really need a fix in VTK (large objects - streaming with masks on). Is there any way that we could be informed of the status of the work that is being done as mentioned in a previous post? Is there anything we can do to help with the solution? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744390.html Sent from the VTK - Users mailing list archive at Nabble.com. From J.Mueller at vr.rwth-aachen.de Mon Aug 14 09:57:31 2017 From: J.Mueller at vr.rwth-aachen.de (=?iso-8859-1?Q?M=FCller=2C_Jan?=) Date: Mon, 14 Aug 2017 13:57:31 +0000 Subject: [vtkusers] Represent Grid as Points Message-ID: <4adf15e7a93c40068e4b71ad9de75336@rwthex-s1-a.rwth-ad.de> Hi All, I am new to VTK and I have trouble visualising just the points of a "vtkUniformGrid". I create a grid and attach Scalars to its points. So far so good but when it comes to visualising the points of the grid im having problems. I found "SetRepresentationToPoints"sadly this only visualises the surface of my Grid but i want ALL points of the grid. The next promising thing I found is "vtkVertexGlyphFilter" but I didnt manage to find a comfortable way of connecting my Grid to it , without creating "vtkPolyData" by iterating through all points of the grid one by one. I am pretty sure there must be an easy way to visualise a Grid as Points but im unable to find it. Any help is very much appreciated! Greetings Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Mon Aug 14 10:43:05 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Mon, 14 Aug 2017 23:43:05 +0900 Subject: [vtkusers] Trouble blending two 3d images In-Reply-To: <1502612883149-5744385.post@n5.nabble.com> References: <1502612883149-5744385.post@n5.nabble.com> Message-ID: Hi Andaharoo, How about compiling with debug and using DebugOn member function on the blendFilter? blendFilter->DebugOn(); It may display additional information related to the problem. Regards, yoshimi 2017-08-13 17:28 GMT+09:00 Andaharoo : > I have two 3d images that I'd like to blend and then display in imageViewer2. > Here's the code: > // Create the mask image based off input > maskImage = vtkSmartPointer::New(); > maskImage->SetDimensions(inputImage->GetDimensions()); > maskImage->SetSpacing(inputImage->GetSpacing()); > maskImage->SetOrigin(inputImage->GetOrigin()); > maskImage->AllocateScalars(VTK_UNSIGNED_CHAR, 3); > int* dim = maskImage->GetDimensions(); > // Get pointer to beginning of image > unsigned char* ptr = static_cast char*>(maskImage->GetScalarPointer(0, 0, 0)); > for (int i = 0; i < dim[0] * dim[1] * dim[2]; i++) > { > // Set and advance the pixel > *ptr++ = 255; > *ptr++ = 0; > *ptr++ = 0; > } > blendFilter = vtkSmartPointer::New(); > blendFilter->AddInputData(inputImage); > blendFilter->AddInputData(maskImage); > blendFilter->SetOpacity(0, 1.0); > blendFilter->SetOpacity(1, 0.5); > blendFilter->Update(); > > Unfortunately my program just freezes and pulls up the vtkOutputWindow with > nothing in it. > > Also does type matter when using these? I'm trying to blend a grayscale > (single float image) with an rgb image (uchar). > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-blending-two-3d-images-tp5744385.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 dan.lipsa at kitware.com Mon Aug 14 11:26:15 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 14 Aug 2017 11:26:15 -0400 Subject: [vtkusers] Planet sized objects and distances on the scale of the Solar System In-Reply-To: References: Message-ID: I would look at the the difference between sun diameter and the planets (if you show the sun on the screen a planet would be smaller than a pixel). Also, the distance between planets might be so big that if you want to show that on the screen, planets would be too small to be seen. I have not look at the actual distances, but this might be some of what you are seeing. I would start with smaller ratios between sun vs planets and distances between planets versus planet diameters. After everyting works as expected, you can move toward the real distances. On Fri, Aug 11, 2017 at 9:57 AM, Mads M. Hansen wrote: > Hi list, > > I am currently writing what I hope is to be a realistic simulation of the > Solar System in C++ and to visualize it in 3D with VTK. However when I try > to render the objects (which er spheres) I get either a black screen or > when I scale the distances/radii a bit the object shown, until I click with > the mouse and then it disappears. You can see the code attached. > > Do you have any suggestions on how to solve this issue? > > Thanks, > Mads. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Aug 14 11:57:01 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 14 Aug 2017 11:57:01 -0400 Subject: [vtkusers] Represent Grid as Points In-Reply-To: <4adf15e7a93c40068e4b71ad9de75336@rwthex-s1-a.rwth-ad.de> References: <4adf15e7a93c40068e4b71ad9de75336@rwthex-s1-a.rwth-ad.de> Message-ID: Does this help? https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ On Mon, Aug 14, 2017 at 9:57 AM, M?ller, Jan wrote: > Hi All, > > I am new to VTK and I have trouble visualising just the points of a > "vtkUniformGrid". I create a grid and attach Scalars to its points. So far > so good but when it comes to visualising the points of the grid im having > problems. > > > I found "SetRepresentationToPoints"sadly this only visualises the > surface of my Grid but i want ALL points of the grid. > > The next promising thing I found is "vtkVertexGlyphFilter" but I didnt > manage to find a comfortable way of connecting my Grid to it , > without creating "vtkPolyData" by iterating through all points of the grid > one by one. > > > I am pretty sure there must be an easy way to visualise a Grid as Points > but im unable to find it. > Any help is very much appreciated! > > Greetings > Jan > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Mon Aug 14 13:34:07 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 14 Aug 2017 17:34:07 +0000 Subject: [vtkusers] Represent Grid as Points In-Reply-To: References: <4adf15e7a93c40068e4b71ad9de75336@rwthex-s1-a.rwth-ad.de> Message-ID: Or https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Glyph3DMapper On Mon, Aug 14, 2017 at 11:57 AM Dan Lipsa wrote: > Does this help? > https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ > > On Mon, Aug 14, 2017 at 9:57 AM, M?ller, Jan > wrote: > >> Hi All, >> >> I am new to VTK and I have trouble visualising just the points of a >> "vtkUniformGrid". I create a grid and attach Scalars to its points. So far >> so good but when it comes to visualising the points of the grid im having >> problems. >> >> >> I found "SetRepresentationToPoints"sadly this only visualises the >> surface of my Grid but i want ALL points of the grid. >> >> The next promising thing I found is "vtkVertexGlyphFilter" but I didnt >> manage to find a comfortable way of connecting my Grid to it , >> without creating "vtkPolyData" by iterating through all points of the grid >> one by one. >> >> >> I am pretty sure there must be an easy way to visualise a Grid as Points >> but im unable to find it. >> Any help is very much appreciated! >> >> Greetings >> Jan >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Aug 14 13:36:17 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 14 Aug 2017 17:36:17 +0000 Subject: [vtkusers] Trouble blending two 3d images In-Reply-To: References: <1502612883149-5744385.post@n5.nabble.com> Message-ID: Please provide a small compilable example that illustrates the problem. On Mon, Aug 14, 2017 at 10:43 AM kenichiro yoshimi wrote: > Hi Andaharoo, > > How about compiling with debug and using DebugOn member function on > the blendFilter? > blendFilter->DebugOn(); > It may display additional information related to the problem. > > Regards, > yoshimi > > 2017-08-13 17:28 GMT+09:00 Andaharoo : > > I have two 3d images that I'd like to blend and then display in > imageViewer2. > > Here's the code: > > // Create the mask image based off input > > maskImage = vtkSmartPointer::New(); > > maskImage->SetDimensions(inputImage->GetDimensions()); > > maskImage->SetSpacing(inputImage->GetSpacing()); > > maskImage->SetOrigin(inputImage->GetOrigin()); > > maskImage->AllocateScalars(VTK_UNSIGNED_CHAR, 3); > > int* dim = maskImage->GetDimensions(); > > // Get pointer to beginning of image > > unsigned char* ptr = static_cast > char*>(maskImage->GetScalarPointer(0, 0, 0)); > > for (int i = 0; i < dim[0] * dim[1] * dim[2]; i++) > > { > > // Set and advance the pixel > > *ptr++ = 255; > > *ptr++ = 0; > > *ptr++ = 0; > > } > > blendFilter = vtkSmartPointer::New(); > > blendFilter->AddInputData(inputImage); > > blendFilter->AddInputData(maskImage); > > blendFilter->SetOpacity(0, 1.0); > > blendFilter->SetOpacity(1, 0.5); > > blendFilter->Update(); > > > > Unfortunately my program just freezes and pulls up the vtkOutputWindow > with > > nothing in it. > > > > Also does type matter when using these? I'm trying to blend a grayscale > > (single float image) with an rgb image (uchar). > > > > > > > > -- > > View this message in context: > http://vtk.1045678.n5.nabble.com/Trouble-blending-two-3d-images-tp5744385.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.oleary at kitware.com Mon Aug 14 13:38:46 2017 From: patrick.oleary at kitware.com (Patrick O'Leary) Date: Mon, 14 Aug 2017 11:38:46 -0600 Subject: [vtkusers] ISAV 2017 paper deadline extension: 29 Aug 2017, 3rd Annual Workshop on In Situ Infrastructures for Enabling Extreme-Scale Analysis and Visualization (ISAV 2017) Message-ID: (Apologies if you receive multiple copies of this notice, it is being cross posted to several different lists) Update: paper submission due date extended to 29 Aug 2017 23:59 AoE ISAV 2017: In Situ Infrastructures for Enabling Extreme-Scale Analysis and Visualization In cooperation with SIGHPC and held in conjunction with SC17: The International Conference on High Performance Computing, Networking, Storage and Analysis, Denver, Colorado, U.S.A. ISAV 2017 - http://vis.lbl.gov/Events/ISAV-2017/ Full-day 9:00 AM - 5:30 PM Sunday November 12th, 2017 Workshop Theme 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 file system. 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, CPUs and accelerators, in the computation of analysis products. The workshop brings together researchers, developers and practitioners from industry, academia, and government laboratories developing, applying, and deploying in situ methods in extreme-scale, high performance computing. The goal is to present research findings, lessons learned, and insights related to developing and applying in situ methods and infrastructure across a range of science and engineering applications in HPC environments; 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; to serve as a ?center of gravity? for researchers, practitioners, and users/consumers of in situ methods and infrastructure in the HPC space. Participation/Call for Papers and Oral Presentations We invite two types of submissions to ISAV 2017: (1) short, 4-page papers that present research results, that identify opportunities or challenges, and that present case studies/best practices for in situ methods/infrastructure in the areas of data management, analysis and visualization; (2) lightning presentation submission, consisting of a 1- or 2-page submission, for a brief oral presentation at the workshop. Short papers will appear in the workshop proceedings and will be invited to give an oral presentation of 15 to 20 minutes; lightning round submissions that are invited to present at the workshop will have author names and titles included as part of the proceedings. Submissions of both types are welcome that fall within one or more areas of interest, as follows: 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 Methods/algorithms/applications/Case studies * Best practices * Analysis: feature detection, statistical methods, temporal methods, geometric methods * Visualization: information visualization, scientific visualization, time-varying methods * Data reduction/compression * Examples/case studies of solving a specific science challenge with in situ methods/infrastructure. 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 Review Process All submissions will undergo a peer-review process consisting of three reviews by experts in the field, and evaluated according to relevance to the workshop theme, technical soundness, creativity, originality, and impactfulness of method/results. Lightning round submissions will be evaluated primarily for relevance to the workshop. Submission Process Authors are invited to submit papers of at most 4 pages in PDF format, excluding references, and lightning presentations of at most 2 pages in PDF format, excluding references. Papers must be submitted in PDF format (readable by Adobe Acrobat Reader 5.0 and higher) and formatted for 8.5" x 11" (U.S. Letter). Submissions are required in the ACM format ( http://www.acm.org/sigs/publications/proceedings-templates) using the sample-sigconf template and submitted via EasyChair ( https://easychair.org/conferences/?conf=isav17). No changes to the margins, spacing, or font sizes as specified by the style file are allowed. Papers must be self-contained and provide the technical substance required for the program committee to evaluate their contributions. Submitted papers must be original work that has not appeared in and is not under consideration for another conference or a journal. See the ACM Prior Publication Policy for more details (http://www.acm.org/publicatio ns/policies/). Papers can be submitted at https://easychair.org/conferen ces/?conf=isav17. Publication in proceedings, presentation at the workshop All paper submissions that receive favorable reviews will be included as part of the workshop proceedings, which will be published through SIGHPC along with other SC17 workshop proceedings in the ACM Digital Library and IEEE Xplore. Lightning round submissions will not be included as part of the proceedings. Subject to the constraints of workshop length, some subset of the accepted publications will be invited to give a brief oral presentation at the workshop. The exact number of such presentations and their length will be determined after the review process has been completed. Timeline/Important Dates 29 August 2017 Paper submission deadline 22 September 2017 Author notification 06 October 2017 Camera ready copy due 15 October 2017 Final program posted to ISAV web page 12 November 2017 ISAV 2017 workshop at SC17 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alvaro.sanchez at kitware.com Mon Aug 14 15:25:07 2017 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Mon, 14 Aug 2017 15:25:07 -0400 Subject: [vtkusers] vtkTextureObject bind error In-Reply-To: <1502710447044-5744390.post@n5.nabble.com> References: <1501261737667-5744202.post@n5.nabble.com> <1501498447377-5744215.post@n5.nabble.com> <1501518920479-5744223.post@n5.nabble.com> <1501522915867-5744226.post@n5.nabble.com> <1501584716697-5744234.post@n5.nabble.com> <1502710447044-5744390.post@n5.nabble.com> Message-ID: Sure Rick, I will let you know once the fix branch is ready for testing. On Mon, Aug 14, 2017 at 7:34 AM, Rick Dailey wrote: > We are now informing customers that we are relying on a third-party > (Kitware) > to update the graphics libraries before we can fix the bug in our software. > Please understand that work-arounds and hacks we have attempted have not > been especially useful. We really need a fix in VTK (large objects - > streaming with masks on). > > Is there any way that we could be informed of the status of the work that > is > being done as mentioned in a previous post? Is there anything we can do to > help with the solution? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/vtkTextureObject-bind-error-tp5744068p5744390.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 > -- Alvaro Sanchez Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Mueller at vr.rwth-aachen.de Mon Aug 14 16:49:01 2017 From: J.Mueller at vr.rwth-aachen.de (=?iso-8859-1?Q?M=FCller=2C_Jan?=) Date: Mon, 14 Aug 2017 20:49:01 +0000 Subject: [vtkusers] Represent Grid as Points In-Reply-To: References: <4adf15e7a93c40068e4b71ad9de75336@rwthex-s1-a.rwth-ad.de> , Message-ID: <1502743749117.81939@vr.rwth-aachen.de> This: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ Plus: vtkSmartPointer grid = vtkSmartPointer::New(); grid->SetDimensions(xsize, ysize, zsize); vtkSmartPointer points = vtkSmartPointer::New(); for (int i = 0; i < grid->GetNumberOfPoints(); ++i) { points->InsertNextPoint(grid->GetPoint(i)); } is pretty much what i do at the moment, I wonder if there is a way to get the Points out of a grid without iterating through the whole grid and copying every single point it contains. Thanks for your help? ________________________________ Von: Bill Lorensen Gesendet: Montag, 14. August 2017 19:34 An: Dan Lipsa; M?ller, Jan Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Represent Grid as Points Or https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Glyph3DMapper On Mon, Aug 14, 2017 at 11:57 AM Dan Lipsa > wrote: Does this help? https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ On Mon, Aug 14, 2017 at 9:57 AM, M?ller, Jan > wrote: Hi All, I am new to VTK and I have trouble visualising just the points of a "vtkUniformGrid". I create a grid and attach Scalars to its points. So far so good but when it comes to visualising the points of the grid im having problems. I found "SetRepresentationToPoints"sadly this only visualises the surface of my Grid but i want ALL points of the grid. The next promising thing I found is "vtkVertexGlyphFilter" but I didnt manage to find a comfortable way of connecting my Grid to it , without creating "vtkPolyData" by iterating through all points of the grid one by one. I am pretty sure there must be an easy way to visualise a Grid as Points but im unable to find it. Any help is very much appreciated! Greetings Jan _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Aug 14 17:41:36 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 14 Aug 2017 17:41:36 -0400 Subject: [vtkusers] Represent Grid as Points In-Reply-To: <1502743749117.81939@vr.rwth-aachen.de> References: <4adf15e7a93c40068e4b71ad9de75336@rwthex-s1-a.rwth-ad.de> <1502743749117.81939@vr.rwth-aachen.de> Message-ID: Why do you need a vtkPoints? In the example it is only used to create the points. For a uniform grid (or image data) the points are not stored but infered from origin and spacing so you should not need them at least for making something similar with the example work. Dan On Mon, Aug 14, 2017 at 4:49 PM, M?ller, Jan wrote: > This: > https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ > Plus: > vtkSmartPointer grid = vtkSmartPointer< > vtkUniformGrid>::New(); > grid->SetDimensions(xsize, ysize, zsize); > > vtkSmartPointer points = vtkSmartPointer::New(); > for (int i = 0; i < grid->GetNumberOfPoints(); ++i) { > points->InsertNextPoint(grid->GetPoint(i)); > } > is pretty much what i do at the moment, I wonder if there is a way to get > the Points out of a grid without iterating through the whole grid and > copying every single point it contains. > Thanks for your help? > > > ------------------------------ > *Von:* Bill Lorensen > *Gesendet:* Montag, 14. August 2017 19:34 > *An:* Dan Lipsa; M?ller, Jan > *Cc:* vtkusers at vtk.org > *Betreff:* Re: [vtkusers] Represent Grid as Points > > Or https://lorensen.github.io/VTKExamples/site/Cxx/ > Visualization/Glyph3DMapper > > On Mon, Aug 14, 2017 at 11:57 AM Dan Lipsa wrote: > >> Does this help? >> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ >> >> On Mon, Aug 14, 2017 at 9:57 AM, M?ller, Jan > > wrote: >> >>> Hi All, >>> >>> I am new to VTK and I have trouble visualising just the points of a >>> "vtkUniformGrid". I create a grid and attach Scalars to its points. So far >>> so good but when it comes to visualising the points of the grid im having >>> problems. >>> >>> >>> I found "SetRepresentationToPoints"sadly this only visualises the >>> surface of my Grid but i want ALL points of the grid. >>> >>> The next promising thing I found is "vtkVertexGlyphFilter" but I didnt >>> manage to find a comfortable way of connecting my Grid to it , >>> without creating "vtkPolyData" by iterating through all points of the grid >>> one by one. >>> >>> >>> I am pretty sure there must be an easy way to visualise a Grid as Points >>> but im unable to find it. >>> Any help is very much appreciated! >>> >>> Greetings >>> Jan >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/ >>> opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/ >> opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Mueller at vr.rwth-aachen.de Mon Aug 14 17:50:04 2017 From: J.Mueller at vr.rwth-aachen.de (=?iso-8859-1?Q?M=FCller=2C_Jan?=) Date: Mon, 14 Aug 2017 21:50:04 +0000 Subject: [vtkusers] Represent Grid as Points In-Reply-To: References: <4adf15e7a93c40068e4b71ad9de75336@rwthex-s1-a.rwth-ad.de> <1502743749117.81939@vr.rwth-aachen.de>, Message-ID: <1502747411397.15935@vr.rwth-aachen.de> My goal is to visualise the points (and only the points) of a grid as points and i found no other way then converting the grid into vtkPoints. ________________________________ Von: Dan Lipsa Gesendet: Montag, 14. August 2017 23:41 An: M?ller, Jan Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Represent Grid as Points Why do you need a vtkPoints? In the example it is only used to create the points. For a uniform grid (or image data) the points are not stored but infered from origin and spacing so you should not need them at least for making something similar with the example work. Dan On Mon, Aug 14, 2017 at 4:49 PM, M?ller, Jan > wrote: This: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ Plus: vtkSmartPointer grid = vtkSmartPointer::New(); grid->SetDimensions(xsize, ysize, zsize); vtkSmartPointer points = vtkSmartPointer::New(); for (int i = 0; i < grid->GetNumberOfPoints(); ++i) { points->InsertNextPoint(grid->GetPoint(i)); } is pretty much what i do at the moment, I wonder if there is a way to get the Points out of a grid without iterating through the whole grid and copying every single point it contains. Thanks for your help? ________________________________ Von: Bill Lorensen > Gesendet: Montag, 14. August 2017 19:34 An: Dan Lipsa; M?ller, Jan Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Represent Grid as Points Or https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Glyph3DMapper On Mon, Aug 14, 2017 at 11:57 AM Dan Lipsa > wrote: Does this help? https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ On Mon, Aug 14, 2017 at 9:57 AM, M?ller, Jan > wrote: Hi All, I am new to VTK and I have trouble visualising just the points of a "vtkUniformGrid". I create a grid and attach Scalars to its points. So far so good but when it comes to visualising the points of the grid im having problems. I found "SetRepresentationToPoints"sadly this only visualises the surface of my Grid but i want ALL points of the grid. The next promising thing I found is "vtkVertexGlyphFilter" but I didnt manage to find a comfortable way of connecting my Grid to it , without creating "vtkPolyData" by iterating through all points of the grid one by one. I am pretty sure there must be an easy way to visualise a Grid as Points but im unable to find it. Any help is very much appreciated! Greetings Jan _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Aug 14 20:30:14 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 14 Aug 2017 20:30:14 -0400 Subject: [vtkusers] Represent Grid as Points In-Reply-To: <1502747411397.15935@vr.rwth-aachen.de> References: <4adf15e7a93c40068e4b71ad9de75336@rwthex-s1-a.rwth-ad.de> <1502743749117.81939@vr.rwth-aachen.de> <1502747411397.15935@vr.rwth-aachen.de> Message-ID: Try this: https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Glyph3DImage/ On Mon, Aug 14, 2017 at 5:50 PM, M?ller, Jan wrote: > My goal is to visualise the points (and only the points) of a grid as points > and i found no other way then converting the grid into vtkPoints. > > ________________________________ > Von: Dan Lipsa > Gesendet: Montag, 14. August 2017 23:41 > An: M?ller, Jan > > Cc: vtkusers at vtk.org > Betreff: Re: [vtkusers] Represent Grid as Points > > Why do you need a vtkPoints? In the example it is only used to create the > points. For a uniform grid (or image data) the points are not stored but > infered from origin and spacing so you should not need them at least for > making something similar with the example work. > > Dan > > > On Mon, Aug 14, 2017 at 4:49 PM, M?ller, Jan > wrote: >> >> This: >> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ >> Plus: >> vtkSmartPointer grid = >> vtkSmartPointer::New(); >> grid->SetDimensions(xsize, ysize, zsize); >> >> vtkSmartPointer points = vtkSmartPointer::New(); >> for (int i = 0; i < grid->GetNumberOfPoints(); ++i) { >> points->InsertNextPoint(grid->GetPoint(i)); >> } >> is pretty much what i do at the moment, I wonder if there is a way to get >> the Points out of a grid without iterating through the whole grid and >> copying every single point it contains. >> Thanks for your help >> >> >> ________________________________ >> Von: Bill Lorensen >> Gesendet: Montag, 14. August 2017 19:34 >> An: Dan Lipsa; M?ller, Jan >> Cc: vtkusers at vtk.org >> Betreff: Re: [vtkusers] Represent Grid as Points >> >> Or >> https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Glyph3DMapper >> >> On Mon, Aug 14, 2017 at 11:57 AM Dan Lipsa wrote: >>> >>> Does this help? >>> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ >>> >>> On Mon, Aug 14, 2017 at 9:57 AM, M?ller, Jan >>> wrote: >>>> >>>> Hi All, >>>> >>>> I am new to VTK and I have trouble visualising just the points of a >>>> "vtkUniformGrid". I create a grid and attach Scalars to its points. So far >>>> so good but when it comes to visualising the points of the grid im having >>>> problems. >>>> >>>> >>>> I found "SetRepresentationToPoints"sadly this only visualises the >>>> surface of my Grid but i want ALL points of the grid. >>>> >>>> The next promising thing I found is "vtkVertexGlyphFilter" but I didnt >>>> manage to find a comfortable way of connecting my Grid to it , without >>>> creating "vtkPolyData" by iterating through all points of the grid one by >>>> one. >>>> >>>> >>>> I am pretty sure there must be an easy way to visualise a Grid as Points >>>> but im unable to find it. >>>> Any help is very much appreciated! >>>> >>>> Greetings >>>> Jan >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From Andx_roo at live.com Mon Aug 14 21:20:49 2017 From: Andx_roo at live.com (Andaharoo) Date: Mon, 14 Aug 2017 18:20:49 -0700 (MST) Subject: [vtkusers] Trouble blending two 3d images In-Reply-To: References: <1502612883149-5744385.post@n5.nabble.com> Message-ID: <1502760049965-5744403.post@n5.nabble.com> Thanks, I wasn't aware there was a DebugOn function. It seems you can't blend a greyscale and rgb image. It's strange this error message isn't thrown to the vtkOutputWindow without DebugOn though. Instead just blankly doing nothing. Color mapping the rgb image to r=g=b and then blending worked. This works: // Creates a blank image to edit and overlay over the input > maskImage = vtkSmartPointer::New(); > maskImage->SetDimensions(inputImage->GetDimensions()); > maskImage->SetSpacing(inputImage->GetSpacing()); > maskImage->SetOrigin(inputImage->GetOrigin()); > maskImage->AllocateScalars(VTK_UNSIGNED_CHAR, 3); > int* dim = maskImage->GetDimensions(); > // Get pointer to beginning of image > unsigned char* ptr = static_cast char*>(maskImage->GetScalarPointer(0, 0, 0)); > for (int i = 0; i < dim[0] * dim[1] * dim[2]; i++) > { > // Set and advance the pixel. Initially make the mask red for > testing. > *ptr++ = 255; > *ptr++ = 0; > *ptr++ = 0; > } blendFilter = vtkSmartPointer::New(); // Convert greyscale input to rgb rgbConverter = vtkSmartPointer::New(); rgbConverter->SetInputData(input); rgbMap = vtkSmartPointer::New(); rgbConverter->SetLookupTable(rgbMap); rgbConverter->Update(); blendFilter->AddInputData(rgbConverter->GetOutput()); blendFilter->AddInputData(maskImage); blendFilter->SetOpacity(0, 1.0); blendFilter->SetOpacity(1, 0.5); blendFilter->Update(); -- View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-blending-two-3d-images-tp5744385p5744403.html Sent from the VTK - Users mailing list archive at Nabble.com. From yujie_job at 163.com Mon Aug 14 22:57:23 2017 From: yujie_job at 163.com (yujie_job at 163.com) Date: Mon, 14 Aug 2017 19:57:23 -0700 (MST) Subject: [vtkusers] how can I use vtkSMPTools Message-ID: <1502765843171-5744404.post@n5.nabble.com> Dear all, I am trying to parallelize my code with vtkSMPTools. my vtk version is v8.0 and compiled with vs 2015. I set VTK_SMP_IMPLEMENTATION_TYPE=openmp. but when i the the test code in testSMP.cxx, I am quite sure that only one thread used. my computer has 4 cores with 8 threads. I do not know what happends? should i install openmp to use vtkSMPTools? I wish someone will give me some help! best wishes, Jie -- View this message in context: http://vtk.1045678.n5.nabble.com/how-can-I-use-vtkSMPTools-tp5744404.html Sent from the VTK - Users mailing list archive at Nabble.com. From ztdepyahoo at gmail.com Tue Aug 15 00:01:08 2017 From: ztdepyahoo at gmail.com (ztdepyahoo) Date: Tue, 15 Aug 2017 12:01:08 +0800 Subject: [vtkusers] write FVM data for 3D unstrucured grid Message-ID: <62299B46-A4D8-4716-9154-820F2001B137@gmail.com> An HTML attachment was scrubbed... URL: From J.Mueller at vr.rwth-aachen.de Tue Aug 15 04:15:22 2017 From: J.Mueller at vr.rwth-aachen.de (=?iso-8859-1?Q?M=FCller=2C_Jan?=) Date: Tue, 15 Aug 2017 08:15:22 +0000 Subject: [vtkusers] Represent Grid as Points In-Reply-To: References: <4adf15e7a93c40068e4b71ad9de75336@rwthex-s1-a.rwth-ad.de> <1502743749117.81939@vr.rwth-aachen.de> <1502747411397.15935@vr.rwth-aachen.de>, Message-ID: <1502784929569.44555@vr.rwth-aachen.de> That is exactly what I was looking for, Thank you! ________________________________________ Von: Bill Lorensen Gesendet: Dienstag, 15. August 2017 02:30 An: M?ller, Jan Cc: Dan Lipsa; vtkusers at vtk.org Betreff: Re: [vtkusers] Represent Grid as Points Try this: https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Glyph3DImage/ On Mon, Aug 14, 2017 at 5:50 PM, M?ller, Jan wrote: > My goal is to visualise the points (and only the points) of a grid as points > and i found no other way then converting the grid into vtkPoints. > > ________________________________ > Von: Dan Lipsa > Gesendet: Montag, 14. August 2017 23:41 > An: M?ller, Jan > > Cc: vtkusers at vtk.org > Betreff: Re: [vtkusers] Represent Grid as Points > > Why do you need a vtkPoints? In the example it is only used to create the > points. For a uniform grid (or image data) the points are not stored but > infered from origin and spacing so you should not need them at least for > making something similar with the example work. > > Dan > > > On Mon, Aug 14, 2017 at 4:49 PM, M?ller, Jan > wrote: >> >> This: >> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ >> Plus: >> vtkSmartPointer grid = >> vtkSmartPointer::New(); >> grid->SetDimensions(xsize, ysize, zsize); >> >> vtkSmartPointer points = vtkSmartPointer::New(); >> for (int i = 0; i < grid->GetNumberOfPoints(); ++i) { >> points->InsertNextPoint(grid->GetPoint(i)); >> } >> is pretty much what i do at the moment, I wonder if there is a way to get >> the Points out of a grid without iterating through the whole grid and >> copying every single point it contains. >> Thanks for your help >> >> >> ________________________________ >> Von: Bill Lorensen >> Gesendet: Montag, 14. August 2017 19:34 >> An: Dan Lipsa; M?ller, Jan >> Cc: vtkusers at vtk.org >> Betreff: Re: [vtkusers] Represent Grid as Points >> >> Or >> https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Glyph3DMapper >> >> On Mon, Aug 14, 2017 at 11:57 AM Dan Lipsa wrote: >>> >>> Does this help? >>> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/ >>> >>> On Mon, Aug 14, 2017 at 9:57 AM, M?ller, Jan >>> wrote: >>>> >>>> Hi All, >>>> >>>> I am new to VTK and I have trouble visualising just the points of a >>>> "vtkUniformGrid". I create a grid and attach Scalars to its points. So far >>>> so good but when it comes to visualising the points of the grid im having >>>> problems. >>>> >>>> >>>> I found "SetRepresentationToPoints"sadly this only visualises the >>>> surface of my Grid but i want ALL points of the grid. >>>> >>>> The next promising thing I found is "vtkVertexGlyphFilter" but I didnt >>>> manage to find a comfortable way of connecting my Grid to it , without >>>> creating "vtkPolyData" by iterating through all points of the grid one by >>>> one. >>>> >>>> >>>> I am pretty sure there must be an easy way to visualise a Grid as Points >>>> but im unable to find it. >>>> Any help is very much appreciated! >>>> >>>> Greetings >>>> Jan >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From ken.martin at kitware.com Tue Aug 15 09:44:16 2017 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 15 Aug 2017 09:44:16 -0400 Subject: [vtkusers] =?utf-8?b?562U5aSNOiDnrZTlpI06IFZvbHVtZSByZW5kZXJlcmlu?= =?utf-8?q?g_with_OpenVR?= In-Reply-To: References: <969181508.108761.1501751511482.JavaMail.administrator@static.162.255.23.22.macminivault.com> Message-ID: Keeping the discussion on list so others can benefit. You should use OpenGL2 for OpenVR and Qt in VTK. For Qt (5.x) you should use the new QVTKOpenGLWidget. You will probably want to turn off the OpenVR factory cmake setting and manually create the OpenVR camera/renderwindow/renderer/renderWindowInteractor as the TestDragon test does. On Mon, Aug 14, 2017 at 9:56 PM, zhao tianchang wrote: > I am very happy to solve the problem mentioned above. When I build VTK > with Qt and OpneVR, I ran into a mistake that Qt uses OpenGL, while OpenVR > must uses OpenGL2. Can't they be compiled together? > > Thanks very much again. > > > ------------------------------ > *???:* Ken Martin > *????:* 2017?8?4? 6:15 > *???:* zhao tianchang > *??:* Re: ??: Volume renderering with OpenVR > > Turn off the frame loss warning for now. The real fix requires changes in > the guts of the Volume Rendering mapper of VTK. > > On Thu, Aug 3, 2017 at 10:42 PM, zhao tianchang > wrote: > >> Thank you for your reply. >> >> I meet the texture2D error and I set renderWindow->setMultiSamples(0) by >> your guidance. Then, I can see the Volume rendering image. But, the word >> "frame loss" is in the front of it. What changes should I do to dispaly it >> correctly. I found the Paraview displaying the volume rendering image by >> HTC Vive is perfect, no matter how close I am to the volume rendering image >> by HTC Vive. >> >> Could you give me some advice on how to set changes? >> >> Thanks very much. >> >> >> ------------------------------ >> *???:* Ken Martin >> *????:* 2017?8?3? 5:52 >> *???:* tianchang824 at outlook.com >> *??:* Re: Volume renderering with OpenVR >> >> The Volume rendering needs some changes to work when the viewer is close >> to the volume. When farther away it should be fine. >> >> On Thu, Aug 3, 2017 at 5:11 AM, wrote: >> >>> Hello Ken: >>> I'm sorry to send email to trouble you. >>> When I use HTC vive to see the result of volume renderering, it >>> present "frame loss" and I can see the volume. The word "frame loss" >>> presents in he front of the volume. And, the frame rate is very low. But, >>> when I use Paraview to see the same volume data, it is good. How can I >>> solve the problem? >>> Thanks. >>> >>> _____________________________________ >>> Sent from http://vtk.1045678.n5.nabble.com >>> >>> >> >> >> -- >> Ken Martin PhD >> Distinguished Engineer >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sujin.philip at kitware.com Tue Aug 15 09:52:19 2017 From: sujin.philip at kitware.com (Sujin Philip) Date: Tue, 15 Aug 2017 09:52:19 -0400 Subject: [vtkusers] how can I use vtkSMPTools In-Reply-To: <1502765843171-5744404.post@n5.nabble.com> References: <1502765843171-5744404.post@n5.nabble.com> Message-ID: Hi Jie, Can you tell me how you are verifying that only one thread is being used? I would also recommend that you switch to the TBB backend for SMP (VTK_SMP_IMPLEMENTATION_TYPE=tbb) as openmp support on the vc2015 compiler is poor. You can download Intel TBB from: https://www.threadingbuildingblocks.org/download#stable-releases. Thanks Sujin On Mon, Aug 14, 2017 at 10:57 PM, yujie_job at 163.com wrote: > Dear all, > > I am trying to parallelize my code with vtkSMPTools. my vtk version is v8.0 > and compiled with vs 2015. > I set VTK_SMP_IMPLEMENTATION_TYPE=openmp. > > but when i the the test code in testSMP.cxx, I am quite sure that only one > thread used. my computer has 4 cores with 8 threads. I do not know what > happends? should i install openmp to use vtkSMPTools? I wish someone will > give me some help! > > best wishes, > > Jie > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/how-can-I-use-vtkSMPTools-tp5744404.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 dan.lipsa at kitware.com Tue Aug 15 10:04:03 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 15 Aug 2017 10:04:03 -0400 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py Message-ID: Hi all, The above two files were (re)moved from the vtk/web directory. What is the updated version for the following example: https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Tue Aug 15 10:35:53 2017 From: aron.helser at kitware.com (Aron Helser) Date: Tue, 15 Aug 2017 10:35:53 -0400 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: I seem to have updated the example locally and not committed the documentation modification. Sorry about that! Those files have been renamed/moved into wslink: https://github.com/kitware/wslink Here are the updated example scripts for vtk and paraview - I will change the documented example to match. Regards, Aron On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa wrote: > Hi all, > The above two files were (re)moved from the vtk/web directory. > > What is the updated version for the following example: > > https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html > > Thanks, > Dan > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- # import to process args import os # import paraview modules. from paraview.web import pv_wslink from paraview.web import protocols as pv_protocols # import RPC annotation # from wslink import register as exportRpc from paraview import simple from wslink import server try: import argparse except ImportError: # since Python 2.6 and earlier don't have argparse, we simply provide # the source for the same as _argparse and we use it instead. from vtk.util import _argparse as argparse # ============================================================================= # Create custom Pipeline Manager class to handle clients requests # ============================================================================= class _DemoServer(pv_wslink.PVServerProtocol): def initialize(self): # Bring used components self.registerVtkWebProtocol(pv_protocols.ParaViewWebMouseHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebViewPort()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebViewPortImageDelivery()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebViewPortGeometryDelivery()) # Update authentication key to use self.updateSecret("wslink-secret") # Disable interactor-based render calls simple.GetRenderView().EnableRenderOnInteraction = 0 simple.GetRenderView().Background = [0,0,0] cone = simple.Cone() simple.Show(cone) # simple.Render() # Update interaction mode pxm = simple.servermanager.ProxyManager() interactionProxy = pxm.GetProxy('settings', 'RenderViewInteractionSettings') interactionProxy.Camera3DManipulators = ['Rotate', 'Pan', 'Zoom', 'Pan', 'Roll', 'Pan', 'Zoom', 'Rotate', 'Zoom'] # ============================================================================= # Main: Parse args and start server # ============================================================================= if __name__ == "__main__": # Create argument parser parser = argparse.ArgumentParser(description="ParaViewWeb Demo") # Add default arguments server.add_arguments(parser) # Add arguments args = parser.parse_args() # Start server server.start_webserver(options=args, protocol=_DemoServer) -------------- next part -------------- r""" This module is a VTK Web server application. The following command line illustrate how to use it:: $ vtkpython .../vtk_web_cone.py Any VTK Web executable script come with a set of standard arguments that can be overriden if need be:: --host localhost Interface on which the HTTP server will listen on. --port 8080 Port number on which the HTTP server will listen to. --content /path-to-web-content/ Directory that you want to server as static web content. By default, this variable is empty which mean that we rely on another server to deliver the static content and the current process only focus on the WebSocket connectivity of clients. --authKey vtk-secret Secret key that should be provided by the client to allow it to make any WebSocket communication. The client will assume if none is given that the server expect "vtk-secret" as secret key. """ # import to process args import sys import os # import vtk modules. import vtk from vtk.web import protocols from vtk.web import wslink as vtk_wslink from wslink import server try: import argparse except ImportError: # since Python 2.6 and earlier don't have argparse, we simply provide # the source for the same as _argparse and we use it instead. from vtk.util import _argparse as argparse # ============================================================================= # Create custom File Opener class to handle clients requests # ============================================================================= class _WebCone(vtk_wslink.ServerProtocol): # Application configuration view = None authKey = "wslink-secret" def initialize(self): global renderer, renderWindow, renderWindowInteractor, cone, mapper, actor # Bring used components self.registerVtkWebProtocol(protocols.vtkWebMouseHandler()) self.registerVtkWebProtocol(protocols.vtkWebViewPort()) self.registerVtkWebProtocol(protocols.vtkWebViewPortImageDelivery()) self.registerVtkWebProtocol(protocols.vtkWebViewPortGeometryDelivery()) # Update authentication key to use self.updateSecret(_WebCone.authKey) # Create default pipeline (Only once for all the session) if not _WebCone.view: # VTK specific code renderer = vtk.vtkRenderer() renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) renderWindowInteractor = vtk.vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) renderWindowInteractor.GetInteractorStyle().SetCurrentStyleToTrackballCamera() cone = vtk.vtkConeSource() mapper = vtk.vtkPolyDataMapper() actor = vtk.vtkActor() mapper.SetInputConnection(cone.GetOutputPort()) actor.SetMapper(mapper) renderer.AddActor(actor) renderer.ResetCamera() renderWindow.Render() # VTK Web application specific _WebCone.view = renderWindow self.getApplication().GetObjectIdMap().SetActiveObject("VIEW", renderWindow) # ============================================================================= # Main: Parse args and start server # ============================================================================= if __name__ == "__main__": # Create argument parser parser = argparse.ArgumentParser(description="VTK/Web Cone web-application") # Add default arguments server.add_arguments(parser) # Exctract arguments args = parser.parse_args() # Configure our current application _WebCone.authKey = args.authKey # Start server server.start_webserver(options=args, protocol=_WebCone) From siva.yedithi at gmail.com Tue Aug 15 10:37:56 2017 From: siva.yedithi at gmail.com (Neel Patel 0-0-0) Date: Tue, 15 Aug 2017 07:37:56 -0700 (MST) Subject: [vtkusers] Both layers don't show up when setting a background image Message-ID: <1502807876316-5744411.post@n5.nabble.com> Hi All, I have a question about setting a background image. When I set the layers individually, as in only one layer is rendering it shows up fine, but when I try to have both render only one layer shows up. I've followed the background image example and have pretty much the same setup. I'm using WPF and C# with Activiz for my application. vtkImageActor actor1 = vtkImageActor.New(); actor1.SetInput(mapToColors); vtkRenderer ren1 = renderWindowControl1.RenderWindow.GetRenderers().GetFirstRenderer(); ren1.ResetCamera(); ren1.SetLayer(0); ren1.InteractiveOff(); ren1.AddActor(actor1); vtkImageActor actor2 = vtkImageActor.New(); actor2.SetInput(mapToColors2); vtkRenderer ren2 = renderWindowControl1.RenderWindow.GetRenderers().GetFirstRenderer(); ren2.ResetCamera(); ren2.SetLayer(1); ren2.AddActor(actor2); vtkRenderWindow renWin = renderWindowControl1.RenderWindow; renWin.SetNumberOfLayers(2); renWin.AddRenderer(ren1); renWin.AddRenderer(ren2); renWin.Render(); I'm not sure if it's because both my renderers point to the same window, that it's only showing one or if it might be something else. Any help would be appreciated. Thanks. Regards, Neel -- View this message in context: http://vtk.1045678.n5.nabble.com/Both-layers-don-t-show-up-when-setting-a-background-image-tp5744411.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Tue Aug 15 11:08:07 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 15 Aug 2017 11:08:07 -0400 Subject: [vtkusers] Both layers don't show up when setting a background image In-Reply-To: <1502807876316-5744411.post@n5.nabble.com> References: <1502807876316-5744411.post@n5.nabble.com> Message-ID: Maybe this c++ example will help? https://lorensen.github.io/VTKExamples/site/Cxx/Images/BackgroundImage/ Bill On Tue, Aug 15, 2017 at 10:37 AM, Neel Patel 0-0-0 wrote: > Hi All, > > I have a question about setting a background image. When I set the > layers individually, as in only one layer is rendering it shows up fine, but > when I try to have both render only one layer shows up. I've followed the > background image example and have pretty much the same setup. I'm using WPF > and C# with Activiz for my application. > > vtkImageActor actor1 = vtkImageActor.New(); > actor1.SetInput(mapToColors); > > vtkRenderer ren1 = > renderWindowControl1.RenderWindow.GetRenderers().GetFirstRenderer(); > ren1.ResetCamera(); > ren1.SetLayer(0); > ren1.InteractiveOff(); > ren1.AddActor(actor1); > > vtkImageActor actor2 = vtkImageActor.New(); > actor2.SetInput(mapToColors2); > > vtkRenderer ren2 = > renderWindowControl1.RenderWindow.GetRenderers().GetFirstRenderer(); > ren2.ResetCamera(); > ren2.SetLayer(1); > ren2.AddActor(actor2); > > vtkRenderWindow renWin = renderWindowControl1.RenderWindow; > renWin.SetNumberOfLayers(2); > renWin.AddRenderer(ren1); > renWin.AddRenderer(ren2); > renWin.Render(); > > I'm not sure if it's because both my renderers point to the same window, > that it's only showing one or > if it might be something else. Any help would be appreciated. Thanks. > > Regards, > Neel > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Both-layers-don-t-show-up-when-setting-a-background-image-tp5744411.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 dan.lipsa at kitware.com Tue Aug 15 11:31:35 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 15 Aug 2017 11:31:35 -0400 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: Great, Thanks Aron. Dan On Tue, Aug 15, 2017 at 10:35 AM, Aron Helser wrote: > I seem to have updated the example locally and not committed the > documentation modification. Sorry about that! > Those files have been renamed/moved into wslink: https://github.com/ > kitware/wslink > > Here are the updated example scripts for vtk and paraview - I will change > the documented example to match. > > Regards, > Aron > > On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa wrote: > >> Hi all, >> The above two files were (re)moved from the vtk/web directory. >> >> What is the updated version for the following example: >> >> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >> >> Thanks, >> Dan >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simakov.w at gmail.com Tue Aug 15 12:21:02 2017 From: simakov.w at gmail.com (=?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KHQuNC80LDQutC+0LI=?=) Date: Tue, 15 Aug 2017 19:21:02 +0300 Subject: [vtkusers] (no subject) Message-ID: Hello. Recently began to study the VTK. Faced the following problem: It is necessary to draw vtkPlotLine3D and on it to represent vectors (Presumably vtkArrowSource). Someone did this? Examples did not help ... = ( Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simakov.w at gmail.com Tue Aug 15 12:24:12 2017 From: simakov.w at gmail.com (=?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KHQuNC80LDQutC+0LI=?=) Date: Tue, 15 Aug 2017 19:24:12 +0300 Subject: [vtkusers] Add vtkArrowSource on vtkPlotLine3D/vtkChartXYZ Message-ID: Hello. Recently began to study the VTK. Faced the following problem: It is necessary to draw vtkPlotLine3D and on it to represent vectors (Presumably vtkArrowSource). Someone did this? Examples did not help ... = ( Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tonio.guillen at gmail.com Tue Aug 15 13:19:54 2017 From: tonio.guillen at gmail.com (Guillen Antonio) Date: Tue, 15 Aug 2017 19:19:54 +0200 Subject: [vtkusers] (no subject) In-Reply-To: References: Message-ID: Here a small example that i use: Field dhField = (Field) this.getDisplayedData(); DrillholeMesh dhMesh = dhField.getMesh(); double[] curvilinearAbscissae = dhMesh.getCurvilinear(); int nbFieldValues = dhField.getValues().length; Drillhole dh = dhField.getDrillhole(); @SuppressWarnings("unchecked") FieldDh field = dhField; if (field == null) return false; vtkPoints points = new vtkPoints(); points.SetDataTypeToDouble(); double[] pc = new double[3]; double[] ps = new double[3]; Vector3D[] values = field.getValues(); if (values != null) { double sizeMaxField = aValue; vtkArrowSource arrow = new vtkArrowSource(); arrow.SetTipRadius(0.1); arrow.SetTipLength(1.); arrow.SetShaftResolution(6); arrow.SetShaftRadius(0.03);*/ vtkDoubleArray vector3DArray = new vtkDoubleArray(); vector3DArray.SetNumberOfComponents(3); vector3DArray.SetName("Vector"); for (int i = 0; i < nbFieldValues; i++) { Vector3D fieldValue = values[i]; if (fieldValue != null && fieldValue != field.getNoValue()) { Point3D p = dh.getSurvey().getPoint(curvilinearAbscissae[i]); ps[0] = p.x; ps[1] = p.y; ps[2] = p.z; points.InsertNextPoint(ps); vector3DArray.InsertNextTuple3(fieldValue.getX(), fieldValue.getY(), fieldValue.getZ()); } } vtkPolyData polyData = new vtkPolyData(); polyData.SetPoints(points); polyData.GetPointData().SetVectors(vector3DArray); vector3DGlyph = new vtkGlyph3D(); vector3DGlyph.SetVectorModeToUseVector(); vector3DGlyph.OrientOn(); vector3DGlyph.SetScaleFactor(sizeMaxField/2.); vector3DGlyph.SetScaleModeToDataScalingOff(); vector3DGlyph.SetColorModeToColorByScalar(); vector3DGlyph.SetSourceConnection(arrow.GetOutputPort()); vector3DGlyph.SetInputData(polyData); vector3DGlyph.Update(); Hope it help you. 2017-08-15 18:21 GMT+02:00 ??????? ??????? : > Hello. > Recently began to study the VTK. > Faced the following problem: > It is necessary to draw vtkPlotLine3D and on it to represent vectors > (Presumably vtkArrowSource). > Someone did this? Examples did not help ... = ( > Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Tue Aug 15 13:50:07 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 15 Aug 2017 13:50:07 -0400 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: Aron, Anything else needs to change on the client? I get: WebSocket connection to 'ws://localhost:1234/ws' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received RemoteRenderer.js:32312 On Tue, Aug 15, 2017 at 11:31 AM, Dan Lipsa wrote: > Great, Thanks Aron. > > Dan > > > On Tue, Aug 15, 2017 at 10:35 AM, Aron Helser > wrote: > >> I seem to have updated the example locally and not committed the >> documentation modification. Sorry about that! >> Those files have been renamed/moved into wslink: https://github.com/kit >> ware/wslink >> >> Here are the updated example scripts for vtk and paraview - I will change >> the documented example to match. >> >> Regards, >> Aron >> >> On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa >> wrote: >> >>> Hi all, >>> The above two files were (re)moved from the vtk/web directory. >>> >>> What is the updated version for the following example: >>> >>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>> >>> Thanks, >>> Dan >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Tue Aug 15 13:55:53 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 15 Aug 2017 13:55:53 -0400 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: This error is in https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html Thanks, Dan On Tue, Aug 15, 2017 at 1:50 PM, Dan Lipsa wrote: > Aron, > Anything else needs to change on the client? I get: > > WebSocket connection to 'ws://localhost:1234/ws' failed: Error during > WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no > response was received > RemoteRenderer.js:32312 > > On Tue, Aug 15, 2017 at 11:31 AM, Dan Lipsa wrote: > >> Great, Thanks Aron. >> >> Dan >> >> >> On Tue, Aug 15, 2017 at 10:35 AM, Aron Helser >> wrote: >> >>> I seem to have updated the example locally and not committed the >>> documentation modification. Sorry about that! >>> Those files have been renamed/moved into wslink: https://github.com/kit >>> ware/wslink >>> >>> Here are the updated example scripts for vtk and paraview - I will >>> change the documented example to match. >>> >>> Regards, >>> Aron >>> >>> On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa >>> wrote: >>> >>>> Hi all, >>>> The above two files were (re)moved from the vtk/web directory. >>>> >>>> What is the updated version for the following example: >>>> >>>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>>> >>>> Thanks, >>>> Dan >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Tue Aug 15 14:17:43 2017 From: aron.helser at kitware.com (Aron Helser) Date: Tue, 15 Aug 2017 14:17:43 -0400 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: I thought I remembered fixing things.... The paraviewweb repository was updated July 24th with the correct source changes and example code - for some reason the automatic publication to the website has not kept up. Seb, for some reason Travis is not updating https://kitware.github.io/paraviewweb ? Dan, if you checkout paraviewweb: https://github.com/kitware/paraviewweb and do 'npm install', ' npm run doc:www -- RemoteRenderer' you should get a local webserver that has that example working. Hope that works, Aron On Tue, Aug 15, 2017 at 1:55 PM, Dan Lipsa wrote: > This error is in > https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html > > Thanks, > Dan > > > On Tue, Aug 15, 2017 at 1:50 PM, Dan Lipsa wrote: > >> Aron, >> Anything else needs to change on the client? I get: >> >> WebSocket connection to 'ws://localhost:1234/ws' failed: Error during >> WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no >> response was received >> RemoteRenderer.js:32312 >> >> On Tue, Aug 15, 2017 at 11:31 AM, Dan Lipsa >> wrote: >> >>> Great, Thanks Aron. >>> >>> Dan >>> >>> >>> On Tue, Aug 15, 2017 at 10:35 AM, Aron Helser >>> wrote: >>> >>>> I seem to have updated the example locally and not committed the >>>> documentation modification. Sorry about that! >>>> Those files have been renamed/moved into wslink: https://github.com/kit >>>> ware/wslink >>>> >>>> Here are the updated example scripts for vtk and paraview - I will >>>> change the documented example to match. >>>> >>>> Regards, >>>> Aron >>>> >>>> On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa >>>> wrote: >>>> >>>>> Hi all, >>>>> The above two files were (re)moved from the vtk/web directory. >>>>> >>>>> What is the updated version for the following example: >>>>> >>>>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>>>> >>>>> Thanks, >>>>> Dan >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simakov.w at gmail.com Tue Aug 15 14:18:45 2017 From: simakov.w at gmail.com (=?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KHQuNC80LDQutC+0LI=?=) Date: Tue, 15 Aug 2017 21:18:45 +0300 Subject: [vtkusers] (no subject) In-Reply-To: References: Message-ID: Guillen Antonio, thanks for the help. But how do I get vtkChartXYZ and vtkGlyph3D to show up and spin on the same scene? Or am I generally not doing the right thing? 2017-08-15 20:19 GMT+03:00 Guillen Antonio : > Here a small example that i use: > > > Field dhField = (Field) this.getDisplayedData(); > > DrillholeMesh dhMesh = dhField.getMesh(); > double[] curvilinearAbscissae = dhMesh.getCurvilinear(); > int nbFieldValues = dhField.getValues().length; > Drillhole dh = dhField.getDrillhole(); > @SuppressWarnings("unchecked") > FieldDh field = dhField; > if (field == null) > return false; > vtkPoints points = new vtkPoints(); > points.SetDataTypeToDouble(); > double[] pc = new double[3]; > double[] ps = new double[3]; > Vector3D[] values = field.getValues(); > if (values != null) { > double sizeMaxField = aValue; > vtkArrowSource arrow = new vtkArrowSource(); > arrow.SetTipRadius(0.1); > arrow.SetTipLength(1.); > arrow.SetShaftResolution(6); > arrow.SetShaftRadius(0.03);*/ > vtkDoubleArray vector3DArray = new vtkDoubleArray(); > vector3DArray.SetNumberOfComponents(3); > vector3DArray.SetName("Vector"); > for (int i = 0; i < nbFieldValues; i++) { > Vector3D fieldValue = values[i]; > if (fieldValue != null && fieldValue != field.getNoValue()) { > Point3D p = dh.getSurvey().getPoint( > curvilinearAbscissae[i]); > ps[0] = p.x; > ps[1] = p.y; > ps[2] = p.z; > points.InsertNextPoint(ps); > vector3DArray.InsertNextTuple3(fieldValue.getX(), > fieldValue.getY(), fieldValue.getZ()); > } > } > vtkPolyData polyData = new vtkPolyData(); > polyData.SetPoints(points); > polyData.GetPointData().SetVectors(vector3DArray); > > > vector3DGlyph = new vtkGlyph3D(); > vector3DGlyph.SetVectorModeToUseVector(); > vector3DGlyph.OrientOn(); > vector3DGlyph.SetScaleFactor(sizeMaxField/2.); > vector3DGlyph.SetScaleModeToDataScalingOff(); > vector3DGlyph.SetColorModeToColorByScalar(); > > vector3DGlyph.SetSourceConnection(arrow.GetOutputPort()); > vector3DGlyph.SetInputData(polyData); > vector3DGlyph.Update(); > > > Hope it help you. > > 2017-08-15 18:21 GMT+02:00 ??????? ??????? : > >> Hello. >> Recently began to study the VTK. >> Faced the following problem: >> It is necessary to draw vtkPlotLine3D and on it to represent vectors >> (Presumably vtkArrowSource). >> Someone did this? Examples did not help ... = ( >> Thank you. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Aug 15 14:34:38 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 15 Aug 2017 12:34:38 -0600 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: => Publish Use custom URL Error while publishing Error: Remote url mismatch. Got "https://f1c777121863797df9dc350d6d0fde1f2c8b1fab at github.com/Kitware/paraviewweb.git" but expected "https://[secure]@github.com/Kitware/paraviewweb.git" in ../../node_modules/kw-doc/node_modules/gh-pages/.cache. If you have changed your "repo" option, try running the "clean" task first. at /home/travis/build/Kitware/paraviewweb/node_modules/kw-doc/node_modules/gh-pages/lib/index.js:147:33 at _fulfilled (/home/travis/build/Kitware/paraviewweb/node_modules/q/q.js:834:54) at self.promiseDispatch.done (/home/travis/build/Kitware/paraviewweb/node_modules/q/q.js:863:30) at Promise.promise.promiseDispatch (/home/travis/build/Kitware/paraviewweb/node_modules/q/q.js:796:13) at /home/travis/build/Kitware/paraviewweb/node_modules/q/q.js:604:44 at runSingle (/home/travis/build/Kitware/paraviewweb/node_modules/q/q.js:137:13) at flush (/home/travis/build/Kitware/paraviewweb/node_modules/q/q.js:125:13) at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9) - Web site published to github.io On Tue, Aug 15, 2017 at 12:17 PM, Aron Helser wrote: > I thought I remembered fixing things.... > The paraviewweb repository was updated July 24th with the correct source > changes and example code - for some reason the automatic publication to the > website has not kept up. > > Seb, for some reason Travis is not updating https://kitware.github.io/paraviewweb > ? > > Dan, if you checkout paraviewweb: https://github.com/kitware/paraviewweb > and do 'npm install', ' npm run doc:www -- RemoteRenderer' > you should get a local webserver that has that example working. > > Hope that works, > Aron > > On Tue, Aug 15, 2017 at 1:55 PM, Dan Lipsa wrote: > >> This error is in >> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >> >> Thanks, >> Dan >> >> >> On Tue, Aug 15, 2017 at 1:50 PM, Dan Lipsa wrote: >> >>> Aron, >>> Anything else needs to change on the client? I get: >>> >>> WebSocket connection to 'ws://localhost:1234/ws' failed: Error during >>> WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no >>> response was received >>> RemoteRenderer.js:32312 >>> >>> On Tue, Aug 15, 2017 at 11:31 AM, Dan Lipsa >>> wrote: >>> >>>> Great, Thanks Aron. >>>> >>>> Dan >>>> >>>> >>>> On Tue, Aug 15, 2017 at 10:35 AM, Aron Helser >>>> wrote: >>>> >>>>> I seem to have updated the example locally and not committed the >>>>> documentation modification. Sorry about that! >>>>> Those files have been renamed/moved into wslink: >>>>> https://github.com/kitware/wslink >>>>> >>>>> Here are the updated example scripts for vtk and paraview - I will >>>>> change the documented example to match. >>>>> >>>>> Regards, >>>>> Aron >>>>> >>>>> On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> The above two files were (re)moved from the vtk/web directory. >>>>>> >>>>>> What is the updated version for the following example: >>>>>> >>>>>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>>>>> >>>>>> Thanks, >>>>>> Dan >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Tue Aug 15 14:36:25 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 15 Aug 2017 14:36:25 -0400 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: Thanks Aron, I moved forward, but I am not there yet. Now the client connects, to the server, I can see the cone moving in the server window, but no image is sent back to the browser. I tried both Chrome and Firefox and I see the same behavior. Any ideas? Thanks, Dan On Tue, Aug 15, 2017 at 2:17 PM, Aron Helser wrote: > I thought I remembered fixing things.... > The paraviewweb repository was updated July 24th with the correct source > changes and example code - for some reason the automatic publication to the > website has not kept up. > > Seb, for some reason Travis is not updating https://kitware.github.io/paraviewweb > ? > > Dan, if you checkout paraviewweb: https://github.com/kitware/paraviewweb > and do 'npm install', ' npm run doc:www -- RemoteRenderer' > you should get a local webserver that has that example working. > > Hope that works, > Aron > > On Tue, Aug 15, 2017 at 1:55 PM, Dan Lipsa wrote: > >> This error is in >> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >> >> Thanks, >> Dan >> >> >> On Tue, Aug 15, 2017 at 1:50 PM, Dan Lipsa wrote: >> >>> Aron, >>> Anything else needs to change on the client? I get: >>> >>> WebSocket connection to 'ws://localhost:1234/ws' failed: Error during >>> WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no >>> response was received >>> RemoteRenderer.js:32312 >>> >>> On Tue, Aug 15, 2017 at 11:31 AM, Dan Lipsa >>> wrote: >>> >>>> Great, Thanks Aron. >>>> >>>> Dan >>>> >>>> >>>> On Tue, Aug 15, 2017 at 10:35 AM, Aron Helser >>>> wrote: >>>> >>>>> I seem to have updated the example locally and not committed the >>>>> documentation modification. Sorry about that! >>>>> Those files have been renamed/moved into wslink: >>>>> https://github.com/kitware/wslink >>>>> >>>>> Here are the updated example scripts for vtk and paraview - I will >>>>> change the documented example to match. >>>>> >>>>> Regards, >>>>> Aron >>>>> >>>>> On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> The above two files were (re)moved from the vtk/web directory. >>>>>> >>>>>> What is the updated version for the following example: >>>>>> >>>>>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>>>>> >>>>>> Thanks, >>>>>> Dan >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From siva.yedithi at gmail.com Tue Aug 15 14:59:41 2017 From: siva.yedithi at gmail.com (Neel Patel 0-0-0) Date: Tue, 15 Aug 2017 11:59:41 -0700 (MST) Subject: [vtkusers] Both layers don't show up when setting a background image In-Reply-To: References: <1502807876316-5744411.post@n5.nabble.com> Message-ID: <1502823581912-5744423.post@n5.nabble.com> Hi Bill, That example was what I based my code off of. My setup is that I have 2 different streams that have to be overlayed on top of each other. The issue that I'm running into is that either one layer doesn't show up, which is usually the background layer or the lookup table for the background is used instead of the one for the foreground. So basically the question was whether or not it was because I had both renderers set to renderWindowControl1.RenderWindow.GetRenderers().GetFirstRenderer(); I've tested out chnaging the control one of them points to, so something like renderWindowControl2.RenderWindow.GetRenderers().GetFirstRenderer() for the other one, and I'm still getting the same issues. I could post some screenshots if need be. Regards, Neel -- View this message in context: http://vtk.1045678.n5.nabble.com/Both-layers-don-t-show-up-when-setting-a-background-image-tp5744411p5744423.html Sent from the VTK - Users mailing list archive at Nabble.com. From sanjin.pajo at gmail.com Tue Aug 15 15:42:09 2017 From: sanjin.pajo at gmail.com (Sanjin Pajo) Date: Tue, 15 Aug 2017 15:42:09 -0400 Subject: [vtkusers] VTK Error Message-ID: I am installing Point Cloud Library (PCL 1.8.1) from source and it requires VTK. During the installation I get mismatch errors in Visual Studio 2015 when building in debug and release mode. I am using CMAKE to configure and generate build files. Examples: Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in hdl_viewer_simple.obj pcl_hdl_viewer_simple C:\PCL\PCL-1.8.1\build\ visualization\tools\vtkRenderingContextOpenGL2-7.1-gd.lib( vtkRenderingContextOpenGL2ObjectFactory.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in outofcore_viewer.obj pcl_outofcore_viewer C:\PCL\PCL-1.8.1\build\outofcore\tools\vtkInteractionStyle-7.1-gd.lib( vtkInteractionStyleObjectFactory.obj) 1 Any help is greatly appreciated. Sanjin P. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Tue Aug 15 15:45:01 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 15 Aug 2017 15:45:01 -0400 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: Aron, Note the problem I am seeing is with the VTK version of the server script. Does it work for you? Thanks, Dan On Tue, Aug 15, 2017 at 2:36 PM, Dan Lipsa wrote: > Thanks Aron, > I moved forward, but I am not there yet. > > Now the client connects, to the server, I can see the cone moving in the > server window, but no image is sent back to the browser. > I tried both Chrome and Firefox and I see the same behavior. Any ideas? > > Thanks, > Dan > > > On Tue, Aug 15, 2017 at 2:17 PM, Aron Helser > wrote: > >> I thought I remembered fixing things.... >> The paraviewweb repository was updated July 24th with the correct source >> changes and example code - for some reason the automatic publication to the >> website has not kept up. >> >> Seb, for some reason Travis is not updating https://kitware.github.io/ >> paraviewweb ? >> >> Dan, if you checkout paraviewweb: https://github.com/kitware/paraviewweb >> and do 'npm install', ' npm run doc:www -- RemoteRenderer' >> you should get a local webserver that has that example working. >> >> Hope that works, >> Aron >> >> On Tue, Aug 15, 2017 at 1:55 PM, Dan Lipsa wrote: >> >>> This error is in >>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>> >>> Thanks, >>> Dan >>> >>> >>> On Tue, Aug 15, 2017 at 1:50 PM, Dan Lipsa >>> wrote: >>> >>>> Aron, >>>> Anything else needs to change on the client? I get: >>>> >>>> WebSocket connection to 'ws://localhost:1234/ws' failed: Error during >>>> WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no >>>> response was received >>>> RemoteRenderer.js:32312 >>>> >>>> On Tue, Aug 15, 2017 at 11:31 AM, Dan Lipsa >>>> wrote: >>>> >>>>> Great, Thanks Aron. >>>>> >>>>> Dan >>>>> >>>>> >>>>> On Tue, Aug 15, 2017 at 10:35 AM, Aron Helser >>>> > wrote: >>>>> >>>>>> I seem to have updated the example locally and not committed the >>>>>> documentation modification. Sorry about that! >>>>>> Those files have been renamed/moved into wslink: >>>>>> https://github.com/kitware/wslink >>>>>> >>>>>> Here are the updated example scripts for vtk and paraview - I will >>>>>> change the documented example to match. >>>>>> >>>>>> Regards, >>>>>> Aron >>>>>> >>>>>> On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa >>>>>> wrote: >>>>>> >>>>>>> Hi all, >>>>>>> The above two files were (re)moved from the vtk/web directory. >>>>>>> >>>>>>> What is the updated version for the following example: >>>>>>> >>>>>>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>>>>>> >>>>>>> Thanks, >>>>>>> Dan >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Tue Aug 15 15:49:37 2017 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Tue, 15 Aug 2017 15:49:37 -0400 Subject: [vtkusers] VTK Error In-Reply-To: References: Message-ID: Hi Sanjin, This is a quirk of Windows. You cannot link libraries built in release mode with libraries built in debug mode. If you want a debug build, you need to build EVERYTHING in debug mode (and use debug versions of the dependencies you don't build yourself). Likewise, if you want to build in release mode, you have to build everything in release. It looks like you are trying to mix the two, which is something Microsoft doesn't allow. HTH, Shawn On Tue, Aug 15, 2017 at 3:42 PM, Sanjin Pajo wrote: > I am installing Point Cloud Library (PCL 1.8.1) from source and it > requires VTK. During the installation I get mismatch errors in Visual > Studio 2015 when building in debug and release mode. I am using CMAKE to > configure and generate build files. > > Examples: > > Error LNK2038 mismatch detected for 'RuntimeLibrary': value > 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in > hdl_viewer_simple.obj pcl_hdl_viewer_simple C:\PCL\PCL-1.8.1\build\visuali > zation\tools\vtkRenderingContextOpenGL2-7.1-gd.lib(vtkRender > ingContextOpenGL2ObjectFactory.obj) 1 > > > Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' > doesn't match value '0' in outofcore_viewer.obj pcl_outofcore_viewer > C:\PCL\PCL-1.8.1\build\outofcore\tools\vtkInteractionStyle- > 7.1-gd.lib(vtkInteractionStyleObjectFactory.obj) 1 > > Any help is greatly appreciated. > > Sanjin P. > > > > > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron.helser at kitware.com Tue Aug 15 16:42:51 2017 From: aron.helser at kitware.com (Aron Helser) Date: Tue, 15 Aug 2017 16:42:51 -0400 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: No, the VTK version does not. The server is returning an exception via RPC, and it is not reported to the console, only in the network trace: 1. error:{code: -32001, message: "Exception raised", data: {method: "viewport.image.render",?}} 1. code:-32001 2. data:{method: "viewport.image.render",?} 1. exception:"AttributeError("'vtkWebCorePython.vtkWebApplication' object has no attribute 'GetLastStillRenderToMTime'",)" This is due to a change in ParaView, and a parallel change is needed in vtkWebApplication. I will look into it. The pv_web_cone.py script does work for me. On Tue, Aug 15, 2017 at 3:45 PM, Dan Lipsa wrote: > Aron, > Note the problem I am seeing is with the VTK version of the server script. > Does it work for you? > Thanks, > Dan > > > On Tue, Aug 15, 2017 at 2:36 PM, Dan Lipsa wrote: > >> Thanks Aron, >> I moved forward, but I am not there yet. >> >> Now the client connects, to the server, I can see the cone moving in the >> server window, but no image is sent back to the browser. >> I tried both Chrome and Firefox and I see the same behavior. Any ideas? >> >> Thanks, >> Dan >> >> >> On Tue, Aug 15, 2017 at 2:17 PM, Aron Helser >> wrote: >> >>> I thought I remembered fixing things.... >>> The paraviewweb repository was updated July 24th with the correct source >>> changes and example code - for some reason the automatic publication to the >>> website has not kept up. >>> >>> Seb, for some reason Travis is not updating https://kitware.github.io/ >>> paraviewweb ? >>> >>> Dan, if you checkout paraviewweb: https://github.com/kitware/paraviewweb >>> and do 'npm install', ' npm run doc:www -- RemoteRenderer' >>> you should get a local webserver that has that example working. >>> >>> Hope that works, >>> Aron >>> >>> On Tue, Aug 15, 2017 at 1:55 PM, Dan Lipsa >>> wrote: >>> >>>> This error is in >>>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>>> >>>> Thanks, >>>> Dan >>>> >>>> >>>> On Tue, Aug 15, 2017 at 1:50 PM, Dan Lipsa >>>> wrote: >>>> >>>>> Aron, >>>>> Anything else needs to change on the client? I get: >>>>> >>>>> WebSocket connection to 'ws://localhost:1234/ws' failed: Error during >>>>> WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no >>>>> response was received >>>>> RemoteRenderer.js:32312 >>>>> >>>>> On Tue, Aug 15, 2017 at 11:31 AM, Dan Lipsa >>>>> wrote: >>>>> >>>>>> Great, Thanks Aron. >>>>>> >>>>>> Dan >>>>>> >>>>>> >>>>>> On Tue, Aug 15, 2017 at 10:35 AM, Aron Helser < >>>>>> aron.helser at kitware.com> wrote: >>>>>> >>>>>>> I seem to have updated the example locally and not committed the >>>>>>> documentation modification. Sorry about that! >>>>>>> Those files have been renamed/moved into wslink: >>>>>>> https://github.com/kitware/wslink >>>>>>> >>>>>>> Here are the updated example scripts for vtk and paraview - I will >>>>>>> change the documented example to match. >>>>>>> >>>>>>> Regards, >>>>>>> Aron >>>>>>> >>>>>>> On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa >>>>>>> wrote: >>>>>>> >>>>>>>> Hi all, >>>>>>>> The above two files were (re)moved from the vtk/web directory. >>>>>>>> >>>>>>>> What is the updated version for the following example: >>>>>>>> >>>>>>>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Dan >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Aug 15 16:50:54 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 15 Aug 2017 14:50:54 -0600 Subject: [vtkusers] vtk/web/wamp.py and vtk/web/server.py In-Reply-To: References: Message-ID: The name of that method has changed: GetLastStillRenderToMTime On Tue, Aug 15, 2017 at 2:42 PM, Aron Helser wrote: > No, the VTK version does not. The server is returning an exception via > RPC, and it is not reported to the console, only in the network trace: > > 1. error:{code: -32001, message: "Exception raised", data: {method: > "viewport.image.render",?}} > 1. code:-32001 > 2. data:{method: "viewport.image.render",?} > 1. exception:"AttributeError("'vtkWebCorePython.vtkWebApplication' > object has no attribute 'GetLastStillRenderToMTime'",)" > > > This is due to a change in ParaView, and a parallel change is needed in > vtkWebApplication. I will look into it. > The pv_web_cone.py script does work for me. > > On Tue, Aug 15, 2017 at 3:45 PM, Dan Lipsa wrote: > >> Aron, >> Note the problem I am seeing is with the VTK version of the server >> script. Does it work for you? >> Thanks, >> Dan >> >> >> On Tue, Aug 15, 2017 at 2:36 PM, Dan Lipsa wrote: >> >>> Thanks Aron, >>> I moved forward, but I am not there yet. >>> >>> Now the client connects, to the server, I can see the cone moving in the >>> server window, but no image is sent back to the browser. >>> I tried both Chrome and Firefox and I see the same behavior. Any ideas? >>> >>> Thanks, >>> Dan >>> >>> >>> On Tue, Aug 15, 2017 at 2:17 PM, Aron Helser >>> wrote: >>> >>>> I thought I remembered fixing things.... >>>> The paraviewweb repository was updated July 24th with the correct >>>> source changes and example code - for some reason the automatic publication >>>> to the website has not kept up. >>>> >>>> Seb, for some reason Travis is not updating https://kitware.github.io/ >>>> paraviewweb ? >>>> >>>> Dan, if you checkout paraviewweb: https://github.co >>>> m/kitware/paraviewweb >>>> and do 'npm install', ' npm run doc:www -- RemoteRenderer' >>>> you should get a local webserver that has that example working. >>>> >>>> Hope that works, >>>> Aron >>>> >>>> On Tue, Aug 15, 2017 at 1:55 PM, Dan Lipsa >>>> wrote: >>>> >>>>> This error is in >>>>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>>>> >>>>> Thanks, >>>>> Dan >>>>> >>>>> >>>>> On Tue, Aug 15, 2017 at 1:50 PM, Dan Lipsa >>>>> wrote: >>>>> >>>>>> Aron, >>>>>> Anything else needs to change on the client? I get: >>>>>> >>>>>> WebSocket connection to 'ws://localhost:1234/ws' failed: Error during >>>>>> WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no >>>>>> response was received >>>>>> RemoteRenderer.js:32312 >>>>>> >>>>>> On Tue, Aug 15, 2017 at 11:31 AM, Dan Lipsa >>>>>> wrote: >>>>>> >>>>>>> Great, Thanks Aron. >>>>>>> >>>>>>> Dan >>>>>>> >>>>>>> >>>>>>> On Tue, Aug 15, 2017 at 10:35 AM, Aron Helser < >>>>>>> aron.helser at kitware.com> wrote: >>>>>>> >>>>>>>> I seem to have updated the example locally and not committed the >>>>>>>> documentation modification. Sorry about that! >>>>>>>> Those files have been renamed/moved into wslink: >>>>>>>> https://github.com/kitware/wslink >>>>>>>> >>>>>>>> Here are the updated example scripts for vtk and paraview - I will >>>>>>>> change the documented example to match. >>>>>>>> >>>>>>>> Regards, >>>>>>>> Aron >>>>>>>> >>>>>>>> On Tue, Aug 15, 2017 at 10:04 AM, Dan Lipsa >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi all, >>>>>>>>> The above two files were (re)moved from the vtk/web directory. >>>>>>>>> >>>>>>>>> What is the updated version for the following example: >>>>>>>>> >>>>>>>>> https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Dan >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanjin.pajo at gmail.com Tue Aug 15 23:28:56 2017 From: sanjin.pajo at gmail.com (Sanjin Pajo) Date: Tue, 15 Aug 2017 23:28:56 -0400 Subject: [vtkusers] VTK Error In-Reply-To: References: Message-ID: I am wondering if there is a workaround for this issue. I have been able to build other PCL dependencies (Boost, Eigen, Flann, QHull) in debug and release mode using Microsoft Visual Studio 2015 and PCL requires that VTK be built in both modes. This issue seems to be a known problem, here is a similar post in the PCL forum : http://www.pcl-users.org/LNK2038-error-when-trying-to-compile-PCL-debug-and-release-mixup-pcl-1-8-0-td4044738.html . Sanjin P. On Tue, Aug 15, 2017 at 3:49 PM, Shawn Waldon wrote: > Hi Sanjin, > > This is a quirk of Windows. You cannot link libraries built in release > mode with libraries built in debug mode. If you want a debug build, you > need to build EVERYTHING in debug mode (and use debug versions of the > dependencies you don't build yourself). Likewise, if you want to build in > release mode, you have to build everything in release. It looks like you > are trying to mix the two, which is something Microsoft doesn't allow. > > HTH, > Shawn > > On Tue, Aug 15, 2017 at 3:42 PM, Sanjin Pajo > wrote: > >> I am installing Point Cloud Library (PCL 1.8.1) from source and it >> requires VTK. During the installation I get mismatch errors in Visual >> Studio 2015 when building in debug and release mode. I am using CMAKE to >> configure and generate build files. >> >> Examples: >> >> Error LNK2038 mismatch detected for 'RuntimeLibrary': value >> 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in >> hdl_viewer_simple.obj pcl_hdl_viewer_simple >> C:\PCL\PCL-1.8.1\build\visualization\tools\vtkRenderingConte >> xtOpenGL2-7.1-gd.lib(vtkRenderingContextOpenGL2ObjectFactory.obj) 1 >> >> >> Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' >> doesn't match value '0' in outofcore_viewer.obj pcl_outofcore_viewer >> C:\PCL\PCL-1.8.1\build\outofcore\tools\vtkInteractionStyle-7 >> .1-gd.lib(vtkInteractionStyleObjectFactory.obj) 1 >> >> Any help is greatly appreciated. >> >> Sanjin P. >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 iamdpak at gmail.com Wed Aug 16 03:14:03 2017 From: iamdpak at gmail.com (vinmean) Date: Wed, 16 Aug 2017 00:14:03 -0700 (MST) Subject: [vtkusers] Using multile texture files in vtkOBJImporter Message-ID: <1502867643441-5744430.post@n5.nabble.com> Following is my function to import obj files with texture. But I need to import obj files that have multiple .png files as textures. Is there a way to use vtkOBJImporter class with mulitple texture files? void import_vtk_tex_obj(std::string filenameOBJ, std::string filenameMTL, std::string filenameTEX, boost::shared_ptr view) { vtkNew importer; std::string texture_path = vtksys::SystemTools::GetFilenamePath(filenameTEX); importer->SetFileName(filenameOBJ.data()); importer->SetFileNameMTL(filenameMTL.data()); importer->SetTexturePath(texture_path.data()); importer->SetRenderWindow(view->getRenderWindow()); importer->Update(); vtkSmartPointer renderer =view->getRenderWindow()->GetRenderers()->GetFirstRenderer(); renderer->ResetCamera(); } -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-multile-texture-files-in-vtkOBJImporter-tp5744430.html Sent from the VTK - Users mailing list archive at Nabble.com. From madsmh at gmail.com Wed Aug 16 07:23:17 2017 From: madsmh at gmail.com (Mads M. Hansen) Date: Wed, 16 Aug 2017 13:23:17 +0200 Subject: [vtkusers] Planet sized objects and distances on the scale of the Solar System In-Reply-To: References: Message-ID: Thanks Dan, will do :) .. Mads 2017-08-14 17:26 GMT+02:00 Dan Lipsa : > I would look at the the difference between sun diameter and the planets > (if you show the sun on the screen a planet would be smaller than a pixel). > Also, the distance between planets might be so big that if you want to show > that on the screen, planets would be too small to be seen. I have not look > at the actual distances, but this might be some of what you are seeing. > > I would start with smaller ratios between sun vs planets and distances > between planets versus planet diameters. After everyting works as expected, > you can move toward the real distances. > > On Fri, Aug 11, 2017 at 9:57 AM, Mads M. Hansen wrote: > >> Hi list, >> >> I am currently writing what I hope is to be a realistic simulation of the >> Solar System in C++ and to visualize it in 3D with VTK. However when I try >> to render the objects (which er spheres) I get either a black screen or >> when I scale the distances/radii a bit the object shown, until I click with >> the mouse and then it disappears. You can see the code attached. >> >> Do you have any suggestions on how to solve this issue? >> >> Thanks, >> Mads. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From madsmh at gmail.com Wed Aug 16 07:41:43 2017 From: madsmh at gmail.com (Mads M. Hansen) Date: Wed, 16 Aug 2017 13:41:43 +0200 Subject: [vtkusers] Assigning object a 2D text label Message-ID: Based on the example at http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower I have tried to attach a text label to a number of objets (line 106-149), however when the render method is called (line 80 in the attached file) I get this message: /xxx/VTK-8.0.0/GUISupport/Qt/QVTKInteractor.cxx, line 147 QVTKInteractor (0x1ea3da0): QVTKInteractor cannot control the event loop. and no text appeares on screen. I have been unable to figure out how to sort it out :( .. Mads -------------- next part -------------- A non-text attachment was scrubbed... Name: mainwindow.cpp Type: text/x-c++src Size: 6686 bytes Desc: not available URL: From chbrossotaf at gmail.com Wed Aug 16 08:57:18 2017 From: chbrossotaf at gmail.com (CharlesB) Date: Wed, 16 Aug 2017 14:57:18 +0200 Subject: [vtkusers] Strange rendering with multiple renderers sharing a camera Message-ID: Hello, I have two renderers in a render window, because I need overlay actors to be always front. They share the same camera, in order to be moved together with user interaction. The issue is that the actor is only partially rendered when user moves the camera in the scene, as if the front and the back of it was disappearing. I see this with VTK 7.1 and 8.0. Is there something special to do to avoid this? Or did I find a bug? [image: Images int?gr?es 1] #include #include #include #include #include #include #include #include #include #include int main(int, char*[]) { auto plane_source = vtkSmartPointer::New(); auto mapper = vtkSmartPointer::New(); mapper->SetInputConnection(plane_source->GetOutputPort()); auto actor = vtkSmartPointer::New(); actor->SetMapper(mapper); auto renderer = vtkSmartPointer::New(); auto overlay_renderer = vtkSmartPointer::New(); renderer->SetLayer(0); overlay_renderer->SetLayer(1); auto render_window = vtkSmartPointer::New(); render_window->SetNumberOfLayers(2); render_window->AddRenderer(renderer); render_window->AddRenderer(overlay_renderer); auto camera = vtkSmartPointer::New(); renderer->SetActiveCamera(camera); overlay_renderer->SetActiveCamera(camera); renderer->AddActor(actor); renderer->ResetCamera(); auto render_window_interactor = vtkSmartPointer::New(); auto trackball_style = vtkSmartPointer::New(); render_window_interactor->SetRenderWindow(render_window); render_window_interactor->SetInteractorStyle(trackball_style); render_window->Render(); render_window_interactor->Start(); return EXIT_SUCCESS; } -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 27561 bytes Desc: not available URL: From ken.martin at kitware.com Wed Aug 16 10:08:17 2017 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 16 Aug 2017 10:08:17 -0400 Subject: [vtkusers] Using multile texture files in vtkOBJImporter In-Reply-To: <1502867643441-5744430.post@n5.nabble.com> References: <1502867643441-5744430.post@n5.nabble.com> Message-ID: Your example should have an OBJ with multiple textures if there is no more than one texture per material. If the issue is that you have an OBJ file where one piece (material?), uses multiple textures and has multiple sets of texture coordinates per vertex, that is not fully supported. I believe currently the multiple sets of texture coordinates are read in but only the first texture map and coordinate are used but I may be out of date. On Wed, Aug 16, 2017 at 3:14 AM, vinmean wrote: > Following is my function to import obj files with texture. But I need to > import obj files that have multiple .png files as textures. Is there a way > to use vtkOBJImporter class with mulitple texture files? > > void import_vtk_tex_obj(std::string filenameOBJ, std::string filenameMTL, > std::string filenameTEX, > boost::shared_ptr view) > { > vtkNew importer; > std::string texture_path = > vtksys::SystemTools::GetFilenamePath(filenameTEX); > > importer->SetFileName(filenameOBJ.data()); > importer->SetFileNameMTL(filenameMTL.data()); > importer->SetTexturePath(texture_path.data()); > importer->SetRenderWindow(view->getRenderWindow()); > importer->Update(); > vtkSmartPointer renderer > =view->getRenderWindow()->GetRenderers()->GetFirstRenderer(); > renderer->ResetCamera(); > } > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Using-multile-texture-files-in-vtkOBJImporter-tp5744430.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 > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Wed Aug 16 10:10:06 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 16 Aug 2017 14:10:06 +0000 Subject: [vtkusers] Assigning object a 2D text label In-Reply-To: References: Message-ID: Hi Mads, The error originates from the following line: interactor->Start(); You don?t need to start the event loop manually with the QVTKInteractor. QVTKWidget would use Qt?s event loop. Just remove the Start() call. Hope that helps. Sankhesh ? On Wed, Aug 16, 2017 at 7:43 AM Mads M. Hansen wrote: > Based on the example at > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower > > I have tried to attach a text label to a number of objets (line > 106-149), however > when the render method is called (line 80 in the attached file) > I get this message: > > /xxx/VTK-8.0.0/GUISupport/Qt/QVTKInteractor.cxx, line 147 > QVTKInteractor (0x1ea3da0): QVTKInteractor cannot control the event loop. > > and no text appeares on screen. I have been unable to figure out how > to sort it out :( > > .. Mads > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Aug 16 10:22:19 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 16 Aug 2017 10:22:19 -0400 Subject: [vtkusers] Using multile texture files in vtkOBJImporter In-Reply-To: References: <1502867643441-5744430.post@n5.nabble.com> Message-ID: Ken is correct. Only one texture per object. On Aug 16, 2017 10:08 AM, "Ken Martin" wrote: > Your example should have an OBJ with multiple textures if there is no more > than one texture per material. > > If the issue is that you have an OBJ file where one piece (material?), > uses multiple textures and has multiple sets of texture coordinates per > vertex, that is not fully supported. I believe currently the multiple sets > of texture coordinates are read in but only the first texture map and > coordinate are used but I may be out of date. > > > > On Wed, Aug 16, 2017 at 3:14 AM, vinmean wrote: > >> Following is my function to import obj files with texture. But I need to >> import obj files that have multiple .png files as textures. Is there a way >> to use vtkOBJImporter class with mulitple texture files? >> >> void import_vtk_tex_obj(std::string filenameOBJ, std::string filenameMTL, >> std::string filenameTEX, >> boost::shared_ptr view) >> { >> vtkNew importer; >> std::string texture_path = >> vtksys::SystemTools::GetFilenamePath(filenameTEX); >> >> importer->SetFileName(filenameOBJ.data()); >> importer->SetFileNameMTL(filenameMTL.data()); >> importer->SetTexturePath(texture_path.data()); >> importer->SetRenderWindow(view->getRenderWindow()); >> importer->Update(); >> vtkSmartPointer renderer >> =view->getRenderWindow()->GetRenderers()->GetFirstRenderer(); >> renderer->ResetCamera(); >> } >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.c >> om/Using-multile-texture-files-in-vtkOBJImporter-tp5744430.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 >> > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.leguay at gmail.com Wed Aug 16 10:22:24 2017 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Wed, 16 Aug 2017 16:22:24 +0200 Subject: [vtkusers] Render glitch on some computers Message-ID: Hello everyone, I create a small Qt (5.8 and 5.9) and VTK (7.1.1) application to display some geometries (for example STL files or VTU series). I have a problem on some computers (a mac pro retina 15" mid-2015 on mac os 10.10.5 (Yosemite) with a graphic cards amd radeon r9 m370x 2048MB): the QVtkWidget is not rendered correctly. I attach the screen shot of my app. The problem always appears on the main screen of the notebook but not on external monitor. Is there a way to debug this kind of bugs? Thank you Romain -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-2.tiff Type: image/tiff Size: 167818 bytes Desc: not available URL: From madsmh at gmail.com Wed Aug 16 12:40:22 2017 From: madsmh at gmail.com (Mads M. Hansen) Date: Wed, 16 Aug 2017 18:40:22 +0200 Subject: [vtkusers] Assigning object a 2D text label In-Reply-To: References: Message-ID: Shankhesh, thank you that got rid of the error - but did not make the text appear. .. Mads 2017-08-16 16:10 GMT+02:00 Sankhesh Jhaveri : > Hi Mads, > > The error originates from the following line: > > interactor->Start(); > > You don?t need to start the event loop manually with the QVTKInteractor. > QVTKWidget would use Qt?s event loop. > Just remove the Start() call. > > Hope that helps. > > Sankhesh > > > On Wed, Aug 16, 2017 at 7:43 AM Mads M. Hansen wrote: >> >> Based on the example at >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower >> >> I have tried to attach a text label to a number of objets (line >> 106-149), however >> when the render method is called (line 80 in the attached file) >> I get this message: >> >> /xxx/VTK-8.0.0/GUISupport/Qt/QVTKInteractor.cxx, line 147 >> QVTKInteractor (0x1ea3da0): QVTKInteractor cannot control the event loop. >> >> and no text appeares on screen. I have been unable to figure out how >> to sort it out :( >> >> .. Mads >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > -- > > Sankhesh Jhaveri > > Sr. Research & Development Engineer | Kitware | (518) 881-4417 From waldo.valenzuela at hotmail.com Wed Aug 16 14:10:38 2017 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Wed, 16 Aug 2017 18:10:38 +0000 Subject: [vtkusers] Render glitch on some computers In-Reply-To: References: Message-ID: Hi Romain, This is a know problem of VTK with high resolution screens, in mac OSX for example, you need to add this to the QVTKWidget, #ifdef Q_OS_OSX disableGLHiDPI(this->winId()); #endif void disableGLHiDPI( long a_id ) { NSView* view = reinterpret_cast( a_id ); [view setWantsBestResolutionOpenGLSurface:NO]; } Cheers, Waldo. On 16 Aug 2017, at 16:22, Romain LEGUAY > wrote: Hello everyone, I create a small Qt (5.8 and 5.9) and VTK (7.1.1) application to display some geometries (for example STL files or VTU series). I have a problem on some computers (a mac pro retina 15" mid-2015 on mac os 10.10.5 (Yosemite) with a graphic cards amd radeon r9 m370x 2048MB): the QVtkWidget is not rendered correctly. I attach the screen shot of my app. The problem always appears on the main screen of the notebook but not on external monitor. Is there a way to debug this kind of bugs? Thank you Romain _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 tonio.guillen at gmail.com Wed Aug 16 14:15:06 2017 From: tonio.guillen at gmail.com (Guillen Antonio) Date: Wed, 16 Aug 2017 20:15:06 +0200 Subject: [vtkusers] Pbs with Streamlines. Message-ID: I try to build streamline using this code: vtkPoints points = new vtkPoints(); points.SetDataTypeToDouble(); double sizeMaxField = aValue; vtkDoubleArray vector3DArray = new vtkDoubleArray(); vector3DArray.SetNumberOfComponents(3); vector3DArray.SetName("Vector"); for (int i = 0; i < grid.getCellNumber(); i++) { Vector3D fieldValue = (Vector3D) getValue(i); Point3D p = (Point3D) grid.getCellBarycenter(i); points.InsertNextPoint(p.x, p.y, p.z); vector3DArray.InsertNextTuple3(fieldValue.x, fieldValue.y, fieldValue.z); } vtkPolyData polyData = new vtkPolyData(); polyData.SetPoints(points); polyData.GetPointData().SetVectors(vector3DArray); // Create the source points for the streamlines vtkPointSource pointSource = new vtkPointSource(); Point3D center = Point3D.barycenter(grid.getOrigin(), grid.getExtremalPoint()); pointSource.SetCenter(center.x, center.y, center.z); pointSource.SetRadius(grid.getExtremalPoint().distance(grid.getOrigin())/2.); pointSource.SetDistributionToUniform(); pointSource.SetNumberOfPoints(1500); pointSource.Update(); tracer = new vtkStreamTracer(); tracer.SetSourceData(polyData); tracer.SetSourceConnection(pointSource.GetOutputPort()); tracer.SetMaximumPropagation(100); tracer.SetInitialIntegrationStep(1); tracer.SetIntegrationDirectionToForward(); tracer.SetComputeVorticity(false); tracer.SetIntegrator(new vtkRungeKutta4()); tracer.Update(); streamTube = new vtkRibbonFilter(); streamTube.SetInputConnection(tracer.GetOutputPort()); streamTube.SetWidth(5); streamTube.SetWidthFactor(5); streamTube.Update(); mapper = new vtkPolyDataMapper(); mapper.SetInputConnection(streamTube.GetOutputPort()); I don't see nothing!!!! Some body can help me? -------------- next part -------------- An HTML attachment was scrubbed... URL: From siva.yedithi at gmail.com Wed Aug 16 16:40:46 2017 From: siva.yedithi at gmail.com (Neel Patel 0-0-0) Date: Wed, 16 Aug 2017 13:40:46 -0700 (MST) Subject: [vtkusers] Both layers don't show up when setting a background image In-Reply-To: <1502823581912-5744423.post@n5.nabble.com> References: <1502807876316-5744411.post@n5.nabble.com> <1502823581912-5744423.post@n5.nabble.com> Message-ID: <1502916046086-5744459.post@n5.nabble.com> It kind of works now. Was missing something from the example. -- View this message in context: http://vtk.1045678.n5.nabble.com/Both-layers-don-t-show-up-when-setting-a-background-image-tp5744411p5744459.html Sent from the VTK - Users mailing list archive at Nabble.com. From siva.yedithi at gmail.com Wed Aug 16 16:52:28 2017 From: siva.yedithi at gmail.com (Neel Patel 0-0-0) Date: Wed, 16 Aug 2017 13:52:28 -0700 (MST) Subject: [vtkusers] Streaming data using a background image Message-ID: <1502916748166-5744460.post@n5.nabble.com> Hi All, I'm currently streaming data and rendering it with VTK. I have 2 streams, one for the background image and one for the foreground. I get both layers to render, but as show in the example http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/BackgroundImage, the render window renders twice. Once before filling the window with the background image (1), and once after the camera is set up (2). While streaming though, the window rapidly switches between (1) and (2). Is there any way to set the camera up to fill the window before rendering the window? I've attached some pictures to illustrate the issue. Before After As an aside, while streaming the foreground layer doesn't seem to refresh, it accumulates so the data starts to overlap on top of each other. Any help would be appreciated. Regards, Neel -- View this message in context: http://vtk.1045678.n5.nabble.com/Streaming-data-using-a-background-image-tp5744460.html Sent from the VTK - Users mailing list archive at Nabble.com. From iamdpak at gmail.com Wed Aug 16 21:18:25 2017 From: iamdpak at gmail.com (vinmean) Date: Wed, 16 Aug 2017 18:18:25 -0700 (MST) Subject: [vtkusers] Using multile texture files in vtkOBJImporter In-Reply-To: References: <1502867643441-5744430.post@n5.nabble.com> Message-ID: <1502932705383-5744463.post@n5.nabble.com> Thanks for the reply. What I had with me was a single mesh.obj, a single MTL file mesh.mtl and multiple texture files mesh_material0000_map_kd.png, mesh_material0001_map_kd.png, mesh_material0002_map_kd.png. After setting the obj and mtl file names, I set only the first material mesh_material0000_map_kd.png using the importer->setTexturePath(). I was able to get the complete 3D object with the textures applied. I had asked this question because the setTexturePath took only one texture file path. Even though my problem seems to be resolved, I am curious to understand if my scenario is different from "/Only one texture per object/". It would be great if you can point me to tutorials/materials which talk about how textures are applied because I didn't understand the statement /"you have an OBJ file where one piece (material?), uses multiple textures and has multiple sets of texture coordinates per vertex"/ -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-multile-texture-files-in-vtkOBJImporter-tp5744430p5744463.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Wed Aug 16 21:32:45 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 16 Aug 2017 21:32:45 -0400 Subject: [vtkusers] Using multile texture files in vtkOBJImporter In-Reply-To: <1502932705383-5744463.post@n5.nabble.com> References: <1502867643441-5744430.post@n5.nabble.com> <1502932705383-5744463.post@n5.nabble.com> Message-ID: SetTexturePath is a directory that contains textures... See this example: https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ that uses this data: https://github.com/lorensen/VTKExamples/tree/master/src/Testing/Data/doorman Bill On Wed, Aug 16, 2017 at 9:18 PM, vinmean wrote: > Thanks for the reply. What I had with me was a single mesh.obj, a single MTL > file mesh.mtl and multiple texture files mesh_material0000_map_kd.png, > mesh_material0001_map_kd.png, mesh_material0002_map_kd.png. > > After setting the obj and mtl file names, I set only the first material > mesh_material0000_map_kd.png using the importer->setTexturePath(). I was > able to get the complete 3D object with the textures applied. > > I had asked this question because the setTexturePath took only one texture > file path. Even though my problem seems to be resolved, I am curious to > understand if my scenario is different from "/Only one texture per object/". > It would be great if you can point me to tutorials/materials which talk > about how textures are applied because I didn't understand the statement > /"you have an OBJ file where one piece (material?), uses multiple textures > and has multiple sets of texture coordinates per vertex"/ > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Using-multile-texture-files-in-vtkOBJImporter-tp5744430p5744463.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 alvaro.sanchez at kitware.com Thu Aug 17 09:26:52 2017 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Thu, 17 Aug 2017 09:26:52 -0400 Subject: [vtkusers] vtkTextureObject bind error In-Reply-To: References: <1501261737667-5744202.post@n5.nabble.com> <1501498447377-5744215.post@n5.nabble.com> <1501518920479-5744223.post@n5.nabble.com> <1501522915867-5744226.post@n5.nabble.com> <1501584716697-5744234.post@n5.nabble.com> <1502710447044-5744390.post@n5.nabble.com> Message-ID: Hi Rick, could you try this branch? Let me know if that helps. https://gitlab.kitware.com/alvaro.sanchez/vtk/commits/support-mask-streaming On Mon, Aug 14, 2017 at 3:25 PM, Alvaro Sanchez wrote: > Sure Rick, I will let you know once the fix branch is ready for testing. > > > On Mon, Aug 14, 2017 at 7:34 AM, Rick Dailey wrote: > >> We are now informing customers that we are relying on a third-party >> (Kitware) >> to update the graphics libraries before we can fix the bug in our >> software. >> Please understand that work-arounds and hacks we have attempted have not >> been especially useful. We really need a fix in VTK (large objects - >> streaming with masks on). >> >> Is there any way that we could be informed of the status of the work that >> is >> being done as mentioned in a previous post? Is there anything we can do >> to >> help with the solution? >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.c >> om/vtkTextureObject-bind-error-tp5744068p5744390.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 >> > > > > -- > Alvaro Sanchez > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4901 <(518)%20881-4901> > -- Alvaro Sanchez Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Aug 17 10:00:25 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 17 Aug 2017 10:00:25 -0400 Subject: [vtkusers] Using multile texture files in vtkOBJImporter In-Reply-To: <1502932705383-5744463.post@n5.nabble.com> References: <1502867643441-5744430.post@n5.nabble.com> <1502932705383-5744463.post@n5.nabble.com> Message-ID: It is possible to have multiple texture maps applied to a single surface where the texture maps are blended together using a blending function. That is the part we do not support. Hope that helps! On Wed, Aug 16, 2017 at 9:18 PM, vinmean wrote: > Thanks for the reply. What I had with me was a single mesh.obj, a single > MTL > file mesh.mtl and multiple texture files mesh_material0000_map_kd.png, > mesh_material0001_map_kd.png, mesh_material0002_map_kd.png. > > After setting the obj and mtl file names, I set only the first material > mesh_material0000_map_kd.png using the importer->setTexturePath(). I was > able to get the complete 3D object with the textures applied. > > I had asked this question because the setTexturePath took only one texture > file path. Even though my problem seems to be resolved, I am curious to > understand if my scenario is different from "/Only one texture per > object/". > It would be great if you can point me to tutorials/materials which talk > about how textures are applied because I didn't understand the statement > /"you have an OBJ file where one piece (material?), uses multiple textures > and has multiple sets of texture coordinates per vertex"/ > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Using-multile-texture-files-in-vtkOBJImporter-tp5744430p5744463.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 > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Aug 17 10:04:43 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 17 Aug 2017 10:04:43 -0400 Subject: [vtkusers] Render glitch on some computers In-Reply-To: References: Message-ID: I believe Qt5 works best with the new QVTKOpenGLWidget, there were some issues with Qt5 and the old classes we had for Qt support IIRC. On Wed, Aug 16, 2017 at 10:22 AM, Romain LEGUAY wrote: > Hello everyone, > > I create a small Qt (5.8 and 5.9) and VTK (7.1.1) application to display > some geometries (for example STL files or VTU series). > > I have a problem on some computers (a mac pro retina 15" mid-2015 on mac > os 10.10.5 (Yosemite) with a graphic cards amd radeon r9 m370x 2048MB): the > QVtkWidget is not rendered correctly. > > I attach the screen shot of my app. The problem always appears on the main > screen of the notebook but not on external monitor. > > Is there a way to debug this kind of bugs? > > Thank you > > Romain > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-2.tiff Type: image/tiff Size: 167818 bytes Desc: not available URL: From simakov.w at gmail.com Thu Aug 17 14:47:15 2017 From: simakov.w at gmail.com (=?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KHQuNC80LDQutC+0LI=?=) Date: Thu, 17 Aug 2017 21:47:15 +0300 Subject: [vtkusers] vtkActor and vtkChartXYZ\vtkPlotLine3D Message-ID: Hello. Can someone tried to create vtkActor for vtkContextItem? You need to create vtkActor for vtkChartXYZ or vtkPlotLine3D ... Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From siva.yedithi at gmail.com Thu Aug 17 15:22:03 2017 From: siva.yedithi at gmail.com (Neel Patel 0-0-0) Date: Thu, 17 Aug 2017 12:22:03 -0700 (MST) Subject: [vtkusers] Help clearing clearing foreground layer in multi-layered render window Message-ID: <1502997723818-5744508.post@n5.nabble.com> Hi All, My application has 2 layers, layer 0 and layer 1. Layer 0 clears and updates as usual but layer 1 doesn't get cleared and it starts to overlap with what it previously had. I've tried setting EraseOn() for the renderer that's set to layer 1, but that doesn't seem to do anything. Same with Clear() or RemoveAllViewProps(). Any help would be appreciated. Thanks. Regards, Neel -- View this message in context: http://vtk.1045678.n5.nabble.com/Help-clearing-clearing-foreground-layer-in-multi-layered-render-window-tp5744508.html Sent from the VTK - Users mailing list archive at Nabble.com. From gregory.zaccaro at caboma.com Thu Aug 17 16:11:07 2017 From: gregory.zaccaro at caboma.com (Gregory Zaccaro) Date: Thu, 17 Aug 2017 20:11:07 +0000 Subject: [vtkusers] Increase color depth for volumic rendering Message-ID: Hi Dear VTK users, I've been working for several days on : - Doing volumic rendering with VTK - Export the render window to an image I'm able to do that but I would like to increase the number of bits per pixels (bpp). Currently, I use a vtkWindowToImageFilter combined with a vtkTIFFWriter to export the image of a vtkWin32OpenGLRenderWindow. I found that the method vtkWin32OpenGLRenderWindow ::SetupPixelFormatPaletteAndContext() let me specify the desired bpp. I managed to go up to 32 bpp without any warning/error but it has no effect on the rendered results and the exported image, the image always has 24 bit depth RGB, 8 bits per channel. I attached the code I use to achieve that. My question is : is it possible to have a render window with 10, 16 or more bits per color per pixel ? My system : VTK 8.0.0 built from source Graphics card : AMD Radeon R9 Fury X. Display settings supports 10 bits per channel Cheers, Gregory Zaccaro. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: main_rendering.cxx URL: From peer9802 at gmail.com Fri Aug 18 08:11:38 2017 From: peer9802 at gmail.com (Eric Petersen) Date: Fri, 18 Aug 2017 07:11:38 -0500 Subject: [vtkusers] Obtaining transformation matrix for vtkPolyData Message-ID: Hello, I currently have a Python script where I am successively translating, and rotating, a vtkPolyData object. The script currently does not track individual transforms but I would like to know the current 4x4 transform matrix. Is there any way to directly obtain this information from the vtkPolyData object or am I stuck rewriting the script to track individual transformations? -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Aug 18 09:33:51 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 18 Aug 2017 09:33:51 -0400 Subject: [vtkusers] Obtaining transformation matrix for vtkPolyData In-Reply-To: References: Message-ID: Howdy Eric, How are you doing the transform? * vtkTransformFIlter? * vtkActor::Transform? * manually changing the points in the vtkPolyData object? For either of the first two you can get the current matrix (and its inverse) from the transform object. hope that helps David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Aug 18, 2017 at 8:11 AM, Eric Petersen wrote: > Hello, > > I currently have a Python script where I am successively translating, and > rotating, a vtkPolyData object. The script currently does not track > individual transforms but I would like to know the current 4x4 transform > matrix. Is there any way to directly obtain this information from the > vtkPolyData object or am I stuck rewriting the script to track individual > transformations? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 alvaro.sanchez at kitware.com Fri Aug 18 12:03:31 2017 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Fri, 18 Aug 2017 12:03:31 -0400 Subject: [vtkusers] vtkTextureObject bind error In-Reply-To: References: <1501261737667-5744202.post@n5.nabble.com> <1501498447377-5744215.post@n5.nabble.com> <1501518920479-5744223.post@n5.nabble.com> <1501522915867-5744226.post@n5.nabble.com> <1501584716697-5744234.post@n5.nabble.com> <1502710447044-5744390.post@n5.nabble.com> Message-ID: The fix was merged into master. On Thu, Aug 17, 2017 at 9:26 AM, Alvaro Sanchez wrote: > Hi Rick, could you try this branch? Let me know if that helps. > > https://gitlab.kitware.com/alvaro.sanchez/vtk/commits/ > support-mask-streaming > > On Mon, Aug 14, 2017 at 3:25 PM, Alvaro Sanchez < > alvaro.sanchez at kitware.com> wrote: > >> Sure Rick, I will let you know once the fix branch is ready for testing. >> >> >> On Mon, Aug 14, 2017 at 7:34 AM, Rick Dailey wrote: >> >>> We are now informing customers that we are relying on a third-party >>> (Kitware) >>> to update the graphics libraries before we can fix the bug in our >>> software. >>> Please understand that work-arounds and hacks we have attempted have not >>> been especially useful. We really need a fix in VTK (large objects - >>> streaming with masks on). >>> >>> Is there any way that we could be informed of the status of the work >>> that is >>> being done as mentioned in a previous post? Is there anything we can do >>> to >>> help with the solution? >>> >>> >>> >>> -- >>> View this message in context: http://vtk.1045678.n5.nabble.c >>> om/vtkTextureObject-bind-error-tp5744068p5744390.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 >>> >> >> >> >> -- >> Alvaro Sanchez >> Kitware, Inc. >> Senior R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4901 <(518)%20881-4901> >> > > > > -- > Alvaro Sanchez > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4901 <(518)%20881-4901> > -- Alvaro Sanchez Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmanvortex at gmail.com Fri Aug 18 16:35:45 2017 From: zmanvortex at gmail.com (Donny Zimmerman) Date: Fri, 18 Aug 2017 15:35:45 -0500 Subject: [vtkusers] vtkWarpScalar with textured geometry Message-ID: I have vtkPolyData that has texture coordinates assigned to it. Does vtkWarpScalar create new texture coordinates when creating new points for the warp process or is it not possible to use vtkWarpScalar with textured geometry? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From peer9802 at gmail.com Fri Aug 18 16:50:38 2017 From: peer9802 at gmail.com (Eric Petersen) Date: Fri, 18 Aug 2017 15:50:38 -0500 Subject: [vtkusers] Obtaining transformation matrix for vtkPolyData In-Reply-To: References: Message-ID: Thanks David, I've got a class setup for reading/writing STL files along with basic manipulation. My rotation code is below and called successive times. I guess the question is does VTK "remember" past transformations on a vtkPolyData object()? If so, what's the best way of accessing them? def Rotate(self, alpha, beta, gamma): t = vtk.vtkTransform() t.RotateX(alpha) t.RotateY(beta) t.RotateZ(gamma) tf = vtk.vtkTransformPolyDataFilter() tf.SetInputData(self.MeshData) tf.SetTransform(t) tf.Update() self.MeshData.ShallowCopy(tf.GetOutput()) On Fri, Aug 18, 2017 at 8:33 AM, David E DeMarle wrote: > Howdy Eric, > > How are you doing the transform? > * vtkTransformFIlter? > * vtkActor::Transform? > * manually changing the points in the vtkPolyData object? > > For either of the first two you can get the current matrix (and its > inverse) from the transform object. > > hope that helps > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 <(518)%20881-4909> > > On Fri, Aug 18, 2017 at 8:11 AM, Eric Petersen wrote: > >> Hello, >> >> I currently have a Python script where I am successively translating, and >> rotating, a vtkPolyData object. The script currently does not track >> individual transforms but I would like to know the current 4x4 transform >> matrix. Is there any way to directly obtain this information from the >> vtkPolyData object or am I stuck rewriting the script to track individual >> transformations? >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 mjordan at live.at Fri Aug 18 16:56:03 2017 From: mjordan at live.at (M. Jordan) Date: Fri, 18 Aug 2017 20:56:03 +0000 Subject: [vtkusers] Automate Rendering / Data Updating in VTK Message-ID: Hi guys, I need some help for the following problem. I have a class which describes the appearance of a cube. class CubeInfo { public: double* sideLength; } Now I am looking for a way to render a cube based on the information of a CubeInfo object automatically. Therefore, the cube should be updated whenever data of the CubeInfo changes. The sideLength member points to a double value which changes regularly. The set functions of the vtkCubeSource do not allow to pass pointers to it: vtkSmartPointer cubeSource = vtkSmartPointer::New(); cubeSource->SetCenter(0.0, 0.0, 0.0); cubeSource->SetXLength(*sideLength); cubeSource->SetYLength(*sideLength); cubeSource->SetZLength(*sideLength); In this case the cube is rendered with the side length value at the time of creation and will not change. Ideally, i would like to pass the "sideLength" pointer to the cubeSource and every time the Cube is repainted (interaction or something) the cube should change its radius according to the value the pointer is pointing to. The only solution I found is to regularly check if the value the pointer is pointing to changes and use a callback / signal-slot mechanism which calls a function which contains: cubeSource->SetXLength(*sideLength); update(); or use the "setScale" method of the corresponding actor to change the length. Is there any mechanism in VTK which allows "streaming"/variable data inputs? Or is there any Qt / C++ workaround? Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Aug 18 17:50:17 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 18 Aug 2017 15:50:17 -0600 Subject: [vtkusers] Obtaining transformation matrix for vtkPolyData In-Reply-To: References: Message-ID: Hi Eric, The typical solution is to save the transform. Make it into a member of your class. It's convenient to have the transform filter as a member, too. def __init__(self): self.MeshTransform = vtk.vtkTransform() self.MeshTransformFilter = vtk.vtkTransformPolyDataFilter() self.MeshTransformFilter.SetInput( < insert original, untransformed data here> ) self.MeshTransformFilter.SetTransform(self.MeshTransform) def Rotate(self, alpha, beta, gamma): self.MeshTransform.RotateX(alpha) self.MeshTransform.RotateY(beta) self.MeshTransform.RotateZ(gamma) self.MeshTransformFilter.Update(); tf.SetInputData(self.MeshData) self.MeshData.ShallowCopy(self.MeshTransformFilter.GetOutput()) The idea here is to keep a copy of your original, unmodified data to use as input to vtkTransformPolyData, though depending on what other kinds of editing you are doing, this might be tricky. - David On Fri, Aug 18, 2017 at 2:50 PM, Eric Petersen wrote: > Thanks David, > > I've got a class setup for reading/writing STL files along with basic > manipulation. My rotation code is below and called successive times. I > guess the question is does VTK "remember" past transformations on a > vtkPolyData object()? If so, what's the best way of accessing them? > > def Rotate(self, alpha, beta, gamma): > t = vtk.vtkTransform() > t.RotateX(alpha) > t.RotateY(beta) > t.RotateZ(gamma) > tf = vtk.vtkTransformPolyDataFilter() > tf.SetInputData(self.MeshData) > tf.SetTransform(t) > tf.Update() > self.MeshData.ShallowCopy(tf.GetOutput()) > > On Fri, Aug 18, 2017 at 8:33 AM, David E DeMarle > wrote: > >> Howdy Eric, >> >> How are you doing the transform? >> * vtkTransformFIlter? >> * vtkActor::Transform? >> * manually changing the points in the vtkPolyData object? >> >> For either of the first two you can get the current matrix (and its >> inverse) from the transform object. >> >> hope that helps >> >> >> David E DeMarle >> Kitware, Inc. >> Principal Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 <(518)%20881-4909> >> >> On Fri, Aug 18, 2017 at 8:11 AM, Eric Petersen >> wrote: >> >>> Hello, >>> >>> I currently have a Python script where I am successively translating, >>> and rotating, a vtkPolyData object. The script currently does not track >>> individual transforms but I would like to know the current 4x4 transform >>> matrix. Is there any way to directly obtain this information from the >>> vtkPolyData object or am I stuck rewriting the script to track individual >>> transformations? >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Aug 18 17:51:37 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 18 Aug 2017 15:51:37 -0600 Subject: [vtkusers] Obtaining transformation matrix for vtkPolyData In-Reply-To: References: Message-ID: I noticed a mistake in my code as soon as I pressed "Send". Let me try again: The typical solution is to save the transform. Make it into a member of your class. It's convenient to have the transform filter as a member, too. def __init__(self): self.MeshTransform = vtk.vtkTransform() self.MeshTransformFilter = vtk.vtkTransformPolyDataFilter() self.MeshTransformFilter.SetInput( < insert original, untransformed data here> ) self.MeshTransformFilter.SetTransform(self.MeshTransform) def Rotate(self, alpha, beta, gamma): self.MeshTransform.RotateX(alpha) self.MeshTransform.RotateY(beta) self.MeshTransform.RotateZ(gamma) self.MeshTransformFilter.Update(); self.MeshData.ShallowCopy(self.MeshTransformFilter.GetOutput()) The idea here is to keep a copy of your original, unmodified data to use as input to vtkTransformPolyData, though depending on what other kinds of editing you are doing, this might be tricky. - David On Fri, Aug 18, 2017 at 3:50 PM, David Gobbi wrote: > Hi Eric, > > The typical solution is to save the transform. Make it into a member of > your class. It's convenient to have the transform filter as a member, too. > > def __init__(self): > self.MeshTransform = vtk.vtkTransform() > self.MeshTransformFilter = vtk.vtkTransformPolyDataFilter() > self.MeshTransformFilter.SetInput( < insert original, > untransformed data here> ) > self.MeshTransformFilter.SetTransform(self.MeshTransform) > > def Rotate(self, alpha, beta, gamma): > self.MeshTransform.RotateX(alpha) > self.MeshTransform.RotateY(beta) > self.MeshTransform.RotateZ(gamma) > self.MeshTransformFilter.Update(); > tf.SetInputData(self.MeshData) > self.MeshData.ShallowCopy(self.MeshTransformFilter.GetOutput()) > > The idea here is to keep a copy of your original, unmodified data to use > as input to vtkTransformPolyData, though depending on what other kinds of > editing you are doing, this might be tricky. > > - David > > > On Fri, Aug 18, 2017 at 2:50 PM, Eric Petersen wrote: > >> Thanks David, >> >> I've got a class setup for reading/writing STL files along with basic >> manipulation. My rotation code is below and called successive times. I >> guess the question is does VTK "remember" past transformations on a >> vtkPolyData object()? If so, what's the best way of accessing them? >> >> def Rotate(self, alpha, beta, gamma): >> t = vtk.vtkTransform() >> t.RotateX(alpha) >> t.RotateY(beta) >> t.RotateZ(gamma) >> tf = vtk.vtkTransformPolyDataFilter() >> tf.SetInputData(self.MeshData) >> tf.SetTransform(t) >> tf.Update() >> self.MeshData.ShallowCopy(tf.GetOutput()) >> >> On Fri, Aug 18, 2017 at 8:33 AM, David E DeMarle < >> dave.demarle at kitware.com> wrote: >> >>> Howdy Eric, >>> >>> How are you doing the transform? >>> * vtkTransformFIlter? >>> * vtkActor::Transform? >>> * manually changing the points in the vtkPolyData object? >>> >>> For either of the first two you can get the current matrix (and its >>> inverse) from the transform object. >>> >>> hope that helps >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> Principal Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 <(518)%20881-4909> >>> >>> On Fri, Aug 18, 2017 at 8:11 AM, Eric Petersen >>> wrote: >>> >>>> Hello, >>>> >>>> I currently have a Python script where I am successively translating, >>>> and rotating, a vtkPolyData object. The script currently does not track >>>> individual transforms but I would like to know the current 4x4 transform >>>> matrix. Is there any way to directly obtain this information from the >>>> vtkPolyData object or am I stuck rewriting the script to track individual >>>> transformations? >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iamdpak at gmail.com Fri Aug 18 23:03:27 2017 From: iamdpak at gmail.com (vinmean) Date: Fri, 18 Aug 2017 20:03:27 -0700 (MST) Subject: [vtkusers] How to set vtk interaction style similar to a 3D designing tool like blender? Message-ID: <1503111807398-5744527.post@n5.nabble.com> Please suggest me and example code to setup the vtk interactor style which is like how we interact in any 3D designing software like blender. I have used pcl (point cloud library) for some time now and I find that the default interaction style in vtk is too smooth and difficult to control the object orientation. The objects being spinning around when the mouse touches the window. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-set-vtk-interaction-style-similar-to-a-3D-designing-tool-like-blender-tp5744527.html Sent from the VTK - Users mailing list archive at Nabble.com. From sanjin.pajo at gmail.com Sun Aug 20 13:05:00 2017 From: sanjin.pajo at gmail.com (Sanjin Pajo) Date: Sun, 20 Aug 2017 13:05:00 -0400 Subject: [vtkusers] VTK Error In-Reply-To: References: Message-ID: Adding the following entries in CMAKE fixes the problem: _HAS_ITERATOR_DEBUGGING =0 _ITERATOR_DEBUG_LEVEL=0 Sanjin P. On Tue, Aug 15, 2017 at 11:28 PM, Sanjin Pajo wrote: > I am wondering if there is a workaround for this issue. I have been able > to build other PCL dependencies (Boost, Eigen, Flann, QHull) in debug and > release mode using Microsoft Visual Studio 2015 and PCL requires that VTK > be built in both modes. > > This issue seems to be a known problem, here is a similar post in the PCL > forum : http://www.pcl-users.org/LNK2038-error-when-trying-to- > compile-PCL-debug-and-release-mixup-pcl-1-8-0-td4044738.html . > > Sanjin P. > > On Tue, Aug 15, 2017 at 3:49 PM, Shawn Waldon > wrote: > >> Hi Sanjin, >> >> This is a quirk of Windows. You cannot link libraries built in release >> mode with libraries built in debug mode. If you want a debug build, you >> need to build EVERYTHING in debug mode (and use debug versions of the >> dependencies you don't build yourself). Likewise, if you want to build in >> release mode, you have to build everything in release. It looks like you >> are trying to mix the two, which is something Microsoft doesn't allow. >> >> HTH, >> Shawn >> >> On Tue, Aug 15, 2017 at 3:42 PM, Sanjin Pajo >> wrote: >> >>> I am installing Point Cloud Library (PCL 1.8.1) from source and it >>> requires VTK. During the installation I get mismatch errors in Visual >>> Studio 2015 when building in debug and release mode. I am using CMAKE to >>> configure and generate build files. >>> >>> Examples: >>> >>> Error LNK2038 mismatch detected for 'RuntimeLibrary': value >>> 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in >>> hdl_viewer_simple.obj pcl_hdl_viewer_simple >>> C:\PCL\PCL-1.8.1\build\visualization\tools\vtkRenderingConte >>> xtOpenGL2-7.1-gd.lib(vtkRenderingContextOpenGL2ObjectFactory.obj) 1 >>> >>> >>> Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' >>> doesn't match value '0' in outofcore_viewer.obj pcl_outofcore_viewer >>> C:\PCL\PCL-1.8.1\build\outofcore\tools\vtkInteractionStyle-7 >>> .1-gd.lib(vtkInteractionStyleObjectFactory.obj) 1 >>> >>> Any help is greatly appreciated. >>> >>> Sanjin P. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 sanjin.pajo at gmail.com Sun Aug 20 13:17:31 2017 From: sanjin.pajo at gmail.com (Sanjin Pajo) Date: Sun, 20 Aug 2017 13:17:31 -0400 Subject: [vtkusers] VTK missing Message-ID: I am configuring and generating build files for my project with VTK. When I run it I get the following error: The program cannot be strated, vtkRenderingGL2PSOpenGL2-8.0.dll is missing. CMakeLists: find_package(VTK 8.0 COMPONENTS vtkCommonCore vtkFiltersCore vtkFiltersModeling vtkFiltersSources vtkRenderingCore vtkRenderingOpenGL2 vtkRenderingGL2PSOpenGL2 ) add_executable(my_project ${project_SOURCES} ${project_FORMS_HEADERS} target_link_libraries (mc_project ${VTK_LIBRARIES}) Sanjin P. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ysa0829 at gmail.com Sun Aug 20 23:47:32 2017 From: ysa0829 at gmail.com (Ang) Date: Sun, 20 Aug 2017 20:47:32 -0700 (MST) Subject: [vtkusers] question about pick contour actor in renderer Message-ID: <1503287252407-5744532.post@n5.nabble.com> Hi all, I have a contour actor that generated by using vtkCutter . I want to interact with the contour , so I have tried all vtkPicker classes in vtk, but the picker class function called GetActor() always return NULL. any suggestion for pick contour actor correct? thanks for help. -- View this message in context: http://vtk.1045678.n5.nabble.com/question-about-pick-contour-actor-in-renderer-tp5744532.html Sent from the VTK - Users mailing list archive at Nabble.com. From chenshaoqiang at buaa.edu.cn Mon Aug 21 04:51:53 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Mon, 21 Aug 2017 16:51:53 +0800 Subject: [vtkusers] How can I use the third party module-libxml2 Message-ID: I can find the directory of libxml2 in the thirdparty directory of vtk8. I tried to create a solution with cmake GUI from the cmakelists.txt under the directory of libxml2. But it gives me an error of Unknown CMake command "vtk_module_third_party". And I can?t find any option in the cmake GUI for vtk8 solution. Any suggestion will be very helpful. Thanks. Sincerely Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From taron2000 at gmx.de Mon Aug 21 08:05:36 2017 From: taron2000 at gmx.de (Taron) Date: Mon, 21 Aug 2017 05:05:36 -0700 (MST) Subject: [vtkusers] Chart + OpenGL2 Backend + Intel Hd = Only square Message-ID: <1503317136508-5744536.post@n5.nabble.com> Hi there, since we switched to the OpenGL2 Backend whenever we use LinePLots or PointPlots, for Windows machines with IntelHD graphics the setMarkerStyle is ignored. We have somnething like this: vtkPlot* points = chart_->AddPlot( vtkChart::POINTS ); points->SetInputData( tables[0], 0, 1 ); points->SetIndexedLabels( vtkStringArray::SafeDownCast( tables[0]->GetColumn( 2 ) ) ); points->SetColor( col.red(), col.green(), col.blue(), 255 ); vtkPlotPoints::SafeDownCast( points )->SetMarkerStyle( vtkPlotPoints::CROSS ); On Intel graphics this paints always squares and on nvidia or ati cards everything works as expected. With the old backend it was also ok on intel graphics. Any comments on what goes wrong here and how to fix this? -- View this message in context: http://vtk.1045678.n5.nabble.com/Chart-OpenGL2-Backend-Intel-Hd-Only-square-tp5744536.html Sent from the VTK - Users mailing list archive at Nabble.com. From ben.boeckel at kitware.com Mon Aug 21 08:26:09 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 21 Aug 2017 08:26:09 -0400 Subject: [vtkusers] How can I use the third party module-libxml2 In-Reply-To: References: Message-ID: <20170821122609.GA4994@megas.kitware.com> On Mon, Aug 21, 2017 at 16:51:53 +0800, chensq wrote: > I can find the directory of libxml2 in the thirdparty directory of vtk8. > I tried to create a solution with cmake GUI from the cmakelists.txt under the directory of libxml2. > But it gives me an error of Unknown CMake command "vtk_module_third_party". > And I can??t find any option in the cmake GUI for vtk8 solution. > Any suggestion will be very helpful. The ThirdParty subdirectories are not usable on their own; they are meant to be used as part of VTK. For libxml2, upstream's repository is here: https://git.gnome.org/browse/libxml2/ --Ben From taron2000 at gmx.de Mon Aug 21 09:42:48 2017 From: taron2000 at gmx.de (Taron) Date: Mon, 21 Aug 2017 06:42:48 -0700 (MST) Subject: [vtkusers] Chart + OpenGL2 Backend + Intel Hd = Only square In-Reply-To: <1503317136508-5744536.post@n5.nabble.com> References: <1503317136508-5744536.post@n5.nabble.com> Message-ID: <1503322968894-5744538.post@n5.nabble.com> I have found the solution. The problem was that we used the new opengl backend and Qt 5.9 but the old QVTKWidget. Using the new QVTKOpenGLWidget solved the problem. -- View this message in context: http://vtk.1045678.n5.nabble.com/Chart-OpenGL2-Backend-Intel-Hd-Only-square-tp5744536p5744538.html Sent from the VTK - Users mailing list archive at Nabble.com. From gregory.zaccaro at caboma.com Mon Aug 21 11:40:58 2017 From: gregory.zaccaro at caboma.com (Gregory Zaccaro) Date: Mon, 21 Aug 2017 15:40:58 +0000 Subject: [vtkusers] Increase color depth with volumic rendering Message-ID: Hi Dear VTK users, I've been working for several days on : - Doing volumic rendering with VTK - Export the render window to an image I'm able to do that but I would like to increase the number of bits per pixels (bpp). Currently, I use a vtkWindowToImageFilter combined with a vtkTIFFWriter to export the image of a vtkWin32OpenGLRenderWindow. I found that the method vtkWin32OpenGLRenderWindow ::SetupPixelFormatPaletteAndContext() let me specify the desired bpp. I managed to go up to 32 bpp without any warning/error but it has no effect on the rendered results and the exported image, the image always has 24 bit depth RGB, 8 bits per channel. I attached the code I use to achieve that. My question is : is it possible to have a render window with 10, 16 or more bits per color per pixel ? My system : VTK 8.0.0 built from source Graphics card : AMD Radeon R9 Fury X. Display settings supports 10 bits per channel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: main.cxx URL: From elainejiang8 at gmail.com Mon Aug 21 12:27:04 2017 From: elainejiang8 at gmail.com (elainejiang8) Date: Mon, 21 Aug 2017 09:27:04 -0700 (MST) Subject: [vtkusers] vtkRenderWindowInteractor with custom render loop Message-ID: <1503332824297-5744540.post@n5.nabble.com> Hi all, I'm writing a program that integrates vtk with an external VR program. This requires that I use the VR program's render loop instead of vtk's. However, I'm hoping to still be able to use vtkRenderWindowInteractor as it will make interacting with vtk objects much easier. I saw a post on stackoverflow that said that I could just call vtkRenderWindowInteractor::Initialize() for the interactor to become enabled, but when I call the function, I can't seem to interact with the vtk objects. Does anyone have any insight into this issue? I'll attach my initialization and render functions below: void initialize() { vtkNew renWin; externalVTKWidget->SetRenderWindow(renWin.GetPointer()); renWin->AddRenderer(ren); /**********************************************************/ std::string files[7] = {"../data/cco-ascii.vtk", "../data/newjets-ascii.vtk", "../data/fekcorr-ascii.vtk", "../data/newar-ascii.vtk", "../data/newhetg-ascii.vtk", "../data/newopt-ascii.vtk", "../data/newsi-ascii.vtk"}; for(int i = 0; i < NUM_ACTORS; i++) { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(files[i].c_str()); reader->Update(); vtkSmartPointer inputPolyData = reader->GetOutput(); // Merge duplicate points, and/or remove unused points and/or remove degenerate cells vtkSmartPointer clean = vtkSmartPointer::New(); clean->SetInputData(inputPolyData); vtkSmartPointer smoothFilter = vtkSmartPointer::New(); smoothFilter->SetInputConnection(clean->GetOutputPort()); smoothFilter->SetNumberOfIterations(15); smoothFilter->SetRelaxationFactor(0.1); smoothFilter->FeatureEdgeSmoothingOff(); smoothFilter->BoundarySmoothingOn(); smoothFilter->Update(); // Update normals on newly smoothed polydata vtkSmartPointer normals = vtkSmartPointer::New(); normals->SetInputConnection(smoothFilter->GetOutputPort()); normals->ComputePointNormalsOn(); normals->ComputeCellNormalsOn(); normals->Update(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(normals->GetOutputPort()); mapper->ScalarVisibilityOff(); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetInterpolationToFlat(); actor->GetProperty()->SetOpacity(0.8); ren->AddActor(actor); actors.push_back(actor); } /**********************************************************/ // Set the custom type to use for interaction. vtkSmartPointer style = vtkSmartPointer::New(); style->SetDefaultRenderer(ren); interactor->SetRenderWindow(renWin.GetPointer()); interactor->SetInteractorStyle(style); /**********************************************************/ ren->SetBackground(0.87, 0.88, 0.91); ren->ResetCamera(); *interactor->Initialize();* vtkOpenGLCamera *camera = (vtkOpenGLCamera *)ren->GetActiveCamera(); // camera default position set at (4.68744, 2.67252, 360.229) camera->SetPosition(4, 2, 360); camera->SetViewUp(0,1,0); // controls "up" direction for camera } void display() { // Enable depth testing. Demonstrates OpenGL context being managed by external // application i.e. GLUT in this case. glEnable(GL_DEPTH_TEST); // Buffers being managed by external application i.e. GLUT in this case. glClearColor(0.87f, 0.88f, 0.91f, 1.0f); // Set background color to gray and opaque glClearDepth(1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear the color buffer glFlush(); // Render now glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); //interactor->Render(); externalVTKWidget->GetRenderWindow()->Render(); glutSwapBuffers(); } Thanks, Elaine -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderWindowInteractor-with-custom-render-loop-tp5744540.html Sent from the VTK - Users mailing list archive at Nabble.com. From sankhesh.jhaveri at kitware.com Mon Aug 21 13:28:30 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 21 Aug 2017 17:28:30 +0000 Subject: [vtkusers] vtkRenderWindowInteractor with custom render loop In-Reply-To: <1503332824297-5744540.post@n5.nabble.com> References: <1503332824297-5744540.post@n5.nabble.com> Message-ID: Hi Elaine, By using the ExternalVTKWidget and all the vtkExternal* classes, you get interaction by default. The external widget ensures that the VTK camera is synchronized with the VR camera. Is there some special kind of interaction that you are looking for? Sankhesh ? On Mon, Aug 21, 2017 at 12:27 PM elainejiang8 wrote: > Hi all, > > I'm writing a program that integrates vtk with an external VR program. This > requires that I use the VR program's render loop instead of vtk's. However, > I'm hoping to still be able to use vtkRenderWindowInteractor as it will > make > interacting with vtk objects much easier. I saw a post on stackoverflow > that > said that I could just call vtkRenderWindowInteractor::Initialize() for the > interactor to become enabled, but when I call the function, I can't seem to > interact with the vtk objects. Does anyone have any insight into this > issue? > I'll attach my initialization and render functions below: > > void initialize() { > vtkNew renWin; > externalVTKWidget->SetRenderWindow(renWin.GetPointer()); > renWin->AddRenderer(ren); > > /**********************************************************/ > > std::string files[7] = {"../data/cco-ascii.vtk", > "../data/newjets-ascii.vtk", "../data/fekcorr-ascii.vtk", > "../data/newar-ascii.vtk", "../data/newhetg-ascii.vtk", > "../data/newopt-ascii.vtk", "../data/newsi-ascii.vtk"}; > > for(int i = 0; i < NUM_ACTORS; i++) { > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName(files[i].c_str()); > reader->Update(); > vtkSmartPointer inputPolyData = reader->GetOutput(); > > // Merge duplicate points, and/or remove unused points and/or > remove > degenerate cells > vtkSmartPointer clean = > vtkSmartPointer::New(); > clean->SetInputData(inputPolyData); > > vtkSmartPointer smoothFilter = > vtkSmartPointer::New(); > smoothFilter->SetInputConnection(clean->GetOutputPort()); > smoothFilter->SetNumberOfIterations(15); > smoothFilter->SetRelaxationFactor(0.1); > smoothFilter->FeatureEdgeSmoothingOff(); > smoothFilter->BoundarySmoothingOn(); > smoothFilter->Update(); > > // Update normals on newly smoothed polydata > vtkSmartPointer normals = > vtkSmartPointer::New(); > normals->SetInputConnection(smoothFilter->GetOutputPort()); > normals->ComputePointNormalsOn(); > normals->ComputeCellNormalsOn(); > normals->Update(); > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(normals->GetOutputPort()); > mapper->ScalarVisibilityOff(); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > actor->GetProperty()->SetInterpolationToFlat(); > actor->GetProperty()->SetOpacity(0.8); > > ren->AddActor(actor); > actors.push_back(actor); > } > > /**********************************************************/ > > // Set the custom type to use for interaction. > vtkSmartPointer style = > vtkSmartPointer::New(); > style->SetDefaultRenderer(ren); > > interactor->SetRenderWindow(renWin.GetPointer()); > interactor->SetInteractorStyle(style); > > /**********************************************************/ > > ren->SetBackground(0.87, 0.88, 0.91); > ren->ResetCamera(); > *interactor->Initialize();* > > vtkOpenGLCamera *camera = (vtkOpenGLCamera *)ren->GetActiveCamera(); > // camera default position set at (4.68744, 2.67252, 360.229) > camera->SetPosition(4, 2, 360); > camera->SetViewUp(0,1,0); // controls "up" direction for camera > } > > > void display() { > // Enable depth testing. Demonstrates OpenGL context being managed by > external > // application i.e. GLUT in this case. > glEnable(GL_DEPTH_TEST); > > // Buffers being managed by external application i.e. GLUT in this > case. > glClearColor(0.87f, 0.88f, 0.91f, 1.0f); // Set background color to > gray > and opaque > glClearDepth(1.0f); > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear the color > buffer > > glFlush(); // Render now > > glEnable(GL_LIGHTING); > glEnable(GL_LIGHT0); > > //interactor->Render(); > externalVTKWidget->GetRenderWindow()->Render(); > glutSwapBuffers(); > } > > Thanks, > Elaine > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkRenderWindowInteractor-with-custom-render-loop-tp5744540.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 > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From elainejiang8 at gmail.com Mon Aug 21 13:49:22 2017 From: elainejiang8 at gmail.com (Elaine Jiang) Date: Mon, 21 Aug 2017 13:49:22 -0400 Subject: [vtkusers] vtkRenderWindowInteractor with custom render loop In-Reply-To: References: <1503332824297-5744540.post@n5.nabble.com> Message-ID: Hi Sankhesh, Yes, I want users to be able to interact with the VTK objects with a VR wand. I can test whether the wand works by temporarily using keyboard buttons to zoom, pan, rotate, and select the VTK objects. I would need to use a vtkRenderWindowInteractor in this case, right? Thanks, Elaine On Mon, Aug 21, 2017 at 1:28 PM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Hi Elaine, > > By using the ExternalVTKWidget and all the vtkExternal* classes, you get > interaction by default. The external widget ensures that the VTK camera is > synchronized with the VR camera. Is there some special kind of interaction > that you are looking for? > > Sankhesh > ? > > On Mon, Aug 21, 2017 at 12:27 PM elainejiang8 > wrote: > >> Hi all, >> >> I'm writing a program that integrates vtk with an external VR program. >> This >> requires that I use the VR program's render loop instead of vtk's. >> However, >> I'm hoping to still be able to use vtkRenderWindowInteractor as it will >> make >> interacting with vtk objects much easier. I saw a post on stackoverflow >> that >> said that I could just call vtkRenderWindowInteractor::Initialize() for >> the >> interactor to become enabled, but when I call the function, I can't seem >> to >> interact with the vtk objects. Does anyone have any insight into this >> issue? >> I'll attach my initialization and render functions below: >> >> void initialize() { >> vtkNew renWin; >> externalVTKWidget->SetRenderWindow(renWin.GetPointer()); >> renWin->AddRenderer(ren); >> >> /**********************************************************/ >> >> std::string files[7] = {"../data/cco-ascii.vtk", >> "../data/newjets-ascii.vtk", "../data/fekcorr-ascii.vtk", >> "../data/newar-ascii.vtk", "../data/newhetg-ascii.vtk", >> "../data/newopt-ascii.vtk", "../data/newsi-ascii.vtk"}; >> >> for(int i = 0; i < NUM_ACTORS; i++) { >> vtkSmartPointer reader = >> vtkSmartPointer::New(); >> reader->SetFileName(files[i].c_str()); >> reader->Update(); >> vtkSmartPointer inputPolyData = reader->GetOutput(); >> >> // Merge duplicate points, and/or remove unused points and/or >> remove >> degenerate cells >> vtkSmartPointer clean = >> vtkSmartPointer::New(); >> clean->SetInputData(inputPolyData); >> >> vtkSmartPointer smoothFilter = >> vtkSmartPointer::New(); >> smoothFilter->SetInputConnection(clean->GetOutputPort()); >> smoothFilter->SetNumberOfIterations(15); >> smoothFilter->SetRelaxationFactor(0.1); >> smoothFilter->FeatureEdgeSmoothingOff(); >> smoothFilter->BoundarySmoothingOn(); >> smoothFilter->Update(); >> >> // Update normals on newly smoothed polydata >> vtkSmartPointer normals = >> vtkSmartPointer::New(); >> normals->SetInputConnection(smoothFilter->GetOutputPort()); >> normals->ComputePointNormalsOn(); >> normals->ComputeCellNormalsOn(); >> normals->Update(); >> >> vtkSmartPointer mapper = >> vtkSmartPointer::New(); >> mapper->SetInputConnection(normals->GetOutputPort()); >> mapper->ScalarVisibilityOff(); >> >> vtkSmartPointer actor = >> vtkSmartPointer::New(); >> actor->SetMapper(mapper); >> actor->GetProperty()->SetInterpolationToFlat(); >> actor->GetProperty()->SetOpacity(0.8); >> >> ren->AddActor(actor); >> actors.push_back(actor); >> } >> >> /**********************************************************/ >> >> // Set the custom type to use for interaction. >> vtkSmartPointer style = >> vtkSmartPointer::New(); >> style->SetDefaultRenderer(ren); >> >> interactor->SetRenderWindow(renWin.GetPointer()); >> interactor->SetInteractorStyle(style); >> >> /**********************************************************/ >> >> ren->SetBackground(0.87, 0.88, 0.91); >> ren->ResetCamera(); >> *interactor->Initialize();* >> >> vtkOpenGLCamera *camera = (vtkOpenGLCamera *)ren->GetActiveCamera(); >> // camera default position set at (4.68744, 2.67252, 360.229) >> camera->SetPosition(4, 2, 360); >> camera->SetViewUp(0,1,0); // controls "up" direction for camera >> } >> >> >> void display() { >> // Enable depth testing. Demonstrates OpenGL context being managed by >> external >> // application i.e. GLUT in this case. >> glEnable(GL_DEPTH_TEST); >> >> // Buffers being managed by external application i.e. GLUT in this >> case. >> glClearColor(0.87f, 0.88f, 0.91f, 1.0f); // Set background color to >> gray >> and opaque >> glClearDepth(1.0f); >> glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear the color >> buffer >> >> glFlush(); // Render now >> >> glEnable(GL_LIGHTING); >> glEnable(GL_LIGHT0); >> >> //interactor->Render(); >> externalVTKWidget->GetRenderWindow()->Render(); >> glutSwapBuffers(); >> } >> >> Thanks, >> Elaine >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble. >> com/vtkRenderWindowInteractor-with-custom-render-loop-tp5744540.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 >> > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenshaoqiang at buaa.edu.cn Mon Aug 21 21:01:09 2017 From: chenshaoqiang at buaa.edu.cn (chensq) Date: Tue, 22 Aug 2017 09:01:09 +0800 Subject: [vtkusers] [SPAM] Re: How can I use the third party module-libxml2 In-Reply-To: <20170821122609.GA4994@megas.kitware.com> References: <20170821122609.GA4994@megas.kitware.com> Message-ID: <4E1DEE976FD242F1841ECC03FA7284EE@chensqPC> Thank you very much Ben. Sincerely Chen. -----????----- From: Ben Boeckel Sent: Monday, August 21, 2017 8:26 PM To: chensq Cc: vtkusers Subject: [SPAM] Re: [vtkusers] How can I use the third party module-libxml2 On Mon, Aug 21, 2017 at 16:51:53 +0800, chensq wrote: > I can find the directory of libxml2 in the thirdparty directory of vtk8. > I tried to create a solution with cmake GUI from the cmakelists.txt under > the directory of libxml2. > But it gives me an error of Unknown CMake command > "vtk_module_third_party". > And I can??t find any option in the cmake GUI for vtk8 solution. > Any suggestion will be very helpful. The ThirdParty subdirectories are not usable on their own; they are meant to be used as part of VTK. For libxml2, upstream's repository is here: https://git.gnome.org/browse/libxml2/ --Ben From rccm.kyoshimi at gmail.com Mon Aug 21 23:47:49 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Tue, 22 Aug 2017 12:47:49 +0900 Subject: [vtkusers] VTK missing In-Reply-To: References: Message-ID: Hi Sanjin, You need to either add the path to the directory containing the VTK dlls to your computer's PATH variable, or put the missing dlls in the same directory as the executable. If you builds VTK static library with Build_SHARED_LIBS=OFF, the above work is not necessary. Thanks 2017-08-21 2:17 GMT+09:00 Sanjin Pajo : > I am configuring and generating build files for my project with VTK. When I > run it I get the following error: > > The program cannot be strated, vtkRenderingGL2PSOpenGL2-8.0.dll is missing. > > CMakeLists: > > find_package(VTK 8.0 COMPONENTS > vtkCommonCore > vtkFiltersCore > vtkFiltersModeling > vtkFiltersSources > vtkRenderingCore > vtkRenderingOpenGL2 > vtkRenderingGL2PSOpenGL2 ) > > > > add_executable(my_project ${project_SOURCES} ${project_FORMS_HEADERS} > target_link_libraries (mc_project ${VTK_LIBRARIES}) > > > > Sanjin P. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 rccm.kyoshimi at gmail.com Tue Aug 22 00:23:23 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Tue, 22 Aug 2017 13:23:23 +0900 Subject: [vtkusers] How to set vtk interaction style similar to a 3D designing tool like blender? In-Reply-To: <1503111807398-5744527.post@n5.nabble.com> References: <1503111807398-5744527.post@n5.nabble.com> Message-ID: Hi vinmean, Although the trackball camera mode is a ParaView-like style, it may let your handling feel easier. Example below is helpful: https://lorensen.github.io/VTKExamples/site/Cxx/Interaction/TrackballCamera/ Thanks 2017-08-19 12:03 GMT+09:00 vinmean : > Please suggest me and example code to setup the vtk interactor style which is > like how we interact in any 3D designing software like blender. I have used > pcl (point cloud library) for some time now and I find that the default > interaction style in vtk is too smooth and difficult to control the object > orientation. The objects being spinning around when the mouse touches the > window. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-set-vtk-interaction-style-similar-to-a-3D-designing-tool-like-blender-tp5744527.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 romain.leguay at gmail.com Tue Aug 22 03:16:45 2017 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Tue, 22 Aug 2017 09:16:45 +0200 Subject: [vtkusers] Render glitch on some computers In-Reply-To: References: Message-ID: <45A4B44E-0626-4BD7-893D-494E4E3BEF37@gmail.com> Hi guys! Sorry for the late answer. Both solutions works great! The first solution need to build the application using Clang or Gcc provided by Apple while the second solution needs at least VTK 8.0. Thanks again! Romain > Le 17 ao?t 2017 ? 16:04, Ken Martin a ?crit : > > I believe Qt5 works best with the new QVTKOpenGLWidget, there were some issues with Qt5 and the old classes we had for Qt support IIRC. > > On Wed, Aug 16, 2017 at 10:22 AM, Romain LEGUAY > wrote: > Hello everyone, > > I create a small Qt (5.8 and 5.9) and VTK (7.1.1) application to display some geometries (for example STL files or VTU series). > > I have a problem on some computers (a mac pro retina 15" mid-2015 on mac os 10.10.5 (Yosemite) with a graphic cards amd radeon r9 m370x 2048MB): the QVtkWidget is not rendered correctly. > > I attach the screen shot of my app. The problem always appears on the main screen of the notebook but not on external monitor. > > Is there a way to debug this kind of bugs? > > Thank you > > Romain > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikhail.pukhlikov at outlook.com Tue Aug 22 03:50:55 2017 From: mikhail.pukhlikov at outlook.com (Mikhail Pukhlikov) Date: Tue, 22 Aug 2017 07:50:55 +0000 Subject: [vtkusers] Is it possible to get/set mouse pointer coordinates and get screen resolution? Message-ID: Is it possible to get/set mouse pointer coordinates and get screen resolution with VTK? I need that to control mouse on screen borders in crossplatform way. It's easy to make with qt but I don't want to put it in module with VTK, Plain C++ OS-depending code will be slightly bad. I doubt if VTK can do it but asking just to be sure. -- Cheers, Mikhail Pukhlikov [mikhail.pukhlikov at outlook.com] -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 529 bytes Desc: This is a digitally signed message part URL: From alican1812 at hotmail.com Tue Aug 22 04:27:25 2017 From: alican1812 at hotmail.com (alican) Date: Tue, 22 Aug 2017 01:27:25 -0700 (MST) Subject: [vtkusers] How would you go about converting an SVG file into 3D mesh Message-ID: <1503390445437-5744549.post@n5.nabble.com> I have an SVG file, that I would like to convert into a mesh. It should have some depth, but the depth and Z position can be the same for all points. I have thought about getting all points coordinates from SVG and adding the same z to all points, then duplicating the process with a slightly different z, then merging these 2 data sets into one mesh. There is at least 2 problems with this approach: 1) it is slow and inefficient 2) if there are some shapes in the SVG, I do not have real points, I need to create the points first, for example, I have 2 centers and 2 radiuses for an ellipse, so I can generate some points on this ellipse' curve. This makes the process even more slow. What would be a more efficient approach, if there is one? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/How-would-you-go-about-converting-an-SVG-file-into-3D-mesh-tp5744549.html Sent from the VTK - Users mailing list archive at Nabble.com. From mjordan at live.at Tue Aug 22 08:50:15 2017 From: mjordan at live.at (M. Jordan) Date: Tue, 22 Aug 2017 12:50:15 +0000 Subject: [vtkusers] Using multiple renderer Message-ID: Hello, I have a set up with two renderer and one renderWindow. The first renderer (layer = 0) contains an actor with a complex polydata object. The second renderer (layer=1) contains various small actors which are updated continuously (they are changing their sizes). Now I would like to update the second renderer (layer = 1) continuously because it contains dynamic objects. The second renderer (layer = 0) should be only updated in the case of user interaction. I used the following code in my update function: ChangeSizesOfRenderer2Actors(); RenderWindow->EraseOff(); Renderer1->DrawOff(); RenderWindow->Render(); Renderer1->DrawOn(); RenderWindow->EraseOn(); Due to the fact that I call RenderWindow->EraseOff() the "old" actors of the second renderer are still displayed although the "new" actors are already rendered too. But I need this command to keep the complex polydata object visible. Any idea how to solve this problem? Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Aug 22 09:21:54 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 22 Aug 2017 09:21:54 -0400 Subject: [vtkusers] How would you go about converting an SVG file into 3D mesh In-Reply-To: <1503390445437-5744549.post@n5.nabble.com> References: <1503390445437-5744549.post@n5.nabble.com> Message-ID: On Tue, Aug 22, 2017 at 4:27 AM, alican wrote: > I have an SVG file, that I would like to convert into a mesh. It should > have > some depth, but the depth and Z position can be the same for all points. I > have thought about getting all points coordinates from SVG and adding the > same z to all points, then duplicating the process with a slightly > different > z, then merging these 2 data sets into one mesh. > > There is at least 2 problems with this approach: > 1) it is slow and inefficient > 2) if there are some shapes in the SVG, I do not have real points, I need > to > create the points first, for example, I have 2 centers and 2 radiuses for > an > ellipse, so I can generate some points on this ellipse' curve. > This makes the process even more slow. > > What would be a more efficient approach, if there is one? > Thanks > > >From a complexity standpoint there can't be a more efficient way to do this than you have described. You need to iterate over the points in the SVG file at least once, which you do in your algorithm. There may be tweaks you can do such as generate points with the same x,y value and different z values at the same time and store these in your mesh, but that is a constant performance improvement. Unless you are dealing with billions of points, what you describe should be quite fast on any computer. Cory > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/How-would-you-go-about-converting-an-SVG-file-into- > 3D-mesh-tp5744549.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramamurr at research.ge.com Tue Aug 22 08:49:24 2017 From: ramamurr at research.ge.com (Ramamurthy, Rajesh (GE Global Research, US)) Date: Tue, 22 Aug 2017 12:49:24 +0000 Subject: [vtkusers] VTK 8.0.0 compile error Message-ID: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF1C@CINMBAPD02.e2k.ad.ge.com> Hi, I am new to VTK and trying to build VTK 8.0 using the Visual Studio 2012 and CMake 3.9.1. I believe I am following the correct instructions. However, when I follow the instructions I am getting a build error as follows that I don't understand: vtk-8.0.0\common\core\vtkGenericDataArrayLookupHelper.h(72): error C2059: syntax error : ',' 9> \vtk-8.0.0\vtk-8.0.0\common\core\vtkGenericDataArrayLookupHelper.h(226) : see reference to class template instantiation 'vtkGenericDataArrayLookupHelper' being compiled 9>\vtk-8.0.0\vtk-8.0.0\common\core\vtkGenericDataArrayLookupHelper.h(73): error C2334: unexpected token(s) preceding '{'; skipping apparent function body 9>\vtk-8.0.0\vtk-8.0.0\common\core\vtkGenericDataArrayLookupHelper.h(73): error C2059: syntax error : ',' 9>\vtk-8.0.0\vtk-8.0.0\common\core\vtkGenericDataArrayLookupHelper.h(74): error C2059: syntax error : '{' 9>\vtk-8.0.0\vtk-8.0.0\common\core\vtkGenericDataArrayLookupHelper.h(74): error C2334: unexpected token(s) preceding '{'; skipping apparent function body Can someone advise me on what I can do here to get a successful VTK build? Regards Rajesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From allison.vacanti at kitware.com Tue Aug 22 09:44:16 2017 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Tue, 22 Aug 2017 09:44:16 -0400 Subject: [vtkusers] VTK 8.0.0 compile error In-Reply-To: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF1C@CINMBAPD02.e2k.ad.ge.com> References: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF1C@CINMBAPD02.e2k.ad.ge.com> Message-ID: On Tue, Aug 22, 2017 at 8:49 AM, Ramamurthy, Rajesh (GE Global Research, US) wrote: > I am new to VTK and trying to build VTK 8.0 using the Visual Studio 2012 and > CMake 3.9.1. I believe those warnings are about missing C++11 features in MSVC 2012. Try a newer version of MSVC (2013+ should work). From allison.vacanti at kitware.com Tue Aug 22 10:15:28 2017 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Tue, 22 Aug 2017 10:15:28 -0400 Subject: [vtkusers] VTK 8.0.0 compile error In-Reply-To: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF89@CINMBAPD02.e2k.ad.ge.com> References: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF1C@CINMBAPD02.e2k.ad.ge.com> <7656909F4F8F7F44B138D3B65F7F9C8468B9FF89@CINMBAPD02.e2k.ad.ge.com> Message-ID: I'm not sure since I rarely use windows, but I believe 7.1 should work with MSVC 2012. Hopefully someone will correct me if I'm wrong. On Tue, Aug 22, 2017 at 9:48 AM, Ramamurthy, Rajesh (GE Global Research, US) wrote: > Thank you for that guidance, extremely helpful. > > However, I don't have easy access to VS2013 at this point. Do we know if VTK 7.1 is compatible with 2012? If not any guidance on the last compatible version of VTK with 2012 will be appreciated. > > -----Original Message----- > From: Allie Vacanti [mailto:allison.vacanti at kitware.com] > Sent: Tuesday, August 22, 2017 9:44 AM > To: Ramamurthy, Rajesh (GE Global Research, US) > Cc: vtkusers at vtk.org > Subject: EXT: Re: [vtkusers] VTK 8.0.0 compile error > > On Tue, Aug 22, 2017 at 8:49 AM, Ramamurthy, Rajesh (GE Global Research, US) wrote: >> I am new to VTK and trying to build VTK 8.0 using the Visual Studio >> 2012 and CMake 3.9.1. > > I believe those warnings are about missing C++11 features in MSVC 2012. Try a newer version of MSVC (2013+ should work). From ramamurr at research.ge.com Tue Aug 22 09:48:46 2017 From: ramamurr at research.ge.com (Ramamurthy, Rajesh (GE Global Research, US)) Date: Tue, 22 Aug 2017 13:48:46 +0000 Subject: [vtkusers] VTK 8.0.0 compile error In-Reply-To: References: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF1C@CINMBAPD02.e2k.ad.ge.com> Message-ID: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF89@CINMBAPD02.e2k.ad.ge.com> Thank you for that guidance, extremely helpful. However, I don't have easy access to VS2013 at this point. Do we know if VTK 7.1 is compatible with 2012? If not any guidance on the last compatible version of VTK with 2012 will be appreciated. -----Original Message----- From: Allie Vacanti [mailto:allison.vacanti at kitware.com] Sent: Tuesday, August 22, 2017 9:44 AM To: Ramamurthy, Rajesh (GE Global Research, US) Cc: vtkusers at vtk.org Subject: EXT: Re: [vtkusers] VTK 8.0.0 compile error On Tue, Aug 22, 2017 at 8:49 AM, Ramamurthy, Rajesh (GE Global Research, US) wrote: > I am new to VTK and trying to build VTK 8.0 using the Visual Studio > 2012 and CMake 3.9.1. I believe those warnings are about missing C++11 features in MSVC 2012. Try a newer version of MSVC (2013+ should work). From ramamurr at research.ge.com Tue Aug 22 10:58:30 2017 From: ramamurr at research.ge.com (Ramamurthy, Rajesh (GE Global Research, US)) Date: Tue, 22 Aug 2017 14:58:30 +0000 Subject: [vtkusers] VTK 8.0.0 compile error In-Reply-To: References: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF1C@CINMBAPD02.e2k.ad.ge.com> <7656909F4F8F7F44B138D3B65F7F9C8468B9FF89@CINMBAPD02.e2k.ad.ge.com> Message-ID: <7656909F4F8F7F44B138D3B65F7F9C8468BA005C@CINMBAPD02.e2k.ad.ge.com> Confirmed VTK7.1 works with MSVC 2012, but not VTK8.0. -----Original Message----- From: Allie Vacanti [mailto:allison.vacanti at kitware.com] Sent: Tuesday, August 22, 2017 10:15 AM To: Ramamurthy, Rajesh (GE Global Research, US) Cc: vtkusers at vtk.org Subject: EXT: Re: [vtkusers] VTK 8.0.0 compile error I'm not sure since I rarely use windows, but I believe 7.1 should work with MSVC 2012. Hopefully someone will correct me if I'm wrong. On Tue, Aug 22, 2017 at 9:48 AM, Ramamurthy, Rajesh (GE Global Research, US) wrote: > Thank you for that guidance, extremely helpful. > > However, I don't have easy access to VS2013 at this point. Do we know if VTK 7.1 is compatible with 2012? If not any guidance on the last compatible version of VTK with 2012 will be appreciated. > > -----Original Message----- > From: Allie Vacanti [mailto:allison.vacanti at kitware.com] > Sent: Tuesday, August 22, 2017 9:44 AM > To: Ramamurthy, Rajesh (GE Global Research, US) > Cc: vtkusers at vtk.org > Subject: EXT: Re: [vtkusers] VTK 8.0.0 compile error > > On Tue, Aug 22, 2017 at 8:49 AM, Ramamurthy, Rajesh (GE Global Research, US) wrote: >> I am new to VTK and trying to build VTK 8.0 using the Visual Studio >> 2012 and CMake 3.9.1. > > I believe those warnings are about missing C++11 features in MSVC 2012. Try a newer version of MSVC (2013+ should work). From lasso at queensu.ca Tue Aug 22 17:26:33 2017 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 22 Aug 2017 21:26:33 +0000 Subject: [vtkusers] VTK 8.0.0 compile error In-Reply-To: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF89@CINMBAPD02.e2k.ad.ge.com> References: <7656909F4F8F7F44B138D3B65F7F9C8468B9FF1C@CINMBAPD02.e2k.ad.ge.com> <7656909F4F8F7F44B138D3B65F7F9C8468B9FF89@CINMBAPD02.e2k.ad.ge.com> Message-ID: > I don't have easy access to VS2013 FYI, you can download VS2013 for free from Microsoft's website (https://www.visualstudio.com/en-us/news/releasenotes/vs2013-archive). Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ramamurthy, Rajesh (GE Global Research, US) Sent: Tuesday, August 22, 2017 9:49 AM To: Allie Vacanti Cc: vtkusers at vtk.org Subject: [vtkusers] VTK 8.0.0 compile error Thank you for that guidance, extremely helpful. However, I don't have easy access to VS2013 at this point. Do we know if VTK 7.1 is compatible with 2012? If not any guidance on the last compatible version of VTK with 2012 will be appreciated. -----Original Message----- From: Allie Vacanti [mailto:allison.vacanti at kitware.com] Sent: Tuesday, August 22, 2017 9:44 AM To: Ramamurthy, Rajesh (GE Global Research, US) Cc: vtkusers at vtk.org Subject: EXT: Re: [vtkusers] VTK 8.0.0 compile error On Tue, Aug 22, 2017 at 8:49 AM, Ramamurthy, Rajesh (GE Global Research, US) wrote: > I am new to VTK and trying to build VTK 8.0 using the Visual Studio > 2012 and CMake 3.9.1. I believe those warnings are about missing C++11 features in MSVC 2012. Try a newer version of MSVC (2013+ should work). _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Cf6edf670b30f46b227fd08d4e96bdc82%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636390096846071116&sdata=3VNMS8wql0LcwEI7aarhKMWWxum%2BDK8rME6W6%2ByovyE%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Cf6edf670b30f46b227fd08d4e96bdc82%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636390096846071116&sdata=8LqBEMdZy0kzenl9iG%2B4bOTNutkLSfADq7WN5w6etRQ%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Cf6edf670b30f46b227fd08d4e96bdc82%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636390096846071116&sdata=Eo0Y7%2FfYc40NrdK6A8o02JXYq0dvGObrmrFg51avKMg%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Cf6edf670b30f46b227fd08d4e96bdc82%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636390096846071116&sdata=ZpRyjsGzGtPXUsoApi3v0%2FQHZTo0socDjEHDqowRRFI%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Cf6edf670b30f46b227fd08d4e96bdc82%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636390096846071116&sdata=085b1E5wrx3bakcBKWe0DLeuqaBzOB76zMwb9jDMoNI%3D&reserved=0 From amit112amit at yahoo.co.in Tue Aug 22 22:00:37 2017 From: amit112amit at yahoo.co.in (Amit) Date: Tue, 22 Aug 2017 19:00:37 -0700 Subject: [vtkusers] Example of vtkDataSetAttributes InterpolatePoint() Message-ID: <5def5bec-5b63-4f07-d24c-5259e2c0b9c7@yahoo.co.in> Hi all. Can someone point me to an example that shows how to use vtkDataSetAttributes::InterpolatePoint(). I am not able to understand from just the description or the source code. Regards, Amit From yujie_job at 163.com Tue Aug 22 22:04:51 2017 From: yujie_job at 163.com (yujie_job at 163.com) Date: Tue, 22 Aug 2017 19:04:51 -0700 (MST) Subject: [vtkusers] how can I use vtkSMPTools In-Reply-To: References: <1502765843171-5744404.post@n5.nabble.com> Message-ID: <1503453891251-5744559.post@n5.nabble.com> Thank you very much for your help! -- View this message in context: http://vtk.1045678.n5.nabble.com/how-can-I-use-vtkSMPTools-tp5744404p5744559.html Sent from the VTK - Users mailing list archive at Nabble.com. From simon.esneault at gmail.com Wed Aug 23 05:25:29 2017 From: simon.esneault at gmail.com (Simon Esneault) Date: Wed, 23 Aug 2017 11:25:29 +0200 Subject: [vtkusers] Display outlined text with VTK Message-ID: Hello community, Does anyone know a way to display an outlined text with VTK ? In order to get a result like this : https://i.stack.imgur.com/BdGB7.png We use a lot of text actor to display information on top of CT scan images, and sometimes it's hard to find a proper text color that makes the text very readable on top of an images with high intensity changes. An outlined text could be a good solution to display a clear text, whatever the underlying image is (like VLC does with subtitles ^^) Any idea ? Thanks Simon -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From chbrossotaf at gmail.com Wed Aug 23 09:18:08 2017 From: chbrossotaf at gmail.com (CharlesB) Date: Wed, 23 Aug 2017 15:18:08 +0200 Subject: [vtkusers] Strange rendering with multiple renderers sharing a camera In-Reply-To: References: Message-ID: Hello, I still have no clue on how to solve this problem, so I submitted a report here : https://gitlab.kitware.com/vtk/vtk/issues/17107 If anyone can give a sight on it to help, I would be grateful! Charles 2017-08-16 14:57 GMT+02:00 CharlesB : > Hello, > > I have two renderers in a render window, because I need overlay actors to > be always front. They share the same camera, in order to be moved together > with user interaction. > The issue is that the actor is only partially rendered when user moves the > camera in the scene, as if the front and the back of it was disappearing. > > I see this with VTK 7.1 and 8.0. > > Is there something special to do to avoid this? Or did I find a bug? > > [image: Images int?gr?es 1] > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > int main(int, char*[]) > { > auto plane_source = vtkSmartPointer::New(); > > auto mapper = vtkSmartPointer::New(); > mapper->SetInputConnection(plane_source->GetOutputPort()); > > auto actor = vtkSmartPointer::New(); > actor->SetMapper(mapper); > > auto renderer = vtkSmartPointer::New(); > auto overlay_renderer = vtkSmartPointer::New(); > renderer->SetLayer(0); > overlay_renderer->SetLayer(1); > auto render_window = vtkSmartPointer::New(); > render_window->SetNumberOfLayers(2); > render_window->AddRenderer(renderer); > render_window->AddRenderer(overlay_renderer); > auto camera = vtkSmartPointer::New(); > renderer->SetActiveCamera(camera); > overlay_renderer->SetActiveCamera(camera); > > renderer->AddActor(actor); > renderer->ResetCamera(); > > auto render_window_interactor = vtkSmartPointer< > vtkRenderWindowInteractor>::New(); > auto trackball_style = vtkSmartPointer era>::New(); > > render_window_interactor->SetRenderWindow(render_window); > render_window_interactor->SetInteractorStyle(trackball_style); > > render_window->Render(); > render_window_interactor->Start(); > > return EXIT_SUCCESS; > } > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 27561 bytes Desc: not available URL: From allison.vacanti at kitware.com Wed Aug 23 09:37:36 2017 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Wed, 23 Aug 2017 09:37:36 -0400 Subject: [vtkusers] Display outlined text with VTK In-Reply-To: References: Message-ID: Outlined text is not available in VTK. You may want to play with the background color/opacity settings and maybe a drop shadow (see vtkTextProperties) to increase visibility on noisy backgrounds. HTH, Allie On Wed, Aug 23, 2017 at 5:25 AM, Simon Esneault wrote: > Hello community, > > Does anyone know a way to display an outlined text with VTK ? > In order to get a result like this : > https://i.stack.imgur.com/BdGB7.png > > We use a lot of text actor to display information on top of CT scan images, > and sometimes it's hard to find a proper text color that makes the text very > readable on top of an images with high intensity changes. > An outlined text could be a good solution to display a clear text, whatever > the underlying image is (like VLC does with subtitles ^^) > > Any idea ? > > Thanks > > Simon > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From bob at stlcc.org Wed Aug 23 11:33:33 2017 From: bob at stlcc.org (srfpala) Date: Wed, 23 Aug 2017 08:33:33 -0700 (MST) Subject: [vtkusers] Activiz.Net Message-ID: <1503502413121-5744564.post@n5.nabble.com> Is this the correct forum for Activiz.Net ? Has anyone used Activiz.Net with VS2017 Community Edition ? Bob -- View this message in context: http://vtk.1045678.n5.nabble.com/Activiz-Net-tp5744564.html Sent from the VTK - Users mailing list archive at Nabble.com. From rick at pile.com Wed Aug 23 11:33:49 2017 From: rick at pile.com (Rick Dailey) Date: Wed, 23 Aug 2017 08:33:49 -0700 (MST) Subject: [vtkusers] vtkTextureObject bind error In-Reply-To: References: <1501518920479-5744223.post@n5.nabble.com> <1501522915867-5744226.post@n5.nabble.com> <1501584716697-5744234.post@n5.nabble.com> <1502710447044-5744390.post@n5.nabble.com> Message-ID: <1503502429551-5744565.post@n5.nabble.com> My apologies for not responding earlier. I have been out of the office and will soon be going on vacation. It looks as though I will not be able to get to this for a few weeks. Thank you for your quick response and I will post again as soon as I can. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744565.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Wed Aug 23 16:07:21 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 23 Aug 2017 16:07:21 -0400 Subject: [vtkusers] Display outlined text with VTK In-Reply-To: References: Message-ID: There are no outlined fonts supplied with vtk, but there are many available on the web. For example: http://www.1001freefonts.com/outline-fonts.php You can load a font into VTK form a ttf. See this example: https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/FontFile/ Bill On Wed, Aug 23, 2017 at 9:37 AM, Allie Vacanti wrote: > Outlined text is not available in VTK. You may want to play with the > background color/opacity settings and maybe a drop shadow (see > vtkTextProperties) to increase visibility on noisy backgrounds. > > HTH, > Allie > > On Wed, Aug 23, 2017 at 5:25 AM, Simon Esneault > wrote: >> Hello community, >> >> Does anyone know a way to display an outlined text with VTK ? >> In order to get a result like this : >> https://i.stack.imgur.com/BdGB7.png >> >> We use a lot of text actor to display information on top of CT scan images, >> and sometimes it's hard to find a proper text color that makes the text very >> readable on top of an images with high intensity changes. >> An outlined text could be a good solution to display a clear text, whatever >> the underlying image is (like VLC does with subtitles ^^) >> >> Any idea ? >> >> Thanks >> >> Simon >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 rccm.kyoshimi at gmail.com Wed Aug 23 20:48:54 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Thu, 24 Aug 2017 09:48:54 +0900 Subject: [vtkusers] Example of vtkDataSetAttributes InterpolatePoint() In-Reply-To: <5def5bec-5b63-4f07-d24c-5259e2c0b9c7@yahoo.co.in> References: <5def5bec-5b63-4f07-d24c-5259e2c0b9c7@yahoo.co.in> Message-ID: Hi Amit, For example, the source code of the function vtkCellDataToPointData::interpolatePointData() might be helpful. Note that in this function an object of the class vtkCellData derived from vtkDataSetAttributes calls vtkDataSetAttributes::InterpolatePoint() directly. Thanks 2017-08-23 11:00 GMT+09:00 Amit via vtkusers : > Hi all. > > Can someone point me to an example that shows how to use > vtkDataSetAttributes::InterpolatePoint(). I am not able to understand from > just the description or the source code. > > Regards, > Amit > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 simon.esneault at gmail.com Thu Aug 24 04:06:05 2017 From: simon.esneault at gmail.com (Simon Esneault) Date: Thu, 24 Aug 2017 10:06:05 +0200 Subject: [vtkusers] Display outlined text with VTK In-Reply-To: References: Message-ID: Hello Bill, Ah that's clever, I never thought about this solution ! And we're already using an external font in order to render properly foreigner characters Now I just need to find an outlined font that can handle Chinese, Cyrillic and Arabic character properly (gasp) Anyway, thanks for your answer Simon 2017-08-23 22:07 GMT+02:00 Bill Lorensen : > There are no outlined fonts supplied with vtk, but there are many > available on the web. For example: > http://www.1001freefonts.com/outline-fonts.php > > You can load a font into VTK form a ttf. See this example: > https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/FontFile/ > > Bill > > On Wed, Aug 23, 2017 at 9:37 AM, Allie Vacanti > wrote: > > Outlined text is not available in VTK. You may want to play with the > > background color/opacity settings and maybe a drop shadow (see > > vtkTextProperties) to increase visibility on noisy backgrounds. > > > > HTH, > > Allie > > > > On Wed, Aug 23, 2017 at 5:25 AM, Simon Esneault > > wrote: > >> Hello community, > >> > >> Does anyone know a way to display an outlined text with VTK ? > >> In order to get a result like this : > >> https://i.stack.imgur.com/BdGB7.png > >> > >> We use a lot of text actor to display information on top of CT scan > images, > >> and sometimes it's hard to find a proper text color that makes the text > very > >> readable on top of an images with high intensity changes. > >> An outlined text could be a good solution to display a clear text, > whatever > >> the underlying image is (like VLC does with subtitles ^^) > >> > >> Any idea ? > >> > >> Thanks > >> > >> Simon > >> > >> -- > >> ------------------------------------------------------------------ > >> Simon Esneault > >> Rennes, France > >> ------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtkusers > >> > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ysa0829 at gmail.com Thu Aug 24 04:25:40 2017 From: ysa0829 at gmail.com (Ang) Date: Thu, 24 Aug 2017 01:25:40 -0700 (MST) Subject: [vtkusers] Question about Pick vtkActor2D Message-ID: <1503563140178-5744570.post@n5.nabble.com> Hi all, I created three vtkActor2D circle(named A ,B ,C) in renderer, and use vtkPropPicker to pick them. no matter I pick A,B or C the vtkPropPicker->GetViewProp() always return A. If I use vtkActor ,it is work well , so I guess some bug in vtkActor2D when using vtkPropPicker. Can any one give me some suggestion? thanks for help. -- View this message in context: http://vtk.1045678.n5.nabble.com/Question-about-Pick-vtkActor2D-tp5744570.html Sent from the VTK - Users mailing list archive at Nabble.com. From ysa0829 at gmail.com Thu Aug 24 05:30:13 2017 From: ysa0829 at gmail.com (Ang) Date: Thu, 24 Aug 2017 02:30:13 -0700 (MST) Subject: [vtkusers] Question about Pick vtkActor2D In-Reply-To: <1503563140178-5744570.post@n5.nabble.com> References: <1503563140178-5744570.post@n5.nabble.com> Message-ID: <1503567013164-5744571.post@n5.nabble.com> Hi all, Finally I found the problem. The reason that vtkProPicker pick wrong is I used QVTKOpenGLWidget not QVTKWidget. I wish someone can fix the bug. -- View this message in context: http://vtk.1045678.n5.nabble.com/Question-about-Pick-vtkActor2D-tp5744570p5744571.html Sent from the VTK - Users mailing list archive at Nabble.com. From sanjin.pajo at gmail.com Thu Aug 24 10:22:56 2017 From: sanjin.pajo at gmail.com (Sanjin Pajo) Date: Thu, 24 Aug 2017 10:22:56 -0400 Subject: [vtkusers] VTK missing In-Reply-To: References: Message-ID: Thank you. Putting the missing dlls in the same directory did get rid of the error. Sanjin P. On Mon, Aug 21, 2017 at 11:47 PM, kenichiro yoshimi wrote: > Hi Sanjin, > > You need to either add the path to the directory containing the VTK > dlls to your computer's PATH variable, or put the missing dlls in the > same directory as the executable. If you builds VTK static library > with Build_SHARED_LIBS=OFF, the above work is not necessary. > > Thanks > > 2017-08-21 2:17 GMT+09:00 Sanjin Pajo : > > I am configuring and generating build files for my project with VTK. > When I > > run it I get the following error: > > > > The program cannot be strated, vtkRenderingGL2PSOpenGL2-8.0.dll is > missing. > > > > CMakeLists: > > > > find_package(VTK 8.0 COMPONENTS > > vtkCommonCore > > vtkFiltersCore > > vtkFiltersModeling > > vtkFiltersSources > > vtkRenderingCore > > vtkRenderingOpenGL2 > > vtkRenderingGL2PSOpenGL2 ) > > > > > > > > add_executable(my_project ${project_SOURCES} ${project_FORMS_HEADERS} > > target_link_libraries (mc_project ${VTK_LIBRARIES}) > > > > > > > > Sanjin P. > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 sanjin.pajo at gmail.com Thu Aug 24 10:29:26 2017 From: sanjin.pajo at gmail.com (Sanjin Pajo) Date: Thu, 24 Aug 2017 10:29:26 -0400 Subject: [vtkusers] QWidget: Must construct a QApplication before a QWidget Message-ID: I am trying to use VTK with Qt and after building a sample program Qt_visualizer (https://github.com/UnaNancyOwen/qt_visualizer), I run it and I get the following error in Debug mode: QWidget: Must construct a QApplication before a QWidget and the following errors in Release mode: ERROR: In C:\VTK-8.0.0\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, line 653 vtkWin32OpenGLRenderWindow (0000000002A79780): failed to get wglChoosePixelFormatARB ERROR: In C:\VTK-8.0.0\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, line 737 vtkWin32OpenGLRenderWindow (0000000002A79780): failed to get valid pixel format. ERROR: In C:\VTK-8.0.0\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 816 vtkWin32OpenGLRenderWindow (0000000002A79780): GLEW could not be initialized. Thank you for any help in advance. Best regards, Sanjin P. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramamurr at research.ge.com Thu Aug 24 12:17:52 2017 From: ramamurr at research.ge.com (Ramamurthy, Rajesh (GE Global Research, US)) Date: Thu, 24 Aug 2017 16:17:52 +0000 Subject: [vtkusers] canny edge detection help Message-ID: <7656909F4F8F7F44B138D3B65F7F9C8468BA7E20@ALPMBAPA01.e2k.ad.ge.com> Hi All, I am new to using VTK and hence I am trying to work with the toolkit using the online examples for canny edge detection and reading DICOM images. My need is to do sub-pixel canny edge detection of a DICOM image and then write out the results to a file. I found examples for both and combined it together into a test app code as below. The code builds, and runs but I am always getting no edges written to my output edges.txt file. I tried playing with different canny parameters but it did not seem to change the situation. I want the edges of the attached DCM file to be found, I have a sample edge detection shown in the attached text file here. Thanks! Rajesh -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: CannyEdge.cpp URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CT_IQI_2.DCM Type: application/octet-stream Size: 518802 bytes Desc: CT_IQI_2.DCM URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CT_IQI_2_reg_inner_outer.asc Type: application/octet-stream Size: 67827 bytes Desc: CT_IQI_2_reg_inner_outer.asc URL: From bill.lorensen at gmail.com Thu Aug 24 13:45:00 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 24 Aug 2017 13:45:00 -0400 Subject: [vtkusers] canny edge detection help In-Reply-To: <7656909F4F8F7F44B138D3B65F7F9C8468BA7E20@ALPMBAPA01.e2k.ad.ge.com> References: <7656909F4F8F7F44B138D3B65F7F9C8468BA7E20@ALPMBAPA01.e2k.ad.ge.com> Message-ID: Remove the vtkImageLuminance from the pipeline. On Thu, Aug 24, 2017 at 12:17 PM, Ramamurthy, Rajesh (GE Global Research, US) wrote: > Hi All, > > > > I am new to using VTK and hence I am trying to work with the toolkit using > the online examples for canny edge detection and reading DICOM images. > > > > My need is to do sub-pixel canny edge detection of a DICOM image and then > write out the results to a file. I found examples for both and combined it > together into a test app code as below. > > > > The code builds, and runs but I am always getting no edges written to my > output edges.txt file. I tried playing with different canny parameters but > it did not seem to change the situation. I want the edges of the attached > DCM file to be found, I have a sample edge detection shown in the attached > text file here. > > > > Thanks! > > Rajesh > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 amit112amit at yahoo.co.in Thu Aug 24 15:48:05 2017 From: amit112amit at yahoo.co.in (Amit) Date: Thu, 24 Aug 2017 12:48:05 -0700 Subject: [vtkusers] Example of vtkDataSetAttributes InterpolatePoint() In-Reply-To: References: <5def5bec-5b63-4f07-d24c-5259e2c0b9c7@yahoo.co.in> Message-ID: <0eb9216e-15fe-46a7-fa83-bdb251233a6c@yahoo.co.in> Thank you, Kenichiro. That was helpful. Regards, Amit On 08/23/2017 05:48 PM, kenichiro yoshimi wrote: > Hi Amit, > > For example, the source code of the function > vtkCellDataToPointData::interpolatePointData() might be helpful. Note > that in this function an object of the class vtkCellData derived from > vtkDataSetAttributes calls vtkDataSetAttributes::InterpolatePoint() > directly. > > Thanks > > 2017-08-23 11:00 GMT+09:00 Amit via vtkusers : >> Hi all. >> >> Can someone point me to an example that shows how to use >> vtkDataSetAttributes::InterpolatePoint(). I am not able to understand from >> just the description or the source code. >> >> Regards, >> Amit >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 alexander.pletzer at nesi.org.nz Thu Aug 24 20:10:54 2017 From: alexander.pletzer at nesi.org.nz (Alexander Pletzer) Date: Fri, 25 Aug 2017 12:10:54 +1200 Subject: [vtkusers] IntersectWithLine returns wrong pcoords? Message-ID: Hi, The simple python code below seems to return the wrong parametric coordinates (if I understand correctly what they mean). This is with python 2.7 and VTK 6.3. I'm creating a hex cell representing a unit cube [0, 1]^3. Then I create a ray with start/end points pA and pB respectively. The code finds the intersection between the ray and the cell, and the intersection point (0, 0.4, 0.3) looks right. However, I'm getting [0.30000000000000004, 0.0, -1.0] for the parametric coordinates -- I expected [0., 0.4, 0.3]. Shouldn't the pcoords be between 0 and 1? Why is the last pcoords not set? Thanks in advance for any help. --Alex import vtk cell = vtk.vtkHexahedron() pts = cell.GetPoints() pts.InsertPoint(0, 0., 0., 0.) pts.InsertPoint(1, 1., 0., 0.) pts.InsertPoint(2, 1., 1., 0.) pts.InsertPoint(3, 0., 1., 0.) pts.InsertPoint(4, 0., 0., 1.) pts.InsertPoint(5, 1., 0., 1.) pts.InsertPoint(6, 1., 1., 1.) pts.InsertPoint(7, 0., 1., 1.) pA = [-0.5, 0.4, 0.3] pB = [ 0.5, 0.4, 0.3] t = vtk.mutable(0.0) intersectPt = [-1.0, -1.0, -1.0] pcoords = [-1.0, -1.0, -1.0] subId = vtk.mutable(-1) tol = 1.e-10 res = cell.IntersectWithLine(pA, pB, tol, t, intersectPt, pcoords, subId) if res: print 'found intersection at ', intersectPt print 'line parametric coord: ', t, ' cell parametric coords: ', pcoords, ' expected: ', [0., 0.4, 0.3], ' subId = ', subId -- Alexander Pletzer HPC Scientific Programmer for New Zealand eScience Infrastructure (NeSI) National Institute of Water and Atmospheric Research (NIWA) 301 Evans Bay Parade, Hataitai, Wellington 6021, New Zealand mobile: +64 21 085 79661 http://www. nesi.org.nz -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Fri Aug 25 02:54:23 2017 From: doug at beachmailing.com (scotsman60) Date: Thu, 24 Aug 2017 23:54:23 -0700 (MST) Subject: [vtkusers] Trouble creating isosurface from unstructuredGrid of Tetras Message-ID: <1503644063748-5744578.post@n5.nabble.com> Hello!!, Newbie here, having trouble creating an isosurface on a unstructredGrid of tetras. I'm using Python 3.6 with VTK V7.1 I'm pretty sure my unstructuredGrid is good - I've attached the .vtk file - I can see the points, cells and scalar data associated with the points. I've cobbled together the code below from looking at examples on the web The code runs, the render window is displayed and there are no errors, but nothing is displayed I'm pretty sure that things are going wring in the vtkContourFilter. When I look at the contents of 'contour' in the debugger after setting the data and the isoSurfaceValue I'm not seeing any data at all... Any help will be gratefully accepted!!!!! Thanx #Builds the unstructuredGrid tetMesh = ReadNastran.buildMesh() # Generate an isosurface contour = vtk.vtkContourFilter() #contour = vtk.vtkMarchingCubes() contour.SetInputData( tetMesh ) contour.ComputeNormalsOn() contour.SetValue( 0, 0.00 ) # Take the isosurface data and create geometry isoMapper = vtk.vtkPolyDataMapper() isoMapper.SetInputData( contour.GetOutput() ) isoMapper.ScalarVisibilityOn() # Take the isosurface data and create geometry actorIso = vtk.vtkLODActor() actorIso.SetNumberOfCloudPoints( 1000000 ) actorIso.SetMapper( isoMapper ) actorIso.GetProperty().SetColor( 1, 1, 1 ) # From here I just pass actorIso into a renderWindow ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # Add the actors to the renderer, set the background and size ren.AddActor(actorIso) ren.SetBackground(0.1, 0.2, 0.4) renWin.SetSize(1000, 800) # This allows the interactor to initalize itself. It has to be # called before an event loop. iren.Initialize() # We'll zoom in a little by accessing the camera and invoking a "Zoom" # method on it. ren.ResetCamera() ren.GetActiveCamera().Zoom(1.5) renWin.Render() # Start the event loop. iren.Start() -- View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-creating-isosurface-from-unstructuredGrid-of-Tetras-tp5744578.html Sent from the VTK - Users mailing list archive at Nabble.com. From doug at beachmailing.com Fri Aug 25 04:13:42 2017 From: doug at beachmailing.com (scotsman60) Date: Fri, 25 Aug 2017 01:13:42 -0700 (MST) Subject: [vtkusers] Trouble creating isosurface from unstructuredGrid of Tetras - Fixed!!! In-Reply-To: <1503644063748-5744578.post@n5.nabble.com> References: <1503644063748-5744578.post@n5.nabble.com> Message-ID: <1503648822089-5744579.post@n5.nabble.com> So, The problem is that we need to call the Update method on the vtkContourFiler() before passing it to the vtkPolyDataMapper....... # Generate an isosurface contour = vtk.vtkContourFilter() #contour = vtk.vtkMarchingCubes() contour.SetInputData( tetMesh ) contour.ComputeNormalsOn() contour.SetValue( 0, 0.00 ) *contour.Update()* Everything seems to be OK now....... -- View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-creating-isosurface-from-unstructuredGrid-of-Tetras-tp5744578p5744579.html Sent from the VTK - Users mailing list archive at Nabble.com. From kornicki.entwicklung at chello.at Fri Aug 25 04:45:33 2017 From: kornicki.entwicklung at chello.at (Claus Volko) Date: Fri, 25 Aug 2017 10:45:33 +0200 Subject: [vtkusers] Windows 10 does not support Microsoft Video 1 Message-ID: <599FE3AD.4060803@chello.at> Dear fellows, With Kitware VTK 5.8, when using the functionality to save the action that is going on in the window as an AVI file and prompting compressor options, the default codec is "Microsoft Video 1". Unfortunately, I noticed that when you save an AVI file with this codec, the default video player of Windows 10 will not be able to play the video. That's a bad thing. However, if I choose another codec from the list, such as "Intel IYUV Codec", playback works. That's the good news. Is there some way to make Kitware VTK 5.8 show only such codecs that work with the default video player of Windows 10? Best regards, Claus Volko --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From bill.lorensen at gmail.com Fri Aug 25 07:34:00 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 25 Aug 2017 07:34:00 -0400 Subject: [vtkusers] Trouble creating isosurface from unstructuredGrid of Tetras - Fixed!!! In-Reply-To: <1503648822089-5744579.post@n5.nabble.com> References: <1503644063748-5744578.post@n5.nabble.com> <1503648822089-5744579.post@n5.nabble.com> Message-ID: Or you could replace: isoMapper.SetInputData( contour.GetOutput() ) with isoMapper.SetInputConnection(contour.GetOutputPort()) On Fri, Aug 25, 2017 at 4:13 AM, scotsman60 wrote: > So, > > The problem is that we need to call the Update method on the > vtkContourFiler() before passing it to the vtkPolyDataMapper....... > > # Generate an isosurface > contour = vtk.vtkContourFilter() > #contour = vtk.vtkMarchingCubes() > contour.SetInputData( tetMesh ) > contour.ComputeNormalsOn() > contour.SetValue( 0, 0.00 ) > *contour.Update()* > > Everything seems to be OK now....... > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-creating-isosurface-from-unstructuredGrid-of-Tetras-tp5744578p5744579.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 mike.jackson at bluequartz.net Fri Aug 25 08:01:14 2017 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 25 Aug 2017 08:01:14 -0400 Subject: [vtkusers] How to set macOS RPATH or install_name (VTK 8.x) Message-ID: <3C38315A-3A68-4E99-82FB-F19B62B5AF41@bluequartz.net> Hello, Just getting back into the VTK scene after a LONG hiatus. I was able to compile VTK, and then import that into my project and successfully link my project to VTK. When I attempt to run my app (mac OS 10.10 .app package) the app crashes because it can not find the VTK libraries. After inspecting the VTK libraries that were built none have an RPATH or absolute path set after I installed them. I searched with CMake for a setting to enable the RPATH on install but I am coming up empty. What is the recommended way to work with VTK during development? I can run from the command line by export'ing DYLD_LIBRARY_PATH but I'm sure I should have to do this. Or is the recommended way of developing against VTK to have my project use the VTK build directory versus an install directory? Thanks for any help -- Michael Jackson | Owner, President BlueQuartz Software [e] mike.jackson at bluequartz.net [w] www.bluequartz.net From david.gobbi at gmail.com Fri Aug 25 08:36:31 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 25 Aug 2017 06:36:31 -0600 Subject: [vtkusers] How to set macOS RPATH or install_name (VTK 8.x) In-Reply-To: <3C38315A-3A68-4E99-82FB-F19B62B5AF41@bluequartz.net> References: <3C38315A-3A68-4E99-82FB-F19B62B5AF41@bluequartz.net> Message-ID: Hi Michael, I always keep the VTK build tree, and import VTK from there into my projects. - David On Fri, Aug 25, 2017 at 6:01 AM, Michael Jackson < mike.jackson at bluequartz.net> wrote: > Hello, > Just getting back into the VTK scene after a LONG hiatus. I was able to > compile VTK, and then import that into my project and successfully link my > project to VTK. When I attempt to run my app (mac OS 10.10 .app package) > the app crashes because it can not find the VTK libraries. After inspecting > the VTK libraries that were built none have an RPATH or absolute path set > after I installed them. I searched with CMake for a setting to enable the > RPATH on install but I am coming up empty. > > What is the recommended way to work with VTK during development? I can run > from the command line by export'ing DYLD_LIBRARY_PATH but I'm sure I should > have to do this. Or is the recommended way of developing against VTK to > have my project use the VTK build directory versus an install directory? > > Thanks for any help > -- > Michael Jackson | Owner, President > BlueQuartz Software > [e] mike.jackson at bluequartz.net > [w] www.bluequartz.net > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iyas.hamdan at gmail.com Fri Aug 25 09:51:13 2017 From: iyas.hamdan at gmail.com (Iyas Hamdan) Date: Fri, 25 Aug 2017 15:51:13 +0200 Subject: [vtkusers] VTK contour Widget Message-ID: Hello, I have a problem using the vtkcontourwidget in 3D. What I'm trying to do is to draw contours on my 3D image, where a different contour can be drawn on each slice of the image. The problem that I'm getting is that when I draw a contour on one of the slices, the same contour appears on all the other slices as well. Here's a piece of the code i'm using: vtkSmartPointer ImageViewer = vtkSmartPointer::New(); ImageViewer->SetInputData(reader->GetOutput()); ImageViewer->SetColorLevel(127); ImageViewer->SetColorWindow(255); vtkSmartPointer iren = vtkSmartPointer::New(); ImageViewer->SetupInteractor(iren); ImageViewer->Render(); ImageViewer->GetRenderer()->ResetCamera(); ImageViewer->Render(); vtkSmartPointer SliderWidget = vtkSmartPointer::New(); SliderWidget->SetInteractor(iren); SliderWidget->SetRepresentation(SliderRepres2D); SliderWidget->KeyPressActivationOff(); SliderWidget->SetAnimationModeToAnimate(); SliderWidget->SetEnabled(true); vtkSmartPointer SliderCb = vtkSmartPointer::New(); SliderCb->SetImageViewer(ImageViewer); SliderWidget->AddObserver(vtkCommand::InteractionEvent, SliderCb); ImageViewer->SetSlice(static_cast(SliderRepres2D->GetValue())); vtkSmartPointer ContourWidget = vtkSmartPointer::New(); vtkSmartPointer rep = vtkSmartPointer::New(); ContourWidget->SetRepresentation(rep); vtkSmartPointer imageActorPointPlacer = vtkSmartPointer::New(); imageActorPointPlacer->SetImageActor(ImageViewer->GetImageActor()); rep->SetPointPlacer(imageActorPointPlacer); rep->GetProperty()->SetColor(0, 1, 0); ContourWidget->SetInteractor(iren); ContourWidget->FollowCursorOn(); ContourWidget->SetEnabled(true); ContourWidget->ProcessEventsOn(); iren->Start(); Any idea what's causing this problem and eventually how to fix it ? Any help would be really appreciated, Thanks in advance, Iyas -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Fri Aug 25 10:05:23 2017 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 25 Aug 2017 14:05:23 +0000 Subject: [vtkusers] VTK contour Widget In-Reply-To: References: Message-ID: Hello Iyas, There are many VTK-based applications that allow contouring on image slices. I would recommend to extend/modify these applications to suit your needs, instead of reimplementing everything from scratch. If you just want to implement this as a learning experience, then you can check out the source code of these existing applications, you can learn a lot about how to implement this and many other features. For example: www.slicer.org www.itksnap.org www.mitk.org Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Iyas Hamdan Sent: Friday, August 25, 2017 9:51 AM To: VTK Users Subject: [vtkusers] VTK contour Widget Hello, I have a problem using the vtkcontourwidget in 3D. What I'm trying to do is to draw contours on my 3D image, where a different contour can be drawn on each slice of the image. The problem that I'm getting is that when I draw a contour on one of the slices, the same contour appears on all the other slices as well. Here's a piece of the code i'm using: vtkSmartPointer ImageViewer = vtkSmartPointer::New(); ImageViewer->SetInputData(reader->GetOutput()); ImageViewer->SetColorLevel(127); ImageViewer->SetColorWindow(255); vtkSmartPointer iren = vtkSmartPointer::New(); ImageViewer->SetupInteractor(iren); ImageViewer->Render(); ImageViewer->GetRenderer()->ResetCamera(); ImageViewer->Render(); vtkSmartPointer SliderWidget = vtkSmartPointer::New(); SliderWidget->SetInteractor(iren); SliderWidget->SetRepresentation(SliderRepres2D); SliderWidget->KeyPressActivationOff(); SliderWidget->SetAnimationModeToAnimate(); SliderWidget->SetEnabled(true); vtkSmartPointer SliderCb = vtkSmartPointer::New(); SliderCb->SetImageViewer(ImageViewer); SliderWidget->AddObserver(vtkCommand::InteractionEvent, SliderCb); ImageViewer->SetSlice(static_cast(SliderRepres2D->GetValue())); vtkSmartPointer ContourWidget = vtkSmartPointer::New(); vtkSmartPointer rep = vtkSmartPointer::New(); ContourWidget->SetRepresentation(rep); vtkSmartPointer imageActorPointPlacer = vtkSmartPointer::New(); imageActorPointPlacer->SetImageActor(ImageViewer->GetImageActor()); rep->SetPointPlacer(imageActorPointPlacer); rep->GetProperty()->SetColor(0, 1, 0); ContourWidget->SetInteractor(iren); ContourWidget->FollowCursorOn(); ContourWidget->SetEnabled(true); ContourWidget->ProcessEventsOn(); iren->Start(); Any idea what's causing this problem and eventually how to fix it ? Any help would be really appreciated, Thanks in advance, Iyas -------------- next part -------------- An HTML attachment was scrubbed... URL: From iyas.hamdan at gmail.com Fri Aug 25 10:52:41 2017 From: iyas.hamdan at gmail.com (Iyas Hamdan) Date: Fri, 25 Aug 2017 16:52:41 +0200 Subject: [vtkusers] VTK contour Widget In-Reply-To: References: Message-ID: Thank you Andras for your answer! Actually image contouring is a small part that I need to integrate in the project that i'm working on. I thought I could use vtk contour widget to do that (since i dont need all the features in slicer or itk snap for example). And I tried it on 2D images and it's exatly what i'm looking for, but I can't get it to work in 3D. I'll take a look at the source code of these applications and see if I could find what I need. Thanks, Iyas On Fri, Aug 25, 2017 at 4:05 PM, Andras Lasso wrote: > Hello Iyas, > > > > There are many VTK-based applications that allow contouring on image > slices. I would recommend to extend/modify these applications to suit your > needs, instead of reimplementing everything from scratch. If you just want > to implement this as a learning experience, then you can check out the > source code of these existing applications, you can learn a lot about how > to implement this and many other features. > > > > For example: > > www.slicer.org > > www.itksnap.org > > www.mitk.org > > > > Andras > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Iyas > Hamdan > *Sent:* Friday, August 25, 2017 9:51 AM > *To:* VTK Users > *Subject:* [vtkusers] VTK contour Widget > > > > Hello, > > I have a problem using the vtkcontourwidget in 3D. What I'm trying to do > is to draw contours on my 3D image, where a different contour can be drawn > on each slice of the image. > > The problem that I'm getting is that when I draw a contour on one of the > slices, the same contour appears on all the other slices as well. > > > > Here's a piece of the code i'm using: > > vtkSmartPointer ImageViewer = vtkSmartPointer< > vtkImageViewer2>::New(); > ImageViewer->SetInputData(reader->GetOutput()); > ImageViewer->SetColorLevel(127); > ImageViewer->SetColorWindow(255); > > vtkSmartPointer iren = vtkSmartPointer< > vtkRenderWindowInteractor>::New(); > ImageViewer->SetupInteractor(iren); > ImageViewer->Render(); > ImageViewer->GetRenderer()->ResetCamera(); > ImageViewer->Render(); > > vtkSmartPointer SliderWidget = vtkSmartPointer< > vtkSliderWidget>::New(); > SliderWidget->SetInteractor(iren); > SliderWidget->SetRepresentation(SliderRepres2D); > SliderWidget->KeyPressActivationOff(); > SliderWidget->SetAnimationModeToAnimate(); > SliderWidget->SetEnabled(true); > > vtkSmartPointer SliderCb = vtkSmartPointer< > vtkSliderCallback>::New(); > SliderCb->SetImageViewer(ImageViewer); > SliderWidget->AddObserver(vtkCommand::InteractionEvent, SliderCb); > > ImageViewer->SetSlice(static_cast(SliderRepres2D->GetValue())); > > vtkSmartPointer ContourWidget = vtkSmartPointer< > vtkContourWidget>::New(); > vtkSmartPointer rep = > vtkSmartPointer::New(); > ContourWidget->SetRepresentation(rep); > > vtkSmartPointer imageActorPointPlacer = > vtkSmartPointer::New(); > imageActorPointPlacer->SetImageActor(ImageViewer->GetImageActor()); > rep->SetPointPlacer(imageActorPointPlacer); > rep->GetProperty()->SetColor(0, 1, 0); > > ContourWidget->SetInteractor(iren); > ContourWidget->FollowCursorOn(); > ContourWidget->SetEnabled(true); > ContourWidget->ProcessEventsOn(); > > iren->Start(); > > Any idea what's causing this problem and eventually how to fix it ? > > Any help would be really appreciated, > > Thanks in advance, > > Iyas > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanjin.pajo at gmail.com Fri Aug 25 14:55:28 2017 From: sanjin.pajo at gmail.com (Sanjin Pajo) Date: Fri, 25 Aug 2017 14:55:28 -0400 Subject: [vtkusers] VTK Error In-Reply-To: References: Message-ID: I tried instaling VTK + Qt again and even after adding the parameters, I still get the same line of errors. So why did it work before, is it possible that I did not build VTK in one of the modes? If anybody has a clue on how to fix the problem or how to install PLC 1.8. with VTK 8.0.0 and Qt 5.9.1, let me know, thank you in advance. On Sun, Aug 20, 2017 at 1:05 PM, Sanjin Pajo wrote: > Adding the following entries in CMAKE fixes the problem: > > _HAS_ITERATOR_DEBUGGING =0 > > _ITERATOR_DEBUG_LEVEL=0 > > > Sanjin P. > > On Tue, Aug 15, 2017 at 11:28 PM, Sanjin Pajo > wrote: > >> I am wondering if there is a workaround for this issue. I have been able >> to build other PCL dependencies (Boost, Eigen, Flann, QHull) in debug and >> release mode using Microsoft Visual Studio 2015 and PCL requires that VTK >> be built in both modes. >> >> This issue seems to be a known problem, here is a similar post in the PCL >> forum : http://www.pcl-users.org/LNK2038-error-when-trying-to-comp >> ile-PCL-debug-and-release-mixup-pcl-1-8-0-td4044738.html . >> >> Sanjin P. >> >> On Tue, Aug 15, 2017 at 3:49 PM, Shawn Waldon >> wrote: >> >>> Hi Sanjin, >>> >>> This is a quirk of Windows. You cannot link libraries built in release >>> mode with libraries built in debug mode. If you want a debug build, you >>> need to build EVERYTHING in debug mode (and use debug versions of the >>> dependencies you don't build yourself). Likewise, if you want to build in >>> release mode, you have to build everything in release. It looks like you >>> are trying to mix the two, which is something Microsoft doesn't allow. >>> >>> HTH, >>> Shawn >>> >>> On Tue, Aug 15, 2017 at 3:42 PM, Sanjin Pajo >>> wrote: >>> >>>> I am installing Point Cloud Library (PCL 1.8.1) from source and it >>>> requires VTK. During the installation I get mismatch errors in Visual >>>> Studio 2015 when building in debug and release mode. I am using CMAKE to >>>> configure and generate build files. >>>> >>>> Examples: >>>> >>>> Error LNK2038 mismatch detected for 'RuntimeLibrary': value >>>> 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in >>>> hdl_viewer_simple.obj pcl_hdl_viewer_simple >>>> C:\PCL\PCL-1.8.1\build\visualization\tools\vtkRenderingConte >>>> xtOpenGL2-7.1-gd.lib(vtkRenderingContextOpenGL2ObjectFactory.obj) 1 >>>> >>>> >>>> Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' >>>> doesn't match value '0' in outofcore_viewer.obj pcl_outofcore_viewer >>>> C:\PCL\PCL-1.8.1\build\outofcore\tools\vtkInteractionStyle-7 >>>> .1-gd.lib(vtkInteractionStyleObjectFactory.obj) 1 >>>> >>>> Any help is greatly appreciated. >>>> >>>> Sanjin P. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> 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 bob at stlcc.org Fri Aug 25 15:30:58 2017 From: bob at stlcc.org (srfpala) Date: Fri, 25 Aug 2017 12:30:58 -0700 (MST) Subject: [vtkusers] Activiz.Net In-Reply-To: <1503502413121-5744564.post@n5.nabble.com> References: <1503502413121-5744564.post@n5.nabble.com> Message-ID: <1503689458249-5744588.post@n5.nabble.com> Running Windows 10. Is this the correct forum for Activiz.Net ? If not can u redirect ? Has anyone used Activiz.Net with VS2017 Community Edition ? Bob -- View this message in context: http://vtk.1045678.n5.nabble.com/Activiz-Net-tp5744564p5744588.html Sent from the VTK - Users mailing list archive at Nabble.com. From mark at cascadeacoustic.com Fri Aug 25 21:03:33 2017 From: mark at cascadeacoustic.com (Mark DeArman) Date: Fri, 25 Aug 2017 20:03:33 -0500 Subject: [vtkusers] Activiz.Net In-Reply-To: <1503689458249-5744588.post@n5.nabble.com> References: <1503502413121-5744564.post@n5.nabble.com> <1503689458249-5744588.post@n5.nabble.com> Message-ID: <4f98798bab0540b5a5fb52df06fc86ee@cascadeacoustic.com> It is the correct forum as far as I know. I have not built a recent version. But there are few more of us here. I have some files on github. Same with David Cole. https://github.com/dearman https://github.com/dlrdave Mark DeArman Cascade Acoustic Research http://www.cascadeacoustic.com (253) 200-5353 ---------------------------------------- From: "srfpala" Sent: Friday, August 25, 2017 12:31 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] Activiz.Net Running Windows 10. Is this the correct forum for Activiz.Net ? If not can u redirect ? Has anyone used Activiz.Net with VS2017 Community Edition ? Bob -- View this message in context: http://vtk.1045678.n5.nabble.com/Activiz-Net-tp5744564p5744588.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 madsmh at gmail.com Sat Aug 26 05:12:47 2017 From: madsmh at gmail.com (Mads M. Hansen) Date: Sat, 26 Aug 2017 11:12:47 +0200 Subject: [vtkusers] QVTKOpenGLWidget usage with QtCreator Message-ID: I have been trying to use QVTKOpenGLWidget by promoting a QWiget in QtCreator, but that seems to result in in a segfault. I have tried searching for some documentation an found the class reference, but that does not seem to address QtCreator. Thanks in advance. From elvis.stansvik at orexplore.com Sat Aug 26 07:12:02 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 26 Aug 2017 13:12:02 +0200 Subject: [vtkusers] QVTKOpenGLWidget usage with QtCreator In-Reply-To: References: Message-ID: Den 26 aug. 2017 11:13 fm skrev "Mads M. Hansen" : I have been trying to use QVTKOpenGLWidget by promoting a QWiget in QtCreator, but that seems to result in in a segfault. I have tried searching for some documentation an found the class reference, but that does not seem to address QtCreator. I think that should work. We're using our own QVTKOpenGLWidget subclass as a promoted widget in QtCreator, and it's working fine. Using it directly should also work. Did you get a backtrace for the crash? Could you share a minimal example that crashes? Elvis Thanks in advance. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sat Aug 26 08:01:22 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 26 Aug 2017 14:01:22 +0200 Subject: [vtkusers] QVTKOpenGLWidget usage with QtCreator In-Reply-To: References: Message-ID: Here is a minimal example that works here (VTK 8.0.0, Qt 5.5.1). The result is as attached. I hope that helps. If you're using the multiple inheritance approach (like I'm doing here), perhaps you were forgetting to call setupUi? Elvis example.cpp: #include "MainWindow.h" #include #include #include int main(int argc, char *argv[]) { QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); QApplication app(argc, argv); MainWindow window; window.show(); return app.exec(); } MainWindow.h: #pragma once #include "ui_MainWindow.h" class MainWindow : public QMainWindow, private Ui::MainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); }; MainWindow.cpp: #include "MainWindow.h" #include #include #include #include #include #include MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { setupUi(this); auto cylinderSource = vtkSmartPointer::New(); cylinderSource->SetCenter(0.0, 0.0, 0.0); cylinderSource->SetRadius(5.0); cylinderSource->SetHeight(7.0); cylinderSource->SetResolution(100); auto mapper = vtkSmartPointer::New(); mapper->SetInputConnection(cylinderSource->GetOutputPort()); auto actor = vtkSmartPointer::New(); actor->SetMapper(mapper); auto renderer = vtkSmartPointer::New(); renderer->AddActor(actor); auto window = vtkSmartPointer::New(); window->AddRenderer(renderer); widget->SetRenderWindow(window); } MainWindow.ui: MainWindow 0 0 800 600 MainWindow 0 0 800 19 QVTKOpenGLWidget QWidget
QVTKOpenGLWidget.h
1
2017-08-26 11:12 GMT+02:00 Mads M. Hansen : > I have been trying to use QVTKOpenGLWidget by promoting a QWiget in > QtCreator, but that seems to result in in a segfault. I have tried > searching for some documentation an found the class reference, but > that does not seem to address QtCreator. > > Thanks in advance. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 10383 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Sat Aug 26 08:05:31 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 26 Aug 2017 14:05:31 +0200 Subject: [vtkusers] QVTKOpenGLWidget usage with QtCreator In-Reply-To: References: Message-ID: 2017-08-26 14:01 GMT+02:00 Elvis Stansvik : > Here is a minimal example that works here (VTK 8.0.0, Qt 5.5.1). The > result is as attached. I hope that helps. > > If you're using the multiple inheritance approach (like I'm doing > here), perhaps you were forgetting to call setupUi? > > Elvis > > > example.cpp: > > #include "MainWindow.h" > > #include > #include > > #include > > int main(int argc, char *argv[]) { > QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); > > QApplication app(argc, argv); > > MainWindow window; > window.show(); > > return app.exec(); > } > > > MainWindow.h: > > #pragma once > > #include "ui_MainWindow.h" > > class MainWindow : public QMainWindow, private Ui::MainWindow { > Q_OBJECT > > public: > explicit MainWindow(QWidget *parent = 0); > }; > > > MainWindow.cpp: > > #include "MainWindow.h" > > #include > > #include > #include > #include > #include > #include > > MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { > setupUi(this); > > auto cylinderSource = vtkSmartPointer::New(); > cylinderSource->SetCenter(0.0, 0.0, 0.0); > cylinderSource->SetRadius(5.0); > cylinderSource->SetHeight(7.0); > cylinderSource->SetResolution(100); > > auto mapper = vtkSmartPointer::New(); > mapper->SetInputConnection(cylinderSource->GetOutputPort()); > > auto actor = vtkSmartPointer::New(); > actor->SetMapper(mapper); > > auto renderer = vtkSmartPointer::New(); > renderer->AddActor(actor); > > auto window = vtkSmartPointer::New(); > window->AddRenderer(renderer); > > widget->SetRenderWindow(window); > } > > > MainWindow.ui: > > > > MainWindow > > > > 0 > 0 > 800 > 600 > > > > MainWindow > > > > > > > > > > > > 0 > 0 > 800 > 19 > > > > > > > > QVTKOpenGLWidget > QWidget >
QVTKOpenGLWidget.h
> 1 >
>
> > >
I forgot the CMakeLists.txt: cmake_minimum_required(VERSION 3.5) project(example) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt5Widgets REQUIRED) find_package(VTK 8.0.0 REQUIRED COMPONENTS vtkCommonCore vtkFiltersSources vtkGUISupportQt vtkInteractionStyle vtkRenderingCore vtkRenderingOpenGL2 ) add_executable(example WIN32 example.cpp MainWindow.cpp) target_link_libraries(example PRIVATE Qt5::Widgets vtkCommonCore vtkFiltersSources vtkGUISupportQt vtkInteractionStyle vtkRenderingCore vtkRenderingOpenGL2 ) target_include_directories(example SYSTEM PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${VTK_INCLUDE_DIRS} ) target_compile_definitions(example PRIVATE ${VTK_DEFINITIONS} ) set_target_properties(example PROPERTIES AUTOMOC ON AUTOUIC ON ) > > > 2017-08-26 11:12 GMT+02:00 Mads M. Hansen : >> I have been trying to use QVTKOpenGLWidget by promoting a QWiget in >> QtCreator, but that seems to result in in a segfault. I have tried >> searching for some documentation an found the class reference, but >> that does not seem to address QtCreator. >> >> Thanks in advance. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers From tjlp at netease.com Sun Aug 27 12:41:21 2017 From: tjlp at netease.com (Liu_tj) Date: Mon, 28 Aug 2017 00:41:21 +0800 (CST) Subject: [vtkusers] What ditermines whether the slice order should be reversed? Message-ID: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> Hi, I have a question about the DICOM slice order. I use the DICOM reader by David Gobbi to read the slice series to vtkImageData. And I found that the oder is the same as the order by DICOM instanceNumber tag. However, some doctors tell me that the order should be reversed because the scan should start from head to foot. @David, if I need to reverse, how to achieve that by your DICOM reader? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Aug 27 15:29:43 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 27 Aug 2017 13:29:43 -0600 Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> Message-ID: Hi Liu Peng, The vtkDICOMReader sorts according to the Image Plane Module: http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part03/sect_C.7.6.2.html That is, the slices are sorted in a manner such that the VTK image data has a right-handed coordinate system (called an RCS in the link above). Sorting the slices to get an RCS means that sometimes the slices will be sorted the same as the InstanceNumber, and sometimes they will be sorted opposite to InstanceNumber, depending on the order in which scanner ordered the slices. You can perform the sorting yourself by calling reader->SortingOff(). If Sorting is Off, the reader will take the slices in the same order as the vtkStringArray that you passed to reader->SetFileNames(). If you send me the block of code where you set up and call the reader, then I might be able to provide more help. Don't forget to also say what versions of VTK and vtk-dicom you are using. Cheers, - David On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: > Hi, > > I have a question about the DICOM slice order. I use the DICOM reader by > David Gobbi to read the slice series to vtkImageData. And I found that the > oder is the same as the order by DICOM instanceNumber tag. However, some > doctors tell me that the order should be reversed because the scan should > start from head to foot. > > @David, if I need to reverse, how to achieve that by your DICOM reader? > > Thanks > Liu Peng > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramamurr at research.ge.com Sun Aug 27 20:10:27 2017 From: ramamurr at research.ge.com (Ramamurthy, Rajesh (GE Global Research, US)) Date: Mon, 28 Aug 2017 00:10:27 +0000 Subject: [vtkusers] =?utf-8?q?_What_ditermines_whether_the_slice_order_sho?= =?utf-8?q?uld_be=09reversed=3F?= In-Reply-To: References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> Message-ID: <7656909F4F8F7F44B138D3B65F7F9C8468BA83E8@ALPMBAPA01.e2k.ad.ge.com> David, Another follow-up question. In VTK7.1.1, is there a method to tell the slice location tag? I found other methods e.g. , for slice spacing but not slice location. Or is there a function that returns all the tags, and we can get the information that way? Thanks Rajesh From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of David Gobbi Sent: Sunday, August 27, 2017 3:30 PM To: Liu_tj Cc: vtkusers Subject: EXT: Re: [vtkusers] What ditermines whether the slice order should be reversed? Hi Liu Peng, The vtkDICOMReader sorts according to the Image Plane Module: http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part03/sect_C.7.6.2.html That is, the slices are sorted in a manner such that the VTK image data has a right-handed coordinate system (called an RCS in the link above). Sorting the slices to get an RCS means that sometimes the slices will be sorted the same as the InstanceNumber, and sometimes they will be sorted opposite to InstanceNumber, depending on the order in which scanner ordered the slices. You can perform the sorting yourself by calling reader->SortingOff(). If Sorting is Off, the reader will take the slices in the same order as the vtkStringArray that you passed to reader->SetFileNames(). If you send me the block of code where you set up and call the reader, then I might be able to provide more help. Don't forget to also say what versions of VTK and vtk-dicom you are using. Cheers, - David On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj > wrote: Hi, I have a question about the DICOM slice order. I use the DICOM reader by David Gobbi to read the slice series to vtkImageData. And I found that the oder is the same as the order by DICOM instanceNumber tag. However, some doctors tell me that the order should be reversed because the scan should start from head to foot. @David, if I need to reverse, how to achieve that by your DICOM reader? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Aug 27 20:29:24 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 27 Aug 2017 18:29:24 -0600 Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: <7656909F4F8F7F44B138D3B65F7F9C8468BA83E8@ALPMBAPA01.e2k.ad.ge.com> References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> <7656909F4F8F7F44B138D3B65F7F9C8468BA83E8@ALPMBAPA01.e2k.ad.ge.com> Message-ID: Hi Rajesh, With vtk-dicom and the vtkDICOMReader, it is possible to get the value of any DICOM tag as described here: http://dgobbi.github.io/vtk-dicom/doc/api/attributes.html You can use vtk-dicom with any version of VTK from 5.10 through VTK 8. In VTK 7 and 8, you just have to set Module_vtkDICOM:BOOL=ON when you configure VTK with cmake. The vtkDICOMReader is not to be confused with VTK's built-in vtkDICOMImageReader, which provides fewer options. Cheers, - David On Sun, Aug 27, 2017 at 6:10 PM, Ramamurthy, Rajesh (GE Global Research, US) wrote: > David, > > > > Another follow-up question. In VTK7.1.1, is there a method to tell the > slice location tag? I found other methods e.g. , for slice spacing but not > slice location. Or is there a function that returns all the tags, and we > can get the information that way? > > > > Thanks > > Rajesh > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *David > Gobbi > *Sent:* Sunday, August 27, 2017 3:30 PM > *To:* Liu_tj > *Cc:* vtkusers > *Subject:* EXT: Re: [vtkusers] What ditermines whether the slice order > should be reversed? > > > > Hi Liu Peng, > > > > The vtkDICOMReader sorts according to the Image Plane Module: > > http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/par > t03/sect_C.7.6.2.html > > That is, the slices are sorted in a manner such that the VTK image data > has a right-handed coordinate system (called an RCS in the link above). > > > > Sorting the slices to get an RCS means that sometimes the slices will be > sorted the same as the InstanceNumber, and sometimes they will be sorted > opposite to InstanceNumber, depending on the order in which scanner ordered > the slices. > > > > You can perform the sorting yourself by calling reader->SortingOff(). If > Sorting is Off, the reader will take the slices in the same order as the > vtkStringArray that you passed to reader->SetFileNames(). > > > > If you send me the block of code where you set up and call the reader, > then I might be able to provide more help. Don't forget to also say what > versions of VTK and vtk-dicom you are using. > > > > Cheers, > > - David > > > > > > > > On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: > > Hi, > > > > I have a question about the DICOM slice order. I use the DICOM reader by > David Gobbi to read the slice series to vtkImageData. And I found that the > oder is the same as the order by DICOM instanceNumber tag. However, some > doctors tell me that the order should be reversed because the scan should > start from head to foot. > > > > @David, if I need to reverse, how to achieve that by your DICOM reader? > > > > Thanks > > Liu Peng > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Mon Aug 28 02:31:51 2017 From: tjlp at netease.com (Liu_tj) Date: Mon, 28 Aug 2017 14:31:51 +0800 (CST) Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> Message-ID: <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> Hi, David, As far as I know, in the RCS system, the direction of Z axis is from foot to head.So by default, the slice order in your dicom reader is consistent with the RCS system.When the reader sorts the slices, does it consider the Patient Postion tag(0080,5100)? Some doctors might use some DICOM tools which the slice order is from head to foot and get used to that. My code block for load slices is as follow: vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New(); vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length); for(int i = 0; i < aDICOMFilePaths->Length; i ++) { String^ filePath = aDICOMFilePaths[i]; const char* filePathByChars = MDKStringUtility::NStringToChars(filePath); vtkDICOMFilePaths->SetValue(i, filePathByChars); } vtkDICOMReader* reader = vtkDICOMReader::New(); vtkImageData* imageData = reader->GetOutput(); Thanks Liu Peng ?2017-08-28?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?28? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, The vtkDICOMReader sorts according to the Image Plane Module: http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part03/sect_C.7.6.2.html That is, the slices are sorted in a manner such that the VTK image data has a right-handed coordinate system (called an RCS in the link above). Sorting the slices to get an RCS means that sometimes the slices will be sorted the same as the InstanceNumber, and sometimes they will be sorted opposite to InstanceNumber, depending on the order in which scanner ordered the slices. You can perform the sorting yourself by calling reader->SortingOff(). If Sorting is Off, the reader will take the slices in the same order as the vtkStringArray that you passed to reader->SetFileNames(). If you send me the block of code where you set up and call the reader, then I might be able to provide more help. Don't forget to also say what versions of VTK and vtk-dicom you are using. Cheers, - David On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: Hi, I have a question about the DICOM slice order. I use the DICOM reader by David Gobbi to read the slice series to vtkImageData. And I found that the oder is the same as the order by DICOM instanceNumber tag. However, some doctors tell me that the order should be reversed because the scan should start from head to foot. @David, if I need to reverse, how to achieve that by your DICOM reader? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Aug 28 04:29:36 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 28 Aug 2017 10:29:36 +0200 Subject: [vtkusers] Looking for C++/Qt/VTK Software Developer in Stockholm Message-ID: Hi all VTK-ers, You'll perhaps know me from my many questions to this great list :) This is primarily for people in the Stockholm area. We?re looking for a talented software developer to join us at our office in Stockholm. Our primary product is a revolutionary new drill core analysis machine for the mining industry. You?ll be working with me and the rest of the team in building cross-platform visualization and data exploration applications using C++, Qt and VTK. The team is a happy mix of software developers, physicists and mechanical engineers. If like me, you find cross-discipline cooperation exciting, and value the freedom to innovate and pick your own tools, you?ll find the work very rewarding. Experience in building 2D/3D visualization tools, especially using Qt and VTK, is highly meritable, as is experience in the F/OSS communities. If you also have some Python skills (PyQt/QML, numpy/scipy, Django, ?) and a keen interest in usability and user experience, then you?re our perfect candidate. Sounds interesting? Just send me an e-mail off list. The position is full time, on-site and some proficiency in Swedish is a must. Our website is at http://www.orexplore.com/, but it's currently out of date and being reworked. In case you want to link to this message, it was first published on my blog at http://estan.dose.se/2017/08/were-hiring-c-qt-vtk Cheers, Elvis From mjordan at live.at Mon Aug 28 05:37:31 2017 From: mjordan at live.at (M. Jordan) Date: Mon, 28 Aug 2017 09:37:31 +0000 Subject: [vtkusers] Color AND scale glyphs Message-ID: Hi, i would like to color and scale some glyphs. I am using the following code to draw and scale the glyphs: vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer scales = vtkSmartPointer::New(); scales->SetName("radius"); for(int i = 0; i < 100; i++) { points->InsertNextPoint(x-pos, y-pos, z-pos); scales->InsertNextValue(radius); } vtkSmartPointer polydata = vtkSmartPointer::New(); polydata->SetPoints(points); polydata->GetPointData()->SetScalars(scales); // Glyph vtkSmartPointer sphereSource = vtkSmartPointer::New(); vtkSmartPointer glyph = vtkSmartPointer::New(); glyph->SetSourceConnection(sphereSource->GetOutputPort()); glyph->SetInputData(scBalls_polydata); glyph->Update(); // Mapper vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(scBalls_glyph3D->GetOutputPort()); // Actor vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(actor); renderer->AddActor(actor); I don't know how to color AND scale the glyphs individually. I would like to set any RGB color in the for loop. Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Mon Aug 28 07:01:11 2017 From: DLRdave at aol.com (David Cole) Date: Mon, 28 Aug 2017 07:01:11 -0400 Subject: [vtkusers] Color AND scale glyphs In-Reply-To: References: Message-ID: Do these stack overflow Q&As help? https://stackoverflow.com/questions/23915671/independently-color-and-rotate-3d-vtk-glyphs On Mon, Aug 28, 2017 at 5:37 AM, M. Jordan wrote: > Hi, > > i would like to color and scale some glyphs. > > I am using the following code to draw and scale the glyphs: > > vtkSmartPointer points = vtkSmartPointer::New(); > vtkSmartPointer scales = > vtkSmartPointer::New(); > scales->SetName("radius"); > > for(int i = 0; i < 100; i++) > { > points->InsertNextPoint(x-pos, y-pos, z-pos); > scales->InsertNextValue(radius); > } > > vtkSmartPointer polydata = vtkSmartPointer::New(); > polydata->SetPoints(points); > polydata->GetPointData()->SetScalars(scales); > > // Glyph > vtkSmartPointer sphereSource = > vtkSmartPointer::New(); > vtkSmartPointer glyph = vtkSmartPointer::New(); > glyph->SetSourceConnection(sphereSource->GetOutputPort()); > glyph->SetInputData(scBalls_polydata); > glyph->Update(); > // Mapper > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(scBalls_glyph3D->GetOutputPort()); > // Actor > vtkSmartPointer actor = vtkSmartPointer::New(); > actor->SetMapper(actor); > renderer->AddActor(actor); > > I don't know how to color AND scale the glyphs individually. I would like > to set > any RGB color in the for loop. > > Thank you very much! > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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.gobbi at gmail.com Mon Aug 28 07:14:03 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 28 Aug 2017 05:14:03 -0600 Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> Message-ID: Hi Liu Peng, What versions of VTK and vtk-dicom you are using? - David On Mon, Aug 28, 2017 at 12:31 AM, Liu_tj wrote: > Hi, David, > > As far as I know, in the RCS system, the direction of Z axis is from foot > to head.So by default, the slice order in your dicom reader is consistent > with the RCS system.When the reader sorts the slices, does it consider the > Patient Postion tag(0080,5100)? Some doctors might use some DICOM tools > which the slice order is from head to foot and get used to that. > > My code block for load slices is as follow: > > vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New(); > vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length); > for(int i = 0; i < aDICOMFilePaths->Length; i ++) > { > String^ filePath = aDICOMFilePaths[i]; > const char* filePathByChars = MDKStringUtility:: > NStringToChars(filePath); > > vtkDICOMFilePaths->SetValue(i, filePathByChars); > } > > vtkDICOMReader* reader = vtkDICOMReader::New(); > vtkImageData* imageData = reader->GetOutput(); > > Thanks > Liu Peng > ?2017-08-28?"David Gobbi" ??? > > -----????----- > *???:*"David Gobbi" > *????:*2017?08?28? ??? > *???:*"Liu_tj" > *??:*"vtkusers" > *??:*Re: What ditermines whether the slice order should be reversed? > > > Hi Liu Peng, > > The vtkDICOMReader sorts according to the Image Plane Module: > http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/ > part03/sect_C.7.6.2.html > That is, the slices are sorted in a manner such that the VTK image data > has a right-handed coordinate system (called an RCS in the link above). > > Sorting the slices to get an RCS means that sometimes the slices will be > sorted the same as the InstanceNumber, and sometimes they will be sorted > opposite to InstanceNumber, depending on the order in which scanner ordered > the slices. > > You can perform the sorting yourself by calling reader->SortingOff(). If > Sorting is Off, the reader will take the slices in the same order as the > vtkStringArray that you passed to reader->SetFileNames(). > > If you send me the block of code where you set up and call the reader, > then I might be able to provide more help. Don't forget to also say what > versions of VTK and vtk-dicom you are using. > > Cheers, > - David > > > > On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: > >> Hi, >> >> I have a question about the DICOM slice order. I use the DICOM reader by >> David Gobbi to read the slice series to vtkImageData. And I found that the >> oder is the same as the order by DICOM instanceNumber tag. However, some >> doctors tell me that the order should be reversed because the scan should >> start from head to foot. >> >> @David, if I need to reverse, how to achieve that by your DICOM reader? >> >> Thanks >> Liu Peng >> >> >> >> > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.leguay at gmail.com Mon Aug 28 10:33:11 2017 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Mon, 28 Aug 2017 16:33:11 +0200 Subject: [vtkusers] vtkPolyDataWriter: comma decimal mark instead of dot decimal mark Message-ID: <9A6034B3-8DE3-436A-B23E-0240267B94A3@gmail.com> Hi everyone, I have a little issue when I try to write then read a polydata. This is the code I use to write then read my polydata inside a string (not a file): // Writing part vtkSmartPointer writer = vtkSmartPointer::New(); writer->WriteToOutputStringOn(); writer->SetInputData(myPolyData); writer->Update(); char * data = writer->GetOutputString(); // Reading part vtkSmartPointer polyReader = vtkSmartPointer::New(); polyReader->ReadFromInputStringOn(); polyReader->SetInputString(data); polyReader->Update(); vtkSmartPointer polyData = polyReader->GetOutput(); Unfortunately, when I try to read the data, I have some error indicating some Unrecognized symbols: the decimal mark is a comma instead of a dot. Can we change easily this comportement or force VTK to write with dot decimal mark? I know the command std::setlocale but I would like to know if there is another way to fix this problem. Thank you! Romain From david.gobbi at gmail.com Mon Aug 28 11:03:54 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 28 Aug 2017 09:03:54 -0600 Subject: [vtkusers] vtkPolyDataWriter: comma decimal mark instead of dot decimal mark In-Reply-To: <9A6034B3-8DE3-436A-B23E-0240267B94A3@gmail.com> References: <9A6034B3-8DE3-436A-B23E-0240267B94A3@gmail.com> Message-ID: Hi Romain, I suspect that VTK could be fixed if someone simply added a call to "imbue(std::locale::classic())" to vtkDataWriter::OpenVTKFile(), e.g.: fptr = new std::ostringstream; fptr->imbue(std::locale::classic()); and fptr = new ofstream(this->FileName, ios::out); fptr->imbue(std::locale::classic()); If you have built VTK from source, you can try making the above change to see if it fixes the issue (the vtkDataSetReader might also need to be fixed, as well as many other IO classes). - David On Mon, Aug 28, 2017 at 8:33 AM, Romain LEGUAY wrote: > Hi everyone, > > I have a little issue when I try to write then read a polydata. > > This is the code I use to write then read my polydata inside a string > (not a file): > > // Writing part > vtkSmartPointer writer = vtkSmartPointer< > vtkPolyDataWriter>::New(); > writer->WriteToOutputStringOn(); > writer->SetInputData(myPolyData); > writer->Update(); > > char * data = writer->GetOutputString(); > > > // Reading part > vtkSmartPointer polyReader = vtkSmartPointer< > vtkPolyDataReader>::New(); > polyReader->ReadFromInputStringOn(); > polyReader->SetInputString(data); > polyReader->Update(); > vtkSmartPointer polyData = polyReader->GetOutput(); > > > Unfortunately, when I try to read the data, I have some error indicating > some Unrecognized symbols: the decimal mark is a comma instead of a dot. > > Can we change easily this comportement or force VTK to write with dot > decimal mark? > > I know the command std::setlocale but I would like to know if there is > another way to fix this problem. > > Thank you! > > Romain > -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.leguay at gmail.com Mon Aug 28 11:10:26 2017 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Mon, 28 Aug 2017 17:10:26 +0200 Subject: [vtkusers] vtkPolyDataWriter: comma decimal mark instead of dot decimal mark In-Reply-To: References: <9A6034B3-8DE3-436A-B23E-0240267B94A3@gmail.com> Message-ID: Thank you David for your quick answer! If I have some time I will do those fixes and send a patch. Romain > Le 28 ao?t 2017 ? 17:03, David Gobbi a ?crit : > > Hi Romain, > > I suspect that VTK could be fixed if someone simply added a call to "imbue(std::locale::classic())" to vtkDataWriter::OpenVTKFile(), e.g.: > > fptr = new std::ostringstream; > fptr->imbue(std::locale::classic()); > > and > > fptr = new ofstream(this->FileName, ios::out); > fptr->imbue(std::locale::classic()); > > If you have built VTK from source, you can try making the above change to see if it fixes the issue (the vtkDataSetReader might also need to be fixed, as well as many other IO classes). > > - David > > > On Mon, Aug 28, 2017 at 8:33 AM, Romain LEGUAY > wrote: > Hi everyone, > > I have a little issue when I try to write then read a polydata. > > This is the code I use to write then read my polydata inside a string (not a file): > > // Writing part > vtkSmartPointer writer = vtkSmartPointer::New(); > writer->WriteToOutputStringOn(); > writer->SetInputData(myPolyData); > writer->Update(); > > char * data = writer->GetOutputString(); > > > // Reading part > vtkSmartPointer polyReader = vtkSmartPointer::New(); > polyReader->ReadFromInputStringOn(); > polyReader->SetInputString(data); > polyReader->Update(); > vtkSmartPointer polyData = polyReader->GetOutput(); > > > Unfortunately, when I try to read the data, I have some error indicating some Unrecognized symbols: the decimal mark is a comma instead of a dot. > > Can we change easily this comportement or force VTK to write with dot decimal mark? > > I know the command std::setlocale but I would like to know if there is another way to fix this problem. > > Thank you! > > Romain -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.bruge at sim-and-cure.com Mon Aug 28 11:12:21 2017 From: s.bruge at sim-and-cure.com (sofi) Date: Mon, 28 Aug 2017 08:12:21 -0700 (MST) Subject: [vtkusers] Using a QVTKOpenGLWidget inside a QTabWidget Message-ID: <1503933141098-5744610.post@n5.nabble.com> RenderWindowUISingleInheritance.zip Hi everyone, I have an issue using a QVTKOpenGLWidget inside a QTabWidget ( I would use a QVTKOpenGLWidget instead a classic QVTKWidget to prevent buffer issues). When i click on the tab containing QVTKOpenGLWidget, all tabs disappeared but still exists (when i click on the top left corner of the displayed window, the application go back to tab 1). I attached the using code ( it's an adapted version of the RenderWindowUISingleInheritance example). Is anyone have an idea of how to fix this issue ? Thank you, Sophie -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-a-QVTKOpenGLWidget-inside-a-QTabWidget-tp5744610.html Sent from the VTK - Users mailing list archive at Nabble.com. From simakov.w at gmail.com Mon Aug 28 12:53:15 2017 From: simakov.w at gmail.com (=?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KHQuNC80LDQutC+0LI=?=) Date: Mon, 28 Aug 2017 19:53:15 +0300 Subject: [vtkusers] Add checkbox? Message-ID: Good day. How can I add a checkbox to vtkRenderWindow? And in general, is there such an element? Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Aug 28 16:15:44 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 28 Aug 2017 16:15:44 -0400 Subject: [vtkusers] Add checkbox? In-Reply-To: References: Message-ID: You can add a button: https://lorensen.github.io/VTKExamples/site/Cxx/Interaction/EllipticalButton/ https://lorensen.github.io/VTKExamples/site/Cxx/Widgets/TexturedButtonWidget/ On Mon, Aug 28, 2017 at 12:53 PM, ??????? ??????? wrote: > Good day. > How can I add a checkbox to vtkRenderWindow? > And in general, is there such an element? > Thank you! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Mon Aug 28 16:23:31 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 28 Aug 2017 16:23:31 -0400 Subject: [vtkusers] Color AND scale glyphs In-Reply-To: References: Message-ID: Scaling: https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/ScaleGlyphs/ Color: https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/ColorGlyphs/ Oriented: https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/OrientedGlyphs/ On Mon, Aug 28, 2017 at 5:37 AM, M. Jordan wrote: > Hi, > > i would like to color and scale some glyphs. > > I am using the following code to draw and scale the glyphs: > > vtkSmartPointer points = vtkSmartPointer::New(); > vtkSmartPointer scales = > vtkSmartPointer::New(); > scales->SetName("radius"); > > for(int i = 0; i < 100; i++) > { > points->InsertNextPoint(x-pos, y-pos, z-pos); > scales->InsertNextValue(radius); > } > > vtkSmartPointer polydata = vtkSmartPointer::New(); > polydata->SetPoints(points); > polydata->GetPointData()->SetScalars(scales); > > // Glyph > vtkSmartPointer sphereSource = > vtkSmartPointer::New(); > vtkSmartPointer glyph = vtkSmartPointer::New(); > glyph->SetSourceConnection(sphereSource->GetOutputPort()); > glyph->SetInputData(scBalls_polydata); > glyph->Update(); > // Mapper > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(scBalls_glyph3D->GetOutputPort()); > // Actor > vtkSmartPointer actor = vtkSmartPointer::New(); > actor->SetMapper(actor); > renderer->AddActor(actor); > > I don't know how to color AND scale the glyphs individually. I would like > to set > any RGB color in the for loop. > > Thank you very much! > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 tjlp at netease.com Mon Aug 28 21:03:13 2017 From: tjlp at netease.com (Liu_tj) Date: Tue, 29 Aug 2017 09:03:13 +0800 (CST) Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> Message-ID: <86ac2d3.1.15e2b83853a.Coremail.tjlp@netease.com> Hi, David, I forgot to mention the verison. The VTK and vtk-DICOM version are both 7.1 Thanks Liu Peng ?2017-08-28?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?28? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, What versions of VTK and vtk-dicom you are using? - David On Mon, Aug 28, 2017 at 12:31 AM, Liu_tj wrote: Hi, David, As far as I know, in the RCS system, the direction of Z axis is from foot to head.So by default, the slice order in your dicom reader is consistent with the RCS system.When the reader sorts the slices, does it consider the Patient Postion tag(0080,5100)? Some doctors might use some DICOM tools which the slice order is from head to foot and get used to that. My code block for load slices is as follow: vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New(); vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length); for(int i = 0; i < aDICOMFilePaths->Length; i ++) { String^ filePath = aDICOMFilePaths[i]; const char* filePathByChars = MDKStringUtility::NStringToChars(filePath); vtkDICOMFilePaths->SetValue(i, filePathByChars); } vtkDICOMReader* reader = vtkDICOMReader::New(); vtkImageData* imageData = reader->GetOutput(); Thanks Liu Peng ?2017-08-28?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?28? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, The vtkDICOMReader sorts according to the Image Plane Module: http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part03/sect_C.7.6.2.html That is, the slices are sorted in a manner such that the VTK image data has a right-handed coordinate system (called an RCS in the link above). Sorting the slices to get an RCS means that sometimes the slices will be sorted the same as the InstanceNumber, and sometimes they will be sorted opposite to InstanceNumber, depending on the order in which scanner ordered the slices. You can perform the sorting yourself by calling reader->SortingOff(). If Sorting is Off, the reader will take the slices in the same order as the vtkStringArray that you passed to reader->SetFileNames(). If you send me the block of code where you set up and call the reader, then I might be able to provide more help. Don't forget to also say what versions of VTK and vtk-dicom you are using. Cheers, - David On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: Hi, I have a question about the DICOM slice order. I use the DICOM reader by David Gobbi to read the slice series to vtkImageData. And I found that the oder is the same as the order by DICOM instanceNumber tag. However, some doctors tell me that the order should be reversed because the scan should start from head to foot. @David, if I need to reverse, how to achieve that by your DICOM reader? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 29 02:01:10 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 29 Aug 2017 00:01:10 -0600 Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: <86ac2d3.1.15e2b83853a.Coremail.tjlp@netease.com> References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> <86ac2d3.1.15e2b83853a.Coremail.tjlp@netease.com> Message-ID: Hi Liu Peng, For vtk-dicom, that would actually be version 0.7.1 (the current version is 0.8.5). It is possible that you have run into this bug, which was fixed in 0.8.3: https://github.com/dgobbi/vtk-dicom/issues/132 The work-around for the bug is reader->SetMemoryRowOrderToFileNative(). See here for more info: http://dgobbi.github.io/vtk-dicom/doc/api/image_orientation.html Unfortunately, calling SetMemoryRowOrderToFileNative() doesn't work very well with vtkImageViewer or vtkImageViewer2, since these "viewer" classes insist on images that are in "bottom-to-top" order (DICOM images are natively in top-to-bottom order). However, if you use vtkImageActor or vtkImageSlice to display your images, then you can set the camera so that "up" is in the correct direction. The vtkDICOMReader uses ImageOrientationPatient (0020,0037) and ImagePositionPatient (0020,0032) to put the slices in order. These attributes are more reliable and more precise than PatientPosition (0018,5100). Cheers, - David On Mon, Aug 28, 2017 at 7:03 PM, Liu_tj wrote: > Hi, David, > > I forgot to mention the verison. The VTK and vtk-DICOM version are both 7.1 > > Thanks > Liu Peng > > ?2017-08-28?"David Gobbi" ??? > > -----????----- > *???:*"David Gobbi" > *????:*2017?08?28? ??? > *???:*"Liu_tj" > *??:*"vtkusers" > *??:*Re: Re: What ditermines whether the slice order should be reversed? > > > Hi Liu Peng, > > What versions of VTK and vtk-dicom you are using? > > - David > > On Mon, Aug 28, 2017 at 12:31 AM, Liu_tj wrote: > >> Hi, David, >> >> As far as I know, in the RCS system, the direction of Z axis is from foot >> to head.So by default, the slice order in your dicom reader is consistent >> with the RCS system.When the reader sorts the slices, does it consider the >> Patient Postion tag(0080,5100)? Some doctors might use some DICOM tools >> which the slice order is from head to foot and get used to that. >> >> My code block for load slices is as follow: >> >> vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New(); >> vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length); >> for(int i = 0; i < aDICOMFilePaths->Length; i ++) >> { >> String^ filePath = aDICOMFilePaths[i]; >> const char* filePathByChars = MDKStringUtility::NStringToCha >> rs(filePath); >> >> vtkDICOMFilePaths->SetValue(i, filePathByChars); >> } >> >> vtkDICOMReader* reader = vtkDICOMReader::New(); >> vtkImageData* imageData = reader->GetOutput(); >> >> Thanks >> Liu Peng >> ?2017-08-28?"David Gobbi" ??? >> >> -----????----- >> *???:*"David Gobbi" >> *????:*2017?08?28? ??? >> *???:*"Liu_tj" >> *??:*"vtkusers" >> *??:*Re: What ditermines whether the slice order should be reversed? >> >> >> Hi Liu Peng, >> >> The vtkDICOMReader sorts according to the Image Plane Module: >> http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/par >> t03/sect_C.7.6.2.html >> That is, the slices are sorted in a manner such that the VTK image data >> has a right-handed coordinate system (called an RCS in the link above). >> >> Sorting the slices to get an RCS means that sometimes the slices will be >> sorted the same as the InstanceNumber, and sometimes they will be sorted >> opposite to InstanceNumber, depending on the order in which scanner ordered >> the slices. >> >> You can perform the sorting yourself by calling reader->SortingOff(). If >> Sorting is Off, the reader will take the slices in the same order as the >> vtkStringArray that you passed to reader->SetFileNames(). >> >> If you send me the block of code where you set up and call the reader, >> then I might be able to provide more help. Don't forget to also say what >> versions of VTK and vtk-dicom you are using. >> >> Cheers, >> - David >> >> >> >> On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: >> >>> Hi, >>> >>> I have a question about the DICOM slice order. I use the DICOM reader by >>> David Gobbi to read the slice series to vtkImageData. And I found that the >>> oder is the same as the order by DICOM instanceNumber tag. However, some >>> doctors tell me that the order should be reversed because the scan should >>> start from head to foot. >>> >>> @David, if I need to reverse, how to achieve that by your DICOM reader? >>> >>> Thanks >>> Liu Peng >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Tue Aug 29 03:58:19 2017 From: tjlp at netease.com (Liu_tj) Date: Tue, 29 Aug 2017 15:58:19 +0800 (CST) Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> <86ac2d3.1.15e2b83853a.Coremail.tjlp@netease.com> Message-ID: <3d3eba3f.9.15e2cff8e60.Coremail.tjlp@netease.com> Hi, David, Actually in my current code I use vtkImageFlip to flip the image data to solve the slice display orientation issue on coronal and saggital view as follow: vtkDICOMReader* reader = vtkDICOMReader::New(); reader->SetFileNames(vtkDICOMFilePaths); reader->Update(); vtkImageFlip* flip = vtkImageFlip::New(); flip->SetInputConnection(reader->GetOutputPort()); flip->SetFilteredAxis(2); flip->Update(); vtkImageData* imageData = flip->GetOutput(); Thanks Liu Peng ?2017-08-29?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?29? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, For vtk-dicom, that would actually be version 0.7.1 (the current version is 0.8.5). It is possible that you have run into this bug, which was fixed in 0.8.3: https://github.com/dgobbi/vtk-dicom/issues/132 The work-around for the bug is reader->SetMemoryRowOrderToFileNative(). See here for more info: http://dgobbi.github.io/vtk-dicom/doc/api/image_orientation.html Unfortunately, calling SetMemoryRowOrderToFileNative() doesn't work very well with vtkImageViewer or vtkImageViewer2, since these "viewer" classes insist on images that are in "bottom-to-top" order (DICOM images are natively in top-to-bottom order). However, if you use vtkImageActor or vtkImageSlice to display your images, then you can set the camera so that "up" is in the correct direction. The vtkDICOMReader uses ImageOrientationPatient (0020,0037) and ImagePositionPatient (0020,0032) to put the slices in order. These attributes are more reliable and more precise than PatientPosition (0018,5100). Cheers, - David On Mon, Aug 28, 2017 at 7:03 PM, Liu_tj wrote: Hi, David, I forgot to mention the verison. The VTK and vtk-DICOM version are both 7.1 Thanks Liu Peng ?2017-08-28?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?28? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, What versions of VTK and vtk-dicom you are using? - David On Mon, Aug 28, 2017 at 12:31 AM, Liu_tj wrote: Hi, David, As far as I know, in the RCS system, the direction of Z axis is from foot to head.So by default, the slice order in your dicom reader is consistent with the RCS system.When the reader sorts the slices, does it consider the Patient Postion tag(0080,5100)? Some doctors might use some DICOM tools which the slice order is from head to foot and get used to that. My code block for load slices is as follow: vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New(); vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length); for(int i = 0; i < aDICOMFilePaths->Length; i ++) { String^ filePath = aDICOMFilePaths[i]; const char* filePathByChars = MDKStringUtility::NStringToChars(filePath); vtkDICOMFilePaths->SetValue(i, filePathByChars); } vtkDICOMReader* reader = vtkDICOMReader::New(); vtkImageData* imageData = reader->GetOutput(); Thanks Liu Peng ?2017-08-28?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?28? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, The vtkDICOMReader sorts according to the Image Plane Module: http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part03/sect_C.7.6.2.html That is, the slices are sorted in a manner such that the VTK image data has a right-handed coordinate system (called an RCS in the link above). Sorting the slices to get an RCS means that sometimes the slices will be sorted the same as the InstanceNumber, and sometimes they will be sorted opposite to InstanceNumber, depending on the order in which scanner ordered the slices. You can perform the sorting yourself by calling reader->SortingOff(). If Sorting is Off, the reader will take the slices in the same order as the vtkStringArray that you passed to reader->SetFileNames(). If you send me the block of code where you set up and call the reader, then I might be able to provide more help. Don't forget to also say what versions of VTK and vtk-dicom you are using. Cheers, - David On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: Hi, I have a question about the DICOM slice order. I use the DICOM reader by David Gobbi to read the slice series to vtkImageData. And I found that the oder is the same as the order by DICOM instanceNumber tag. However, some doctors tell me that the order should be reversed because the scan should start from head to foot. @David, if I need to reverse, how to achieve that by your DICOM reader? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 29 07:58:43 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 29 Aug 2017 05:58:43 -0600 Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: <3d3eba3f.9.15e2cff8e60.Coremail.tjlp@netease.com> References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> <86ac2d3.1.15e2b83853a.Coremail.tjlp@netease.com> <3d3eba3f.9.15e2cff8e60.Coremail.tjlp@netease.com> Message-ID: Hi Liu Peng, If you apply vtkImageFlip to the image, then the matrix returned by reader->GetPatientMatrix() will not work with the image. I recommend that, at the very least, you try doing the following instead: 1) use reader->SetMemoryRowOrderToFileNative(), and 2) try using vtkDICOMToRAS instead of vtkImageFlip: https://github.com/dgobbi/vtk-dicom/blob/master/Source/vtkDICOMToRAS.h Also, if possible, update to the latest version of vtk-dicom. Cheers, - David On Tue, Aug 29, 2017 at 1:58 AM, Liu_tj wrote: > Hi, David, > > Actually in my current code I use vtkImageFlip to flip the image data to > solve the slice display orientation issue on coronal and saggital view as > follow: > > vtkDICOMReader* reader = vtkDICOMReader::New(); > reader->SetFileNames(vtkDICOMFilePaths); > reader->Update(); > vtkImageFlip* flip = vtkImageFlip::New(); > flip->SetInputConnection(reader->GetOutputPort()); > flip->SetFilteredAxis(2); > flip->Update(); > vtkImageData* imageData = flip->GetOutput(); > > Thanks > Liu Peng > > ?2017-08-29?"David Gobbi" ??? > > -----????----- > *???:*"David Gobbi" > *????:*2017?08?29? ??? > *???:*"Liu_tj" > *??:*"vtkusers" > *??:*Re: Re: Re: What ditermines whether the slice order should be > reversed? > > > Hi Liu Peng, > > For vtk-dicom, that would actually be version 0.7.1 (the current version > is 0.8.5). > > It is possible that you have run into this bug, which was fixed in 0.8.3: > https://github.com/dgobbi/vtk-dicom/issues/132 > The work-around for the bug is reader->SetMemoryRowOrderToFileNative(). See > here for more info: > http://dgobbi.github.io/vtk-dicom/doc/api/image_orientation.html > > Unfortunately, calling SetMemoryRowOrderToFileNative() doesn't work very > well with vtkImageViewer or vtkImageViewer2, since these "viewer" classes > insist on images that are in "bottom-to-top" order (DICOM images are > natively in top-to-bottom order). However, if you use vtkImageActor or > vtkImageSlice to display your images, then you can set the camera so that > "up" is in the correct direction. > > The vtkDICOMReader uses ImageOrientationPatient (0020,0037) and > ImagePositionPatient (0020,0032) to put the slices in order. These > attributes are more reliable and more precise than PatientPosition > (0018,5100). > > Cheers, > - David > > > > > On Mon, Aug 28, 2017 at 7:03 PM, Liu_tj wrote: > >> Hi, David, >> >> I forgot to mention the verison. The VTK and vtk-DICOM version are both >> 7.1 >> >> Thanks >> Liu Peng >> >> ?2017-08-28?"David Gobbi" ??? >> >> -----????----- >> *???:*"David Gobbi" >> *????:*2017?08?28? ??? >> *???:*"Liu_tj" >> *??:*"vtkusers" >> *??:*Re: Re: What ditermines whether the slice order should be reversed? >> >> >> Hi Liu Peng, >> >> What versions of VTK and vtk-dicom you are using? >> >> - David >> >> On Mon, Aug 28, 2017 at 12:31 AM, Liu_tj wrote: >> >>> Hi, David, >>> >>> As far as I know, in the RCS system, the direction of Z axis is from >>> foot to head.So by default, the slice order in your dicom reader is >>> consistent with the RCS system.When the reader sorts the slices, does it >>> consider the Patient Postion tag(0080,5100)? Some doctors might use some >>> DICOM tools which the slice order is from head to foot and get used to that. >>> >>> My code block for load slices is as follow: >>> >>> vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New(); >>> vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length); >>> for(int i = 0; i < aDICOMFilePaths->Length; i ++) >>> { >>> String^ filePath = aDICOMFilePaths[i]; >>> const char* filePathByChars = MDKStringUtility::NStringToCha >>> rs(filePath); >>> >>> vtkDICOMFilePaths->SetValue(i, filePathByChars); >>> } >>> >>> vtkDICOMReader* reader = vtkDICOMReader::New(); >>> vtkImageData* imageData = reader->GetOutput(); >>> >>> Thanks >>> Liu Peng >>> ?2017-08-28?"David Gobbi" ??? >>> >>> -----????----- >>> *???:*"David Gobbi" >>> *????:*2017?08?28? ??? >>> *???:*"Liu_tj" >>> *??:*"vtkusers" >>> *??:*Re: What ditermines whether the slice order should be reversed? >>> >>> >>> Hi Liu Peng, >>> >>> The vtkDICOMReader sorts according to the Image Plane Module: >>> http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/par >>> t03/sect_C.7.6.2.html >>> That is, the slices are sorted in a manner such that the VTK image data >>> has a right-handed coordinate system (called an RCS in the link above). >>> >>> Sorting the slices to get an RCS means that sometimes the slices will be >>> sorted the same as the InstanceNumber, and sometimes they will be sorted >>> opposite to InstanceNumber, depending on the order in which scanner ordered >>> the slices. >>> >>> You can perform the sorting yourself by calling reader->SortingOff(). >>> If Sorting is Off, the reader will take the slices in the same order as the >>> vtkStringArray that you passed to reader->SetFileNames(). >>> >>> If you send me the block of code where you set up and call the reader, >>> then I might be able to provide more help. Don't forget to also say what >>> versions of VTK and vtk-dicom you are using. >>> >>> Cheers, >>> - David >>> >>> >>> >>> On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: >>> >>>> Hi, >>>> >>>> I have a question about the DICOM slice order. I use the DICOM reader >>>> by David Gobbi to read the slice series to vtkImageData. And I found that >>>> the oder is the same as the order by DICOM instanceNumber tag. However, >>>> some doctors tell me that the order should be reversed because the scan >>>> should start from head to foot. >>>> >>>> @David, if I need to reverse, how to achieve that by your DICOM reader? >>>> >>>> Thanks >>>> Liu Peng >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From landinghere at 163.com Tue Aug 29 09:04:17 2017 From: landinghere at 163.com (landings) Date: Tue, 29 Aug 2017 06:04:17 -0700 (MST) Subject: [vtkusers] How to insert integer tuples into vtkIntArray? Message-ID: <1504011857886-5744619.post@n5.nabble.com> Hello, It seems that vtkIntArray::InsertNextTuple() methods can only insert float and double values. why? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-insert-integer-tuples-into-vtkIntArray-tp5744619.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Tue Aug 29 09:28:17 2017 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Tue, 29 Aug 2017 06:28:17 -0700 (MST) Subject: [vtkusers] Change vtkScalarBarActor label text Message-ID: <1504013297086-5744620.post@n5.nabble.com> Hi all, I have a lookup table with a maximum (let's say 100). All values greater than 100 are rendered in white. The problem is that vtkScalarBarActor should show the greatest increment (next to the white colour) as "?100", but instead shows it as "100". Is there any way round this? Maybe to get the text of each increment and add a "?" to the max? Thanks in advance P.S. rendering is done with vtkLookupTable, vtkImageMapToColors then vtkScalarBarActor -- View this message in context: http://vtk.1045678.n5.nabble.com/Change-vtkScalarBarActor-label-text-tp5744620.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Aug 29 09:48:31 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 29 Aug 2017 09:48:31 -0400 Subject: [vtkusers] How to insert integer tuples into vtkIntArray? In-Reply-To: <1504011857886-5744619.post@n5.nabble.com> References: <1504011857886-5744619.post@n5.nabble.com> Message-ID: There is also vtkIdType vtkIntArray::InsertNextTypedTuple(const int *tuple). That lets you set the tuple from an int array. HTH, Cory On Tue, Aug 29, 2017 at 9:04 AM, landings wrote: > Hello, > It seems that vtkIntArray::InsertNextTuple() methods can only insert float > and double values. why? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-insert-integer-tuples-into-vtkIntArray-tp5744619.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From minsky at tandar.cnea.gov.ar Tue Aug 29 13:20:16 2017 From: minsky at tandar.cnea.gov.ar (Daniel Minsky) Date: Tue, 29 Aug 2017 14:20:16 -0300 Subject: [vtkusers] Making custom data for a regular 3d voxel grid Message-ID: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> Dear all, I am very new to VTK, I could follow the C++ examples to read an image from disk, however I would like to generate the image inside my program with some voxel data coming from other object in my code. I would like to generate a vtkImageData with a regular 3d voxel grid values. I do have all the unsigned_char 100x200x40 voxels in a unsigned char array. All voxels are cubic with 1cm side. How do I feed the vtkImageData object with my data array? How do I use the vtkImageData? The vtkImageData does not have the GetOutputPort() method to feed a Mapper and I am very confused about the correct pipeline. My final goal is to make a 3d image of the data within an upper and lower thresholds and an arbitrary plane slice. Kind regards, Daniel -- Dr. Daniel Minsky Investigador CONICET - CNEA Departamento de F?sica Centro At?mico Constituyentes - Comisi?n Nacional de Energ?a At?mica Av. Gral. Paz 1499 (B1650KNA) San Mart?n - Pcia. de Buenos Aires - Argentina Tel: +54 11 6772 7913 Fax: +54 11 6772 7121 e-mail: minsky at tandar.cnea.gov.ar -------------- next part -------------- A non-text attachment was scrubbed... Name: minsky.vcf Type: text/x-vcard Size: 433 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Tue Aug 29 13:57:18 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 29 Aug 2017 19:57:18 +0200 Subject: [vtkusers] Making custom data for a regular 3d voxel grid In-Reply-To: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> References: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> Message-ID: Hi Daniel, 2017-08-29 19:20 GMT+02:00 Daniel Minsky : > Dear all, > > I am very new to VTK, I could follow the C++ examples to read an image from > disk, however I would like to generate the image inside my program with some > voxel data coming from other object in my code. > > I would like to generate a vtkImageData with a regular 3d voxel grid values. > I do have all the unsigned_char 100x200x40 voxels in a unsigned char array. > All voxels are cubic with 1cm side. > > How do I feed the vtkImageData object with my data array? You can get a pointer to the data underlying the vtkImageData with GetScalarPointer(). Using that you can simply copy your values there. Make sure that you call SetExtent(...) followed by AllocateScalars(...) so that the underlying data has been allocated first, and that you write your data in the correct order (I think VTK uses Fortran order). You can use SetSpacing(...) to control the spacing of the resulting image, which will determine its bounds in the VTK world. > > How do I use the vtkImageData? The vtkImageData does not have the > GetOutputPort() method to feed a Mapper and I am very confused about the > correct pipeline. vtkImageData is not a VTK "algorithm". It is instead normally the output of an algorithm (for example a file reading algorithm, or some image filtering algorithm). That's why it doesn't have the GetOutputPort(..)/SetInputConnection(..), since it doesn't take part as a filter in VTK pipelines. To render a ready-made vtkImageData as a volume, you set up a vtkVolumeMapper (for example vtkGPUVolumeRayCastMapper or a vtkSmartVolumeMapper), and set the vtkImageData as its input data using SetInputData(...). You then set up a vtkVolumeProperty, with an associated scalar opacity transfer function (a vtkPiecewiseFunction) and color transfer function (a vtkColorTransferFunction). You then create a vtkVolume and set the vtkVolumeProperty and the volume mapper on it. Finally, you add the volume to your vtkRenderer. I know it's a lot to process at first, but I think the VTK volume rendering examples should be more helpful than my explanation above, once you've got your vtkImageData ready. Hope that helps. Elvis > > My final goal is to make a 3d image of the data within an upper and lower > thresholds and an arbitrary plane slice. > > Kind regards, > > Daniel > > -- > Dr. Daniel Minsky > Investigador CONICET - CNEA > Departamento de F?sica > Centro At?mico Constituyentes - Comisi?n Nacional de Energ?a At?mica > Av. Gral. Paz 1499 (B1650KNA) San Mart?n - Pcia. de Buenos Aires - Argentina > Tel: +54 11 6772 7913 > Fax: +54 11 6772 7121 > e-mail: minsky at tandar.cnea.gov.ar > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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.gobbi at gmail.com Tue Aug 29 14:05:54 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 29 Aug 2017 12:05:54 -0600 Subject: [vtkusers] Making custom data for a regular 3d voxel grid In-Reply-To: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> References: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> Message-ID: Hi Daniel, I think that you need vtkImageImport: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageImport/ - David On Tue, Aug 29, 2017 at 11:20 AM, Daniel Minsky wrote: > Dear all, > > I am very new to VTK, I could follow the C++ examples to read an image > from disk, however I would like to generate the image inside my program > with some voxel data coming from other object in my code. > > I would like to generate a vtkImageData with a regular 3d voxel grid > values. I do have all the unsigned_char 100x200x40 voxels in a unsigned > char array. All voxels are cubic with 1cm side. > > How do I feed the vtkImageData object with my data array? > > How do I use the vtkImageData? The vtkImageData does not have the > GetOutputPort() method to feed a Mapper and I am very confused about the > correct pipeline. > > My final goal is to make a 3d image of the data within an upper and lower > thresholds and an arbitrary plane slice. > > Kind regards, > > Daniel > > -- > Dr. Daniel Minsky > Investigador CONICET - CNEA > Departamento de F?sica > Centro At?mico Constituyentes - Comisi?n Nacional de Energ?a At?mica > Av. Gral. Paz 1499 (B1650KNA) San Mart?n - Pcia. de Buenos Aires - > Argentina > Tel: +54 11 6772 7913 > Fax: +54 11 6772 7121 > e-mail: minsky at tandar.cnea.gov.ar > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Aug 29 14:18:07 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 29 Aug 2017 14:18:07 -0400 Subject: [vtkusers] Making custom data for a regular 3d voxel grid In-Reply-To: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> References: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> Message-ID: Take a look at this example: https://lorensen.github.io/VTKExamples/site//Cxx/Images/ImageImport/ Note the use of SetInputData rather that SetInputConnection. Bill On Tue, Aug 29, 2017 at 1:20 PM, Daniel Minsky wrote: > Dear all, > > I am very new to VTK, I could follow the C++ examples to read an image from > disk, however I would like to generate the image inside my program with some > voxel data coming from other object in my code. > > I would like to generate a vtkImageData with a regular 3d voxel grid values. > I do have all the unsigned_char 100x200x40 voxels in a unsigned char array. > All voxels are cubic with 1cm side. > > How do I feed the vtkImageData object with my data array? > > How do I use the vtkImageData? The vtkImageData does not have the > GetOutputPort() method to feed a Mapper and I am very confused about the > correct pipeline. > > My final goal is to make a 3d image of the data within an upper and lower > thresholds and an arbitrary plane slice. > > Kind regards, > > Daniel > > -- > Dr. Daniel Minsky > Investigador CONICET - CNEA > Departamento de F?sica > Centro At?mico Constituyentes - Comisi?n Nacional de Energ?a At?mica > Av. Gral. Paz 1499 (B1650KNA) San Mart?n - Pcia. de Buenos Aires - Argentina > Tel: +54 11 6772 7913 > Fax: +54 11 6772 7121 > e-mail: minsky at tandar.cnea.gov.ar > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 elvis.stansvik at orexplore.com Tue Aug 29 14:22:13 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 29 Aug 2017 20:22:13 +0200 Subject: [vtkusers] Making custom data for a regular 3d voxel grid In-Reply-To: References: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> Message-ID: 2017-08-29 20:18 GMT+02:00 Bill Lorensen : > Take a look at this example: > https://lorensen.github.io/VTKExamples/site//Cxx/Images/ImageImport/ Ah, indeed. Take advice from the big boys here Daniel, and use vtkImageImport. Disregard the more manual approach I suggested. Elvis > > Note the use of SetInputData rather that SetInputConnection. > > Bill > > On Tue, Aug 29, 2017 at 1:20 PM, Daniel Minsky > wrote: >> Dear all, >> >> I am very new to VTK, I could follow the C++ examples to read an image from >> disk, however I would like to generate the image inside my program with some >> voxel data coming from other object in my code. >> >> I would like to generate a vtkImageData with a regular 3d voxel grid values. >> I do have all the unsigned_char 100x200x40 voxels in a unsigned char array. >> All voxels are cubic with 1cm side. >> >> How do I feed the vtkImageData object with my data array? >> >> How do I use the vtkImageData? The vtkImageData does not have the >> GetOutputPort() method to feed a Mapper and I am very confused about the >> correct pipeline. >> >> My final goal is to make a 3d image of the data within an upper and lower >> thresholds and an arbitrary plane slice. >> >> Kind regards, >> >> Daniel >> >> -- >> Dr. Daniel Minsky >> Investigador CONICET - CNEA >> Departamento de F?sica >> Centro At?mico Constituyentes - Comisi?n Nacional de Energ?a At?mica >> Av. Gral. Paz 1499 (B1650KNA) San Mart?n - Pcia. de Buenos Aires - Argentina >> Tel: +54 11 6772 7913 >> Fax: +54 11 6772 7121 >> e-mail: minsky at tandar.cnea.gov.ar >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 david.gobbi at gmail.com Tue Aug 29 20:22:31 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 29 Aug 2017 18:22:31 -0600 Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: <4148bdf7.1a.15e3074a2d7.Coremail.tjlp@netease.com> References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> <86ac2d3.1.15e2b83853a.Coremail.tjlp@netease.com> <3d3eba3f.9.15e2cff8e60.Coremail.tjlp@netease.com> <4148bdf7.1a.15e3074a2d7.Coremail.tjlp@netease.com> Message-ID: On Tue, Aug 29, 2017 at 6:05 PM, Liu_tj wrote: > Hi?David, > > 2 questions come up. > > 1. If I call reader->SetMemoryRowOrderToFileNative() before update() > method, do I still need to use vtkDICOMToRAS? > Yes, if you are using vtkImageViewer (or vtkImageViewer2). If you do not use vtkDICOMToRAS, then vtkImageViewer will show the image upside-down. > 2. If I update to the latest vtk-dicom version, do I still need to use > reader->SetMemoryRowOrderToFileNative() and vtkDICOMToRAS? No. Again, I'm assuming that you are using vtkImageViewer2. - David > ?2017-08-29?"David Gobbi" ??? > > -----????----- > *???:*"David Gobbi" > *????:*2017?08?29? ??? > *???:*"Liu_tj" > *??:*"vtkusers" > *??:*Re: Re: Re: Re: What ditermines whether the slice order should be > reversed? > > > Hi Liu Peng, > > If you apply vtkImageFlip to the image, then the matrix returned by > reader->GetPatientMatrix() will not work with the image. I recommend that, > at the very least, you try doing the following instead: > > 1) use reader->SetMemoryRowOrderToFileNative(), and > 2) try using vtkDICOMToRAS instead of vtkImageFlip: > https://github.com/dgobbi/vtk-dicom/blob/master/Source/vtkDICOMToRAS.h > > Also, if possible, update to the latest version of vtk-dicom. > > Cheers, > - David > > On Tue, Aug 29, 2017 at 1:58 AM, Liu_tj wrote: > >> Hi, David, >> >> Actually in my current code I use vtkImageFlip to flip the image data to >> solve the slice display orientation issue on coronal and saggital view as >> follow: >> >> vtkDICOMReader* reader = vtkDICOMReader::New(); >> reader->SetFileNames(vtkDICOMFilePaths); >> reader->Update(); >> vtkImageFlip* flip = vtkImageFlip::New(); >> flip->SetInputConnection(reader->GetOutputPort()); >> flip->SetFilteredAxis(2); >> flip->Update(); >> vtkImageData* imageData = flip->GetOutput(); >> >> Thanks >> Liu Peng >> >> ?2017-08-29?"David Gobbi" ??? >> >> -----????----- >> *???:*"David Gobbi" >> *????:*2017?08?29? ??? >> *???:*"Liu_tj" >> *??:*"vtkusers" >> *??:*Re: Re: Re: What ditermines whether the slice order should be >> reversed? >> >> >> Hi Liu Peng, >> >> For vtk-dicom, that would actually be version 0.7.1 (the current version >> is 0.8.5). >> >> It is possible that you have run into this bug, which was fixed in 0.8.3: >> https://github.com/dgobbi/vtk-dicom/issues/132 >> The work-around for the bug is reader->SetMemoryRowOrderToFileNative(). See >> here for more info: >> http://dgobbi.github.io/vtk-dicom/doc/api/image_orientation.html >> >> Unfortunately, calling SetMemoryRowOrderToFileNative() doesn't work very >> well with vtkImageViewer or vtkImageViewer2, since these "viewer" classes >> insist on images that are in "bottom-to-top" order (DICOM images are >> natively in top-to-bottom order). However, if you use vtkImageActor or >> vtkImageSlice to display your images, then you can set the camera so that >> "up" is in the correct direction. >> >> The vtkDICOMReader uses ImageOrientationPatient (0020,0037) and >> ImagePositionPatient (0020,0032) to put the slices in order. These >> attributes are more reliable and more precise than PatientPosition >> (0018,5100). >> >> Cheers, >> - David >> >> >> >> >> On Mon, Aug 28, 2017 at 7:03 PM, Liu_tj wrote: >> >>> Hi, David, >>> >>> I forgot to mention the verison. The VTK and vtk-DICOM version are both >>> 7.1 >>> >>> Thanks >>> Liu Peng >>> >>> ?2017-08-28?"David Gobbi" ??? >>> >>> -----????----- >>> *???:*"David Gobbi" >>> *????:*2017?08?28? ??? >>> *???:*"Liu_tj" >>> *??:*"vtkusers" >>> *??:*Re: Re: What ditermines whether the slice order should be reversed? >>> >>> >>> Hi Liu Peng, >>> >>> What versions of VTK and vtk-dicom you are using? >>> >>> - David >>> >>> On Mon, Aug 28, 2017 at 12:31 AM, Liu_tj wrote: >>> >>>> Hi, David, >>>> >>>> As far as I know, in the RCS system, the direction of Z axis is from >>>> foot to head.So by default, the slice order in your dicom reader is >>>> consistent with the RCS system.When the reader sorts the slices, does it >>>> consider the Patient Postion tag(0080,5100)? Some doctors might use some >>>> DICOM tools which the slice order is from head to foot and get used to that. >>>> >>>> My code block for load slices is as follow: >>>> >>>> vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New(); >>>> vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length); >>>> for(int i = 0; i < aDICOMFilePaths->Length; i ++) >>>> { >>>> String^ filePath = aDICOMFilePaths[i]; >>>> const char* filePathByChars = MDKStringUtility::NStringToCha >>>> rs(filePath); >>>> >>>> vtkDICOMFilePaths->SetValue(i, filePathByChars); >>>> } >>>> >>>> vtkDICOMReader* reader = vtkDICOMReader::New(); >>>> vtkImageData* imageData = reader->GetOutput(); >>>> >>>> Thanks >>>> Liu Peng >>>> ?2017-08-28?"David Gobbi" ??? >>>> >>>> -----????----- >>>> *???:*"David Gobbi" >>>> *????:*2017?08?28? ??? >>>> *???:*"Liu_tj" >>>> *??:*"vtkusers" >>>> *??:*Re: What ditermines whether the slice order should be reversed? >>>> >>>> >>>> Hi Liu Peng, >>>> >>>> The vtkDICOMReader sorts according to the Image Plane Module: >>>> http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/par >>>> t03/sect_C.7.6.2.html >>>> That is, the slices are sorted in a manner such that the VTK image data >>>> has a right-handed coordinate system (called an RCS in the link above). >>>> >>>> Sorting the slices to get an RCS means that sometimes the slices will >>>> be sorted the same as the InstanceNumber, and sometimes they will be sorted >>>> opposite to InstanceNumber, depending on the order in which scanner ordered >>>> the slices. >>>> >>>> You can perform the sorting yourself by calling reader->SortingOff(). >>>> If Sorting is Off, the reader will take the slices in the same order as the >>>> vtkStringArray that you passed to reader->SetFileNames(). >>>> >>>> If you send me the block of code where you set up and call the reader, >>>> then I might be able to provide more help. Don't forget to also say what >>>> versions of VTK and vtk-dicom you are using. >>>> >>>> Cheers, >>>> - David >>>> >>>> >>>> >>>> On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: >>>> >>>>> Hi, >>>>> >>>>> I have a question about the DICOM slice order. I use the DICOM reader >>>>> by David Gobbi to read the slice series to vtkImageData. And I found that >>>>> the oder is the same as the order by DICOM instanceNumber tag. However, >>>>> some doctors tell me that the order should be reversed because the scan >>>>> should start from head to foot. >>>>> >>>>> @David, if I need to reverse, how to achieve that by your DICOM reader? >>>>> >>>>> Thanks >>>>> Liu Peng >>>>> >>>> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Tue Aug 29 20:05:03 2017 From: tjlp at netease.com (Liu_tj) Date: Wed, 30 Aug 2017 08:05:03 +0800 (CST) Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> <86ac2d3.1.15e2b83853a.Coremail.tjlp@netease.com> <3d3eba3f.9.15e2cff8e60.Coremail.tjlp@netease.com> Message-ID: <4148bdf7.1a.15e3074a2d7.Coremail.tjlp@netease.com> Hi?David, 2 questions come up. 1. If I call reader->SetMemoryRowOrderToFileNative() before update() method, do I still need to use vtkDICOMToRAS? 2. If I update to the latest vtk-dicom version, do I still need to use reader->SetMemoryRowOrderToFileNative() and vtkDICOMToRAS? Thanks Liu Peng ?2017-08-29?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?29? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: Re: Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, If you apply vtkImageFlip to the image, then the matrix returned by reader->GetPatientMatrix() will not work with the image. I recommend that, at the very least, you try doing the following instead: 1) use reader->SetMemoryRowOrderToFileNative(), and 2) try using vtkDICOMToRAS instead of vtkImageFlip: https://github.com/dgobbi/vtk-dicom/blob/master/Source/vtkDICOMToRAS.h Also, if possible, update to the latest version of vtk-dicom. Cheers, - David On Tue, Aug 29, 2017 at 1:58 AM, Liu_tj wrote: Hi, David, Actually in my current code I use vtkImageFlip to flip the image data to solve the slice display orientation issue on coronal and saggital view as follow: vtkDICOMReader* reader = vtkDICOMReader::New(); reader->SetFileNames(vtkDICOMFilePaths); reader->Update(); vtkImageFlip* flip = vtkImageFlip::New(); flip->SetInputConnection(reader->GetOutputPort()); flip->SetFilteredAxis(2); flip->Update(); vtkImageData* imageData = flip->GetOutput(); Thanks Liu Peng ?2017-08-29?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?29? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, For vtk-dicom, that would actually be version 0.7.1 (the current version is 0.8.5). It is possible that you have run into this bug, which was fixed in 0.8.3: https://github.com/dgobbi/vtk-dicom/issues/132 The work-around for the bug is reader->SetMemoryRowOrderToFileNative(). See here for more info: http://dgobbi.github.io/vtk-dicom/doc/api/image_orientation.html Unfortunately, calling SetMemoryRowOrderToFileNative() doesn't work very well with vtkImageViewer or vtkImageViewer2, since these "viewer" classes insist on images that are in "bottom-to-top" order (DICOM images are natively in top-to-bottom order). However, if you use vtkImageActor or vtkImageSlice to display your images, then you can set the camera so that "up" is in the correct direction. The vtkDICOMReader uses ImageOrientationPatient (0020,0037) and ImagePositionPatient (0020,0032) to put the slices in order. These attributes are more reliable and more precise than PatientPosition (0018,5100). Cheers, - David On Mon, Aug 28, 2017 at 7:03 PM, Liu_tj wrote: Hi, David, I forgot to mention the verison. The VTK and vtk-DICOM version are both 7.1 Thanks Liu Peng ?2017-08-28?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?28? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, What versions of VTK and vtk-dicom you are using? - David On Mon, Aug 28, 2017 at 12:31 AM, Liu_tj wrote: Hi, David, As far as I know, in the RCS system, the direction of Z axis is from foot to head.So by default, the slice order in your dicom reader is consistent with the RCS system.When the reader sorts the slices, does it consider the Patient Postion tag(0080,5100)? Some doctors might use some DICOM tools which the slice order is from head to foot and get used to that. My code block for load slices is as follow: vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New(); vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length); for(int i = 0; i < aDICOMFilePaths->Length; i ++) { String^ filePath = aDICOMFilePaths[i]; const char* filePathByChars = MDKStringUtility::NStringToChars(filePath); vtkDICOMFilePaths->SetValue(i, filePathByChars); } vtkDICOMReader* reader = vtkDICOMReader::New(); vtkImageData* imageData = reader->GetOutput(); Thanks Liu Peng ?2017-08-28?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?28? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, The vtkDICOMReader sorts according to the Image Plane Module: http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part03/sect_C.7.6.2.html That is, the slices are sorted in a manner such that the VTK image data has a right-handed coordinate system (called an RCS in the link above). Sorting the slices to get an RCS means that sometimes the slices will be sorted the same as the InstanceNumber, and sometimes they will be sorted opposite to InstanceNumber, depending on the order in which scanner ordered the slices. You can perform the sorting yourself by calling reader->SortingOff(). If Sorting is Off, the reader will take the slices in the same order as the vtkStringArray that you passed to reader->SetFileNames(). If you send me the block of code where you set up and call the reader, then I might be able to provide more help. Don't forget to also say what versions of VTK and vtk-dicom you are using. Cheers, - David On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: Hi, I have a question about the DICOM slice order. I use the DICOM reader by David Gobbi to read the slice series to vtkImageData. And I found that the oder is the same as the order by DICOM instanceNumber tag. However, some doctors tell me that the order should be reversed because the scan should start from head to foot. @David, if I need to reverse, how to achieve that by your DICOM reader? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From landinghere at 163.com Tue Aug 29 21:33:05 2017 From: landinghere at 163.com (landings) Date: Tue, 29 Aug 2017 18:33:05 -0700 (MST) Subject: [vtkusers] How to insert integer tuples into vtkIntArray? In-Reply-To: References: <1504011857886-5744619.post@n5.nabble.com> Message-ID: <1504056785972-0.post@n5.nabble.com> Many thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tjlp at netease.com Tue Aug 29 21:44:31 2017 From: tjlp at netease.com (Liu_tj) Date: Wed, 30 Aug 2017 09:44:31 +0800 (CST) Subject: [vtkusers] What ditermines whether the slice order should be reversed? In-Reply-To: References: <15071ae9.5.15e2491b0d0.Coremail.tjlp@netease.com> <40fe010a.5.15e278a0b1a.Coremail.tjlp@netease.com> <86ac2d3.1.15e2b83853a.Coremail.tjlp@netease.com> <3d3eba3f.9.15e2cff8e60.Coremail.tjlp@netease.com> <4148bdf7.1a.15e3074a2d7.Coremail.tjlp@netease.com> Message-ID: <5db0173b.1b.15e30cfb20c.Coremail.tjlp@netease.com> Hi, David, Thanks. I will try it. Also thanks for the great vtk-dicom component again. Liu Peng ?2017-08-30?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?30? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: Re: Re: Re: What ditermines whether the slice order should be reversed? On Tue, Aug 29, 2017 at 6:05 PM, Liu_tj wrote: Hi?David, 2 questions come up. 1. If I call reader->SetMemoryRowOrderToFileNative() before update() method, do I still need to use vtkDICOMToRAS? Yes, if you are using vtkImageViewer (or vtkImageViewer2). If you do not use vtkDICOMToRAS, then vtkImageViewer will show the image upside-down. 2. If I update to the latest vtk-dicom version, do I still need to use reader->SetMemoryRowOrderToFileNative() and vtkDICOMToRAS? No. Again, I'm assuming that you are using vtkImageViewer2. - David ?2017-08-29?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?29? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: Re: Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, If you apply vtkImageFlip to the image, then the matrix returned by reader->GetPatientMatrix() will not work with the image. I recommend that, at the very least, you try doing the following instead: 1) use reader->SetMemoryRowOrderToFileNative(), and 2) try using vtkDICOMToRAS instead of vtkImageFlip: https://github.com/dgobbi/vtk-dicom/blob/master/Source/vtkDICOMToRAS.h Also, if possible, update to the latest version of vtk-dicom. Cheers, - David On Tue, Aug 29, 2017 at 1:58 AM, Liu_tj wrote: Hi, David, Actually in my current code I use vtkImageFlip to flip the image data to solve the slice display orientation issue on coronal and saggital view as follow: vtkDICOMReader* reader = vtkDICOMReader::New(); reader->SetFileNames(vtkDICOMFilePaths); reader->Update(); vtkImageFlip* flip = vtkImageFlip::New(); flip->SetInputConnection(reader->GetOutputPort()); flip->SetFilteredAxis(2); flip->Update(); vtkImageData* imageData = flip->GetOutput(); Thanks Liu Peng ?2017-08-29?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?29? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, For vtk-dicom, that would actually be version 0.7.1 (the current version is 0.8.5). It is possible that you have run into this bug, which was fixed in 0.8.3: https://github.com/dgobbi/vtk-dicom/issues/132 The work-around for the bug is reader->SetMemoryRowOrderToFileNative(). See here for more info: http://dgobbi.github.io/vtk-dicom/doc/api/image_orientation.html Unfortunately, calling SetMemoryRowOrderToFileNative() doesn't work very well with vtkImageViewer or vtkImageViewer2, since these "viewer" classes insist on images that are in "bottom-to-top" order (DICOM images are natively in top-to-bottom order). However, if you use vtkImageActor or vtkImageSlice to display your images, then you can set the camera so that "up" is in the correct direction. The vtkDICOMReader uses ImageOrientationPatient (0020,0037) and ImagePositionPatient (0020,0032) to put the slices in order. These attributes are more reliable and more precise than PatientPosition (0018,5100). Cheers, - David On Mon, Aug 28, 2017 at 7:03 PM, Liu_tj wrote: Hi, David, I forgot to mention the verison. The VTK and vtk-DICOM version are both 7.1 Thanks Liu Peng ?2017-08-28?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?28? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, What versions of VTK and vtk-dicom you are using? - David On Mon, Aug 28, 2017 at 12:31 AM, Liu_tj wrote: Hi, David, As far as I know, in the RCS system, the direction of Z axis is from foot to head.So by default, the slice order in your dicom reader is consistent with the RCS system.When the reader sorts the slices, does it consider the Patient Postion tag(0080,5100)? Some doctors might use some DICOM tools which the slice order is from head to foot and get used to that. My code block for load slices is as follow: vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New(); vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length); for(int i = 0; i < aDICOMFilePaths->Length; i ++) { String^ filePath = aDICOMFilePaths[i]; const char* filePathByChars = MDKStringUtility::NStringToChars(filePath); vtkDICOMFilePaths->SetValue(i, filePathByChars); } vtkDICOMReader* reader = vtkDICOMReader::New(); vtkImageData* imageData = reader->GetOutput(); Thanks Liu Peng ?2017-08-28?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?08?28? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: What ditermines whether the slice order should be reversed? Hi Liu Peng, The vtkDICOMReader sorts according to the Image Plane Module: http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part03/sect_C.7.6.2.html That is, the slices are sorted in a manner such that the VTK image data has a right-handed coordinate system (called an RCS in the link above). Sorting the slices to get an RCS means that sometimes the slices will be sorted the same as the InstanceNumber, and sometimes they will be sorted opposite to InstanceNumber, depending on the order in which scanner ordered the slices. You can perform the sorting yourself by calling reader->SortingOff(). If Sorting is Off, the reader will take the slices in the same order as the vtkStringArray that you passed to reader->SetFileNames(). If you send me the block of code where you set up and call the reader, then I might be able to provide more help. Don't forget to also say what versions of VTK and vtk-dicom you are using. Cheers, - David On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj wrote: Hi, I have a question about the DICOM slice order. I use the DICOM reader by David Gobbi to read the slice series to vtkImageData. And I found that the oder is the same as the order by DICOM instanceNumber tag. However, some doctors tell me that the order should be reversed because the scan should start from head to foot. @David, if I need to reverse, how to achieve that by your DICOM reader? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at cascadeacoustic.com Tue Aug 29 23:58:03 2017 From: mark at cascadeacoustic.com (Mark DeArman) Date: Tue, 29 Aug 2017 22:58:03 -0500 Subject: [vtkusers] Activiz 7.1.1 Message-ID: <798bd98642b747d0a61073f719afddb5@cascadeacoustic.com> I have finished my build of the latest Activiz source against VTK-7.1.1 Visual Studio 2013 Generator Intel Compiler 16.0 Generator with .NET 4.0 CSC compiler. I made a number of slight changes to mummy, vtk, and activiz, and there are plenty of issues surrounding updating the mummy wrapping config, to still be tested. I did successfully test a number of the examples with VS2017, although I have not yet updated the Examples in the repo. This time, I did use git through the process, so you can download the repos from github. https://github.com/dearman/activizdotnet https://github.com/dearman/mummy I will upload the VTK repo and our Activiz-WPF control in the next few days. The only real change to VTK if you are using the standard VS compilers and not icc, is that you need to fix the proj4 cmake so that it names the output 'proj4-7.1' and not 'proj4-7.1_d'. Let me know if there are any questions. Mark DeArman Cascade Acoustic Research http://www.cascadeacoustic.com (253) 200-5353 -------------- next part -------------- An HTML attachment was scrubbed... URL: From AdagioA at yandex.ru Wed Aug 30 08:35:03 2017 From: AdagioA at yandex.ru (Adagio) Date: Wed, 30 Aug 2017 05:35:03 -0700 (MST) Subject: [vtkusers] Vtktextactor problem In-Reply-To: <1503948987155-5744612.post@n5.nabble.com> References: <1503948987155-5744612.post@n5.nabble.com> Message-ID: <1504096503025-0.post@n5.nabble.com> Found some solution from previous topic. How to include vtkRenderingFreeType in the list of modules in the find_package(VTK) MODULES list? How to configure Cmake? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Wed Aug 30 15:38:09 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 30 Aug 2017 15:38:09 -0400 Subject: [vtkusers] Making custom data for a regular 3d voxel grid In-Reply-To: <47850.192.168.71.100.1504119330.squirrel@www2.tandar.cnea.gov.ar> References: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> <47850.192.168.71.100.1504119330.squirrel@www2.tandar.cnea.gov.ar> Message-ID: Daniel, Yes, the learning curve is high. But once you get the basics, you'll see that VTK has a consistent architecture. So learning a few concepts will go a long way. I suggest you work your way through the new VTK Examples: https://lorensen.github.io/VTKExamples/site/Cxx/ You can build them all, or one at a time. Making small changes to a working example is great way to learn a new "language." For the most part, the examples have a consistent style and flow. Welcome to VTK, Bill On Wed, Aug 30, 2017 at 2:55 PM, Daniel Minsky wrote: > Hi, > many thanks. I could manage to get the volumetric image with your help and other mailing list members. The > VTK lerning curve seems to be very hard. > Kind regards, > Daniel > > >> Take a look at this example: >> https://lorensen.github.io/VTKExamples/site//Cxx/Images/ImageImport/ >> >> Note the use of SetInputData rather that SetInputConnection. >> >> Bill >> >> On Tue, Aug 29, 2017 at 1:20 PM, Daniel Minsky >> wrote: >>> Dear all, >>> >>> I am very new to VTK, I could follow the C++ examples to read an image from >>> disk, however I would like to generate the image inside my program with some >>> voxel data coming from other object in my code. >>> >>> I would like to generate a vtkImageData with a regular 3d voxel grid values. >>> I do have all the unsigned_char 100x200x40 voxels in a unsigned char array. >>> All voxels are cubic with 1cm side. >>> >>> How do I feed the vtkImageData object with my data array? >>> >>> How do I use the vtkImageData? The vtkImageData does not have the >>> GetOutputPort() method to feed a Mapper and I am very confused about the >>> correct pipeline. >>> >>> My final goal is to make a 3d image of the data within an upper and lower >>> thresholds and an arbitrary plane slice. >>> >>> Kind regards, >>> >>> Daniel >>> >>> -- >>> Dr. Daniel Minsky >>> Investigador CONICET - CNEA >>> Departamento de F?sica >>> Centro At?mico Constituyentes - Comisi?n Nacional de Energ?a At?mica >>> Av. Gral. Paz 1499 (B1650KNA) San Mart?n - Pcia. de Buenos Aires - Argentina >>> Tel: +54 11 6772 7913 >>> Fax: +54 11 6772 7121 >>> e-mail: minsky at tandar.cnea.gov.ar >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 lasso at queensu.ca Wed Aug 30 21:30:00 2017 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 31 Aug 2017 01:30:00 +0000 Subject: [vtkusers] Making custom data for a regular 3d voxel grid In-Reply-To: References: <0ba0d613-da5c-dc9a-d607-d1cb022f171f@tandar.cnea.gov.ar> <47850.192.168.71.100.1504119330.squirrel@www2.tandar.cnea.gov.ar> Message-ID: To learn VTK, I would also strongly recommend to read the VTK textbook, cover to cover, a few times. It is available here: http://www.vtk.org/vtk-textbook/ Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Bill Lorensen Sent: Wednesday, August 30, 2017 3:38 PM To: Daniel Minsky ; VTK Users Subject: Re: [vtkusers] Making custom data for a regular 3d voxel grid Daniel, Yes, the learning curve is high. But once you get the basics, you'll see that VTK has a consistent architecture. So learning a few concepts will go a long way. I suggest you work your way through the new VTK Examples: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2F&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=oiB65DtMLDTU%2F22WNdJ%2FfpPOkmM%2BdgwRuFjQX4rFkQQ%3D&reserved=0 You can build them all, or one at a time. Making small changes to a working example is great way to learn a new "language." For the most part, the examples have a consistent style and flow. Welcome to VTK, Bill On Wed, Aug 30, 2017 at 2:55 PM, Daniel Minsky wrote: > Hi, > many thanks. I could manage to get the volumetric image with your help > and other mailing list members. The VTK lerning curve seems to be very hard. > Kind regards, > Daniel > > >> Take a look at this example: >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore >> nsen.github.io%2FVTKExamples%2Fsite%2F%2FCxx%2FImages%2FImageImport%2 >> F&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f >> 6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sda >> ta=Bj%2Ff%2Bc8AIpCuVV9%2FdtrtqLUhl%2FfFc%2BKytwnTN42END8%3D&reserved= >> 0 >> >> Note the use of SetInputData rather that SetInputConnection. >> >> Bill >> >> On Tue, Aug 29, 2017 at 1:20 PM, Daniel Minsky >> wrote: >>> Dear all, >>> >>> I am very new to VTK, I could follow the C++ examples to read an >>> image from disk, however I would like to generate the image inside >>> my program with some voxel data coming from other object in my code. >>> >>> I would like to generate a vtkImageData with a regular 3d voxel grid values. >>> I do have all the unsigned_char 100x200x40 voxels in a unsigned char array. >>> All voxels are cubic with 1cm side. >>> >>> How do I feed the vtkImageData object with my data array? >>> >>> How do I use the vtkImageData? The vtkImageData does not have the >>> GetOutputPort() method to feed a Mapper and I am very confused about >>> the correct pipeline. >>> >>> My final goal is to make a 3d image of the data within an upper and >>> lower thresholds and an arbitrary plane slice. >>> >>> Kind regards, >>> >>> Daniel >>> >>> -- >>> Dr. Daniel Minsky >>> Investigador CONICET - CNEA >>> Departamento de F?sica >>> Centro At?mico Constituyentes - Comisi?n Nacional de Energ?a At?mica >>> Av. Gral. Paz 1499 (B1650KNA) San Mart?n - Pcia. de Buenos Aires - >>> Argentina >>> Tel: +54 11 6772 7913 >>> Fax: +54 11 6772 7121 >>> e-mail: minsky at tandar.cnea.gov.ar >>> >>> >>> _______________________________________________ >>> Powered by >>> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&d >>> ata=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6% >>> 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdat >>> a=%2B1Vj127dEv3IpeVL8tejVG3QLkLAMGS1zUeCZTIlAOw%3D&reserved=0 >>> >>> Visit other Kitware open-source projects at >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww. >>> kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40qu >>> eensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4ef >>> b2838b925c%7C1%7C0%7C636397186987547234&sdata=GAItA4LRMgAHVne%2FLLBv >>> 2OPmlCrADqfzF91W31hIGG4%3D&reserved=0 >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww. >>> vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab >>> 68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0 >>> %7C636397186987547234&sdata=JGLDIHOgk9V%2BrP2UWVTDVmuqJ1hXX6brzg%2FX >>> Ft%2B3qlw%3D&reserved=0 >>> >>> Search the list archives at: >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmark >>> mail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.c >>> a%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b9 >>> 25c%7C1%7C0%7C636397186987547234&sdata=qwKMUqNKbR3vfKEdsIk9WlswVcYl6 >>> %2BSSliNpEQb3iLo%3D&reserved=0 >>> >>> Follow this link to subscribe/unsubscribe: >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpubl >>> ic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo% >>> 40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582 >>> c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=4qF14Xjq5oo%2FJMxI >>> AQdLoMKbORB1Y3aZIsFTV%2BfOUdE%3D&reserved=0 >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> > > -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=%2B1Vj127dEv3IpeVL8tejVG3QLkLAMGS1zUeCZTIlAOw%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=GAItA4LRMgAHVne%2FLLBv2OPmlCrADqfzF91W31hIGG4%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=JGLDIHOgk9V%2BrP2UWVTDVmuqJ1hXX6brzg%2FXFt%2B3qlw%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=qwKMUqNKbR3vfKEdsIk9WlswVcYl6%2BSSliNpEQb3iLo%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=4qF14Xjq5oo%2FJMxIAQdLoMKbORB1Y3aZIsFTV%2BfOUdE%3D&reserved=0 From ajaygkumar16 at gmail.com Wed Aug 30 23:20:53 2017 From: ajaygkumar16 at gmail.com (Ajay Kumar G) Date: Thu, 31 Aug 2017 12:20:53 +0900 Subject: [vtkusers] Unable to COnfigure VTK 8.0 with Oculus Libraries Message-ID: Hello All, I am trying to use VTK 8.0 to render into Oculus, But I am unable to succeed in this regard. Other sample projects from VTK 8.0 are working good. But files related to Oculus causing issue. If i include "vtkOculusRenderWindow" I am getting like below. LNK2019 unresolved external symbol main referenced in function "int __cdecl invoke_main(void)" Could anyone please explain to me how to integrate Oculus Libraries. regards, Ajay -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andx_roo at live.com Thu Aug 31 00:53:53 2017 From: Andx_roo at live.com (Andaharoo) Date: Wed, 30 Aug 2017 21:53:53 -0700 (MST) Subject: [vtkusers] Double error check in vtkImageData? Message-ID: <1504155233652-0.post@n5.nabble.com> In vtkImageData, GetScalarPointer(x, y, z) error checks by checking if the coordinates are in the bounds of the image. It then calls GetArrayPointer(int[]) which error checks again (with identical code) which finally returns the results. What's the reason for this? Is this a mistake? Seems to me the first error check is not needed. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From elvis.stansvik at orexplore.com Thu Aug 31 03:00:13 2017 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 31 Aug 2017 09:00:13 +0200 Subject: [vtkusers] Double error check in vtkImageData? In-Reply-To: <1504155233652-0.post@n5.nabble.com> References: <1504155233652-0.post@n5.nabble.com> Message-ID: I wouldn't call it a mistake, just regular defensive programming. Neither function is documented as doing any bounds checking, so I would say that the author of GetScalarPointer was right in checking the args, if the intention was for that function to provide checking as an undocumented perk, as the checking done by GetArrayPointer is not part of its contract. Whether it should be changed for performance reasons I'll leave to the heavyweights on this list :) Elvis Den 31 aug. 2017 6:54 fm skrev "Andaharoo" : In vtkImageData, GetScalarPointer(x, y, z) error checks by checking if the coordinates are in the bounds of the image. It then calls GetArrayPointer(int[]) which error checks again (with identical code) which finally returns the results. What's the reason for this? Is this a mistake? Seems to me the first error check is not needed. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Aug 31 07:49:55 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 31 Aug 2017 07:49:55 -0400 Subject: [vtkusers] Unable to COnfigure VTK 8.0 with Oculus Libraries In-Reply-To: References: Message-ID: Oculus changed their SDK in a way that breaks older code. I have not had the time to work out a solution but if you track it down please let me know. In the meantime I believe VTK can use the oculus through steamvr. On Wed, Aug 30, 2017 at 11:20 PM, Ajay Kumar G wrote: > Hello All, > > I am trying to use VTK 8.0 to render into Oculus, > But I am unable to succeed in this regard. > > Other sample projects from VTK 8.0 are working good. > But files related to Oculus causing issue. > > If i include "vtkOculusRenderWindow" I am getting like below. > LNK2019 unresolved external symbol main referenced in function "int > __cdecl invoke_main(void)" > > Could anyone please explain to me how to integrate Oculus Libraries. > > regards, > Ajay > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Thu Aug 31 10:24:06 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 31 Aug 2017 14:24:06 +0000 Subject: [vtkusers] Announce: vtk 8.0.1 released! Message-ID: The VTK maintenance team is happy to announce a new patch release for VTK 8.0. You can find the source, data and documentation tarballs here: http://www.vtk.org/download See detailed release notes on the Kitware blog: https://blog.kitware.com/vtk-8-0-1-released/ Please try this version of VTK and report any issues to the list or the bug tracker . We hope you enjoy this release of VTK! As always, contact Kitware and the mailing lists for assistance. Thanks, VTK Maintenance Team ? -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From simakov.w at gmail.com Thu Aug 31 13:52:59 2017 From: simakov.w at gmail.com (=?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KHQuNC80LDQutC+0LI=?=) Date: Thu, 31 Aug 2017 20:52:59 +0300 Subject: [vtkusers] Add checkbox? In-Reply-To: References: Message-ID: Thank you. I took advantage of your advice! 2017-08-28 23:15 GMT+03:00 Bill Lorensen : > You can add a button: > https://lorensen.github.io/VTKExamples/site/Cxx/ > Interaction/EllipticalButton/ > https://lorensen.github.io/VTKExamples/site/Cxx/Widgets/ > TexturedButtonWidget/ > > > > On Mon, Aug 28, 2017 at 12:53 PM, ??????? ??????? > wrote: > > Good day. > > How can I add a checkbox to vtkRenderWindow? > > And in general, is there such an element? > > Thank you! > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simakov.w at gmail.com Thu Aug 31 13:56:02 2017 From: simakov.w at gmail.com (=?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KHQuNC80LDQutC+0LI=?=) Date: Thu, 31 Aug 2017 20:56:02 +0300 Subject: [vtkusers] MFC CButton in VTK window. Message-ID: Hello! I use VTK in the MFC project ... Whether prompt it is possible to add somehow on window vtk CButton? And handle the button click? With the fact that the window is created in another thread ... Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayavardhanravi at outlook.com Thu Aug 31 17:14:27 2017 From: jayavardhanravi at outlook.com (Jay) Date: Thu, 31 Aug 2017 14:14:27 -0700 (MST) Subject: [vtkusers] Is it possible to create a flexible cylinder Message-ID: <1504214067543-0.post@n5.nabble.com> Would it be possible to create a flexible cylinder just like a water tube in VTK. Does the VTK library have any such supporting features. I understand that the question is very broad, but I am looking whether it is possible build such a system in anyway using VTK. I have some previous experience trying to build such a flexible water tube kind of model by connect the VTK with the Bullet Physics Library, but I am looking for other ways. Any ideas or suggestions would be helpful. Regards, Jay -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Thu Aug 31 19:40:33 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 1 Sep 2017 08:40:33 +0900 Subject: [vtkusers] Is it possible to create a flexible cylinder In-Reply-To: <1504214067543-0.post@n5.nabble.com> References: <1504214067543-0.post@n5.nabble.com> Message-ID: Hi Jay, This example by Bill Lorensen might be helpful for that purpose. https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/TubesFromSplines/ Regards 2017-09-01 6:14 GMT+09:00 Jay : > Would it be possible to create a flexible cylinder just like a water tube in > VTK. Does the VTK library have any such supporting features. > > I understand that the question is very broad, but I am looking whether it is > possible build such a system in anyway using VTK. > > I have some previous experience trying to build such a flexible water tube > kind of model by connect the VTK with the Bullet Physics Library, but I am > looking for other ways. > > Any ideas or suggestions would be helpful. > > Regards, > Jay > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From kayarre at gmail.com Thu Aug 31 20:26:58 2017 From: kayarre at gmail.com (Kurt Sansom) Date: Thu, 31 Aug 2017 17:26:58 -0700 Subject: [vtkusers] building python wrappers question. Message-ID: Hi, I am trying to run some code that is building a wrapper for python. I am getting this error. import libvtkboolPython as vtkbool ImportError: /home/ksansom/code/cpp/vtk/vtkbool/build/libvtkboolPython.so: undefined symbol: PyVTKObject_Delete Can anyone point me in the direction to solving this? ~Kurt -- Kurt Sansom -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Aug 31 20:48:00 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 31 Aug 2017 18:48:00 -0600 Subject: [vtkusers] building python wrappers question. In-Reply-To: References: Message-ID: Hi Sansom, You'll have to link to the vtkWrappingPythonCore library. - David On Thu, Aug 31, 2017 at 6:26 PM, Kurt Sansom wrote: > Hi, > I am trying to run some code that is building a wrapper for python. > > I am getting this error. > > import libvtkboolPython as vtkbool > > ImportError: /home/ksansom/code/cpp/vtk/vtkbool/build/libvtkboolPython.so: > undefined symbol: PyVTKObject_Delete > > Can anyone point me in the direction to solving this? > > ~Kurt > > -- > Kurt Sansom > -------------- next part -------------- An HTML attachment was scrubbed... URL: