From waynezw0618 at gmail.com Mon Sep 1 00:07:21 2014 From: waynezw0618 at gmail.com (Zhang Wei) Date: Mon, 1 Sep 2014 12:07:21 +0800 Subject: [vtkusers] high quality plot Message-ID: Dear everyone: I notice nowadays it is very popular to create high quality plot with paraview and vtk for CFD. this plot really looks like silver. does anyone know how to create such plot? Thanks! cheers ---------------------------------------------- Zhang Wei waynezw0618 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 382B31E3-8009-44A4-A5E6-F1BCF7E53EC6.jpg Type: image/jpg Size: 59160 bytes Desc: not available URL: From biddisco at cscs.ch Mon Sep 1 02:57:11 2014 From: biddisco at cscs.ch (Biddiscombe, John A.) Date: Mon, 1 Sep 2014 06:57:11 +0000 Subject: [vtkusers] Timestep name In-Reply-To: References: Message-ID: <50320452A334BD42A5EC72BAD214509918DE7772@MBX110.d.ethz.ch> https://hpcforge.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pv-echam/pv-echam.git;a=tree;h=5f8410b1879178a4a114a279b8bd9463825e507d;hb=5f8410b1879178a4a114a279b8bd9463825e507d Chris, If you do as Ken says and use a numeric time, then .... There is some very old code in that repo linked above which includes a JulianDayToText class. I used to use this in paraview to take netCDF times and convert them to a string, then add this to my plots with a text source object in paraview which displayed the string. The code is ancient, and you should not use the netCDF stuff as this was superseded some time back by the one in vtk/paraview. However the text source might give you an idea of how to do what you want, (I just looked in my archive and saw this ftp://ftp.cscs.ch/out/biddisco/netCDF/SO2-1950-2050-5yr-2.avi which was made in 2009 and uses the date/time source to display a simple yyyy/mm/dd dormat time. JB From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Moreland, Kenneth Sent: 25 August 2014 14:13 To: Chris Marsh; vtkusers at vtk.org Subject: Re: [vtkusers] Timestep name Chris, In the pvd file, which is just an XML metadata file, you will see tags named DataSet that point to the vtu files. The DataSet tag supports a timestep attribute that takes a number that represents the time value. These time values do not have to be integers and do not have to be regularly spaced. However, the timestep attribute does have to be a number. You will have to convert your time to some seconds/hours/days from some reference point. -Ken Kenneth Moreland Sandia National Laboratories email: kmorel at sandia.gov phone: (505) 844-8919 web: http://www.sandia.gov/~kmorel ________________________________ From: vtkusers > on behalf of Chris Marsh > Sent: Friday, August 22, 2014 2:14 PM To: vtkusers at vtk.org Subject: [EXTERNAL] [vtkusers] Timestep name I have a timeseries of data that I am saving to a set of vtu files. These load in paraview nicely and play as an animation. However, each timestep corresponds to a date/time (e.g., Oct-01-2010 14:00:00) and I would like this to be displayed. For example, 'Timestep 758' isn't intuitive when dealing with realworld datetimes. I have tried making a pvd file, but it wasn't not clear how to rename a timestep. Is there a way of doing this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcplatt at dsl.pipex.com Mon Sep 1 04:53:16 2014 From: jcplatt at dsl.pipex.com (John Platt) Date: Mon, 1 Sep 2014 09:53:16 +0100 Subject: [vtkusers] TriangleArea() return the not correct value. References: <20140829.114115.128488439.asou@soum.co.jp> <20140829.151807.82067791.asou@soum.co.jp> Message-ID: <40FBEA6C32374177B1693F2CD36EA669@pafec5> Hi, It could be worth looking at "Miscalculating Area and Angles of a Needle-like Triangle" W. Kahan (24 March 2000) http://www.cs.berkeley.edu/~wkahan/Triangle.pdf for implementation of Heron's formula. HTH John. ----- Original Message ----- From: "Masato Asou" To: Cc: Sent: Friday, August 29, 2014 7:18 AM Subject: Re: [vtkusers] TriangleArea() return the not correct value. >I didn't aware about efficiency. > > I hope that I can choose whichever efficiency or quality. > Thanks. > -- > ASOU Masato > >> Note that there is a difference in efficiency, because Heron's formula >> requires applying sqrt() four times, while VTK's formula requires >> applying >> sqrt() only once. > >> It might be worthwhile to use both Heron's formula and the current VTK >> formula, with a discriminator to choose which based on the quality of the >> triangle. >> - David >> >> >> On Thu, Aug 28, 2014 at 9:10 PM, Cory Quammen >> wrote: >>> Masato, >>> >>> It looks like you are running into numerical precision problems >>> because two of your points are extremely close, almost close enough to >>> be indistinguishable by double precision. >>> >>> The inconsistencies that depend on the order the points are given are >>> caused by which sides are considered in the cross product and area >>> calculation. Heron's formula, which I wasn't aware of, seems to >>> eliminate this inconsistency. We should consider using this in VTK, in >>> particular the numerically more stable implementation: >>> http://en.wikipedia.org/wiki/Heron's_formula#Numerical_stability >>> >>> I don't know if my answer helps, but thank you for pointing out Heron's >>> formula. >>> >>> Thanks, >>> Cory >>> >>> On Thu, Aug 28, 2014 at 10:41 PM, Masato Asou wrote: >>>> Hi, >>>> >>>> I have a probrem about vtkTriangle::TriangleArea(). I use VTK-5.10.1. >>>> >>>> The triangle to be calculated is what one side is very short. >>>> >>>> I calculate the area of the triangle in vtkTriangle::TriangleArea(), >>>> the result are different to that using the Heron's formula and cross >>>> products. I also calculate tha area is regarded as a rectanglar >>>> triangle, >>>> this value is also different vtkTriangle::TriangleArea() >>>> >>>> In addition, vtkTriangle::TriangleArea() return a different value when >>>> change the order of the vertices. >>>> >>>> This problem be resolved? >>>> >>>> My system as: >>>> >>>> $ cat /etc/redhat-release >>>> CentOS release 5.6 (Final) >>>> $ uname -m -r -s -v >>>> Linux 2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64 >>>> >>>> My program as below: >>>> >>>> $ cat triangle.cpp >>>> #include >>>> #include >>>> using namespace std; >>>> #include >>>> >>>> double >>>> lineLength(const double p0[3], const double p1[3]) >>>> { >>>> double len2 = 0.0; >>>> >>>> for(int i = 0; i < 3; i++) { >>>> len2 += (p0[i] - p1[i]) * (p0[i] - p1[i]); >>>> } >>>> return sqrt(len2); >>>> } >>>> >>>> double >>>> CrossProduct(double p1[3], double p2[3], double p3[3]) >>>> { >>>> double a[3], b[3], o[3], v[3]; >>>> >>>> // Create the vector a and b. >>>> a[0] = p2[0] - p1[0]; >>>> a[1] = p2[1] - p1[1]; >>>> a[2] = p2[2] - p1[2]; >>>> b[0] = p3[0] - p1[0]; >>>> b[1] = p3[1] - p1[1]; >>>> b[2] = p3[2] - p1[2]; >>>> >>>> // Calculate the cross product of vector a and b. >>>> o[0] = 0.0; >>>> o[1] = 0.0; >>>> o[2] = 0.0; >>>> v[0] = (a[1] * b[2]) - (a[2] * b[1]); >>>> v[1] = (a[2] * b[0]) - (a[0] * b[2]); >>>> v[2] = (a[0] * b[1]) - (a[1] * b[0]); >>>> return fabs(lineLength(o, v)) / 2; >>>> } >>>> >>>> double >>>> HeronsFormula(double p1[3], double p2[3], double p3[3]) >>>> { >>>> double a = lineLength(p1, p2); >>>> double b = lineLength(p2, p3); >>>> double c = lineLength(p3, p1); >>>> >>>> return sqrt((a+b+c) * (-a+b+c) * (a-b+c) * (a+b-c)) * 0.25; >>>> } >>>> >>>> int >>>> main(void) >>>> { >>>> double A[3] = {-3.58117425311239667707, -3.58117425311239667707, >>>> 1.0}; >>>> double B[3] = {-3.04058712655619833853, -3.04058712655619833853, >>>> 0.95}; >>>> double C[3] = {-3.04058712655619833853, -3.04058712655619789444, >>>> 0.95}; >>>> double a = lineLength(A, B); >>>> double b = lineLength(B, C); >>>> double c = lineLength(C, A); >>>> >>>> cout << fixed << setprecision(20); >>>> cout << "TriangleArea(A, B, C): " << vtkTriangle::TriangleArea(A, >>>> B, C) << endl; >>>> cout << "TriangleArea(B, C, A): " << vtkTriangle::TriangleArea(B, >>>> C, A) << endl; >>>> cout << "CrossProduct(A, B, C): " << CrossProduct(A, B, C) << >>>> endl; >>>> cout << "CrossProduct(B, C, A): " << CrossProduct(B, C, A) << >>>> endl; >>>> cout << "HeronsFormula(A, B, C): " << HeronsFormula(A, B, C) << >>>> endl; >>>> cout << "HeronsFormula(B, C, A): " << HeronsFormula(B, C, A) << >>>> endl; >>>> cout << "RectangularTriangle: " << (a * b / 2) << endl; >>>> cout << "line length: a: " << a << ", b: " << b << ", c: " << c << >>>> endl; >>>> >>>> return 0; >>>> } >>>> $ g++ -g -I../../src -I/home/asou/freesw/vtk-5.10.1/include/vtk-5.10 >>>> triangle.cpp -Xlinker -rpath -Xlinker >>>> ../../src -L/home/asou/freesw/vtk-5.10.1/lib/vtk-5.10 -lvtkCommon -lvtkWidgets >>>> -Xlinker -rpath -Xlinker /home/asou/freesw/vtk-5.10.1/lib/vtk-5.10 >>>> In file included from >>>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/strstream:51, >>>> from >>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkIOStream.h:108, >>>> from >>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkSystemIncludes.h:40, >>>> from >>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkIndent.h:24, >>>> from >>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkObjectBase.h:43, >>>> from >>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkObject.h:41, >>>> from >>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkCell.h:40, >>>> from >>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkTriangle.h:23, >>>> from triangle.cpp:4: >>>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: >>>> warning: #warning This file includes at least one deprecated or >>>> antiquated header. Please consider using one of the 32 headers found in >>>> section 17.4.1.2 of the C++ standard. Examples include substituting the >>>> header for the header for C++ includes, or instead >>>> of the deprecated header . To disable this warning >>>> use -Wno-deprecated. >>>> $ ./a.out >>>> TriangleArea(A, B, C): 0.00000000526835606386 >>>> TriangleArea(B, C, A): 0.00000000000000009839 >>>> CrossProduct(A, B, C): 0.00000000000000011168 >>>> CrossProduct(B, C, A): 0.00000000000000012055 >>>> HeronsFormula(A, B, C): 0.00000000000000011252 >>>> HeronsFormula(B, C, A): 0.00000000000000011252 >>>> RectangularTriangle: 0.00000000000000017012 >>>> line length: a: 0.76613894483740641039, b: 0.00000000000000044409, c: >>>> 0.76613894483740674346 >>>> $ >>>> >>>> Thanks in advance any help or suggestions. >>>> -- >>>> ASOU Masato >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> 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 >>> >>> 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From flaviu2 at yahoo.com Mon Sep 1 08:52:15 2014 From: flaviu2 at yahoo.com (flaviu2) Date: Mon, 1 Sep 2014 05:52:15 -0700 (PDT) Subject: [vtkusers] Retrieve window/level Message-ID: <1409575935216-5728524.post@n5.nabble.com> I have an vtkImageReslice, which according this post: http://vtk.1045678.n5.nabble.com/A-new-way-to-look-at-images-td3352404.html can automatically adjust window/level by mouse motion after left button is pressed ... but how can I retrieve window/level values ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Retrieve-window-level-tp5728524.html Sent from the VTK - Users mailing list archive at Nabble.com. From cp.vtk.user at googlemail.com Mon Sep 1 10:12:08 2014 From: cp.vtk.user at googlemail.com (C P) Date: Mon, 1 Sep 2014 16:12:08 +0200 Subject: [vtkusers] No key events on MAC OSX Message-ID: Dear vtk users, there seems to be no keyboard event processing on MAC OSX. I checked this post here: http://vtk.org/Bug/view.php?id=2025 but without success. Here is the content of my CMakeLists.txt file: -------------------------------------------------------------------------------------------------------------- project(rec3dapp) cmake_minimum_required(VERSION 2.6) find_package(VTK) find_package(OpenCV) FILE(GLOB CPP_FILES *.cpp) FILE(GLOB REC3D_CPP_FILES ../rec3d/*.cpp) FILE(GLOB REC3D_VIS_CPP_FILES ../rec3dvis/*.cpp) FILE(GLOB VTKVIEW_CPP_FILES ../vtkview/*.cpp) include(${VTK_USE_FILE}) include_directories( .. ) IF(APPLE) SET(EXECUTABLE_FLAG MACOSX_BUNDLE) ENDIF(APPLE) link_libraries(${VTK_LIBRARIES} ${OpenCV_LIBS}) add_executable(rec3dapp MACOSX_BUNDLE @CPP_FILES@ @REC3D_CPP_FILES@ @REC3D_VIS_CPP_FILES@ @VTKVIEW_CPP_FILES@ ) -------------------------------------------------------------------------------------------------------------- Do you have any suggestions? Thanks a lot. Best regards Chavdar -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Sep 1 21:08:59 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 1 Sep 2014 21:08:59 -0400 Subject: [vtkusers] The color of the triangle mesh is affected after I call SetScalars In-Reply-To: References: Message-ID: In fact, you CAN store the color and weight information at the same time, as long as they have different names. I don't know what the PLY writer names its scalars, nor do I know what the vtkDijkstraGraphGeodesicPath names its scalars outputs. If the reader and filter do not assign a name to their output scalar arrays, then indeed the colors from the PLY writer will be overwritten by the scalars from vtkDijkstraGraphGeodesicPath. Is it possible to post a small, self-contained piece of code that shows what you are trying to do, and a small representative PLY file? That will make it easier to guide you on what needs to be done. Thanks, Cory On Wed, Aug 27, 2014 at 11:19 PM, Jogging Song wrote: > Thanks for your timely reply, Cory. > After reading some code of VTK, maybe I find the reason. When VTK reads one > ply mesh with color, the color information is stored in scalars field of > vtkPointData. I hope to find the shortest path with weight on the mesh. > In the implementation of vtkDijkstraGraphGeodesicPath, the weight is > obtained from scalar field of the vtkPolyData. > So when I set the scalars, the color information of the mesh is overwritten. > I can only store color information or weight information, but not > simultaneously. > > Is there one way to use the color information and weight information at the > same time? > > Regards > Jogging Song > > > On Wed, Aug 27, 2014 at 9:01 PM, Cory Quammen > wrote: >> >> Jogging, >> >> Without seeing any code, it's tough to tell you where to make the >> change. I'll assume you have a vtkMapper (or subclass) somewhere in >> your code, and I'll assume C++. To disable coloring by the scalar >> value, call >> >> mapper->ScalarVisibilityOff(); >> >> I hope that helps, >> Cory >> >> On Wed, Aug 27, 2014 at 4:03 AM, Jogging Song >> wrote: >> > Hi, all >> > >> > I read one triangle mesh file from the disk. The mesh itself contains >> > color >> > information. I can render the mesh correctly. The color of rendered >> > mesh is >> > from the color information of the mesh. To use the scalars, I call the >> > function SetScalars. The color of the rendered mesh is changed and now >> > the >> > color is from scalars. However I hope to use the color of the mesh. I >> > can >> > find the answer from the internet. Can anyone help me? >> > >> > Regards >> > Jogging Song >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > > > From m.brehler at dkfz-heidelberg.de Tue Sep 2 04:46:22 2014 From: m.brehler at dkfz-heidelberg.de (Brehler, Michael) Date: Tue, 2 Sep 2014 10:46:22 +0200 Subject: [vtkusers] ThinPlateSpline regression In-Reply-To: References: <57EE86D11538B44096C712532DBB6C5A0109F370169B@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: <57EE86D11538B44096C712532DBB6C5A0109F370183C@DKFZEX01.ad.dkfz-heidelberg.de> Hi David, thank you for your reply. I found this (broken) example http://www.vtk.org/Wiki/VTK/Examples/Broken/QuadricSurfaceFitting which some time ago probably did what I want to do. I adjusted the main method to work with the VTK6 input and output and added the correct matrices to be freed: int main (int argc, char *argv[]) { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(argv[1]); reader->Update(); vtkPolyData* polydata = reader->GetOutput(); vtkPoints* points = polydata->GetPoints(); //fit a quadric surface int numberOfSamples = points->GetNumberOfPoints(); int numberOfVariables = 6; double **x = create_matrix (numberOfSamples, numberOfVariables); double **y = create_matrix ( numberOfSamples, 1 ); for(unsigned int i = 0; i < numberOfSamples; i++) { double p[3]; points->GetPoint(i,p); x[i][0] = pow(p[0],2); //x^2 x[i][1] = pow(p[1],2); //y^2 x[i][2] = p[0] * p[1]; //x*y x[i][3] = p[0]; // x x[i][4] = p[1]; //y x[i][5] = 1; // constant y[i][0] = p[2]; //z } double **m = create_matrix ( numberOfVariables, 1 ); vtkMath::SolveLeastSquares(numberOfSamples, x, numberOfVariables, y, 1, m); std::cout << "Solution is: " << std::endl; for(unsigned int i = 0; i < numberOfVariables; i++) { std::cout << m[i][0] << " "; } std::cout << std::endl; // create the quadric function definition vtkSmartPointer quadric = vtkSmartPointer::New(); quadric->SetCoefficients(m[0][0], m[1][0], 0, m[2][0], 0, 0, m[3][0], m[4][0], 0, m[5][0]); // sample the quadric function vtkSmartPointer sample = vtkSmartPointer::New(); sample->SetSampleDimensions(50,50,50); sample->SetImplicitFunction(quadric); double xmin = -5, xmax=5, ymin=-5, ymax=5, zmin=-5, zmax=5; sample->SetModelBounds(xmin, xmax, ymin, ymax, zmin, zmax); //create the 0 isosurface vtkSmartPointer contours = vtkSmartPointer::New(); contours->SetInputConnection(sample->GetOutputPort()); contours->GenerateValues(1, 1, 1); contours->Update(); vtkSmartPointer polyD = contours->GetOutput(); vtkSmartPointer surfaceWriter = vtkSmartPointer::New(); surfaceWriter->SetFileName("Quadratic.vtp"); surfaceWriter->SetInputData(polyD); surfaceWriter->Write(); free_matrix(x); free_matrix(y); free_matrix(m); return 0; } But using the input points from the example page the output is a elliptic cylinder centered around the input points, which is not the desired result. Could somebody tell me what went wrong? Best, Michael -----Urspr?ngliche Nachricht----- Von: David Gobbi [mailto:david.gobbi at gmail.com] Gesendet: Freitag, 29. August 2014 16:58 An: Brehler, Michael Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] ThinPlateSpline regression Hi Michael, No, I don't think that ThinPlateSplineTransform provides a way to do this. I see a ComputeBestFittingPlane() method in vtkDelaunay2D, but it is a protected method and, looking at the method that it uses, I don't think it computes the "best" plane, anyway. Hopefully other people who have used VTK to compute the best-fit plane can give you a better answer, but my suggestion is to search the internet for a method that computes the best plane via an eigenvalue decomposition (my suspicion is that for the best-fit plane, the eigenvector for the smallest eigenvalue is the normal of the plane, and the "origin" of the plane is the centre-of-mass). The vtkMath::Jacobi() function can compute the eigenvalues. - David On Fri, Aug 29, 2014 at 3:29 AM, Brehler, Michael wrote: > Hi, > > > > I am using VTK to find a best fitting hyperplane (or regression plane) > for a given 3D point cloud (polydata surface) and was wondering if the > ThinPlateSplineTransform could be of any help. Can I use an equally > distributed 'grid' of points to calculate the matching hyperplane with > the ThinPlateSplineTransform or is there a better way? > > > > Regards, > > Michael From christian.askeland at gmail.com Tue Sep 2 05:05:29 2014 From: christian.askeland at gmail.com (Christian Askeland) Date: Tue, 2 Sep 2014 11:05:29 +0200 Subject: [vtkusers] Fix Ubuntu 14.04 VTK 6.1 compiling issue In-Reply-To: References: Message-ID: Hi, I had the same issue today, on both VTK 6.1 and the current git HEAD. I use the NVidia driver version 343 (gl headers dated august 2014). However, a colleague of mine compiles VTK fine when using an older driver (331 / january 2014). I looked into the GL headers (/usr/include/GL/) and found that GLintptr now is in use in glxext.h, this was not the case in the previous version. My solution was to uncomment the define GLXEXT like this: // define GLX_GLXEXT_LEGACY to prevent glx.h to include glxext.h provided by // the system #define GLX_GLXEXT_LEGACY #include "GL/glx.h" #include "vtkgl.h" in file vtkXOpenGLRenderWindow.cpp which causes glext.h to be included in glxext.h, thus providing the missing type GLintptr. This seems like a better solution than including vtkgl.h before GL/glx.h, but I don't have the full picture here. Best Regards Christian Askeland SINTEF Medical Technology On Fri, Aug 29, 2014 at 9:49 AM, Severin Holzer-Graf wrote: > Hi, > > I faced the same compiling issue on Ubuntu 14.04 as mathew here: > http://www.vtk.org/pipermail/vtkusers/2014-August/084877.html > Compiling fails, because "GLsizeiptr has not been declared". > > The issue is that "vtkgl.h" is included *after* "GL/glx.h" which needs > the typedefs for the datatypes from "vtkgl.h". > I simply swapped the two lines and VTK compiles. Appended a patch that > shows the change. > > Interestingly on my ArchLinux system compiling VTK 6.1 works out of > the box and this was not necessary. I didn't further investigate that, > so I'm not sure if swapping the two lines is actually the correct fix. > > Best > Severin > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From safna.royal10 at gmail.com Tue Sep 2 05:33:46 2014 From: safna.royal10 at gmail.com (safna) Date: Tue, 2 Sep 2014 02:33:46 -0700 (PDT) Subject: [vtkusers] how to label a 3d point? In-Reply-To: <1409618375792-5728526.post@n5.nabble.com> References: <1409618375792-5728526.post@n5.nabble.com> Message-ID: <1409650426416-5728530.post@n5.nabble.com> I think you can use vtktextActor for labelling check this out: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/TextWidget -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-label-a-3d-point-tp5728526p5728530.html Sent from the VTK - Users mailing list archive at Nabble.com. From rolf.wester at ilt.fraunhofer.de Tue Sep 2 09:35:02 2014 From: rolf.wester at ilt.fraunhofer.de (Wester, Rolf) Date: Tue, 2 Sep 2014 13:35:02 +0000 Subject: [vtkusers] vtkGUISupportQtModule.h missing Message-ID: Hi, I'm trying to compile a Qt5 application using QVTKWidget on VS2013. I get the message: VTK-6.1.0\GUISupport\Qt\QVTKWidget.h(39): fatal error C1083: Datei (Include) kann nicht ge?ffnet werden: "vtkGUISupportQtModule.h": No such file or directory I cannot find the file "vtkGUISupportQtModule.h" in the VTK distribution (VTK-6.1.0.zip). I would be very appreciative for any help. Thank you in anticipation Rolf -- ------------------------------------------------- Dr. rer. nat. Rolf Wester Modellierung und Simulation Modelling and Simulation Fraunhofer-Institut f?r Lasertechnik ILT Steinbachstr. 15, 52074 Aachen, Germany Tel +49 241 8906-401 Fax +49 241 8906-121 rolf.wester at ilt.fraunhofer.de http://www.ilt.fraunhofer.de ------------------------------------------------- Besuchen Sie uns/Visit us: COMPOSITES EUROPE, 07.-09. Oktober 2014, D?sseldorf Fraunhofer-Gemeinschaftsstand Halle 8a/F20 Fakuma 2014, 14.-18. Oktober, Friedrichshafen ICALEO, 19.-23. Oktober 2014, San Diego Weitere Messen / see more trade shows -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Tue Sep 2 09:48:47 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 2 Sep 2014 09:48:47 -0400 Subject: [vtkusers] the pronlem of blending two volume by vtkImageBlend In-Reply-To: <12b735e1.51b5.1482c2b3112.Coremail.yuetian926@163.com> References: <12b735e1.51b5.1482c2b3112.Coremail.yuetian926@163.com> Message-ID: Can you send us a small sample output dataset? I am not sure about the values you are setting here unless I see the data. - Aashish On Sun, Aug 31, 2014 at 9:05 AM, Yuetian Liu wrote: > Hi vtkusers, > > I want to blend the two volumes by vtkImageBlend. And I use vtkMetaImageReader > to read two volumes(CT and MR) > > Then I use the vtkImageBlend to blend two volumes. And then I use the Ray > Casting Algorithm to render the two volumes > > after blending. But the result has one color. And it is not the result > that I want. My hoping result is that the CT volume is > > red and the MR volume was blue. > > How can I solve it. Please help me. And my code is attached. > > Thank you very much! > > Bset > Yuetian > > #include > #include > #include > #include > #include > #include > #include "vtkMetaImageReader.h" > #include > #include "vtkPiecewiseFunction.h" > #include "vtkColorTransferFunction.h" > #include "vtkVolumeProperty.h" > #include "vtkVolumeRayCastCompositeFunction.h" > #include "vtkVolumeRayCastMapper.h" > #include "vtkVolume.h" > #include "vtkImageCast.h" > #include > > int main ( int argc, char* argv[] ) > { > std::string input1Filename = argv[1]; > std::string input2Filename = argv[2]; > > vtkSmartPointerReader1 = > vtkSmartPointer::New(); > Reader1->SetFileName ( input1Filename.c_str() ); > > vtkSmartPointer jReader2 = > vtkSmartPointer::New(); > Reader2->SetFileName ( input2Filename.c_str() ); > vtkSmartPointer imgBlender = > vtkSmartPointer::New(); > imgBlender->SetOpacity( 0, 0.2 ); > imgBlender->SetOpacity( 1, 0.6 ); > imgBlender->AddInputConnection( Reader1->GetOutputPort() ); > imgBlender->AddInputConnection( Reader2->GetOutputPort() ); > > vtkSmartPointer< vtkImageCast> readerImageCast = > vtkSmartPointer< vtkImageCast>::New(); > readerImageCast->SetInputConnection(imgBlender->GetOutputPort()); > readerImageCast->SetOutputScalarTypeToUnsignedShort (); > readerImageCast->ClampOverflowOn(); > > vtkSmartPointer< vtkPiecewiseFunction> opacityTransferFunction = > vtkSmartPointer< vtkPiecewiseFunction>::New(); > opacityTransferFunction->AddPoint(20, 0.0); > opacityTransferFunction->AddPoint(255, 0.8); > vtkSmartPointer< vtkColorTransferFunction > colorTransferFunction = > vtkSmartPointer< vtkColorTransferFunction > ::New(); > colorTransferFunction->AddRGBPoint(0,0.9,0.7,0.5); > colorTransferFunction->AddRGBPoint(15,1,0.7,0.6); > colorTransferFunction->AddRGBPoint(255,1,0,0); > vtkSmartPointer volumeProperty = > vtkSmartPointer::New(); > volumeProperty->SetColor(colorTransferFunction); > volumeProperty->SetScalarOpacity(opacityTransferFunction); > volumeProperty->ShadeOn(); > volumeProperty->SetInterpolationTypeToLinear(); > volumeProperty->SetSpecular(0.1); > volumeProperty->SetSpecularPower(8); > volumeProperty->SetScalarOpacityUnitDistance(0.8919); > vtkSmartPointer compositeFunction = > vtkSmartPointer::New(); > vtkSmartPointer< vtkVolumeRayCastMapper> volumeMapper = > vtkSmartPointer< vtkVolumeRayCastMapper> ::New(); > volumeMapper->SetVolumeRayCastFunction(compositeFunction); > volumeMapper->SetInputConnection(readerImageCast->GetOutputPort()); > volumeMapper->SetNumberOfThreads(3); > vtkSmartPointer volume = > vtkSmartPointer::New(); > volume->SetMapper(volumeMapper); > volume->SetProperty(volumeProperty); > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > renderer->AddVolume(volume); > renderWindow->Render(); > renderWindowInteractor->Start(); > return EXIT_SUCCESS; > } > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From selcukcalli at gmail.com Tue Sep 2 09:53:39 2014 From: selcukcalli at gmail.com (=?UTF-8?Q?Selcuk_=C3=87ALLI?=) Date: Tue, 2 Sep 2014 16:53:39 +0300 Subject: [vtkusers] =?utf-8?q?3D_point_to_UnstructuredGrid=E2=80=8F?= Message-ID: Can we obtain an UnstructuredGrid from 3D point array with values that exceed a threshold? I want to apply mesh to 3D point array. Is it possible? What kind of filters/functions do we need to do this process? Best regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cdavid.tran at gmail.com Tue Sep 2 10:24:54 2014 From: cdavid.tran at gmail.com (eternallite2) Date: Tue, 2 Sep 2014 07:24:54 -0700 (PDT) Subject: [vtkusers] vtkPolyData - multiple normals per vertex and vertex duplication Message-ID: <1409667894367-5728535.post@n5.nabble.com> This is a fundamental question about how to deal with multiple normals per vertex/point. If I have a cube with 8 vertices and 6 faces for example, I would store this into a vtkPolyData object with 8 vtkPoints using vtkPolyData->SetPoints and for the faces I would store 6 vtkPolygon (faces) with each face referencing 4 point IDs from the points array. Since there are 6 faces and each face references 4 points, I would have a total of 6 * 4 = 24 point IDs for the faces. This makes sense, but now let's say I want to texture map the cube (or add normals); I can't just assign each point one normal or one texture coordinate because on a cube, every point is shared by 3 other faces so every point would have 3 different normals depending on which face of the cube that point is on. In VTK, one vtkPoint can only have one normal, so I noticed the way VTK tries to remedy this is by duplicating the point everytime the face references the point. So since every point is referenced by 3 faces in the cube, every point will have 3 normals. But since there are only 8 unique points, VTK will duplicate the 8 points 3 times and make 24 vtkPoints with 24 normals. Sorry for the long explanation, so my question is... there are only 8 unique points but now my vtkPolyData contains 24 vtkPoints (even though it's 3x duplicates), how would I get the individual unique points from the vtkPolyData while still preserving its normals/texture coordinates? (I know vtkCleanPolyData can merge points within the same position, but they also merge normals and texture coordinates so that each point has one normal, etc. Is there a data structure in VTK that preserves the relationship without duplicating? (or can I extract the unique points and their referenced texture coordinates, normals easily from a vtkPolyData is what I'm asking) - Thanks for any help I can get :) -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkPolyData-multiple-normals-per-vertex-and-vertex-duplication-tp5728535.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Sep 2 10:40:16 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 2 Sep 2014 08:40:16 -0600 Subject: [vtkusers] No key events on MAC OSX In-Reply-To: References: Message-ID: Hi Chavdar, I suspect that it isn't working because of the "@" symbols. Those only work in ".in" files, the do not work in regular cmake files. Try this instead: add_executable(rec3dapp MACOSX_BUNDLE ${CPP_FILES} ${REC3D_CPP_FILES} ${REC3D_VIS_CPP_FILES} ${VTKVIEW_CPP_FILES} ) - David On Mon, Sep 1, 2014 at 8:12 AM, C P wrote: > Dear vtk users, > > there seems to be no keyboard event processing on MAC OSX. I checked this > post here: > > http://vtk.org/Bug/view.php?id=2025 > > but without success. Here is the content of my CMakeLists.txt file: > > -------------------------------------------------------------------------------------------------------------- > > project(rec3dapp) > > cmake_minimum_required(VERSION 2.6) > > find_package(VTK) > > find_package(OpenCV) > > FILE(GLOB CPP_FILES *.cpp) > > FILE(GLOB REC3D_CPP_FILES ../rec3d/*.cpp) > > FILE(GLOB REC3D_VIS_CPP_FILES ../rec3dvis/*.cpp) > > FILE(GLOB VTKVIEW_CPP_FILES ../vtkview/*.cpp) > > include(${VTK_USE_FILE}) > > include_directories( > > .. > > ) > > IF(APPLE) > > SET(EXECUTABLE_FLAG MACOSX_BUNDLE) > > ENDIF(APPLE) > > link_libraries(${VTK_LIBRARIES} ${OpenCV_LIBS}) > > add_executable(rec3dapp > > MACOSX_BUNDLE > > @CPP_FILES@ > > @REC3D_CPP_FILES@ > > @REC3D_VIS_CPP_FILES@ > > @VTKVIEW_CPP_FILES@ > > ) > > -------------------------------------------------------------------------------------------------------------- > > > Do you have any suggestions? > > Thanks a lot. > > > Best regards > > Chavdar From zarko at kg.ac.rs Tue Sep 2 11:15:08 2014 From: zarko at kg.ac.rs (zarko.milosevic) Date: Tue, 2 Sep 2014 08:15:08 -0700 (PDT) Subject: [vtkusers] vtkResliceImage and appending slices Message-ID: <1409670908520-5728537.post@n5.nabble.com> Hi all, I`m using vtkResliceImage to extract some oblique slices from DICOM image series. Is there any way to somehow merge extracted slices along one axis and generate 3D image from them which i will, again, use to reslice it with vtkResliceImage filter? Just to mention, extracted slices, images, do not have same dimensions. Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkResliceImage-and-appending-slices-tp5728537.html Sent from the VTK - Users mailing list archive at Nabble.com. From MEEHANBT at nv.doe.gov Tue Sep 2 11:41:54 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Tue, 2 Sep 2014 15:41:54 +0000 Subject: [vtkusers] =?utf-8?q?3D_point_to_UnstructuredGrid=E2=80=8F?= In-Reply-To: <781B147323W2181810-01@EMF_nv.doe.gov> References: <781B147323W2181810-01@EMF_nv.doe.gov> Message-ID: Hi - First, there are a lot of things you are asking about in your email: 1) create vtkUnstructuredGrid from a collection of points 2) extracting points that exceed a given threshold 3) meshing the points The meshing of the points can probably be done with a vtkDelaunay3D filter, and the rest of it I will describe - but in general the more specific you can be about your problem, the more likely it is that you will find answers. I'd also point you to the examples page on the wiki: http://www.vtk.org/Wiki/VTK/Examples, there are examples of how to do almost everything that you might want. So, a partial answer to your question (at least as I was able to see it - Python source follows): # First comment - is that all of this can easily be done in ParaView, however, # it is easier for me to show this to you in a Python script than for me to # describe what to click on in ParaView. Unless you have to go through piles of # data - you should probably figure out how to do this in ParaView. import random, vtk points = vtk.vtkPoints() temperature = vtk.vtkDoubleArray() temperature.SetName("Temperature") # Set up your array of random points, random temperature samples. for i in range(5000): points.InsertPoint(i, random.uniform(-1, 1), random.uniform(-1, 1), random.uniform(-1, 1)) temperature.InsertNextValue(random.weibullvariate(1, 5)) print temperature.GetMaxNorm() # The situation you described did not necessarily require a # vtkUnstructuredGrid, you could have also done it with a vtkPolyData. However, # adding points and their associated temperature samples to a # vtkUnstructuredGrid is straightforward. ugrid = vtk.vtkUnstructuredGrid() ugrid.SetPoints(points) ugrid.GetPointData().SetScalars(temperature) # Here, I am going to select points that have an associated temperature value # that is greater than 1.0: ugrid_thresh = vtk.vtkThresholdPoints() ugrid_thresh.SetInputData(ugrid) ugrid_thresh.ThresholdByUpper(1.0) # Depending on what you're doing with the thresholded dataset, you may need to # call "Update" on it to make sure that the data is ready to use. ugrid_thresh.Update() # All you have is points in your vtkUnstructuredGrid, so you will need to do # something to see the structure in your data. The data I have created has sort # of a messy structure though. Below, the vtkVertexGlyph filters are set up # differently because in the first case, you are using the data itself to start # the pipeline - in the second case, you are using the output of a filter to # feed the input of the next filter. before_glyph = vtk.vtkVertexGlyphFilter() before_glyph.SetInputData(ugrid) after_glyph = vtk.vtkVertexGlyphFilter() after_glyph.SetInputConnection(ugrid_thresh.GetOutputPort()) # I'm using a vtkOutlineFilter here mostly to make the data look nicer. This # isn't strictly necessary for any of the parts of your question. outline = vtk.vtkOutlineFilter() outline.SetInputData(ugrid) #-----------------# # Rendering Stuff # #-----------------# # The unstructured grid by itself doesn't have much interesting to look at # inside of it, but if you were to change that, you would need a different # mapper: # umapper = vtk.vtkDataSetMapper() # umapper.SetInputData(ugrid) before_mapper = vtk.vtkPolyDataMapper() before_mapper.SetInputConnection(before_glyph.GetOutputPort()) after_mapper = vtk.vtkPolyDataMapper() after_mapper.SetInputConnection(after_glyph.GetOutputPort()) # If you are re-using data or filter outputs in the visualization pipeline, # avoid re-using mappers and actors. Since I'm showing a before and after # scenario as a left and right image, I will need two mappers and two actors to # represent the outline. outline_mapper1 = vtk.vtkPolyDataMapper() outline_mapper1.SetInputConnection(outline.GetOutputPort()) outline_mapper2 = vtk.vtkPolyDataMapper() outline_mapper2.SetInputConnection(outline.GetOutputPort()) outline_actor1 = vtk.vtkActor() outline_actor1.SetMapper(outline_mapper1) outline_actor2 = vtk.vtkActor() outline_actor2.SetMapper(outline_mapper2) before_actor = vtk.vtkActor() before_actor.SetMapper(before_mapper) after_actor = vtk.vtkActor() after_actor.SetMapper(after_mapper) left_ren = vtk.vtkRenderer() left_ren.SetBackground(.3, .3, .3) left_ren.SetViewport(0.0, 0.0, 0.5, 1.0) left_ren.AddActor(before_actor) left_ren.AddActor(outline_actor1) right_ren = vtk.vtkRenderer() right_ren.SetBackground(.3, .3, .3) right_ren.SetViewport(0.5, 0.0, 1.0, 1.0) # This line links the cameras for the two renderers so that manipulating the # view in one viewport manipulates the view in both viewports. right_ren.SetActiveCamera(left_ren.GetActiveCamera()) right_ren.AddActor(after_actor) right_ren.AddActor(outline_actor2) renw = vtk.vtkRenderWindow() renw.AddRenderer(left_ren) renw.AddRenderer(right_ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renw) left_ren.ResetCamera() renw.Render() iren.Start() From: Selcuk ?ALLI > Date: Tuesday, September 2, 2014 6:53 AM To: "vtkusers at vtk.org" > Subject: [vtkusers] 3D point to UnstructuredGrid? Can we obtain an UnstructuredGrid from 3D point array with values that exceed a threshold? I want to apply mesh to 3D point array. Is it possible? What kind of filters/functions do we need to do this process? Best regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Tue Sep 2 12:01:38 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Tue, 2 Sep 2014 16:01:38 +0000 Subject: [vtkusers] vtkProbe on an Exodus II file ... Message-ID: Hi - I'm trying to project a dataset from one mesh (stored in an Exodus II file) onto another mesh (also, stored on an Exodus II file). I was hoping that I could do it with vtkProbe, in a fashion somewhat similar to: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid, and I am hoping that it is just a simple oversight on my part. I wasn't sure if the mailing list took attachments ... I tried not to make them large. (note that the "g" extension, namely the Genesis file format, is readable with the vtkExodusIIReader). The script I was using doesn't seem to map anything at all I just get zero data? import vtk from math import exp, hypot rdr1 = vtk.vtkExodusIIReader() rdr1.SetFileName("waffly.g") rdr1.Update() rdr2 = vtk.vtkExodusIIReader() rdr2.SetFileName("roundish.g") rdr2.Update() spot = vtk.vtkFloatArray() spot.SetName("Gaussian Spot") inputdata = rdr2.GetOutput().GetBlock(0).GetBlock(0) outputdata = rdr1.GetOutput().GetBlock(0).GetBlock(0) for i in range(inputdata.GetNumberOfPoints()): x, y = inputdata.GetPoint(i)[:2] r = hypot(x, y) spot.InsertValue(i, exp(-r**2)) inputdata.GetPointData().SetScalars(spot) #-------------# # Probe Stuff # #-------------# p = vtk.vtkProbeFilter() p.SetInputData(outputdata) p.SetSourceData(inputdata) # <-has scalars you want p.Update() #-----------------# # Rendering stuff # #-----------------# mapper1 = vtk.vtkDataSetMapper() mapper1.SetInputData(inputdata) mapper2 = vtk.vtkDataSetMapper() mapper2.SetInputData(outputdata) actor1 = vtk.vtkActor() actor1.SetMapper(mapper1) actor2 = vtk.vtkActor() actor2.SetMapper(mapper2) left_ren = vtk.vtkRenderer() left_ren.SetViewport(0.0, 0.0, 0.5, 1.0) left_ren.AddActor(actor1) right_ren = vtk.vtkRenderer() right_ren.SetViewport(0.5, 0.0, 1.0, 1.0) right_ren.SetActiveCamera(left_ren.GetActiveCamera()) right_ren.AddActor(actor2) renw = vtk.vtkRenderWindow() renw.AddRenderer(left_ren) renw.AddRenderer(right_ren) renw.SetSize(800, 400) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renw) left_ren.ResetCamera() renw.Render() iren.Start() -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Archive.zip Type: application/zip Size: 6552 bytes Desc: Archive.zip URL: From david.gobbi at gmail.com Tue Sep 2 12:08:38 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 2 Sep 2014 10:08:38 -0600 Subject: [vtkusers] vtkPolyData - multiple normals per vertex and vertex duplication In-Reply-To: <1409667894367-5728535.post@n5.nabble.com> References: <1409667894367-5728535.post@n5.nabble.com> Message-ID: Hi David, The simple answer is no, you cannot have multiple normals per point, so you are stuck with point duplication. So you might have to devise a way to identify the points other than their point IDs. One possibility is to add a label array to the PointData so that each point is labeled by one of 8 unique label values. A label array can be just a vtkIntArray with the name "Labels" and the an int for each of the 24 points that has a value between 0 and 7 to identify which "unique" point each of the actual points corresponds to. - David On Tue, Sep 2, 2014 at 8:24 AM, eternallite2 wrote: > This is a fundamental question about how to deal with multiple normals per > vertex/point. > > If I have a cube with 8 vertices and 6 faces for example, I would store this > into a vtkPolyData object with > 8 vtkPoints using vtkPolyData->SetPoints and for the faces I would store > 6 vtkPolygon (faces) with each face referencing 4 point IDs from the points > array. > > Since there are 6 faces and each face references 4 points, I would have a > total > of 6 * 4 = 24 point IDs for the faces. > > This makes sense, but now let's say I want to texture map the cube (or add > normals); > I can't just assign each point one normal or one texture coordinate because > on a cube, > every point is shared by 3 other faces so every point would have 3 different > normals depending on which face of the cube that point is on. > > In VTK, one vtkPoint can only have one normal, so I noticed the way VTK > tries to remedy this > is by duplicating the point everytime the face references the point. > > So since every point is referenced by 3 faces in the cube, every point will > have 3 normals. > But since there are only 8 unique points, VTK will duplicate the 8 points 3 > times and make 24 > vtkPoints with 24 normals. > > Sorry for the long explanation, so my question is... there are only 8 unique > points but now my vtkPolyData contains 24 vtkPoints (even though it's 3x > duplicates), how would I get the individual unique points from the > vtkPolyData while still preserving its normals/texture coordinates? > > (I know vtkCleanPolyData can merge points within the same position, but they > also merge > normals and texture coordinates so that each point has one normal, etc. > > Is there a data structure in VTK that preserves the relationship without > duplicating? (or can I extract > the unique points and their referenced texture coordinates, normals easily > from a vtkPolyData is what I'm asking) - > > Thanks for any help I can get :) From david.gobbi at gmail.com Tue Sep 2 12:17:43 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 2 Sep 2014 10:17:43 -0600 Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: <1409670908520-5728537.post@n5.nabble.com> References: <1409670908520-5728537.post@n5.nabble.com> Message-ID: Hi Zarko, Usually, one should use vtkImageReslice::SetOutputExtent() to specify a 3D extent that contains more than one sliice. This makes it unnecessary to include the "append" as a follow-up step. You will probably have to find some way to make all your images have the same dimensions, because in a 3D image (i.e. a vtkImageData) all the slices are required to have the same dimensions. If the slices are not the same dimensions, then there is no easy way to append them (vtkImageAppend won't work, for example). - David On Tue, Sep 2, 2014 at 9:15 AM, zarko.milosevic wrote: > Hi all, > > I`m using vtkResliceImage to extract some oblique slices from DICOM image > series. Is there any way to somehow merge extracted slices along one axis > and generate 3D image from them which i will, again, use to reslice it with > vtkResliceImage filter? Just to mention, extracted slices, images, do not > have same dimensions. > > Zarko From berk.geveci at kitware.com Tue Sep 2 19:56:15 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 2 Sep 2014 19:56:15 -0400 Subject: [vtkusers] Proposal: Bug tracker hack-a-ton In-Reply-To: References: Message-ID: OK folks. October 2nd it is. We'll shoot for 9am-5pm EDT. So far, I received confirmation from Bill, Dave C., Sean and Will. There will be a few us from Kitware also. If you plan on attending, please let me know off list - please let me know if you will attend in person or via Google Hangout. On Thu, Aug 28, 2014 at 10:21 AM, Berk Geveci wrote: > Several people indicated a preference for October. How about October 2nd? > > Best, > -berk > > > On Tue, Aug 26, 2014 at 4:32 PM, Berk Geveci > wrote: > >> Hi folks, >> >> I propose a hack-a-ton to reduce the number of open issues in the bug >> tracker. It is like a yard that hasn't been mowed and weeded the whole >> summer. I propose a full day hack-a-ton. We can host some folks here at >> Kitware and others can join through a Google Hangout. I propose one in >> September. What do you think? Interested parties please send me an e-mail >> off the list with your preferred dates. >> >> This will have to be the first in a series. There are a lot of issues to >> go over. >> >> Best, >> -berk >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Tue Sep 2 20:25:32 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 2 Sep 2014 20:25:32 -0400 Subject: [vtkusers] Depth Peeling w/ Nvidia Quadro 2000 In-Reply-To: References: <4d478f080fc34f8bb98785eac467c7aa@BN1PR05MB263.namprd05.prod.outlook.com> Message-ID: Did you build with VTK_RENDERING_BACKEND set to OpenGL2? Best, -berk On Tue, Sep 2, 2014 at 8:23 PM, Windes, Grant wrote: > Unfortunately the depth peeling is behaving the same way in vtk 6.2 as > 5.10.1 > > > > Any idea what may be causing it to work fine on a Intel integrated GPU > compared to a traditional graphics card (Nvidia Quadro 2000)? > > > > Thanks, > > Grant > > > > *From:* Berk Geveci [mailto:berk.geveci at kitware.com] > *Sent:* Tuesday, August 26, 2014 5:32 PM > *To:* Windes, Grant > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Depth Peeling w/ Nvidia Quadro 2000 > > > > Rather than trying to figure it out, I'd recommend trying out the new > render code in VTK. It has a brand spanking new depth peeling > implementation. See > > > > http://www.kitware.com/source/home/post/144 > > > > -berk > > > > On Tue, Aug 26, 2014 at 5:59 PM, Windes, Grant < > Grant.Windes at smith-nephew.com> wrote: > > Looking to implement a proper depth sort for semi-transparent objects. My > research has shown that the vtkDepthSortPolyData is not sufficient as it is > CPU bound. > > > > I?ve enabled depth peeling and it?s worked great using Core i7 4770K > (4600HD Integrated Graphics). However, it was slower than we liked and thus > I tested an Nvidia Quadro 3000M and Quadro 2000. Both don?t properly enable > depth peeling as confirmed with a GetRenderLastUsedDepthPeeling() call. > > > > Note: Using pyVTK (vtk 5.10.1) on Windows 7 64bit with latest gpu Quadro > drivers (9.18.13.4062) > > > > In my small test application I can get DepthPeeling to render properly on > the Quadro 2000 by setting > > > > renderWindow.SetAlphaBitPlanes(1) > > renderWindow.SetMultiSamples(0) > > renderer.SetUseDepthPeeling(1) > > > > However, If I remove SetAlphaBitPlanes() and SetMultiSamples() depth > peeling doesn?t work properly and is not enabled. > > > > Any indication as to why depth peeling works fine on the Core i7 > integrated graphics compared to a true GPU? > > > > Thanks, > > Grant > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Sep 2 20:44:40 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 2 Sep 2014 20:44:40 -0400 Subject: [vtkusers] Proposal: Bug tracker hack-a-ton In-Reply-To: References: Message-ID: In person On Sep 2, 2014 7:56 PM, "Berk Geveci" wrote: > OK folks. October 2nd it is. We'll shoot for 9am-5pm EDT. So far, I > received confirmation from Bill, Dave C., Sean and Will. There will be a > few us from Kitware also. If you plan on attending, please let me know off > list - please let me know if you will attend in person or via Google > Hangout. > > > On Thu, Aug 28, 2014 at 10:21 AM, Berk Geveci > wrote: > >> Several people indicated a preference for October. How about October 2nd? >> >> Best, >> -berk >> >> >> On Tue, Aug 26, 2014 at 4:32 PM, Berk Geveci >> wrote: >> >>> Hi folks, >>> >>> I propose a hack-a-ton to reduce the number of open issues in the bug >>> tracker. It is like a yard that hasn't been mowed and weeded the whole >>> summer. I propose a full day hack-a-ton. We can host some folks here at >>> Kitware and others can join through a Google Hangout. I propose one in >>> September. What do you think? Interested parties please send me an e-mail >>> off the list with your preferred dates. >>> >>> This will have to be the first in a series. There are a lot of issues to >>> go over. >>> >>> Best, >>> -berk >>> >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From asou at soum.co.jp Wed Sep 3 01:58:44 2014 From: asou at soum.co.jp (Masato Asou) Date: Wed, 03 Sep 2014 14:58:44 +0900 (JST) Subject: [vtkusers] TriangleArea() return the not correct value. In-Reply-To: <40FBEA6C32374177B1693F2CD36EA669@pafec5> References: <20140829.151807.82067791.asou@soum.co.jp> <40FBEA6C32374177B1693F2CD36EA669@pafec5> Message-ID: <20140903.145844.127141694.asou@soum.co.jp> Hi, Thanks for link, John. By the way, why vtkTriangle::TriangleArea() doesn't use cross product? Also cross product requires applying sqrt() only once. Error of up to 0.0000000000000001 is acceptable in my program. However, vtkTraiangle::TriangleArea() causes an error of 0.000000001. -- ASOU Masato From: "John Platt" Date: Mon, 1 Sep 2014 09:53:16 +0100 > Hi, > > It could be worth looking at "Miscalculating Area and Angles of a > Needle-like Triangle" W. Kahan (24 March 2000) > http://www.cs.berkeley.edu/~wkahan/Triangle.pdf for implementation of > Heron's formula. > > HTH > > John. > > > ----- Original Message ----- > From: "Masato Asou" > To: > Cc: > Sent: Friday, August 29, 2014 7:18 AM > Subject: Re: [vtkusers] TriangleArea() return the not correct value. > > >>I didn't aware about efficiency. >> >> I hope that I can choose whichever efficiency or quality. >> Thanks. >> -- >> ASOU Masato >> >>> Note that there is a difference in efficiency, because Heron's formula >>> requires applying sqrt() four times, while VTK's formula requires >>> applying >>> sqrt() only once. >> >>> It might be worthwhile to use both Heron's formula and the current VTK >>> formula, with a discriminator to choose which based on the quality of >>> the >>> triangle. >>> - David >>> >>> >>> On Thu, Aug 28, 2014 at 9:10 PM, Cory Quammen >>> wrote: >>>> Masato, >>>> >>>> It looks like you are running into numerical precision problems >>>> because two of your points are extremely close, almost close enough to >>>> be indistinguishable by double precision. >>>> >>>> The inconsistencies that depend on the order the points are given are >>>> caused by which sides are considered in the cross product and area >>>> calculation. Heron's formula, which I wasn't aware of, seems to >>>> eliminate this inconsistency. We should consider using this in VTK, in >>>> particular the numerically more stable implementation: >>>> http://en.wikipedia.org/wiki/Heron's_formula#Numerical_stability >>>> >>>> I don't know if my answer helps, but thank you for pointing out >>>> Heron's formula. >>>> >>>> Thanks, >>>> Cory >>>> >>>> On Thu, Aug 28, 2014 at 10:41 PM, Masato Asou wrote: >>>>> Hi, >>>>> >>>>> I have a probrem about vtkTriangle::TriangleArea(). I use VTK-5.10.1. >>>>> >>>>> The triangle to be calculated is what one side is very short. >>>>> >>>>> I calculate the area of the triangle in vtkTriangle::TriangleArea(), >>>>> the result are different to that using the Heron's formula and cross >>>>> products. I also calculate tha area is regarded as a rectanglar >>>>> triangle, >>>>> this value is also different vtkTriangle::TriangleArea() >>>>> >>>>> In addition, vtkTriangle::TriangleArea() return a different value when >>>>> change the order of the vertices. >>>>> >>>>> This problem be resolved? >>>>> >>>>> My system as: >>>>> >>>>> $ cat /etc/redhat-release >>>>> CentOS release 5.6 (Final) >>>>> $ uname -m -r -s -v >>>>> Linux 2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64 >>>>> >>>>> My program as below: >>>>> >>>>> $ cat triangle.cpp >>>>> #include >>>>> #include >>>>> using namespace std; >>>>> #include >>>>> >>>>> double >>>>> lineLength(const double p0[3], const double p1[3]) >>>>> { >>>>> double len2 = 0.0; >>>>> >>>>> for(int i = 0; i < 3; i++) { >>>>> len2 += (p0[i] - p1[i]) * (p0[i] - p1[i]); >>>>> } >>>>> return sqrt(len2); >>>>> } >>>>> >>>>> double >>>>> CrossProduct(double p1[3], double p2[3], double p3[3]) >>>>> { >>>>> double a[3], b[3], o[3], v[3]; >>>>> >>>>> // Create the vector a and b. >>>>> a[0] = p2[0] - p1[0]; >>>>> a[1] = p2[1] - p1[1]; >>>>> a[2] = p2[2] - p1[2]; >>>>> b[0] = p3[0] - p1[0]; >>>>> b[1] = p3[1] - p1[1]; >>>>> b[2] = p3[2] - p1[2]; >>>>> >>>>> // Calculate the cross product of vector a and b. >>>>> o[0] = 0.0; >>>>> o[1] = 0.0; >>>>> o[2] = 0.0; >>>>> v[0] = (a[1] * b[2]) - (a[2] * b[1]); >>>>> v[1] = (a[2] * b[0]) - (a[0] * b[2]); >>>>> v[2] = (a[0] * b[1]) - (a[1] * b[0]); >>>>> return fabs(lineLength(o, v)) / 2; >>>>> } >>>>> >>>>> double >>>>> HeronsFormula(double p1[3], double p2[3], double p3[3]) >>>>> { >>>>> double a = lineLength(p1, p2); >>>>> double b = lineLength(p2, p3); >>>>> double c = lineLength(p3, p1); >>>>> >>>>> return sqrt((a+b+c) * (-a+b+c) * (a-b+c) * (a+b-c)) * 0.25; >>>>> } >>>>> >>>>> int >>>>> main(void) >>>>> { >>>>> double A[3] = {-3.58117425311239667707, -3.58117425311239667707, >>>>> 1.0}; >>>>> double B[3] = {-3.04058712655619833853, -3.04058712655619833853, >>>>> 0.95}; >>>>> double C[3] = {-3.04058712655619833853, -3.04058712655619789444, >>>>> 0.95}; >>>>> double a = lineLength(A, B); >>>>> double b = lineLength(B, C); >>>>> double c = lineLength(C, A); >>>>> >>>>> cout << fixed << setprecision(20); >>>>> cout << "TriangleArea(A, B, C): " << vtkTriangle::TriangleArea(A, B, >>>>> C) << endl; >>>>> cout << "TriangleArea(B, C, A): " << vtkTriangle::TriangleArea(B, C, >>>>> A) << endl; >>>>> cout << "CrossProduct(A, B, C): " << CrossProduct(A, B, C) << endl; >>>>> cout << "CrossProduct(B, C, A): " << CrossProduct(B, C, A) << endl; >>>>> cout << "HeronsFormula(A, B, C): " << HeronsFormula(A, B, C) << endl; >>>>> cout << "HeronsFormula(B, C, A): " << HeronsFormula(B, C, A) << endl; >>>>> cout << "RectangularTriangle: " << (a * b / 2) << endl; >>>>> cout << "line length: a: " << a << ", b: " << b << ", c: " << c << >>>>> endl; >>>>> >>>>> return 0; >>>>> } >>>>> $ g++ -g -I../../src -I/home/asou/freesw/vtk-5.10.1/include/vtk-5.10 >>>>> triangle.cpp -Xlinker -rpath -Xlinker ../../src >>>>> -L/home/asou/freesw/vtk-5.10.1/lib/vtk-5.10 -lvtkCommon -lvtkWidgets >>>>> -Xlinker -rpath -Xlinker /home/asou/freesw/vtk-5.10.1/lib/vtk-5.10 >>>>> In file included from >>>>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/strstream:51, >>>>> from >>>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkIOStream.h:108, >>>>> from >>>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkSystemIncludes.h:40, >>>>> from >>>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkIndent.h:24, >>>>> from >>>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkObjectBase.h:43, >>>>> from >>>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkObject.h:41, >>>>> from >>>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkCell.h:40, >>>>> from >>>>> /home/asou/freesw/vtk-5.10.1/include/vtk-5.10/vtkTriangle.h:23, >>>>> from triangle.cpp:4: >>>>> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: >>>>> warning: #warning This file includes at least one deprecated or >>>>> antiquated header. Please consider using one of the 32 headers found >>>>> in section 17.4.1.2 of the C++ standard. Examples include substituting >>>>> the header for the header for C++ includes, or >>>>> instead of the deprecated header . To disable this warning >>>>> use -Wno-deprecated. >>>>> $ ./a.out >>>>> TriangleArea(A, B, C): 0.00000000526835606386 >>>>> TriangleArea(B, C, A): 0.00000000000000009839 >>>>> CrossProduct(A, B, C): 0.00000000000000011168 >>>>> CrossProduct(B, C, A): 0.00000000000000012055 >>>>> HeronsFormula(A, B, C): 0.00000000000000011252 >>>>> HeronsFormula(B, C, A): 0.00000000000000011252 >>>>> RectangularTriangle: 0.00000000000000017012 >>>>> line length: a: 0.76613894483740641039, b: 0.00000000000000044409, c: >>>>> 0.76613894483740674346 >>>>> $ >>>>> >>>>> Thanks in advance any help or suggestions. >>>>> -- >>>>> ASOU Masato >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> 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 >>>> >>>> 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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > From zarko at kg.ac.rs Wed Sep 3 05:39:06 2014 From: zarko at kg.ac.rs (zarko.milosevic) Date: Wed, 3 Sep 2014 02:39:06 -0700 (PDT) Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: References: <1409670908520-5728537.post@n5.nabble.com> Message-ID: <1409737146129-5728549.post@n5.nabble.com> Hi David, Thanks for quick reply. Actually output slices are same dimensions. I just figure it out. I do not change the extent. It is default, as extent of input data, just permuted through re-slice axes. So all slices are with same dimensions. But how to join them in one 3d image using vtkImageReslice ? Regards Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728537p5728549.html Sent from the VTK - Users mailing list archive at Nabble.com. From flaviu2 at yahoo.com Wed Sep 3 07:12:12 2014 From: flaviu2 at yahoo.com (flaviu2) Date: Wed, 3 Sep 2014 04:12:12 -0700 (PDT) Subject: [vtkusers] Retrieve window/level In-Reply-To: <1409575935216-5728524.post@n5.nabble.com> References: <1409575935216-5728524.post@n5.nabble.com> Message-ID: <1409742732354-5728551.post@n5.nabble.com> This is what I meanning when I said: flaviu2 wrote > I have an vtkImageReslice, which according this post: > http://vtk.1045678.n5.nabble.com/A-new-way-to-look-at-images-td3352404.html > > can automatically adjust window/level by mouse motion after left button is > pressed ... but how can I retrieve window/level values ? Is really automation, but how can i retrieve window/level information from vtkImageReslice ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Retrieve-window-level-tp5728524p5728551.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Sep 3 08:01:26 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 3 Sep 2014 06:01:26 -0600 Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: <1409737146129-5728549.post@n5.nabble.com> References: <1409670908520-5728537.post@n5.nabble.com> <1409737146129-5728549.post@n5.nabble.com> Message-ID: Hi Zarko, Can you send a few lines of source code to show how you are using vtkImageReslice? - David From inglis.dl at gmail.com Wed Sep 3 08:27:23 2014 From: inglis.dl at gmail.com (Dean Inglis) Date: Wed, 3 Sep 2014 08:27:23 -0400 Subject: [vtkusers] Retrieve window/level In-Reply-To: <1409742732354-5728551.post@n5.nabble.com> References: <1409575935216-5728524.post@n5.nabble.com> <1409742732354-5728551.post@n5.nabble.com> Message-ID: You could use vtkImageProperty's GetColorWindow, GetColorLevel methods: http://www.vtk.org/doc/nightly/html/classvtkImageProperty.html If you are using vtkImageActor you could do double windowValue = myActor->GetProperty()->GetColorWindow() regards, Dean On Wed, Sep 3, 2014 at 7:12 AM, flaviu2 via vtkusers wrote: > This is what I meanning when I said: > > > flaviu2 wrote > > I have an vtkImageReslice, which according this post: > > > http://vtk.1045678.n5.nabble.com/A-new-way-to-look-at-images-td3352404.html > > < > http://vtk.1045678.n5.nabble.com/A-new-way-to-look-at-images-td3352404.html > > > > can automatically adjust window/level by mouse motion after left button > is > > pressed ... but how can I retrieve window/level values ? > > Is really automation, but how can i retrieve window/level information from > vtkImageReslice ? > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Retrieve-window-level-tp5728524p5728551.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlrdave at aol.com Wed Sep 3 08:43:31 2014 From: dlrdave at aol.com (David Cole) Date: Wed, 3 Sep 2014 08:43:31 -0400 Subject: [vtkusers] TriangleArea() return the not correct value. Message-ID: <8D1958BCD1FEB4B-15CC-A1DD@webmail-m269.sysops.aol.com> > Error of up to 0.0000000000000001 is acceptable in my program. Good luck with getting to the 1e-16 level for acceptable error. DBL_EPSILON is typically ~2.2e-16, and it is super easy, depending on how many calculations you need to do, to have accumulated calculation errors reach the 1e-15 to 1e-14 levels... even when you're doing double-precision math everywhere. http://stackoverflow.com/questions/1566198/how-to-portably-get-dbl-epsilon-in-c-c http://en.wikipedia.org/wiki/Loss_of_significance You have to be really careful with your code if you want/need to keep all your error levels close to DBL_EPSILON. Good luck, David C. From zarko at kg.ac.rs Wed Sep 3 09:38:40 2014 From: zarko at kg.ac.rs (zarko.milosevic) Date: Wed, 3 Sep 2014 06:38:40 -0700 (PDT) Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: References: <1409670908520-5728537.post@n5.nabble.com> <1409737146129-5728549.post@n5.nabble.com> Message-ID: <1409751520521-5728555.post@n5.nabble.com> Hi David, Some basic intro: I first create one 3D vtkParametricSpline that goes through volume (DICOM image stack). You can consider that spline as central line of some blood vessel. In one loop I got through all points and create Directional vectors by subtracting (i+1)th point from ith point ofthe spline. Next I create 4x4 matrix (re-slice axes) based on that directional vector and two vectors perpendicular to directional one. Actually I create coordinate frame based on that three vectors. Every iteration of the loop ends with new re-slice axes and new oblique slice. What I want is to merge those slices in one new 3D image which a will on the end slice it with vtkImageReslice. Here is some code: { // vtkResliceImage initialization _imageReslice = vtkSmartPointer::New(); _imageReslice->SetInputConnection(reader->GetOutputPort()); _imageReslice->SetResliceAxes(this->GetViewAxes()); _imageReslice->SetOutputDimensionality(2); vtkSmartPointer lut = vtkSmartPointer::New(); lut->SetRange(0, 255); lut->SetValueRange(0.0, 1.0); lut->SetSaturationRange(0.0, 0.0); lut->SetRampToLinear(); lut->Build(); vtkSmartPointer colorMapper = vtkSmartPointer::New(); colorMapper->SetLookupTable(lut); colorMapper->SetInputConnection(_imageReslice->GetOutputPort()); _actorImage = vtkSmartPointer::New(); _actorImage->SetInput(colorMapper->GetOutput()); _renderer = vtkSmartPointer::New(); . . . } { // Iteration through spline - this is part of from some other method vtkSmartPointer axes = null; axes = GetViewAxes(); while(axes) { _imageReslice->SetResliceAxes(); _imageReslice->Update(); axes = GetViewAxes(); // in this method I calculate re-slice axes } . . . // Here after every iteration I get new oblique slice. What I want is to join all slices together in // one new 3d image which will be input for new vtkImageReslice object. } -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728537p5728555.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Sep 3 09:53:48 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 3 Sep 2014 07:53:48 -0600 Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: <1409751520521-5728555.post@n5.nabble.com> References: <1409670908520-5728537.post@n5.nabble.com> <1409737146129-5728549.post@n5.nabble.com> <1409751520521-5728555.post@n5.nabble.com> Message-ID: Hi Zarko, Thanks for the info. If each slice has a different normal, then it is necessary to extract each slice separately (like you are doing), and then you can use vtkImageAppend to create a volume from all of the slices. However, when you use vtkImageReslice to do oblique slices, I recommend that you always set the OutputExtent, OutputSpacing, and OutputOrigin for vtkImageReslice. The code that vtkImageReslice uses to "guess" these values is really only useful for orthogonal reslicing. - David On Wed, Sep 3, 2014 at 7:38 AM, zarko.milosevic wrote: > Hi David, > > Some basic intro: > > I first create one 3D vtkParametricSpline that goes through volume (DICOM > image stack). You can consider that spline as central line of some blood > vessel. > In one loop I got through all points and create Directional vectors by > subtracting (i+1)th point from ith point ofthe spline. > Next I create 4x4 matrix (re-slice axes) based on that directional vector > and two vectors perpendicular to directional one. Actually I create > coordinate frame based on that three vectors. > Every iteration of the loop ends with new re-slice axes and new oblique > slice. > > What I want is to merge those slices in one new 3D image which a will on the > end slice it with vtkImageReslice. > > Here is some code: > { > // vtkResliceImage initialization > _imageReslice = vtkSmartPointer::New(); > _imageReslice->SetInputConnection(reader->GetOutputPort()); > _imageReslice->SetResliceAxes(this->GetViewAxes()); > _imageReslice->SetOutputDimensionality(2); > > vtkSmartPointer lut = > vtkSmartPointer::New(); > lut->SetRange(0, 255); > lut->SetValueRange(0.0, 1.0); > lut->SetSaturationRange(0.0, 0.0); > lut->SetRampToLinear(); > lut->Build(); > > vtkSmartPointer colorMapper = > vtkSmartPointer::New(); > > colorMapper->SetLookupTable(lut); > colorMapper->SetInputConnection(_imageReslice->GetOutputPort()); > > _actorImage = vtkSmartPointer::New(); > _actorImage->SetInput(colorMapper->GetOutput()); > _renderer = vtkSmartPointer::New(); > . > . > . > } > > { > // Iteration through spline - this is part of from some other method > vtkSmartPointer axes = null; > axes = GetViewAxes(); > while(axes) > { > _imageReslice->SetResliceAxes(); > _imageReslice->Update(); > axes = GetViewAxes(); // in this method I calculate re-slice axes > } > . > . > . > > // Here after every iteration I get new oblique slice. What I want is to > join all slices together in > // one new 3d image which will be input for new vtkImageReslice object. > } From nicgallego at gmail.com Wed Sep 3 13:13:39 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Wed, 3 Sep 2014 19:13:39 +0200 Subject: [vtkusers] About vtkCellLocator::IntersectWithLine method Message-ID: Hi, I am using the locator find the intersections between the normal lines of one surface to another surface, both surface being triangular meshes loaded as vtkPolyData. I find a little confusing the documentation regarding this particular method of the locator, could anybody clarify it please? I am using the following signature (taken form vtkAbstractCellLocator.h) // Description: // Return intersection point (if any) AND the cell which was intersected by // the finite line. virtual int IntersectWithLine( double p1[3], double p2[3], double tol, double& t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId); I understand that p1 and p2 are the extremes of the intersecting finite line segment, and tol is some sort of tolerance, but my confusion is about the reference double& t, x, pcoords and the rest, Are all of them outputs? thank you, I will appreciate if you point out some example code or filter that uses this fuctionallity, or any other idea to do just that, intersect a PolyData surface with a given line. Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 3 13:55:36 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 3 Sep 2014 11:55:36 -0600 Subject: [vtkusers] About vtkCellLocator::IntersectWithLine method In-Reply-To: References: Message-ID: On Wed, Sep 3, 2014 at 11:13 AM, Nicolas Gallego wrote: > Hi, > > I understand that p1 and p2 are the extremes of the intersecting finite line > segment, and tol is some sort of tolerance, but my confusion is about the > reference double& t, x, pcoords and the rest, > > Are all of them outputs? I don't have an answer on hand, but the answer is, yes, they are all outputs. t - parametric coordinate along the line segment (a value between 0 and 1) x - intersection point, in data coordinates pcoords - parametric coordinates within the polygon (I haven't used these for a while, so I have forgotten how they are defined) cellId - identifies the cell that has been intersected subId - identifies a "sub-cell" within the cell, e.g. the triangle if the cell is a triangle strip - David From david.gobbi at gmail.com Wed Sep 3 13:57:46 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 3 Sep 2014 11:57:46 -0600 Subject: [vtkusers] About vtkCellLocator::IntersectWithLine method In-Reply-To: References: Message-ID: On Wed, Sep 3, 2014 at 11:55 AM, David Gobbi wrote: > > I don't have an answer on hand, but the answer is, yes, they are all outputs. I meant to say "I don't have an example on hand". From asou at soum.co.jp Wed Sep 3 23:02:45 2014 From: asou at soum.co.jp (Masato Asou) Date: Thu, 04 Sep 2014 12:02:45 +0900 (JST) Subject: [vtkusers] TriangleArea() return the not correct value. In-Reply-To: <8D1958BCD1FEB4B-15CC-A1DD@webmail-m269.sysops.aol.com> References: <8D1958BCD1FEB4B-15CC-A1DD@webmail-m269.sysops.aol.com> Message-ID: <20140904.120245.261185053.asou@soum.co.jp> From: David Cole Date: Wed, 3 Sep 2014 08:43:31 -0400 >> Error of up to 0.0000000000000001 is acceptable in my program. > You have to be really careful with your code if you want/need to keep > all your error levels close to DBL_EPSILON. Thank you for your advice. It has not been able to correctly represent the intent of my previous email. The following is a quotation from first email. From: Masato Asou Date: Fri, 29 Aug 2014 11:41:15 +0900 (JST) > $ ./a.out > TriangleArea(A, B, C): 0.00000000526835606386 Above is not acceptable error. Below is acceptable error. > TriangleArea(B, C, A): 0.00000000000000009839 Heron's formula and cross product are acceptable. > CrossProduct(A, B, C): 0.00000000000000011168 > CrossProduct(B, C, A): 0.00000000000000012055 > HeronsFormula(A, B, C): 0.00000000000000011252 > HeronsFormula(B, C, A): 0.00000000000000011252 > RectangularTriangle: 0.00000000000000017012 Error due to the order of the vertex is lage calculation result of vtkTriangle::TriangleArea(). Error due to the order of the vertex is small heron's formula and cross product. From: David Gobbi Date: Thu, 28 Aug 2014 21:19:08 -0600 > Note that there is a difference in efficiency, because Heron's formula > requires applying sqrt() four times, while VTK's formula requires applying > sqrt() only once. Why vtkTriangle::TriangleArea() doesn't use cross product? Also cross product requires applying sqrt() only once. -- ASOU Masato From flaviu2 at yahoo.com Thu Sep 4 04:56:46 2014 From: flaviu2 at yahoo.com (flaviu2) Date: Thu, 4 Sep 2014 01:56:46 -0700 (PDT) Subject: [vtkusers] vtkCommand mouse doubleclick In-Reply-To: <468D137A.1030505@cotran.ca> References: <623453.44018.qm@web62308.mail.re1.yahoo.com> <468D137A.1030505@cotran.ca> Message-ID: <1409821006825-5728565.post@n5.nabble.com> I know that might be so late, but someone else could saerch for this issue ... here is a slighltly different solution: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/DoubleClick Interaction/DoubleClick -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkCommand-mouse-doubleclick-tp1233942p5728565.html Sent from the VTK - Users mailing list archive at Nabble.com. From nicgallego at gmail.com Thu Sep 4 05:44:45 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Thu, 4 Sep 2014 11:44:45 +0200 Subject: [vtkusers] About vtkCellLocator::IntersectWithLine method In-Reply-To: References: Message-ID: Hi David, Thank you very much, your explanation took me back to the good track. It would be nice if next time developers review locators documentations, make explicit the difference between double pcoords[3] and double x[3] the first being in baricentric coordinates apearently and the second in data coordinates. I will try to extract an example of this exercice a post it on the wiki. Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-09-03 19:57 GMT+02:00 David Gobbi : > On Wed, Sep 3, 2014 at 11:55 AM, David Gobbi > wrote: > > > > I don't have an answer on hand, but the answer is, yes, they are all > outputs. > > I meant to say "I don't have an example on hand". > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlrdave at aol.com Thu Sep 4 06:42:43 2014 From: dlrdave at aol.com (David Cole) Date: Thu, 4 Sep 2014 06:42:43 -0400 Subject: [vtkusers] TriangleArea() return the not correct value. In-Reply-To: <20140904.120245.261185053.asou@soum.co.jp> References: <8D1958BCD1FEB4B-15CC-A1DD@webmail-m269.sysops.aol.com> <20140904.120245.261185053.asou@soum.co.jp> Message-ID: <8D19644176811B3-15CC-1209B@webmail-m269.sysops.aol.com> Good -- glad I was just misinterpreting your email... By the way, the comment "Heron's formula requires applying sqrt() four times" is because to use that formula, you need to calculate the length of each side of the triangle, so that requires 3 sqrt() calls, one for each side. The last sqrt() call comes from applying the formula itself. With the cross product technique, there are six possible permutations of cross product, depending on which vectors you choose to do the cross product: a x b, a x c, b x a, b x c, c x a, and c x b. I think you will still hit a math problem with some of the permutations for your extreme case, won't you? If so, then whether or not your result is acceptable depends on being lucky about which permutation you choose. David C. From selcukcalli at gmail.com Thu Sep 4 07:19:06 2014 From: selcukcalli at gmail.com (=?UTF-8?Q?Selcuk_=C3=87ALLI?=) Date: Thu, 4 Sep 2014 14:19:06 +0300 Subject: [vtkusers] 3D mesh Message-ID: Can we obtain a mesh from 3D array with floating values? What kind of filters/functions do we need to do this process? Sample output images are below. ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ornek_2.jpg Type: image/jpeg Size: 56781 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ornek_1.jpg Type: image/jpeg Size: 40735 bytes Desc: not available URL: From nicgallego at gmail.com Thu Sep 4 08:31:00 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Thu, 4 Sep 2014 14:31:00 +0200 Subject: [vtkusers] 3D mesh In-Reply-To: References: Message-ID: Hi Selcuk, If you data is already binary, you could use vtkContourFilter [1] or equivanlently itkBinaryMask3DMeshSource[2] [1] http://www.vtk.org/doc/release/6.1/html/classvtkContourFilter.html [2] http://itk.org/ITKExamples/src/Core/Mesh/ExtractIsoSurface/Documentation.html?highlight=itkbinarymask3dmeshsource hope that helps, Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-09-04 13:19 GMT+02:00 Selcuk ?ALLI : > Can we obtain a mesh from 3D array with floating values? What kind of > filters/functions do we need to do this process? Sample output images are > below. > > > > > > > ? > > > ? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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: ornek_2.jpg Type: image/jpeg Size: 56781 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ornek_1.jpg Type: image/jpeg Size: 40735 bytes Desc: not available URL: From cory.quammen at kitware.com Thu Sep 4 08:35:17 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 4 Sep 2014 08:35:17 -0400 Subject: [vtkusers] About vtkCellLocator::IntersectWithLine method In-Reply-To: References: Message-ID: Hi Nicolas, While it would be fantastic to be able to review all of VTK and add documentation where ever it is missing, in reality the resources to do that will likely never materialize. However, one of the great things about VTK is that it is open source, and anyone can contribute patches to the source code, including missing documentation. With that in mind, I invite you to become a VTK developer and contribute the missing documentation in a patch. Directions for doing so can be found here: http://www.vtk.org/Wiki/VTK/Git/Develop Feel free to add me as a reviewer to any documentation topics you post. Best regards, Cory On Thu, Sep 4, 2014 at 5:44 AM, Nicolas Gallego wrote: > Hi David, > Thank you very much, your explanation took me back to the good track. > > It would be nice if next time developers review locators documentations, > make explicit the difference between > double pcoords[3] and double x[3] > the first being in baricentric coordinates apearently and the second in data > coordinates. > > I will try to extract an example of this exercice a post it on the wiki. > > Nicol?s Gallego-Ortiz > Universit? catholique de Louvain, Belgium > > > 2014-09-03 19:57 GMT+02:00 David Gobbi : > >> On Wed, Sep 3, 2014 at 11:55 AM, David Gobbi >> wrote: >> > >> > I don't have an answer on hand, but the answer is, yes, they are all >> > outputs. >> >> I meant to say "I don't have an example on hand". > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From andrew.crozier at medunigraz.at Thu Sep 4 09:00:47 2014 From: andrew.crozier at medunigraz.at (Andrew Crozier) Date: Thu, 04 Sep 2014 15:00:47 +0200 Subject: [vtkusers] Image Resampling Message-ID: <5408627F.7070703@medunigraz.at> I and a colleague are working on an image segmentation problem, where we use marching cubes to generate the surface of a segmentation, apply a custom smoothing operation to the surface mesh with numpy in python, then re-render as a vtk image at an arbitrary higher resolution before writing out for the rest of our workflow. The original data set is, however, not simply a binary data set, but both the 'ones' and 'zeros' are further subdivided into integer 'tag' values. We would like to map said tags to the resampled image, but I am trying to figure out the most efficient way to do that in VTK. ----------------- Say, for example, we have an image with four 'tags'; 10, 11, 12 and 13. 10 and 11 are assigned a zero value for the surface extraction and smoothing, and 12 and 13 are assigned ones. The surface is extracted, smoothed, and resampled image generated, which now also has ones and zeros as values. I would now like to reassign the appropriate tags, such that zeros always become either 10 or 11 and ones become either 12 or 13. Conceptually, I consider this problem as requiring something like a 'masked nearest neighbour' approach, meaning that each zero pixel in the resampled image should be assigned the tag of the spatially closest 10 or 11 pixel in the original image. I say masked nearest neighbour as it seems equivalent to a nearest neighbour interpolation (such as by using vtkImageInterpolator) but where pixels with a 12 or 13 value are ignored. The equivaltent mapping would of course be done for 'one' pixels in the resampled image, finding the closest in the original with a 12 or 13 value. ----------------- I could, or course, implement this algorithm in pure python as part of my script, but I am keen not to do so unless necessary as the resampled data sets can be quite large. I have fairly limited experience using vtk and would appreciate any suggestions or pointers on how to achieve the desired result. Best wishes, Andrew From jcplatt at dsl.pipex.com Thu Sep 4 09:41:14 2014 From: jcplatt at dsl.pipex.com (John Platt) Date: Thu, 4 Sep 2014 14:41:14 +0100 Subject: [vtkusers] Convert vtkRectilinearGrid to vtkImageData Message-ID: Hi, I found this post http://vtk.1045678.n5.nabble.com/How-can-I-transform-a-vtkRectilinearGrid-to-a-vtkImageData-td4493942.html from 2011. I need to preserve the spatial variation of the point data. Can anything be done with VTK 5.10.1. Many thanks, John. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simpsona at gmail.com Thu Sep 4 10:22:29 2014 From: simpsona at gmail.com (Amber Simpson) Date: Thu, 4 Sep 2014 10:22:29 -0400 Subject: [vtkusers] Job Opening for Postdoctoral Fellow in New York, NY Message-ID: I am looking for a highly motivated Postdoctoral Fellow to develop strategies for intraoperative spatio-temporial stereo imaging of the liver. The position is part of a large multidisciplinary disease management team from the Departments of Surgery, Radiology, and Medicine, investigating new computing methods toward precision cancer care. Applicants should hold a Ph.D. in computer science, engineering, or related discipline. The position will involve extensive clinical collaboration and data collection within the operating room environment. Familiarity with image-guided surgery and stereo-based imaging approaches is preferred. Background in numerical methods using Matlab is desirable. Strong programming skills in C++ or Java are required; VTK/ITK skills are encouraged. Memorial Sloan Kettering Cancer Center offers reduced rate housing in proximity to the hospital and competitive salary and benefits for postdoctoral fellows. Please email a cover letter indicating research interests, curriculum vitae including list of publications, and contact information for three referees by replying to this email or using the email address below. Amber Simpson, Ph.D. Assistant Attending Computer Scientist Departments of Surgery & Radiology Memorial Sloan Kettering Cancer Center New York, NY Email: simpsonl at mskcc.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From clavier2008 at hotmail.fr Thu Sep 4 10:48:28 2014 From: clavier2008 at hotmail.fr (AzDTo) Date: Thu, 4 Sep 2014 07:48:28 -0700 (PDT) Subject: [vtkusers] vtkChartXY: Rotate or flip a 2D Chart Message-ID: <1409842108320-5728574.post@n5.nabble.com> HI, Is there a way that I can make Rotating a *2D VTK Chart * 90 Degrees to the left or 90 degrees to the right? Like this: I take an example code from http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkChartXY-Rotate-or-flip-a-2D-Chart-tp5728574.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Sep 4 11:59:02 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 4 Sep 2014 09:59:02 -0600 Subject: [vtkusers] Image Resampling In-Reply-To: <5408627F.7070703@medunigraz.at> References: <5408627F.7070703@medunigraz.at> Message-ID: Hi Andrew, The "masking" part is what makes this especially tricky. Also, the NN interpolator is very specifically a "nearest neighbor" interpolator, its code would have to be changed drastically in order for it to instead look for the "nearest neighbor that has a value of X or Y". It would need a whole new inner loop to perform the search. I have a class that doesn't do quite what you need, but it might provide you with ideas: it is an interpolator specifically written for label images. It models the voxel positions as random variables (Gaussian) and, for each voxel in the resampled image, it finds the highest-probability label for that voxel. It does not, however, allow you to ignore specific label values. http://github.com/dgobbi/AIRS/blob/master/ImageRegistration/vtkLabelInterpolator.h - David On Thu, Sep 4, 2014 at 7:00 AM, Andrew Crozier wrote: > I and a colleague are working on an image segmentation problem, where we use > marching cubes to generate the surface of a segmentation, apply a custom > smoothing operation to the surface mesh with numpy in python, then re-render > as a vtk image at an arbitrary higher resolution before writing out for the > rest of our workflow. > > The original data set is, however, not simply a binary data set, but both > the 'ones' and 'zeros' are further subdivided into integer 'tag' values. We > would like to map said tags to the resampled image, but I am trying to > figure out the most efficient way to do that in VTK. > > ----------------- > > Say, for example, we have an image with four 'tags'; 10, 11, 12 and 13. 10 > and 11 are assigned a zero value for the surface extraction and smoothing, > and 12 and 13 are assigned ones. The surface is extracted, smoothed, and > resampled image generated, which now also has ones and zeros as values. I > would now like to reassign the appropriate tags, such that zeros always > become either 10 or 11 and ones become either 12 or 13. > > Conceptually, I consider this problem as requiring something like a 'masked > nearest neighbour' approach, meaning that each zero pixel in the resampled > image should be assigned the tag of the spatially closest 10 or 11 pixel in > the original image. I say masked nearest neighbour as it seems equivalent to > a nearest neighbour interpolation (such as by using vtkImageInterpolator) > but where pixels with a 12 or 13 value are ignored. The equivaltent mapping > would of course be done for 'one' pixels in the resampled image, finding the > closest in the original with a 12 or 13 value. > > ----------------- > > I could, or course, implement this algorithm in pure python as part of my > script, but I am keen not to do so unless necessary as the resampled data > sets can be quite large. I have fairly limited experience using vtk and > would appreciate any suggestions or pointers on how to achieve the desired > result. > > Best wishes, > Andrew From MEEHANBT at nv.doe.gov Thu Sep 4 13:48:09 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Thu, 4 Sep 2014 17:48:09 +0000 Subject: [vtkusers] python example ... Message-ID: For a new example, say for instance in the VTK Python area, I'd have to let someone know before the screenshot gets generated for the example. Is this the right mailing list for that? Anyhow, this was the example: http://www.vtk.org/Wiki/VTK/Examples/Python/DataManipulation/KochSnowflake.py -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.john.parker at googlemail.com Fri Sep 5 02:33:16 2014 From: andy.john.parker at googlemail.com (Dr Andrew Parker) Date: Fri, 5 Sep 2014 07:33:16 +0100 Subject: [vtkusers] Job Opportunities at Fluid Gravity Engineering Message-ID: <0F28BC61-1CCB-4125-909A-A4F3B3B32E0D@gmail.com> Dear All, I know this is not the purpose of these forums, but I wanted to take a moment to notify you of the current job opportunities available at Fluid Gravity Engineering. Please visit http://www.fluidgravity.co.uk for further details about our company and the roles that are currently available. You will also find contact details there should you wish to get in touch. Please feel free to forward this to others who may be interested. Many thanks, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicgallego at gmail.com Fri Sep 5 05:27:06 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Fri, 5 Sep 2014 11:27:06 +0200 Subject: [vtkusers] 3D mesh In-Reply-To: References: Message-ID: Hi Selcuk, So your question is about interfacing your data to VTK formats. I was in a similar situation recently, not with image data but with surface data and what I did was to write in my application, glue code to structure data in some vtk format. It shouldn't be that hard. I guess you could try to build from your program something like a vtkImage similar to what the readers in the examples are providing, or just save your data, in some of the supported image formats the files as inputs to the processing pipeline proposed in the examples. Check this formats in the inheritance diagram of the vtkImageReader for example [1]. Hope that helps, ps. keep the discussion on the forum so that you can get help from others also. Don't forget to check if vtkusers at vtk.org is either in the to: or the cc: fields of your message. [1] http://www.vtk.org/doc/release/6.1/html/classvtkImageReader.html Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-09-04 15:50 GMT+02:00 Selcuk ?ALLI : > Hi Nicolas, thank you for your answer. > vtkcontourfilt can meet my needs. But I have found examples on the > internet by reading data from the file takes place. I want to use dummy dat > on memory not use file. can you help in this regard. > For example: > > vtkVolume16Reader *reader = vtkVolume16Reader::New(); > reader->SetDataDimensions (70,50); reader->SetImageRange (1,20); > reader->SetFilePrefix (filePath); int thresholdValue = 100; > vtkContourFilter *filter = vtkContourFilter::New(); > filter->SetInputConnection(reader->GetOutputPort()); // I don't want read > file, I want to generate point data on memory filter->SetValue(0, > thresholdValue); vtkPolyDataNormals *normals = vtkPolyDataNormals::New(); > normals->SetInputConnection(filter->GetOutputPort()); vtkPolyDataMapper > *mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(normals->GetOutputPort()); > mapper->ScalarVisibilityOff(); vtkActor *mesh = vtkActor::New(); > mesh->SetMapper(mapper); > > // I don't want read file, I want to generate point data on memory > example: > vtkSmartPointer points = vtkSmartPointer::New(); > unsigned int x_cnt = 100; unsigned int y_cnt = 4; unsigned int z_cnt = 60; > for(unsigned int x = 0; x < x_cnt; x++) { for(unsigned int y = 0; y < > y_cnt; y++) { for(unsigned int z = 0; z < z_cnt; z++) { > points->InsertNextPoint(x, y, z); } } } > > > > > 2014-09-04 15:31 GMT+03:00 Nicolas Gallego : > >> Hi Selcuk, >> >> If you data is already binary, you could use vtkContourFilter [1] or >> equivanlently itkBinaryMask3DMeshSource[2] >> >> [1] http://www.vtk.org/doc/release/6.1/html/classvtkContourFilter.html >> [2] >> http://itk.org/ITKExamples/src/Core/Mesh/ExtractIsoSurface/Documentation.html?highlight=itkbinarymask3dmeshsource >> >> hope that helps, >> >> Nicol?s Gallego-Ortiz >> Universit? catholique de Louvain, Belgium >> >> >> 2014-09-04 13:19 GMT+02:00 Selcuk ?ALLI : >> >>> Can we obtain a mesh from 3D array with floating values? What kind of >>> filters/functions do we need to do this process? Sample output images are >>> below. >>> >>> >>> >>> >>> >>> >>> ? >>> >>> >>> ? >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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: ornek_1.jpg Type: image/jpeg Size: 40735 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ornek_2.jpg Type: image/jpeg Size: 56781 bytes Desc: not available URL: From andrew.crozier at medunigraz.at Fri Sep 5 05:46:16 2014 From: andrew.crozier at medunigraz.at (Andrew Crozier) Date: Fri, 05 Sep 2014 11:46:16 +0200 Subject: [vtkusers] Image Resampling In-Reply-To: References: <5408627F.7070703@medunigraz.at> Message-ID: <54098668.2020907@medunigraz.at> Hi David, Thanks very much for the feedback. Your code has given some good ideas. BW, Andrew On 04/09/14 17:59, David Gobbi wrote: > Hi Andrew, > > The "masking" part is what makes this especially tricky. Also, the NN > interpolator is very specifically a "nearest neighbor" interpolator, > its code would have to be changed drastically in order for it to > instead look for the "nearest neighbor that has a value of X or Y". > It would need a whole new inner loop to perform the search. > > I have a class that doesn't do quite what you need, but it might > provide you with ideas: it is an interpolator specifically written for > label images. It models the voxel positions as random variables > (Gaussian) and, for each voxel in the resampled image, it finds the > highest-probability label for that voxel. It does not, however, allow > you to ignore specific label values. > > http://github.com/dgobbi/AIRS/blob/master/ImageRegistration/vtkLabelInterpolator.h > > - David > > > On Thu, Sep 4, 2014 at 7:00 AM, Andrew Crozier > wrote: >> I and a colleague are working on an image segmentation problem, where we use >> marching cubes to generate the surface of a segmentation, apply a custom >> smoothing operation to the surface mesh with numpy in python, then re-render >> as a vtk image at an arbitrary higher resolution before writing out for the >> rest of our workflow. >> >> The original data set is, however, not simply a binary data set, but both >> the 'ones' and 'zeros' are further subdivided into integer 'tag' values. We >> would like to map said tags to the resampled image, but I am trying to >> figure out the most efficient way to do that in VTK. >> >> ----------------- >> >> Say, for example, we have an image with four 'tags'; 10, 11, 12 and 13. 10 >> and 11 are assigned a zero value for the surface extraction and smoothing, >> and 12 and 13 are assigned ones. The surface is extracted, smoothed, and >> resampled image generated, which now also has ones and zeros as values. I >> would now like to reassign the appropriate tags, such that zeros always >> become either 10 or 11 and ones become either 12 or 13. >> >> Conceptually, I consider this problem as requiring something like a 'masked >> nearest neighbour' approach, meaning that each zero pixel in the resampled >> image should be assigned the tag of the spatially closest 10 or 11 pixel in >> the original image. I say masked nearest neighbour as it seems equivalent to >> a nearest neighbour interpolation (such as by using vtkImageInterpolator) >> but where pixels with a 12 or 13 value are ignored. The equivaltent mapping >> would of course be done for 'one' pixels in the resampled image, finding the >> closest in the original with a 12 or 13 value. >> >> ----------------- >> >> I could, or course, implement this algorithm in pure python as part of my >> script, but I am keen not to do so unless necessary as the resampled data >> sets can be quite large. I have fairly limited experience using vtk and >> would appreciate any suggestions or pointers on how to achieve the desired >> result. >> >> Best wishes, >> Andrew From andrew.amaclean at gmail.com Fri Sep 5 06:18:18 2014 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Fri, 5 Sep 2014 20:18:18 +1000 Subject: [vtkusers] python example Message-ID: When you are in edit mode look at:http :// www.vtk.org /Wiki/VTK/Examples/Python/Visualization/ ElevationBandsWithGlyphs at the very top you will see a link to a png file. From memory, if you type in a link like this but substitute KochSnowflake.png for the image then, if you then click on the link, after going out of edit mode, (it should be red), it will take you to a page where you can upload the image. Bill Lorensen will be able to help more. He will give better instructions than I can. Regards Andrew On Sep 5, 2014 7:46 PM, -request@ vtk.org > wrote: > > Send vtkusers mailing list submissions to > > ---------- Forwarded message ---------- > From: "Meehan, Bernard" @ nv.doe.gov > > To: "vtkusers @ vtk.org " @ vtk.org > > Cc: > Date: Thu, 4 Sep 2014 17:48:09 +0000 > Subject: [vtkusers] python example ... > For a new example, say for instance in the VTK Python area, I'd have to let someone know before the screenshot gets generated for the example. Is this the right mailing list for that? > > Anyhow, this was the example: >http:// www.vtk.org /Wiki/VTK/Examples/Python/ DataManipulation / KochSnowflake.py > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Sep 5 08:00:41 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 5 Sep 2014 08:00:41 -0400 Subject: [vtkusers] python example In-Reply-To: References: Message-ID: Andrew, Those instructions are spot on. Thanks, Bill On Fri, Sep 5, 2014 at 6:18 AM, Andrew Maclean wrote: > When you are in edit mode look > at:http://www.vtk.org/Wiki/VTK/Examples/Python/Visualization/ElevationBandsWithGlyphs > at the very top you will see a link to a png file. From memory, if you type > in a link like this but substitute KochSnowflake.png for the image then, > if you then click on the link, after going out of edit mode, (it should be > red), it will take you to a page where you can upload the image. > > Bill Lorensen will be able to help more. He will give better instructions > than I can. > > Regards > > Andrew > > On Sep 5, 2014 7:46 PM, wrote: >> >> Send vtkusers mailing list submissions to > >> >> ---------- Forwarded message ---------- >> From: "Meehan, Bernard" >> To: "vtkusers at vtk.org" >> Cc: >> Date: Thu, 4 Sep 2014 17:48:09 +0000 >> Subject: [vtkusers] python example ... >> For a new example, say for instance in the VTK Python area, I'd have to >> let someone know before the screenshot gets generated for the example. Is >> this the right mailing list for that? >> >> Anyhow, this was the example: >>http://www.vtk.org/Wiki/VTK/Examples/Python/DataManipulation/KochSnowflake.py >> >> >> -- Unpaid intern in BillsBasement at noware dot com From emptytanka at web.de Fri Sep 5 09:20:59 2014 From: emptytanka at web.de (Tankard) Date: Fri, 5 Sep 2014 06:20:59 -0700 (PDT) Subject: [vtkusers] Integrate VTK6.1 in QT5.3 in Visual Studio 2013 Message-ID: <1409923259750-5728588.post@n5.nabble.com> Hello, I'm trying to use the QVTKWidget to display 3D data inside a QT-GUI. I installed QT 5.3 and compiled VTK using CMake for Visual Studio 2013. I used the msvc_opengl version of QT. After installing VTK6.1, I copied the QVTKWidgetPlugin.dll from VTK\plugins\designer to Qt\5.3\msvc2013_opengl\plugins\designer. I created a new QTApplication (using the wizzard) and added all dependencies to the project setting. At this point, the project worked. Then I used the QT Designer to add a QVTKWidget. After that, the project stoped working. In debug, I get the error: QWidget: Must construct a QApplication before a QWidget when the QVTKWidget is constructed. In release, I get a different error: Exception at 0x52724A0D (vtkGUISupportQt-6.1.dll) in ParcelChecker.exe: 0xC0000005: access violation while reading position 0x00000000 and the vtkOutputWindow says: "Error: no override found for 'vtkRenderWindow'". I have not a single line of self written code. I use Visual Studio 2013 and Windows 8.1 64bit. Is the use of QVTKWidget the right way to display vtk-data inside a qt-gui, or are there other (better) ways to do it? Can anyone explain how I get these errors and how to fix it? Best regards Tankard -- View this message in context: http://vtk.1045678.n5.nabble.com/Integrate-VTK6-1-in-QT5-3-in-Visual-Studio-2013-tp5728588.html Sent from the VTK - Users mailing list archive at Nabble.com. From nicgallego at gmail.com Fri Sep 5 10:08:06 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Fri, 5 Sep 2014 16:08:06 +0200 Subject: [vtkusers] About vtkCellLocator::IntersectWithLine method In-Reply-To: References: Message-ID: Hi Cory and David, Thank you for the invitation to develop, I did the changes in the source code and pushed the topic. I also added you as a reviewer. I basically took David's explanation and place it in the definition of the method vtkCell::IntersectWithLine() since I understood it was somehow delegated to that class, I also added the reference in vtkAbstractCellLocator to the vtkCell for details. I hope that helps, Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-09-04 14:35 GMT+02:00 Cory Quammen : > Hi Nicolas, > > While it would be fantastic to be able to review all of VTK and add > documentation where ever it is missing, in reality the resources to do > that will likely never materialize. However, one of the great things > about VTK is that it is open source, and anyone can contribute patches > to the source code, including missing documentation. > > With that in mind, I invite you to become a VTK developer and > contribute the missing documentation in a patch. Directions for doing > so can be found here: > > http://www.vtk.org/Wiki/VTK/Git/Develop > > Feel free to add me as a reviewer to any documentation topics you post. > > Best regards, > Cory > > On Thu, Sep 4, 2014 at 5:44 AM, Nicolas Gallego > wrote: > > Hi David, > > Thank you very much, your explanation took me back to the good track. > > > > It would be nice if next time developers review locators documentations, > > make explicit the difference between > > double pcoords[3] and double x[3] > > the first being in baricentric coordinates apearently and the second in > data > > coordinates. > > > > I will try to extract an example of this exercice a post it on the wiki. > > > > Nicol?s Gallego-Ortiz > > Universit? catholique de Louvain, Belgium > > > > > > 2014-09-03 19:57 GMT+02:00 David Gobbi : > > > >> On Wed, Sep 3, 2014 at 11:55 AM, David Gobbi > >> wrote: > >> > > >> > I don't have an answer on hand, but the answer is, yes, they are all > >> > outputs. > >> > >> I meant to say "I don't have an example on hand". > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Sep 5 10:18:08 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 5 Sep 2014 10:18:08 -0400 Subject: [vtkusers] About vtkCellLocator::IntersectWithLine method In-Reply-To: References: Message-ID: Nicolas, Thanks for your contribution! I've reviewed it and merged it into the repository. http://www.vtk.org/gitweb?p=VTK.git;a=log I'm looking forward to your future contributions! All the best, Cory On Fri, Sep 5, 2014 at 10:08 AM, Nicolas Gallego wrote: > Hi Cory and David, > > Thank you for the invitation to develop, I did the changes in the source > code and pushed the topic. I also added you as a reviewer. > > I basically took David's explanation and place it in the definition of the > method vtkCell::IntersectWithLine() since I understood it was somehow > delegated to that class, I also added the reference in > vtkAbstractCellLocator to the vtkCell for details. > > I hope that helps, > > Nicol?s Gallego-Ortiz > Universit? catholique de Louvain, Belgium > > > 2014-09-04 14:35 GMT+02:00 Cory Quammen : >> >> Hi Nicolas, >> >> While it would be fantastic to be able to review all of VTK and add >> documentation where ever it is missing, in reality the resources to do >> that will likely never materialize. However, one of the great things >> about VTK is that it is open source, and anyone can contribute patches >> to the source code, including missing documentation. >> >> With that in mind, I invite you to become a VTK developer and >> contribute the missing documentation in a patch. Directions for doing >> so can be found here: >> >> http://www.vtk.org/Wiki/VTK/Git/Develop >> >> Feel free to add me as a reviewer to any documentation topics you post. >> >> Best regards, >> Cory >> >> On Thu, Sep 4, 2014 at 5:44 AM, Nicolas Gallego >> wrote: >> > Hi David, >> > Thank you very much, your explanation took me back to the good track. >> > >> > It would be nice if next time developers review locators documentations, >> > make explicit the difference between >> > double pcoords[3] and double x[3] >> > the first being in baricentric coordinates apearently and the second in >> > data >> > coordinates. >> > >> > I will try to extract an example of this exercice a post it on the wiki. >> > >> > Nicol?s Gallego-Ortiz >> > Universit? catholique de Louvain, Belgium >> > >> > >> > 2014-09-03 19:57 GMT+02:00 David Gobbi : >> > >> >> On Wed, Sep 3, 2014 at 11:55 AM, David Gobbi >> >> wrote: >> >> > >> >> > I don't have an answer on hand, but the answer is, yes, they are all >> >> > outputs. >> >> >> >> I meant to say "I don't have an example on hand". >> > >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > > > From beekmaarten at yahoo.com Fri Sep 5 12:40:33 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Fri, 5 Sep 2014 09:40:33 -0700 Subject: [vtkusers] vtkImageThresholdConnectivity Message-ID: <1409935233.58194.YahooMailNeo@web121303.mail.ne1.yahoo.com> Hi all, I have a problem with vtkImageThresholdConnectivity in a pipeline with vtkImageSlice. The vtkImageSlice reduces the extent of the image to the slice that is visible, and vtkImageThresholdConnectivity allocates its output accordingly. However it then takes the scalar pointer of the output for the extent of the (3d) input image. This happens on line 448 of vtkImageThresholdConnectivity.cxx (VTK 6.1.0). Is this a bug, or am I doing something wrong? Thanks - Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 5 13:04:14 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 5 Sep 2014 11:04:14 -0600 Subject: [vtkusers] vtkImageThresholdConnectivity In-Reply-To: <1409935233.58194.YahooMailNeo@web121303.mail.ne1.yahoo.com> References: <1409935233.58194.YahooMailNeo@web121303.mail.ne1.yahoo.com> Message-ID: Hi Maarten, I think it might be a bug, so I will investigate. This filter needs the whole extent from the input because it does a 3D connectivity operation, but that shouldn't impact the extent that it produces as output. If asked for a single-slice output extent, then it should pull in a 3D input extent but produce a 2D output extent. - David On Fri, Sep 5, 2014 at 10:40 AM, Maarten Beek via vtkusers wrote: > Hi all, > > I have a problem with vtkImageThresholdConnectivity in a pipeline with > vtkImageSlice. > > The vtkImageSlice reduces the extent of the image to the slice that is > visible, and vtkImageThresholdConnectivity allocates its output accordingly. > However it then takes the scalar pointer of the output for the extent of the > (3d) input image. > This happens on line 448 of vtkImageThresholdConnectivity.cxx (VTK 6.1.0). > > Is this a bug, or am I doing something wrong? > > Thanks - Maarten From david.gobbi at gmail.com Fri Sep 5 13:29:25 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 5 Sep 2014 11:29:25 -0600 Subject: [vtkusers] vtkImageThresholdConnectivity In-Reply-To: References: <1409935233.58194.YahooMailNeo@web121303.mail.ne1.yahoo.com> Message-ID: Yes, it is a bug, and exactly at line 448 like you said. Thanks. I'll start working on a patch, since I submitted the original code. In the meantime, you might be able to work around the problem by calling Update() on vtkImageThresholdConnectivity before calling Render() on your RenderWindow. That will cause the filter to produce a 3D extent, and then vtkImageSlice will take just the slice it needs. - David On Fri, Sep 5, 2014 at 11:04 AM, David Gobbi wrote: > Hi Maarten, > > I think it might be a bug, so I will investigate. This filter needs > the whole extent from the input because it does a 3D connectivity > operation, but that shouldn't impact the extent that it produces as > output. If asked for a single-slice output extent, then it should > pull in a 3D input extent but produce a 2D output extent. > > - David > > On Fri, Sep 5, 2014 at 10:40 AM, Maarten Beek via vtkusers > wrote: >> Hi all, >> >> I have a problem with vtkImageThresholdConnectivity in a pipeline with >> vtkImageSlice. >> >> The vtkImageSlice reduces the extent of the image to the slice that is >> visible, and vtkImageThresholdConnectivity allocates its output accordingly. >> However it then takes the scalar pointer of the output for the extent of the >> (3d) input image. >> This happens on line 448 of vtkImageThresholdConnectivity.cxx (VTK 6.1.0). >> >> Is this a bug, or am I doing something wrong? >> >> Thanks - Maarten From beekmaarten at yahoo.com Fri Sep 5 14:06:08 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Fri, 5 Sep 2014 11:06:08 -0700 Subject: [vtkusers] vtkImageThresholdConnectivity In-Reply-To: References: <1409935233.58194.YahooMailNeo@web121303.mail.ne1.yahoo.com> Message-ID: <1409940368.71958.YahooMailNeo@web121302.mail.ne1.yahoo.com> Thanks - David. I'll try your Update() suggestion. I made my app is quite complex; not sure I can find the right stop for the function call... ;-) In the meantime, do you need anything from me to help you with the fix? Maarten On Friday, September 5, 2014 1:29:45 PM, David Gobbi wrote: Yes, it is a bug, and exactly at line 448 like you said. Thanks. I'll start working on a patch, since I submitted the original code. In the meantime, you might be able to work around the problem by calling Update() on vtkImageThresholdConnectivity before calling Render() on your RenderWindow. That will cause the filter to produce a 3D extent, and then vtkImageSlice will take just the slice it needs. - David On Fri, Sep 5, 2014 at 11:04 AM, David Gobbi wrote: > Hi Maarten, > > I think it might be a bug, so I will investigate. This filter needs > the whole extent from the input because it does a 3D connectivity > operation, but that shouldn't impact the extent that it produces as > output. If asked for a single-slice output extent, then it should > pull in a 3D input extent but produce a 2D output extent. > > - David > > On Fri, Sep 5, 2014 at 10:40 AM, Maarten Beek via vtkusers > wrote: >> Hi all, >> >> I have a problem with vtkImageThresholdConnectivity in a pipeline with >> vtkImageSlice. >> >> The vtkImageSlice reduces the extent of the image to the slice that is >> visible, and vtkImageThresholdConnectivity allocates its output accordingly. >> However it then takes the scalar pointer of the output for the extent of the >> (3d) input image. >> This happens on line 448 of vtkImageThresholdConnectivity.cxx (VTK 6.1.0). >> >> Is this a bug, or am I doing something wrong? >> >> Thanks - Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 5 14:07:33 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 5 Sep 2014 12:07:33 -0600 Subject: [vtkusers] vtkImageThresholdConnectivity In-Reply-To: <1409940368.71958.YahooMailNeo@web121302.mail.ne1.yahoo.com> References: <1409935233.58194.YahooMailNeo@web121303.mail.ne1.yahoo.com> <1409940368.71958.YahooMailNeo@web121302.mail.ne1.yahoo.com> Message-ID: The patch can be found at the following web page, if you are able to try it out then I'd like to hear whether it works for you. http://review.source.kitware.com/#/c/16916/1 Even with this patch, it is still a good idea to call Update() on the filter before Render(), because otherwise the filter will re-execute every time the slice location changes, causing the render to be very slow. - David On Fri, Sep 5, 2014 at 12:06 PM, Maarten Beek wrote: > Thanks - David. > > I'll try your Update() suggestion. I made my app is quite complex; not sure > I can find the right stop for the function call... ;-) > > In the meantime, do you need anything from me to help you with the fix? > > Maarten > > > On Friday, September 5, 2014 1:29:45 PM, David Gobbi > wrote: > > > Yes, it is a bug, and exactly at line 448 like you said. Thanks. > I'll start working on a patch, since I submitted the original code. > > In the meantime, you might be able to work around the problem by > calling Update() on vtkImageThresholdConnectivity before calling > Render() on your RenderWindow. That will cause the filter to produce > a 3D extent, and then vtkImageSlice will take just the slice it needs. > > - David > > On Fri, Sep 5, 2014 at 11:04 AM, David Gobbi wrote: >> Hi Maarten, >> >> I think it might be a bug, so I will investigate. This filter needs >> the whole extent from the input because it does a 3D connectivity >> operation, but that shouldn't impact the extent that it produces as >> output. If asked for a single-slice output extent, then it should >> pull in a 3D input extent but produce a 2D output extent. >> >> - David >> >> On Fri, Sep 5, 2014 at 10:40 AM, Maarten Beek via vtkusers >> wrote: >>> Hi all, >>> >>> I have a problem with vtkImageThresholdConnectivity in a pipeline with >>> vtkImageSlice. >>> >>> The vtkImageSlice reduces the extent of the image to the slice that is >>> visible, and vtkImageThresholdConnectivity allocates its output >>> accordingly. >>> However it then takes the scalar pointer of the output for the extent of >>> the >>> (3d) input image. >>> This happens on line 448 of vtkImageThresholdConnectivity.cxx (VTK >>> 6.1.0). >>> >>> Is this a bug, or am I doing something wrong? >>> >>> Thanks - Maarten > > From beekmaarten at yahoo.com Fri Sep 5 14:51:06 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Fri, 5 Sep 2014 11:51:06 -0700 Subject: [vtkusers] vtkImageThresholdConnectivity In-Reply-To: References: <1409935233.58194.YahooMailNeo@web121303.mail.ne1.yahoo.com> <1409940368.71958.YahooMailNeo@web121302.mail.ne1.yahoo.com> Message-ID: <1409943066.66831.YahooMailNeo@web121303.mail.ne1.yahoo.com> Your patch seems to have solved my crash. Your Update() suggestion is indeed still a good one... Maarten On Friday, September 5, 2014 2:07:54 PM, David Gobbi wrote: The patch can be found at the following web page, if you are able to try it out then I'd like to hear whether it works for you. http://review.source.kitware.com/#/c/16916/1 Even with this patch, it is still a good idea to call Update() on the filter before Render(), because otherwise the filter will re-execute every time the slice location changes, causing the render to be very slow. - David On Fri, Sep 5, 2014 at 12:06 PM, Maarten Beek wrote: > Thanks - David. > > I'll try your Update() suggestion. I made my app is quite complex; not sure > I can find the right stop for the function call... ;-) > > In the meantime, do you need anything from me to help you with the fix? > > Maarten > > > On Friday, September 5, 2014 1:29:45 PM, David Gobbi > wrote: > > > Yes, it is a bug, and exactly at line 448 like you said. Thanks. > I'll start working on a patch, since I submitted the original code. > > In the meantime, you might be able to work around the problem by > calling Update() on vtkImageThresholdConnectivity before calling > Render() on your RenderWindow. That will cause the filter to produce > a 3D extent, and then vtkImageSlice will take just the slice it needs. > > - David > > On Fri, Sep 5, 2014 at 11:04 AM, David Gobbi wrote: >> Hi Maarten, >> >> I think it might be a bug, so I will investigate. This filter needs >> the whole extent from the input because it does a 3D connectivity >> operation, but that shouldn't impact the extent that it produces as >> output. If asked for a single-slice output extent, then it should >> pull in a 3D input extent but produce a 2D output extent. >> >> - David >> >> On Fri, Sep 5, 2014 at 10:40 AM, Maarten Beek via vtkusers >> wrote: >>> Hi all, >>> >>> I have a problem with vtkImageThresholdConnectivity in a pipeline with >>> vtkImageSlice. >>> >>> The vtkImageSlice reduces the extent of the image to the slice that is >>> visible, and vtkImageThresholdConnectivity allocates its output >>> accordingly. >>> However it then takes the scalar pointer of the output for the extent of >>> the >>> (3d) input image. >>> This happens on line 448 of vtkImageThresholdConnectivity.cxx (VTK >>> 6.1.0). >>> >>> Is this a bug, or am I doing something wrong? >>> >>> Thanks - Maarten > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scbiradar at gmail.com Fri Sep 5 15:23:38 2014 From: scbiradar at gmail.com (Santosh Biradar) Date: Sat, 6 Sep 2014 00:53:38 +0530 Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method Message-ID: Hi, I am trying to find if a point lies inside a closed surface. I have a closed STL file and i want to find if a point lies inside the surface defined by the STL file. I am using a vtkSelectEnclosedPoints filter of VTK-5.10 and calling isInside method of the filter. I have checked that my STL file is a closed file by using a vtkFeatureEdges filter. However, I notice that if I run a loop for the same point I get inconsistent output. Python Code: reader = vtk.vtkSTLReader() reader.SetFileName("/path/to/ my/file/") featureEdge = vtk.vtkFeatureEdges() featureEdge.FeatureEdgesOff() featureEdge.BoundaryEdgesOn() featureEdge.NonManifoldEdgesOn() featureEdge.SetInput(reader.GetOutput()) featureEdge.Update() openEdges = featureEdge.GetOutput().GetNumberOfCells() if openEdges != 0: print " the stl file is not closed" filter = vtk.vtkSelectEnclosedPoints() filter.SetSurface(reader.GetOutput()) # create input polydata pts = vtk.vtkPoints() pts.InsertNextPoint(0.1,0,0.1) pts_pd = vtk.vtkPolyData() pts_pd.SetPoints(pts) for i in range(100): filter.SetInput(pts_pd) filter.Update() print filter.IsInside(0) This code gives me an output like this (formatted for posting here): 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1 Why is the filter behaving inconsistently for the same point ? Any suggestions ? Thanks, Santosh -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 5 15:44:38 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 5 Sep 2014 13:44:38 -0600 Subject: [vtkusers] vtkImageThresholdConnectivity In-Reply-To: <1409943066.66831.YahooMailNeo@web121303.mail.ne1.yahoo.com> References: <1409935233.58194.YahooMailNeo@web121303.mail.ne1.yahoo.com> <1409940368.71958.YahooMailNeo@web121302.mail.ne1.yahoo.com> <1409943066.66831.YahooMailNeo@web121303.mail.ne1.yahoo.com> Message-ID: Regarding the Update(), I think that I should add an option in the SliceMapper to _always_ request the whole extent. Usually people don't want to stream the data through the pipeline on every render, they want to update the whole volume just once. - David On Fri, Sep 5, 2014 at 12:51 PM, Maarten Beek wrote: > Your patch seems to have solved my crash. > > Your Update() suggestion is indeed still a good one... > > Maarten > > > On Friday, September 5, 2014 2:07:54 PM, David Gobbi > wrote: > > > The patch can be found at the following web page, if you are able to > try it out then I'd like to hear whether it works for you. > > http://review.source.kitware.com/#/c/16916/1 > > Even with this patch, it is still a good idea to call Update() on the > filter before Render(), because otherwise the filter will re-execute > every time the slice location changes, causing the render to be very > slow. > > - David > > On Fri, Sep 5, 2014 at 12:06 PM, Maarten Beek wrote: >> Thanks - David. >> >> I'll try your Update() suggestion. I made my app is quite complex; not >> sure >> I can find the right stop for the function call... ;-) >> >> In the meantime, do you need anything from me to help you with the fix? >> >> Maarten >> >> >> On Friday, September 5, 2014 1:29:45 PM, David Gobbi >> >> wrote: >> >> >> Yes, it is a bug, and exactly at line 448 like you said. Thanks. >> I'll start working on a patch, since I submitted the original code. >> >> In the meantime, you might be able to work around the problem by >> calling Update() on vtkImageThresholdConnectivity before calling >> Render() on your RenderWindow. That will cause the filter to produce >> a 3D extent, and then vtkImageSlice will take just the slice it needs. >> >> - David >> >> On Fri, Sep 5, 2014 at 11:04 AM, David Gobbi >> wrote: >>> Hi Maarten, >>> >>> I think it might be a bug, so I will investigate. This filter needs >>> the whole extent from the input because it does a 3D connectivity >>> operation, but that shouldn't impact the extent that it produces as >>> output. If asked for a single-slice output extent, then it should >>> pull in a 3D input extent but produce a 2D output extent. >>> >>> - David >>> >>> On Fri, Sep 5, 2014 at 10:40 AM, Maarten Beek via vtkusers >>> wrote: >>>> Hi all, >>>> >>>> I have a problem with vtkImageThresholdConnectivity in a pipeline with >>>> vtkImageSlice. >>>> >>>> The vtkImageSlice reduces the extent of the image to the slice that is >>>> visible, and vtkImageThresholdConnectivity allocates its output >>>> accordingly. >>>> However it then takes the scalar pointer of the output for the extent of >>>> the >>>> (3d) input image. >>>> This happens on line 448 of vtkImageThresholdConnectivity.cxx (VTK >>>> 6.1.0). >>>> >>>> Is this a bug, or am I doing something wrong? >>>> >>>> Thanks - Maarten >> >> > > From andrew.crozier at medunigraz.at Fri Sep 5 18:08:43 2014 From: andrew.crozier at medunigraz.at (Andrew Crozier) Date: Sat, 06 Sep 2014 00:08:43 +0200 Subject: [vtkusers] Image Resampling In-Reply-To: <54098668.2020907@medunigraz.at> References: <5408627F.7070703@medunigraz.at> <54098668.2020907@medunigraz.at> Message-ID: <540A346B.4070500@medunigraz.at> If anyone following up this thread is interested, I settled on a solution using a python/numpy C extension. We were already doing some array operations using numpy in this project, and a small python C module is fast and easy to build on new systems (whereas building vtk and python bindings from source is non-trivial - at present we use vanilla vtk from system package managers). BW, Andrew On 05/09/14 11:46, Andrew Crozier wrote: > Hi David, > > Thanks very much for the feedback. Your code has given some good ideas. > > BW, > Andrew > > On 04/09/14 17:59, David Gobbi wrote: >> Hi Andrew, >> >> The "masking" part is what makes this especially tricky. Also, the NN >> interpolator is very specifically a "nearest neighbor" interpolator, >> its code would have to be changed drastically in order for it to >> instead look for the "nearest neighbor that has a value of X or Y". >> It would need a whole new inner loop to perform the search. >> >> I have a class that doesn't do quite what you need, but it might >> provide you with ideas: it is an interpolator specifically written for >> label images. It models the voxel positions as random variables >> (Gaussian) and, for each voxel in the resampled image, it finds the >> highest-probability label for that voxel. It does not, however, allow >> you to ignore specific label values. >> >> http://github.com/dgobbi/AIRS/blob/master/ImageRegistration/vtkLabelInterpolator.h >> >> >> - David >> >> >> On Thu, Sep 4, 2014 at 7:00 AM, Andrew Crozier >> wrote: >>> I and a colleague are working on an image segmentation problem, >>> where we use >>> marching cubes to generate the surface of a segmentation, apply a >>> custom >>> smoothing operation to the surface mesh with numpy in python, then >>> re-render >>> as a vtk image at an arbitrary higher resolution before writing out >>> for the >>> rest of our workflow. >>> >>> The original data set is, however, not simply a binary data set, but >>> both >>> the 'ones' and 'zeros' are further subdivided into integer 'tag' >>> values. We >>> would like to map said tags to the resampled image, but I am trying to >>> figure out the most efficient way to do that in VTK. >>> >>> ----------------- >>> >>> Say, for example, we have an image with four 'tags'; 10, 11, 12 and >>> 13. 10 >>> and 11 are assigned a zero value for the surface extraction and >>> smoothing, >>> and 12 and 13 are assigned ones. The surface is extracted, smoothed, >>> and >>> resampled image generated, which now also has ones and zeros as >>> values. I >>> would now like to reassign the appropriate tags, such that zeros always >>> become either 10 or 11 and ones become either 12 or 13. >>> >>> Conceptually, I consider this problem as requiring something like a >>> 'masked >>> nearest neighbour' approach, meaning that each zero pixel in the >>> resampled >>> image should be assigned the tag of the spatially closest 10 or 11 >>> pixel in >>> the original image. I say masked nearest neighbour as it seems >>> equivalent to >>> a nearest neighbour interpolation (such as by using >>> vtkImageInterpolator) >>> but where pixels with a 12 or 13 value are ignored. The equivaltent >>> mapping >>> would of course be done for 'one' pixels in the resampled image, >>> finding the >>> closest in the original with a 12 or 13 value. >>> >>> ----------------- >>> >>> I could, or course, implement this algorithm in pure python as part >>> of my >>> script, but I am keen not to do so unless necessary as the resampled >>> data >>> sets can be quite large. I have fairly limited experience using vtk and >>> would appreciate any suggestions or pointers on how to achieve the >>> desired >>> result. >>> >>> Best wishes, >>> Andrew > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From sid.murthy at gmail.com Sat Sep 6 22:20:59 2014 From: sid.murthy at gmail.com (Sid Murthy) Date: Sat, 6 Sep 2014 20:20:59 -0600 Subject: [vtkusers] vtkDistanceWidget not working Message-ID: Hi - When using vtkDistanceWidget with a 3d Distance Representation: vtkSmartPointer dRep3d= vtkSmartPointer::New(); vtkSmartPointer dWidget = vtkSmartPointer::New(); dWidget ->SetInteractor(mRenderWindowInteractor); dWidget ->CreateDefaultRepresentation(); dWidget ->SetRepresentation(dRep3d); dWidget ->SetDebug(1); dWidget ->On(); I get the following debug ouput: Debug: In ..\..\VTK5.10.1\Common\vtkObject.cxx, line 871 vtkDistanceWidget (06EA2260): UnRegistered by NULL, ReferenceCount = 0 Debug: In ..\..\VTK5.10.1\Widgets\vtkAbstractWidget.cxx, line 166 vtkAbstractWidget (06EA2260): Disabling widget Debug: In ..\..\VTK5.10.1\Rendering\vtkInteractorObserver.cxx, line 25 vtkInteractorObserver (06EA2260): vtkInteractorObserver (06EA2260): setting DefaultRenderer to 00000000 Debug: In ..\..\VTK5.10.1\Common\vtkObject.cxx, line 154 vtkObject (06EA2260): Destructing! Is there something obvious I'm missing to make this widget work? I have several other widgets working fine. thanks, Sid -------------- next part -------------- An HTML attachment was scrubbed... URL: From sfaisal.ali91 at gmail.com Mon Sep 8 01:27:11 2014 From: sfaisal.ali91 at gmail.com (sfaisalali91) Date: Sun, 7 Sep 2014 22:27:11 -0700 (PDT) Subject: [vtkusers] Multiple renderes and interactor callback In-Reply-To: References: <1409048154305-5728393.post@n5.nabble.com> <1409121131703-5728440.post@n5.nabble.com> Message-ID: <1410154031398-5728602.post@n5.nabble.com> hey David, I was able to fix the problem and i am able to rotate the volume to a desired angle of rotation based on MPR slicing and also rotate it independently. Thanks for the help. Now i am trying to synchronize the zoom functionality on all the three viewports (Zoom should takes place simultaneously on three viewports). i tried setting active camera of one viewport to another. As MPR slicing is involved, it changes the whole orientation of all the three vieports. is there any way to calculate the zoom factor ?? Can you please guide me. Thanks in advance. Thanks & Regards Faisal Ali -- View this message in context: http://vtk.1045678.n5.nabble.com/Multiple-renderes-and-interactor-callback-tp5728393p5728602.html Sent from the VTK - Users mailing list archive at Nabble.com. From flaviu2 at yahoo.com Mon Sep 8 04:08:00 2014 From: flaviu2 at yahoo.com (flaviu2) Date: Mon, 8 Sep 2014 01:08:00 -0700 (PDT) Subject: [vtkusers] Retrieve window/level In-Reply-To: References: <1409575935216-5728524.post@n5.nabble.com> <1409742732354-5728551.post@n5.nabble.com> Message-ID: <1410163680633-5728603.post@n5.nabble.com> Thank you Dean, I will try that and let yu know what I have done ... right now, if I override /vtkCommand::MouseMoveEvent/ in order to display window/level values, I don't have window/level functionality ... I need to solve this issue, before I can try your code ... Thank you a lot ! -- View this message in context: http://vtk.1045678.n5.nabble.com/Retrieve-window-level-tp5728524p5728603.html Sent from the VTK - Users mailing list archive at Nabble.com. From asou at soum.co.jp Mon Sep 8 05:12:27 2014 From: asou at soum.co.jp (Masato Asou) Date: Mon, 08 Sep 2014 18:12:27 +0900 (JST) Subject: [vtkusers] TriangleArea() return the not correct value. In-Reply-To: <8D19644176811B3-15CC-1209B@webmail-m269.sysops.aol.com> References: <8D1958BCD1FEB4B-15CC-A1DD@webmail-m269.sysops.aol.com> <20140904.120245.261185053.asou@soum.co.jp> <8D19644176811B3-15CC-1209B@webmail-m269.sysops.aol.com> Message-ID: <20140908.181227.154713470.asou@soum.co.jp> Sorry for my delayed reply. > With the cross product technique, there are six possible permutations > of cross product, depending on which vectors you choose to do the > cross product: a x b, a x c, b x a, b x c, c x a, and c x b. I think > you will still hit a math problem with some of the permutations for > your extreme case, won't you? If so, then whether or not your result > is acceptable depends on being lucky about which permutation you > choose. As you have pointed out cross product approach also hit the round off error problem, which depends on the choice of the vector pair. However, the norm of the cross product is taken in this approach, So that there are no subtraction in the final sqrt() operation. For example, let a x b be sufferd from the round-off-error, to be (e1, e2, e3) where e* is about machie epsilon. Even in this case norm(a x b) = sqrt(e1**2 + e2**2 + e3**2) is the order of 1e-16. Meanwhile, in the present implementation of vtkTriangle::TraingleArea(), the area may become O(sqrt(e))~1e-8. -- ASOU Masato From david.gobbi at gmail.com Mon Sep 8 08:40:16 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 8 Sep 2014 06:40:16 -0600 Subject: [vtkusers] Multiple renderes and interactor callback In-Reply-To: <1410154031398-5728602.post@n5.nabble.com> References: <1409048154305-5728393.post@n5.nabble.com> <1409121131703-5728440.post@n5.nabble.com> <1410154031398-5728602.post@n5.nabble.com> Message-ID: Hi Ali, If you are using a parallel projection, then the zoom factor is inversely proportional to the ParallelScale. If you are using a perspective projection (the default), and if your zoom interaction is being done by moving the camera in and out, then the zoom factor is inversely proportional to the camera Distance. In other words, to synchronize the zoom, you generally want to copy the ParallelScale and the Distance. Note that in all of the discussion above, I've been using a loose definition of "zoom factor", since the precise camera definition of "zoom" relates to ViewAngle, not Distance. - David On Sun, Sep 7, 2014 at 11:27 PM, sfaisalali91 wrote: > hey David, > > I was able to fix the problem and i am able to rotate the volume to a > desired angle of rotation based on MPR slicing and also rotate it > independently. Thanks for the help. > > Now i am trying to synchronize the zoom functionality on all the three > viewports (Zoom should takes place simultaneously on three viewports). i > tried setting active camera of one viewport to another. As MPR slicing is > involved, it changes the whole orientation of all the three vieports. > > > is there any way to calculate the zoom factor ?? Can you please guide me. > Thanks in advance. > > Thanks & Regards > Faisal Ali > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Multiple-renderes-and-interactor-callback-tp5728393p5728602.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From joachim.pouderoux at kitware.com Mon Sep 8 08:42:34 2014 From: joachim.pouderoux at kitware.com (Joachim Pouderoux) Date: Mon, 8 Sep 2014 14:42:34 +0200 Subject: [vtkusers] ANN: ParaView Training Course in Paris, France, October 14-15, 2014 Message-ID: Hello, Kitware will be holding a 2-day ParaView course on October 14 and 15th, 2014 at Universit? Pierre et Marie Curie, Paris, France. The specificity of this training is that it will take place in a virtual reality room fitted with a powerwall. Please visit our web site for more information and registration details at either: http://training.kitware.fr/browse/71 (in English) or http://formations.kitware.fr/browse/71 (in French) Note that the course might be taught in English. If you have any question, please contact us at formations at http://www.kitware.fr Thank you, *Joachim Pouderoux* *PhD, Technical Expert* *Kitware SAS * -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Mon Sep 8 09:54:58 2014 From: zarko at kg.ac.rs (zarko.milosevic) Date: Mon, 8 Sep 2014 06:54:58 -0700 (PDT) Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: References: <1409670908520-5728537.post@n5.nabble.com> <1409737146129-5728549.post@n5.nabble.com> <1409751520521-5728555.post@n5.nabble.com> Message-ID: <1410184498184-5728608.post@n5.nabble.com> Hi David, Thanks for that info. But, in case of the oblique slicing how can i calculate new spacing ? Regards Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728537p5728608.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon Sep 8 10:20:20 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 8 Sep 2014 08:20:20 -0600 Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: <1410184498184-5728608.post@n5.nabble.com> References: <1409670908520-5728537.post@n5.nabble.com> <1409737146129-5728549.post@n5.nabble.com> <1409751520521-5728555.post@n5.nabble.com> <1410184498184-5728608.post@n5.nabble.com> Message-ID: On Mon, Sep 8, 2014 at 7:54 AM, zarko.milosevic wrote: > > Thanks for that info. But, in case of the oblique slicing how can i > calculate new spacing ? Do whatever you think is best. Usually I just use the minimum out of the three input spacings. There is no "correct" answer, it all depends on what you want to achieve. - David From francois.touvet at inria.fr Mon Sep 8 11:06:09 2014 From: francois.touvet at inria.fr (ftouvet) Date: Mon, 8 Sep 2014 08:06:09 -0700 (PDT) Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: <1409923254872-5728587.post@n5.nabble.com> References: <1409923254872-5728587.post@n5.nabble.com> Message-ID: <1410188769756-5728610.post@n5.nabble.com> Hi, is your surface made of triangles? I faced some problems with this filter and used the pipeline explained here . It doesn't work everytime, I am currently refining it. But still it could help you? Francois -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728610.html Sent from the VTK - Users mailing list archive at Nabble.com. From dlrdave at aol.com Mon Sep 8 11:56:48 2014 From: dlrdave at aol.com (David Cole) Date: Mon, 8 Sep 2014 11:56:48 -0400 Subject: [vtkusers] vtkDistanceWidget not working In-Reply-To: References: Message-ID: <8D19994A16F19F5-1768-2BA34@webmail-m244.sysops.aol.com> Hold the dWidget variable beyond the scope of whatever function it is in.... i.e. -- when the widget goes away, it does not show up anymore. You need to hold the reference alive by maintaining a smart pointer to it at a "more outer" scope. Perhaps attaching it to whatever keeps your renderwindow alive makes sense... HTH, David C. From MEEHANBT at nv.doe.gov Mon Sep 8 20:16:15 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Tue, 9 Sep 2014 00:16:15 +0000 Subject: [vtkusers] preferred way to reference VTK in papers? Message-ID: Is there a preferred way to reference VTK in papers? Unless there was a better answer - I was going to reference the VTK User's Guide ... -------------- next part -------------- An HTML attachment was scrubbed... URL: From mohamed.moussa89 at gmail.com Tue Sep 9 00:02:46 2014 From: mohamed.moussa89 at gmail.com (Mohamed Moussa) Date: Tue, 9 Sep 2014 14:02:46 +1000 Subject: [vtkusers] Best way to handle Gauss points? Message-ID: Hello, I'm trying to output FEA results from our solver to a VTK unstructured grid format so we can visualize in Paraview. I'm stuck on stress tensor output. I'm writing C++ code and I've figured out how to output cells/elements, displacement results at the node, etc. Whats the best way of handling tensor data defined at Gauss points so that I can visualize interpolated results in Paraview in a straightforward manner? I have read that VTK quadrature document but I don't want to go down that path if it means I will have to write a filter in Paraview anyway (I noticed there is no 'interpolate/extrapolate from quadrature points' filter). I might as well just do it within my own program and output nodal data. Mo From scbiradar at gmail.com Tue Sep 9 02:03:33 2014 From: scbiradar at gmail.com (santosh) Date: Mon, 8 Sep 2014 23:03:33 -0700 (PDT) Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: <1410188769756-5728610.post@n5.nabble.com> References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> Message-ID: Hi Francois, The surface is made of triangles. I have tried passing my surface data through a triangle filter and a normals filter. Still I get the same inconsistent results. However, if i use a surface (STL file) which is created using VTK built in shapes like vtkCylinderSource I get consistent output. I am facing problems with my STL file which is created using a CAD software. I have ensured that the surface is closed with no boundary edges. Santosh On Mon, Sep 8, 2014 at 8:36 PM, ftouvet [via VTK] < ml-node+s1045678n5728610h68 at n5.nabble.com> wrote: > Hi, > > is your surface made of triangles? I faced some problems with this filter > and used the pipeline explained here > . > > > It doesn't work everytime, I am currently refining it. But still it could > help you? > Francois > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728610.html > To unsubscribe from vtkSelectEnclosedPoints filter inconsistent output of > IsInside method, click here > > . > NAML > > -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728617.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sfaisal.ali91 at gmail.com Tue Sep 9 02:29:02 2014 From: sfaisal.ali91 at gmail.com (sfaisalali91) Date: Mon, 8 Sep 2014 23:29:02 -0700 (PDT) Subject: [vtkusers] Multiple renderes and interactor callback In-Reply-To: References: <1409048154305-5728393.post@n5.nabble.com> <1409121131703-5728440.post@n5.nabble.com> <1410154031398-5728602.post@n5.nabble.com> Message-ID: <1410244142080-5728618.post@n5.nabble.com> hi David, Now it makes a lot of sense and helped me omit the complex approach. Thanks again David Thanks & Regards Faisal Ali -- View this message in context: http://vtk.1045678.n5.nabble.com/Multiple-renderes-and-interactor-callback-tp5728393p5728618.html Sent from the VTK - Users mailing list archive at Nabble.com. From clavier2008 at hotmail.fr Tue Sep 9 02:52:24 2014 From: clavier2008 at hotmail.fr (AzDTo) Date: Mon, 8 Sep 2014 23:52:24 -0700 (PDT) Subject: [vtkusers] vtkChartXY: Rotate or flip a 2D Chart In-Reply-To: <1409842108320-5728574.post@n5.nabble.com> References: <1409842108320-5728574.post@n5.nabble.com> Message-ID: <1410245544820-5728619.post@n5.nabble.com> Here is the Part of code Source: create a Chart.. ..... .. . //rotate (90) a chart pImpl->verticalModeTransform = vtkSmartPointer::New(); pImpl->verticalModeTransform->AddItem(pImpl->chart); pImpl->verticalModeTransform->Translate(0.0, sizeY); pImpl->sizeY = sizeX; pImpl->verticalModeTransform->Rotate(90); pImpl->chart->SetAutoSize(true); pImpl->chart->SetSize(vtkRectf(0.0, 0.0, sizeY, sizeX)); pImpl->view->GetScene()->AddItem(pImpl->verticalModeTransform); ... .. . the result Looks like this: Default Chart rotate to 90 degree thanks again -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkChartXY-Rotate-or-flip-a-2D-Chart-tp5728574p5728619.html Sent from the VTK - Users mailing list archive at Nabble.com. From jcplatt at dsl.pipex.com Tue Sep 9 04:25:11 2014 From: jcplatt at dsl.pipex.com (John Platt) Date: Tue, 9 Sep 2014 09:25:11 +0100 Subject: [vtkusers] Best way to handle Gauss points? References: Message-ID: Hi, Typically, FE solvers sample the stresses at optimal sampling points (which may coincide with the Gauss points) then linearly extrapolate to the nodes. If it is appropriate to average the stresses at the nodes, I would do this in your solver and write point tensor data to VTK. If the stresses cannot be averaged, you can create multiple VTK points at your nodes (with the same coordinates) for each element and set the topology accordingly. Point tensor data can then be written. Be careful that VTK does not remove coincident points. HTH John. ----- Original Message ----- From: "Mohamed Moussa" To: Sent: Tuesday, September 09, 2014 5:02 AM Subject: [vtkusers] Best way to handle Gauss points? > Hello, > > I'm trying to output FEA results from our solver to a VTK unstructured > grid format so we can visualize in Paraview. I'm stuck on stress > tensor output. I'm writing C++ code and I've figured out how to output > cells/elements, displacement results at the node, etc. > > Whats the best way of handling tensor data defined at Gauss points so > that I can visualize interpolated results in Paraview in a > straightforward manner? > > I have read that VTK quadrature document but I don't want to go down > that path if it means I will have to write a filter in Paraview anyway > (I noticed there is no 'interpolate/extrapolate from quadrature > points' filter). I might as well just do it within my own program and > output nodal data. > > Mo > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From heiland at iu.edu Tue Sep 9 07:02:58 2014 From: heiland at iu.edu (Randy Heiland) Date: Tue, 9 Sep 2014 07:02:58 -0400 Subject: [vtkusers] version of boost for infovis? Message-ID: Hi all, Is there a required version of Boost to build the parallel infovis stuff? Apologies if stated online and I missed it. thanks, Randy From emptytanka at web.de Tue Sep 9 08:12:47 2014 From: emptytanka at web.de (Tankard) Date: Tue, 9 Sep 2014 05:12:47 -0700 (PDT) Subject: [vtkusers] Integrate VTK6.1 in QT5.3 in Visual Studio 2013 In-Reply-To: <1409923259750-5728588.post@n5.nabble.com> References: <1409923259750-5728588.post@n5.nabble.com> Message-ID: <1410264767964-5728623.post@n5.nabble.com> I reinstalled VTK and now I get the access violation exception in Debug as well. I saw in the debugger that the QVTKWidget::GetRenderWindow method in QVTKWidget.cxx had a problem. The call of vtkRenderWindow::New() returned null, so that win->Delete() crashes. vtkRenderWindow* QVTKWidget::GetRenderWindow() { if (!this->mRenWin) { // create a default vtk window vtkRenderWindow* win = vtkRenderWindow::New(); this->SetRenderWindow(win); win->Delete(); } return this->mRenWin; } Am I missing some initialisation oder something like that? -- View this message in context: http://vtk.1045678.n5.nabble.com/Integrate-VTK6-1-in-QT5-3-in-Visual-Studio-2013-tp5728588p5728623.html Sent from the VTK - Users mailing list archive at Nabble.com. From jphv at open-engineering.com Tue Sep 9 08:39:49 2014 From: jphv at open-engineering.com (Juan Pablo Hernandez Vogt) Date: Tue, 9 Sep 2014 13:39:49 +0100 Subject: [vtkusers] Selecting a point by clicking on it Message-ID: Hello, While I wait for the book arrive, I tried to create basic selection from examples. In the following example you can do: click + Shift over sphere --> creates a small sphere on it click + Alt over small spheres --> select the actor. In the second selection creates a line between its centers. click + Shift on empty space --> creates a point (green, there are 3 blue points by default) My problem: I can not create a line between points because I do not know how to select the actor of my new points. Why a sphere is "selectable" and a point is not in this context? As I said, I'm waiting the VTK book arrive and from help I could not get what I misunderstood. I saw HighlightSelectedPoints, but I do not want a rectangular area, I want to select only one point by clicking. My idea is a basic editor for add/remove point, line, arc., so the first thing is how to select a point to gets its coordinates. Thanks in advance for play with this code and tell me any example that drives this task. Best Regards, Juan Pablo [code from Internet] /* This example demonstrates cell picking using vtkCellPicker. It displays the results of picking using a vtkTextMapper. converted from TCL */ #include "vtkSphereSource.h" #include "vtkPolyDataMapper.h" #include "vtkLODActor.h" #include "vtkConeSource.h" #include "vtkGlyph3D.h" #include "vtkCellPicker.h" #include "vtkTextMapper.h" #include "vtkActor2D.h" #include "vtkInteractorStyleTrackballCamera.h" #include "vtkInteractorStyleRubberBand2D.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkTextProperty.h" #include "vtkCallbackCommand.h" #include "vtkCamera.h" #include "vtkSmartPointer.h" #include "vtkProperty.h" #include "vtkLineSource.h" #include "vtkCellArray.h" #include "vtkLine.h" vtkPoints* points; vtkCellArray* vertices; int MouseMotion; int SelectLine; vtkRenderer *ren1; vtkRenderWindow *renWin; vtkRenderWindowInteractor *iren; vtkCellPicker *picker; vtkActor2D *textActor; vtkTextMapper *textMapper; vtkActor* selectionActor1; vtkActor* selectionActor2; vtkCellPicker *pickerPointActor; vtkPolyData* pointPolyData; #define VTK_CREATE(type, name) \ vtkSmartPointer name = vtkSmartPointer::New() void addPointActor(double p[3], vtkRenderer* renderer) { // Create the geometry of a point (the coordinate) vtkSmartPointer points = vtkSmartPointer::New(); // Create the topology of the point (a vertex) vtkSmartPointer vertices = vtkSmartPointer::New(); vtkIdType pid, cid; pid = points->InsertNextPoint(p); cid = vertices->InsertNextCell(1, &pid); cout<<"addPointActor: pid="< SphereSource = vtkSmartPointer::New(); SphereSource->SetCenter(xp, yp, zp); SphereSource->SetRadius(0.01); SphereSource->Update(); vtkSmartPointer Mapper = vtkSmartPointer::New(); Mapper->SetInput(SphereSource->GetOutput()); vtkSmartPointer Actor = vtkSmartPointer::New(); Actor->SetMapper(Mapper); //vtkProperty* color = Actor->GetProperty(); //color-> Actor->GetProperty()->SetColor(255,0,0); ren1->AddActor(Actor); */ #else pointPolyData->BuildLinks(); pointPolyData->DeleteCell(0); pointPolyData->RemoveDeletedCells(); //vertices->rem vtkIdType pid,cid; pid = points->InsertNextPoint(xp, yp, zp); cid = vertices->InsertNextCell(1,&pid); int a = 2* cid; #endif } else { double selpt[3]; picker->GetSelectionPoint(selpt); double x = selpt[0]; double y = selpt[1]; double pickPos[3]; picker->GetPickPosition( pickPos ); double xp = pickPos[0]; double yp = pickPos[1]; double zp = pickPos[2]; char text[120]; sprintf( text, "(%5.5f, %5.5f, %5.5f)", selpt[0], selpt[1], selpt[2] ); cout <<"Click inside, selpt: "<< text << endl; sprintf( text, "(%5.5f, %5.5f, %5.5f)", xp, yp, zp ); cout <<"Click inside, pickPos: "<< text << endl; textMapper->SetInput( text ); textActor->SetPosition(x, y); textActor->VisibilityOn(); vtkSmartPointer SphereSource = vtkSmartPointer::New(); SphereSource->SetCenter(xp, yp, zp); SphereSource->SetRadius(0.01); SphereSource->Update(); vtkSmartPointer Mapper = vtkSmartPointer::New(); Mapper->SetInput(SphereSource->GetOutput()); vtkSmartPointer Actor = vtkSmartPointer::New(); Actor->SetMapper(Mapper); ren1->AddActor(Actor); } renWin->Render(); } }; class PickPointActorCommand : public vtkCommand { public: static PickPointActorCommand *New() { return new PickPointActorCommand; } void Delete() { delete this; } virtual void Execute(vtkObject *caller, unsigned long l, void *callData) { vtkPicker* currentPicker = (vtkPicker*) caller; vtkProp* prop = currentPicker->GetViewProp(); vtkProp3D* prop3d = currentPicker->GetProp3D(); cout<<"prop="<GetBounds(bounds); center1[0] = (bounds[1]+bounds[0])/2; center1[1] = (bounds[3]+bounds[2])/2; center1[2] = (bounds[5]+bounds[4])/2; selectionActor2->GetBounds(bounds); center2[0] = (bounds[1]+bounds[0])/2; center2[1] = (bounds[3]+bounds[2])/2; center2[2] = (bounds[5]+bounds[4])/2; // Create source vtkSmartPointer lineSource = vtkSmartPointer::New(); lineSource->SetPoint1(center1); lineSource->SetPoint2(center2); lineSource->Update(); // Visualize vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(lineSource->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetLineWidth(2); actor->GetProperty()->SetColor(255,0,255); // Activate ren1->AddActor(actor); // remove prvious selection selectionActor1 = selectionActor2 = 0; SelectLine = 0; // stop selection } } else { // No actor selected cout<<"PickPointActorCommand: there is NO actor" <Render(); } }; void PickerInteractionCallback( vtkObject* vtkNotUsed(object), unsigned long event, void* clientdata, void* vtkNotUsed(calldata) ) { vtkInteractorStyleTrackballCamera * style = (vtkInteractorStyleTrackballCamera*)clientdata; switch( event ) { case vtkCommand::LeftButtonPressEvent: //cout<<"PickerInteractionCallback::LeftButtonPressEvent"<GetAltKey()) { SelectLine = 1; //cout<<"SelectLine = 1"<OnLeftButtonDown(); break; case vtkCommand::LeftButtonReleaseEvent: //cout<<"PickerInteractionCallback::LeftButtonReleaseEvent"<GetEventPosition(); pickerPointActor->Pick((double)pick[0], (double)pick[1], 0.0, ren1); } else if (MouseMotion == 0) { if (iren->GetShiftKey()) { int *pick = iren->GetEventPosition(); picker->Pick((double)pick[0], (double)pick[1], 0.0, ren1); } } style->OnLeftButtonUp(); break; case vtkCommand::MouseMoveEvent: //cout<<"PickerInteractionCallback::MouseMoveEvent"<OnMouseMove(); break; } } int main(int argc, char* argv) { MouseMotion = 0; SelectLine = 0; // Original code: vtkSphereSource *sphere = vtkSphereSource::New(); vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New(); sphereMapper->SetInput(sphere->GetOutput()); sphereMapper->GlobalImmediateModeRenderingOn(); vtkLODActor *sphereActor = vtkLODActor::New(); sphereActor->SetMapper(sphereMapper); // create the spikes by glyphing the sphere with a cone. Create the mapper // and actor for the glyphs. vtkConeSource *cone = vtkConeSource::New(); vtkGlyph3D *glyph = vtkGlyph3D::New(); glyph->SetInput(sphere->GetOutput()); glyph->SetSource(cone->GetOutput()); glyph->SetVectorModeToUseNormal(); glyph->SetScaleModeToScaleByVector(); glyph->SetScaleFactor(0.25); vtkPolyDataMapper *spikeMapper = vtkPolyDataMapper::New(); spikeMapper->SetInput(glyph->GetOutput()); vtkLODActor *spikeActor = vtkLODActor::New(); spikeActor->SetMapper(spikeMapper); // Create a cell picker. PickCommand* pickObserver = PickCommand::New(); picker = vtkCellPicker::New(); picker->AddObserver( vtkCommand::EndPickEvent, pickObserver ); // Create a Actor picker. PickPointActorCommand* pickPointActorObserver = PickPointActorCommand::New(); pickerPointActor = vtkCellPicker::New(); pickerPointActor->AddObserver( vtkCommand::EndPickEvent, pickPointActorObserver ); // Create a text mapper and actor to display the results of picking. textMapper = vtkTextMapper::New(); vtkTextProperty *tprop = textMapper->GetTextProperty(); tprop->SetFontFamilyToArial(); tprop->SetFontSize(12); tprop->BoldOn(); // tprop->ShadowOn(); tprop->SetColor(1, 0, 0); textActor = vtkActor2D::New(); textActor->VisibilityOff(); textActor->SetMapper(textMapper); // Create the Renderer, RenderWindow, and RenderWindowInteractor vtkInteractorStyleTrackballCamera *style = vtkInteractorStyleTrackballCamera::New(); vtkCallbackCommand * pickerCommand = vtkCallbackCommand::New(); pickerCommand->SetClientData(style); pickerCommand->SetCallback(PickerInteractionCallback); style->AddObserver(vtkCommand::LeftButtonPressEvent, pickerCommand); style->AddObserver(vtkCommand::MouseMoveEvent, pickerCommand); style->AddObserver(vtkCommand::LeftButtonReleaseEvent, pickerCommand); ren1 = vtkRenderer::New(); renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren1); iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); iren->SetInteractorStyle(style); // Is who calls the picker //iren->SetPicker(picker); // Add the actors to the renderer, set the background and size ren1->AddActor2D(textActor); ren1->AddActor(sphereActor); ren1->AddActor(spikeActor); ren1->SetBackground(1, 1, 1); renWin->SetSize(500, 500); // Get the camera and zoom in closer to the image. vtkCamera *cam1 = ren1->GetActiveCamera(); //cam1->Zoom(1); // Create the geometry of a point (the coordinate), 3 points: //vtkSmartPointer points = vtkSmartPointer::New(); points = vtkPoints::New(); // Create the topology of the point (a vertex) //vtkSmartPointer vertices = vtkSmartPointer::New(); vertices = vtkCellArray::New(); vtkIdType pid; pid = points->InsertNextPoint(1,1,0); vertices->InsertNextCell(1,&pid); pid = points->InsertNextPoint(1,-1,0); vertices->InsertNextCell(1,&pid); pid = points->InsertNextPoint(1,1,1); vertices->InsertNextCell(1,&pid); //vtkSmartPointer line0 = vtkSmartPointer::New(); //line0->GetPointIds()->SetId(0, 0); //line0->GetPointIds()->SetId(1, 1); //vertices->InsertNextCell(line0); // Create a polydata object pointPolyData = vtkPolyData::New(); // Set the points and vertices we created as the geometry and topology of the polydata pointPolyData->SetPoints(points); pointPolyData->SetVerts(vertices); // Visualize vtkSmartPointer mapper = vtkSmartPointer::New(); #if VTK_MAJOR_VERSION <= 5 mapper->SetInput(pointPolyData); #else mapper->SetInputData(pointPolyData); #endif vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(10); actor->GetProperty()->SetColor(0,0,255); actor->GetProperty()->SetLineWidth(5); ren1->AddActor(actor); iren->Initialize(); iren->Start(); picker->RemoveObserver( pickObserver ); sphere->Delete(); sphereMapper->Delete(); sphereActor->Delete(); cone->Delete(); glyph->Delete(); spikeMapper->Delete(); spikeActor->Delete(); picker->Delete(); textMapper->Delete(); textActor->Delete(); pickerCommand->Delete(); style->Delete(); ren1->Delete(); renWin->Delete(); pickObserver->Delete(); vertices->Delete(); points->Delete(); iren->Delete(); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Sep 9 09:01:38 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 9 Sep 2014 09:01:38 -0400 Subject: [vtkusers] version of boost for infovis? In-Reply-To: References: Message-ID: Try 1.48. But note, InfovisParallel needs attention, which is why it is deprecated in master. See http://markmail.org/thread/vliivgttngtnduaq for recent discussion of it. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Sep 9, 2014 at 7:02 AM, Randy Heiland wrote: > Hi all, > > Is there a required version of Boost to build the parallel infovis stuff? > Apologies if stated online and I missed it. > > thanks, Randy > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Sep 9 09:35:08 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 9 Sep 2014 09:35:08 -0400 Subject: [vtkusers] announce: nominees are decided, now vote in the 2014 HPCwire awards Message-ID: Thank you everyone who nominated VTK and ParaView! The nominees have been chosen and VTK and ParaView both made the Best HPC visualization product or technology list. Please vote for VTK and ParaView. For details see: http://tci.taborcommunications.com/webmail/21812/138268695/d27a89e0d341e5c4e5fe433bb0cb97f4 many thanks! David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Sep 9 10:04:45 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 9 Sep 2014 10:04:45 -0400 Subject: [vtkusers] Fix Ubuntu 14.04 VTK 6.1 compiling issue In-Reply-To: References: Message-ID: Severin, Can you try Christian's solution of uncommenting the GLX_GLXEXT_LEGACY definition to see if it works on your system? Thanks, Cory On Tue, Sep 2, 2014 at 5:05 AM, Christian Askeland wrote: > Hi, > > I had the same issue today, on both VTK 6.1 and the current git HEAD. I use > the NVidia driver version 343 (gl headers dated august 2014). However, a > colleague of mine compiles VTK fine when using an older driver (331 / > january 2014). > > I looked into the GL headers (/usr/include/GL/) and found that GLintptr now > is in use in glxext.h, this was not the case in the previous version. > > My solution was to uncomment the define GLXEXT like this: > > // define GLX_GLXEXT_LEGACY to prevent glx.h to include glxext.h provided by > // the system > #define GLX_GLXEXT_LEGACY > #include "GL/glx.h" > > #include "vtkgl.h" > > in file > > vtkXOpenGLRenderWindow.cpp > > which causes glext.h to be included in glxext.h, thus providing the missing > type GLintptr. > > This seems like a better solution than including vtkgl.h before GL/glx.h, > but I don't have the full picture here. > > > > Best Regards > > Christian Askeland > SINTEF Medical Technology > > > > > On Fri, Aug 29, 2014 at 9:49 AM, Severin Holzer-Graf > wrote: >> >> Hi, >> >> I faced the same compiling issue on Ubuntu 14.04 as mathew here: >> http://www.vtk.org/pipermail/vtkusers/2014-August/084877.html >> Compiling fails, because "GLsizeiptr has not been declared". >> >> The issue is that "vtkgl.h" is included *after* "GL/glx.h" which needs >> the typedefs for the datatypes from "vtkgl.h". >> I simply swapped the two lines and VTK compiles. Appended a patch that >> shows the change. >> >> Interestingly on my ArchLinux system compiling VTK 6.1 works out of >> the box and this was not necessary. I didn't further investigate that, >> so I'm not sure if swapping the two lines is actually the correct fix. >> >> Best >> Severin >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From andy.bauer at kitware.com Tue Sep 9 10:40:43 2014 From: andy.bauer at kitware.com (Andy Bauer) Date: Tue, 9 Sep 2014 10:40:43 -0400 Subject: [vtkusers] preferred way to reference VTK in papers? In-Reply-To: <20140909001547.41B3583E2D@public.kitware.com> References: <20140909001547.41B3583E2D@public.kitware.com> Message-ID: I think the most complete way to reference VTK would be to reference both the VTK textbook and the user's guide (http://vtk.org/VTK/help/book.html). Depending on how much space you have, I think either one is fine if you only have space for one VTK reference. On Mon, Sep 8, 2014 at 8:16 PM, Meehan, Bernard wrote: > Is there a preferred way to reference VTK in papers? Unless there was a > better answer - I was going to reference the VTK User's Guide ... > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Sep 9 14:27:10 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 9 Sep 2014 14:27:10 -0400 Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> Message-ID: Can you provide a link to an stl file that is causing problems? On Tue, Sep 9, 2014 at 2:03 AM, santosh wrote: > Hi Francois, > > The surface is made of triangles. I have tried passing my surface data > through a triangle filter and a normals filter. Still I get the same > inconsistent results. > However, if i use a surface (STL file) which is created using VTK built in > shapes like vtkCylinderSource I get consistent output. I am facing problems > with my STL file which is created using a CAD software. I have ensured that > the surface is closed with no boundary edges. > Santosh > > On Mon, Sep 8, 2014 at 8:36 PM, ftouvet [via VTK] <[hidden email]> wrote: >> >> Hi, >> >> is your surface made of triangles? I faced some problems with this filter >> and used the pipeline explained here. >> >> It doesn't work everytime, I am currently refining it. But still it could >> help you? >> Francois >> >> ________________________________ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728610.html >> To unsubscribe from vtkSelectEnclosedPoints filter inconsistent output of >> IsInside method, click here. >> NAML > > > > ________________________________ > View this message in context: Re: vtkSelectEnclosedPoints filter > inconsistent output of IsInside method > > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From aaron.hickerson at ondiagnostics.com Tue Sep 9 15:58:29 2014 From: aaron.hickerson at ondiagnostics.com (Aaron Hickerson) Date: Tue, 9 Sep 2014 12:58:29 -0700 Subject: [vtkusers] Request info about changes made to vtkRuledSurfaceFilter vtkAppendPolyData after 5.2.1 Message-ID: Hello, I am in the process of upgrading my company OS from ubuntu10 to ubuntu14 and so I am therefore dealing with an upgrade of vtk 5.2.1 to vtk 5.8. Our legacy software is heavily dependent on vtk and we are noticing some unexpected differences in outcomes with the newer 5.8 library. These differences are slight but for our regulated software we need to know why there are ANY differences in outcomes for this new release, no matter how small. There were changes made to the classes vtkRuledSurfaceFilter and vtkAppendPolyData after 5.2.1 but I cannot find any succinct explanations as to why these changes were made. These are the two classes that I have identified that our software is dependent on that behave differently in this new release, and provide different outcomes. I have scoured the internet and looked at the source code in detail but I still cannot find any real explanation as to WHY these two classes were modified to produce different outcomes than in previous versions. Can anyone point me to the changelog(s) for these classes that contain succinct explanations for the algorithmic changes? Thanks, Aaron Hickerson -------------- next part -------------- An HTML attachment was scrubbed... URL: From scbiradar at gmail.com Tue Sep 9 16:11:54 2014 From: scbiradar at gmail.com (santosh) Date: Tue, 9 Sep 2014 13:11:54 -0700 (PDT) Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> Message-ID: <1410293514372-5728642.post@n5.nabble.com> Hi, I have uploaded the stl file hemispherical-bot-closed-binary.stl -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728642.html Sent from the VTK - Users mailing list archive at Nabble.com. From george.gerber at gmail.com Tue Sep 9 16:19:46 2014 From: george.gerber at gmail.com (George) Date: Tue, 9 Sep 2014 13:19:46 -0700 (PDT) Subject: [vtkusers] polyhedron in python Message-ID: <1410293986843-5728643.post@n5.nabble.com> Good day, Would somebody be so kind as to give a basic example of creating a polyhedron in python (or c++ if necessary)? I have searched google extensively, without any luck. Best regards, George -- View this message in context: http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643.html Sent from the VTK - Users mailing list archive at Nabble.com. From christopher.mullins at kitware.com Tue Sep 9 16:28:30 2014 From: christopher.mullins at kitware.com (Christopher Mullins) Date: Tue, 9 Sep 2014 16:28:30 -0400 Subject: [vtkusers] polyhedron in python In-Reply-To: <1410293986843-5728643.post@n5.nabble.com> References: <1410293986843-5728643.post@n5.nabble.com> Message-ID: The Geometric Objects examples (c++[1] and python[2]) might be what you're looking for. [1] http://www.vtk.org/Wiki/VTK/Examples/Cxx#Geometric_Objects [2] http://www.vtk.org/Wiki/VTK/Examples/Python#Geometric_Objects On Tue, Sep 9, 2014 at 4:19 PM, George wrote: > Good day, > > Would somebody be so kind as to give a basic example of creating a > polyhedron in python (or c++ if necessary)? I have searched google > extensively, without any luck. > > Best regards, > George > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Christopher Mullins R&D Engineer Kitware Inc., 919.869.8871 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Sep 9 16:42:35 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 9 Sep 2014 16:42:35 -0400 Subject: [vtkusers] Fix Ubuntu 14.04 VTK 6.1 compiling issue In-Reply-To: References: Message-ID: Christian's solution has been committed to VTK master: http://www.vtk.org/gitweb?p=VTK.git;a=commit;h=800282f2 Please let us know if you have any further troubles. Cory On Tue, Sep 9, 2014 at 10:04 AM, Cory Quammen wrote: > Severin, > > Can you try Christian's solution of uncommenting the GLX_GLXEXT_LEGACY > definition to see if it works on your system? > > Thanks, > Cory > > On Tue, Sep 2, 2014 at 5:05 AM, Christian Askeland > wrote: >> Hi, >> >> I had the same issue today, on both VTK 6.1 and the current git HEAD. I use >> the NVidia driver version 343 (gl headers dated august 2014). However, a >> colleague of mine compiles VTK fine when using an older driver (331 / >> january 2014). >> >> I looked into the GL headers (/usr/include/GL/) and found that GLintptr now >> is in use in glxext.h, this was not the case in the previous version. >> >> My solution was to uncomment the define GLXEXT like this: >> >> // define GLX_GLXEXT_LEGACY to prevent glx.h to include glxext.h provided by >> // the system >> #define GLX_GLXEXT_LEGACY >> #include "GL/glx.h" >> >> #include "vtkgl.h" >> >> in file >> >> vtkXOpenGLRenderWindow.cpp >> >> which causes glext.h to be included in glxext.h, thus providing the missing >> type GLintptr. >> >> This seems like a better solution than including vtkgl.h before GL/glx.h, >> but I don't have the full picture here. >> >> >> >> Best Regards >> >> Christian Askeland >> SINTEF Medical Technology >> >> >> >> >> On Fri, Aug 29, 2014 at 9:49 AM, Severin Holzer-Graf >> wrote: >>> >>> Hi, >>> >>> I faced the same compiling issue on Ubuntu 14.04 as mathew here: >>> http://www.vtk.org/pipermail/vtkusers/2014-August/084877.html >>> Compiling fails, because "GLsizeiptr has not been declared". >>> >>> The issue is that "vtkgl.h" is included *after* "GL/glx.h" which needs >>> the typedefs for the datatypes from "vtkgl.h". >>> I simply swapped the two lines and VTK compiles. Appended a patch that >>> shows the change. >>> >>> Interestingly on my ArchLinux system compiling VTK 6.1 works out of >>> the box and this was not necessary. I didn't further investigate that, >>> so I'm not sure if swapping the two lines is actually the correct fix. >>> >>> Best >>> Severin >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> From dave.demarle at kitware.com Tue Sep 9 16:44:48 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 9 Sep 2014 16:44:48 -0400 Subject: [vtkusers] Request info about changes made to vtkRuledSurfaceFilter vtkAppendPolyData after 5.2.1 In-Reply-To: References: Message-ID: Try this from a git checkout at the v5.10 (before modularization) tag: git log v5.2.0...v5.8.0 --follow Graphics/vtkAppendPolyData.cxx and git log v5.2.0...v5.8.0 --follow Graphics/vtkRuledSurfaceFilter.cxx David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Sep 9, 2014 at 3:58 PM, Aaron Hickerson < aaron.hickerson at ondiagnostics.com> wrote: > Hello, > > I am in the process of upgrading my company OS from ubuntu10 to ubuntu14 > and so I am therefore dealing with an upgrade of vtk 5.2.1 to vtk 5.8. Our > legacy software is heavily dependent on vtk and we are noticing some > unexpected differences in outcomes with the newer 5.8 library. These > differences are slight but for our regulated software we need to know why > there are ANY differences in outcomes for this new release, no matter how > small. > > There were changes made to the classes vtkRuledSurfaceFilter and > vtkAppendPolyData after 5.2.1 but I cannot find any succinct explanations > as to why these changes were made. These are the two classes that I have > identified that our software is dependent on that behave differently in > this new release, and provide different outcomes. I have scoured the > internet and looked at the source code in detail but I still cannot find > any real explanation as to WHY these two classes were modified to produce > different outcomes than in previous versions. > > Can anyone point me to the changelog(s) for these classes that contain > succinct explanations for the algorithmic changes? > > Thanks, > Aaron Hickerson > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Tue Sep 9 20:02:43 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Wed, 10 Sep 2014 00:02:43 +0000 Subject: [vtkusers] polyhedron in python In-Reply-To: <7811BB2923W2546411-01@EMF_nv.doe.gov> References: <1410293986843-5728643.post@n5.nabble.com> <7811BB2923W2546411-01@EMF_nv.doe.gov> Message-ID: If you needed to make a generic polyhedron that wasn't in the vtkPlatonicSolidSource, you'd do something like this: import vtk # This is a Rhombic Dodecahedron. # First, you need to store the vertex locations. vertex_locations = vtk.vtkPoints() vertex_locations.SetNumberOfPoints(14) vertex_locations.SetPoint( 0, (-0.816497, -0.816497, 0.00000)) vertex_locations.SetPoint( 1, (-0.816497, 0.000000, -0.57735)) vertex_locations.SetPoint( 2, (-0.816497, 0.000000, 0.57735)) vertex_locations.SetPoint( 3, (-0.816497, 0.816497, 0.00000)) vertex_locations.SetPoint( 4, ( 0.000000, -0.816497, -0.57735)) vertex_locations.SetPoint( 5, ( 0.000000, -0.816497, 0.57735)) vertex_locations.SetPoint( 6, ( 0.000000, 0.000000, -1.15470)) vertex_locations.SetPoint( 7, ( 0.000000, 0.000000, 1.15470)) vertex_locations.SetPoint( 8, ( 0.000000, 0.816497, -0.57735)) vertex_locations.SetPoint( 9, ( 0.000000, 0.816497, 0.57735)) vertex_locations.SetPoint(10, ( 0.816497, -0.816497, 0.00000)) vertex_locations.SetPoint(11, ( 0.816497, 0.000000, -0.57735)) vertex_locations.SetPoint(12, ( 0.816497, 0.000000, 0.57735)) vertex_locations.SetPoint(13, ( 0.816497, 0.816497, 0.00000)) # Next, you describe the polygons that represent the faces using the vertex # indices in the vtkPoints that stores the vertex locations. There are a number # of ways to do this that you can find in examples on the Wiki. polygon_faces = vtk.vtkCellArray() q = vtk.vtkQuad() q.GetPointIds().SetId(0, 7) q.GetPointIds().SetId(1, 12) q.GetPointIds().SetId(2, 10) q.GetPointIds().SetId(3, 5) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 7) q.GetPointIds().SetId(1, 12) q.GetPointIds().SetId(2, 13) q.GetPointIds().SetId(3, 9) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 7) q.GetPointIds().SetId(1, 9) q.GetPointIds().SetId(2, 3) q.GetPointIds().SetId(3, 2) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 7) q.GetPointIds().SetId(1, 2) q.GetPointIds().SetId(2, 0) q.GetPointIds().SetId(3, 5) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 6) q.GetPointIds().SetId(1, 11) q.GetPointIds().SetId(2, 10) q.GetPointIds().SetId(3, 4) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 6) q.GetPointIds().SetId(1, 4) q.GetPointIds().SetId(2, 0) q.GetPointIds().SetId(3, 1) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 6) q.GetPointIds().SetId(1, 1) q.GetPointIds().SetId(2, 3) q.GetPointIds().SetId(3, 8) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 6) q.GetPointIds().SetId(1, 8) q.GetPointIds().SetId(2, 13) q.GetPointIds().SetId(3, 11) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 10) q.GetPointIds().SetId(1, 11) q.GetPointIds().SetId(2, 13) q.GetPointIds().SetId(3, 12) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 13) q.GetPointIds().SetId(1, 8) q.GetPointIds().SetId(2, 3) q.GetPointIds().SetId(3, 9) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 3) q.GetPointIds().SetId(1, 1) q.GetPointIds().SetId(2, 0) q.GetPointIds().SetId(3, 2) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 0) q.GetPointIds().SetId(1, 4) q.GetPointIds().SetId(2, 10) q.GetPointIds().SetId(3, 5) polygon_faces.InsertNextCell(q) # Next you create a vtkPolyData to store your face and vertex information that # represents your polyhedron. pd = vtk.vtkPolyData() pd.SetPoints(vertex_locations) pd.SetPolys(polygon_faces) #---------------------# # visualization stuff # #---------------------# mapper = vtk.vtkPolyDataMapper() mapper.SetInputData(pd) actor = vtk.vtkActor() actor.SetMapper(mapper) ren = vtk.vtkRenderer() ren.AddActor(actor) renw = vtk.vtkRenderWindow() renw.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renw) ren.ResetCamera() renw.Render() iren.Start() From: Christopher Mullins > Date: Tuesday, September 9, 2014 1:28 PM To: George > Cc: VTK > Subject: Re: [vtkusers] polyhedron in python The Geometric Objects examples (c++[1] and python[2]) might be what you're looking for. [1] http://www.vtk.org/Wiki/VTK/Examples/Cxx#Geometric_Objects [2] http://www.vtk.org/Wiki/VTK/Examples/Python#Geometric_Objects On Tue, Sep 9, 2014 at 4:19 PM, George > wrote: Good day, Would somebody be so kind as to give a basic example of creating a polyhedron in python (or c++ if necessary)? I have searched google extensively, without any luck. Best regards, George -- View this message in context: http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643.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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Christopher Mullins R&D Engineer Kitware Inc., 919.869.8871 -------------- next part -------------- An HTML attachment was scrubbed... URL: From selcukcalli at gmail.com Wed Sep 10 05:06:23 2014 From: selcukcalli at gmail.com (=?UTF-8?Q?Selcuk_=C3=87ALLI?=) Date: Wed, 10 Sep 2014 12:06:23 +0300 Subject: [vtkusers] keep points in memory and 3D mesh Message-ID: I have a simple question/problem. I have a 20 points and I want to mesh using this points. Question 1) How should keep these points in memory? Question 2) which filter should I use for mesh? Can you write code for it. My points: (x,y,z) 0, 0, 0 1, 0, 0 2, 0, 0 0, 1, 0 1, 1, 0 2, 1, 0 1, 2, 0 2, 2, 0 1, 3, 0 2, 3, 0 0, 0, 1 1, 0, 1 2, 0, 1 0, 1, 1 1, 1, 1 2, 1, 1 1, 2, 1 2, 2, 1 1, 3, 1 2, 3, 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Sep 10 08:07:56 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 10 Sep 2014 08:07:56 -0400 Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: <1410293514372-5728642.post@n5.nabble.com> References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> <1410293514372-5728642.post@n5.nabble.com> Message-ID: I wrote a small c++ program that works fine with your data. Can you send your entire python program? On Tue, Sep 9, 2014 at 4:11 PM, santosh wrote: > Hi, > I have uploaded the stl file > hemispherical-bot-closed-binary.stl > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728642.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From scbiradar at gmail.com Wed Sep 10 08:29:54 2014 From: scbiradar at gmail.com (santosh) Date: Wed, 10 Sep 2014 05:29:54 -0700 (PDT) Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> <1410293514372-5728642.post@n5.nabble.com> Message-ID: <1410352194329-5728654.post@n5.nabble.com> Hi Bill, I have uploaded my Python code. check_point_loc.py Thanks, Santosh -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728654.html Sent from the VTK - Users mailing list archive at Nabble.com. From rippalka at gmail.com Wed Sep 10 10:23:58 2014 From: rippalka at gmail.com (Guillaume Dumont) Date: Wed, 10 Sep 2014 10:23:58 -0400 Subject: [vtkusers] Blending multiple textures with different texture coordinates Message-ID: Hi everyone, I am currently stuck on a tricky problem that doesn't seem to have an efficient solution and I was hoping that someone could show me the light. *What I have:* - Mesh that is not UV unwrapped - Multiple textures with partial UV mapping (projection from image onto the mesh, so the UV mapping only affects a subportion of the mesh) *What I want to do:* - Blend these textures on the model for visualization purpose *What I have tried:* - Multiple texture handling in Vtk is limited by the hardware (up to 4 on my computer) - I experimented by UV unwrapping the mesh myself and try to project my textures in this manual UV mapping (that maps the *entire* mesh). My implementation is slow, and implies manual UV unwrapping. The intent is to then perform the blending before displaying the texture. If anyone has any idea about how to accomplish such a task in Vtk, I would be infintely thankful! Thanks, Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlop at umich.edu Wed Sep 10 10:29:01 2014 From: jlop at umich.edu (Julia Lopinto) Date: Wed, 10 Sep 2014 10:29:01 -0400 Subject: [vtkusers] filter for cropping a volume (vtk file) Message-ID: Hi, I am trying to crop a volume (vtk file) from a plan that I defined and I would like to know if there is a vtk filter to do that. thank you Julia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Sep 10 10:50:01 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 10 Sep 2014 10:50:01 -0400 Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: <1410352194329-5728654.post@n5.nabble.com> References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> <1410293514372-5728642.post@n5.nabble.com> <1410352194329-5728654.post@n5.nabble.com> Message-ID: I can reproduce the problem with your script. There is something funny about the repeated calls to getPolydata. If you move that call outside the loop, it works. However, if you do filter.Modified() in the loop the error returns. Looks like a bug. I'll try to track it down. Bill On Wed, Sep 10, 2014 at 8:29 AM, santosh wrote: > Hi Bill, > I have uploaded my Python code. > check_point_loc.py > > Thanks, > Santosh > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728654.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From MEEHANBT at nv.doe.gov Wed Sep 10 11:17:35 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Wed, 10 Sep 2014 15:17:35 +0000 Subject: [vtkusers] keep points in memory and 3D mesh In-Reply-To: <780ECB2B23W2564220-01@EMF_nv.doe.gov> References: <780ECB2B23W2564220-01@EMF_nv.doe.gov> Message-ID: Your mesh looks like it would be an "L" shaped group of hexahedrons. My best advice would be to check out: http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/DataManipulation/Python/BuildUGrid.py From: Selcuk ?ALLI > Date: Wednesday, September 10, 2014 2:06 AM To: "vtkusers at vtk.org" > Subject: [vtkusers] keep points in memory and 3D mesh I have a simple question/problem. I have a 20 points and I want to mesh using this points. Question 1) How should keep these points in memory? Question 2) which filter should I use for mesh? Can you write code for it. My points: (x,y,z) 0, 0, 0 1, 0, 0 2, 0, 0 0, 1, 0 1, 1, 0 2, 1, 0 1, 2, 0 2, 2, 0 1, 3, 0 2, 3, 0 0, 0, 1 1, 0, 1 2, 0, 1 0, 1, 1 1, 1, 1 2, 1, 1 1, 2, 1 2, 2, 1 1, 3, 1 2, 3, 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From scbiradar at gmail.com Wed Sep 10 11:50:59 2014 From: scbiradar at gmail.com (santosh) Date: Wed, 10 Sep 2014 08:50:59 -0700 (PDT) Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> <1410293514372-5728642.post@n5.nabble.com> <1410352194329-5728654.post@n5.nabble.com> Message-ID: Hi Bill, Thanks for trying out my code. As you notice, there is inconsistency in the output. Eagerly waiting for your fix to this issue. Santosh On Wed, Sep 10, 2014 at 8:20 PM, Bill Lorensen [via VTK] < ml-node+s1045678n5728661h49 at n5.nabble.com> wrote: > I can reproduce the problem with your script. There is something funny > about the repeated calls to getPolydata. If you move that call outside > the loop, it works. However, if you do > filter.Modified() in the loop the error returns. Looks like a bug. > I'll try to track it down. > > Bill > > On Wed, Sep 10, 2014 at 8:29 AM, santosh <[hidden email] > > wrote: > > > Hi Bill, > > I have uploaded my Python code. > > check_point_loc.py > > > > Thanks, > > Santosh > > > > > > > > -- > > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728654.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 > > > > 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 > > 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/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728661.html > To unsubscribe from vtkSelectEnclosedPoints filter inconsistent output of > IsInside method, click here > > . > NAML > > -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728663.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.gerber at gmail.com Wed Sep 10 17:34:28 2014 From: george.gerber at gmail.com (George) Date: Wed, 10 Sep 2014 14:34:28 -0700 (PDT) Subject: [vtkusers] polyhedron in python In-Reply-To: <20140910000223.A509A843D7@public.kitware.com> References: <1410293986843-5728643.post@n5.nabble.com> <20140910000223.A509A843D7@public.kitware.com> Message-ID: <1410384868755-5728664.post@n5.nabble.com> Hi, The example of Meehan works quite well. However, I see that each face of the polyhedron is listed as a cell. Is it possible to hide these face 'cells', so that when you select the polyhedron in paraview it lists only 1 cell (the polyhedron itself)? Best regards, George -- View this message in context: http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643p5728664.html Sent from the VTK - Users mailing list archive at Nabble.com. From berk.geveci at kitware.com Wed Sep 10 20:14:33 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Wed, 10 Sep 2014 20:14:33 -0400 Subject: [vtkusers] The recently introduce vtkPythonAlgorithm Message-ID: Hi folks, I wanted to do a little marketing for a class Ben Boeckel recently added to VTK. I wrote a fairly long article on it recently: http://www.kitware.com/blog/home/post/737 This class and the supporting Python classes allow one to develop fully-functional subclasses of vtkAlgorithm purely in Python. Something we haven't had until now. I also wrote a who slew of articles on how to leverage the also recently introduced numpy_support module to do a lot of thing from purely Python without loosing efficiency. If you are interested, here is the list: http://www.kitware.com/blog/home/user/53 I will be following these with more articles on developing sophisticated algorithms in Python and some cool examples. Best, -berk -------------- next part -------------- An HTML attachment was scrubbed... URL: From ninarock at list.ru Thu Sep 11 03:54:07 2014 From: ninarock at list.ru (Butterfly) Date: Thu, 11 Sep 2014 00:54:07 -0700 (PDT) Subject: [vtkusers] vtkChartXY: Rotate or flip a 2D Chart In-Reply-To: <1410245544820-5728619.post@n5.nabble.com> References: <1409842108320-5728574.post@n5.nabble.com> <1410245544820-5728619.post@n5.nabble.com> Message-ID: <1410422047158-5728667.post@n5.nabble.com> Your chart is rotated, seems like you solved your problem yourself :) -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkChartXY-Rotate-or-flip-a-2D-Chart-tp5728574p5728667.html Sent from the VTK - Users mailing list archive at Nabble.com. From Christophe.Duperthuy at bioclinica.com Thu Sep 11 03:45:34 2014 From: Christophe.Duperthuy at bioclinica.com (Duperthuy, Christophe) Date: Thu, 11 Sep 2014 07:45:34 +0000 Subject: [vtkusers] ActiViz 5.8.0 recurring random AccessViolationException Message-ID: Dear VTK ActiViz users, We are working on a x64 C# WinForm application based on Activiz 5.8.0 wrapping of VTK classes. Since migration of our application to Framework .NET4.0 (we were previously building with .NET3.5) it appears that we experience more frequent random crashes related to the Activiz wrapping. The crashing methods die with an AccessViolationException which generally occurs within one the 4 following methods (though we can find other less recurrent places): * Kitware.VTK.vtkRenderWindow.vtkRenderWindow_Render_88 (usually on mouse event) * Kitware.VTK.vtkAlgorithm.vtkAlgorithm_UpdateWholeExtent_73 (usually on mouse event) * Kitware.VTK.vtkDataObject.vtkDataObject_UnRegister_120 (finalizer) * Kitware.VTK. vtkObjectBase.vtkObjectBase_UnRegister_12 (finalizer) I read from < http://vtkdotnet.sourceforge.net/Programming.html> (last paragraph) that such crashes could be related to bad referencing or bad event un-subscription. If I reduce the C# code to the following one in a C# Console application, in Release x64 (x86 with pending x86 Activiz dlls crashes the same), I experience the crash randomness, principally in the GC Finalizer Thread for method vtkDataObject_UnRegister_120, but also in the main thread at the update (vtkAlgorithm_Update_68 in this case) namespace VTKCrashTestApplication { using System; using System.Threading; using Kitware.VTK; // to add Kitware.Activiz.dll and Kitware.mummy.Runtime.dll to your References // to add to PostBuild replacing with your own path //xcopy "\Activiz\5.8.0\$(PlatformName)\*.*" $(ProjectDir)$(OutDir) /i /y internal class Program { private static void Main(string[] args) { Thread lGCStressThread = new Thread(GarbageCollectorStressThread); lGCStressThread.Start(); // just a time feedback Console.WriteLine(string.Format("Start time: {0}", DateTime.Now)); // create the unique source instance vtkSphereSource lVtkSphereSource = vtkSphereSource.New(); int count = 0; while (true) { // update the source lVtkSphereSource.SetRadius(1 + count%100); lVtkSphereSource.Update(); // get a volatile reference to the source output vtkPolyData lvtkPolyData = lVtkSphereSource.GetOutput(); count++; } } private static void GarbageCollectorStressThread(object arg) { int gccount = 0; while (true) { GC.Collect(); Thread.Sleep(200); GC.WaitForPendingFinalizers(); gccount++; } } } } As we've tried to dig into the vtkusers mailing list, we barely read answers to the posts. I plan to build a Debug version of the wrappers, to get a better understanding of what's going on. As for now, I can hardly get it working for 5.8.0 (Debug x64)... Any constructive feedback will be appreciated. /chris -- Confidentiality Notice: This e-mail transmission may contain confidential or legally privileged information that is intended only for the individual or entity named in the e-mail address. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or reliance upon the contents of this e-mail is strictly prohibited. If you have received this e-mail transmission in error, please reply to the sender and then delete the message from your computer. Thank you. -- Confidentiality Notice: This e-mail transmission may contain confidential or legally privileged information that is intended only for the individual or entity named in the e-mail address. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or reliance upon the contents of this e-mail is strictly prohibited. If you have received this e-mail transmission in error, please reply to the sender and then delete the message from your computer. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Sep 11 07:37:28 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 11 Sep 2014 07:37:28 -0400 Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> <1410293514372-5728642.post@n5.nabble.com> <1410352194329-5728654.post@n5.nabble.com> Message-ID: Santosh, The default tolerance for ray-cell intersection is too large for your dataset. The selection algorithm shoots random rays from the test point through the surface. Since each call to Update generates different random rays, you see varying results. Decrease the tolearce and you will get consistent results. The default tolerate is .001. Try .00001 with your data: filter.SetTolerance(.00001) Bill On Wed, Sep 10, 2014 at 11:50 AM, santosh wrote: > Hi Bill, > Thanks for trying out my code. As you notice, there is inconsistency in the > output. Eagerly waiting for your fix to this issue. > Santosh > > On Wed, Sep 10, 2014 at 8:20 PM, Bill Lorensen [via VTK] <[hidden email]> > wrote: >> >> I can reproduce the problem with your script. There is something funny >> about the repeated calls to getPolydata. If you move that call outside >> the loop, it works. However, if you do >> filter.Modified() in the loop the error returns. Looks like a bug. >> I'll try to track it down. >> >> Bill >> >> On Wed, Sep 10, 2014 at 8:29 AM, santosh <[hidden email]> wrote: >> >> > Hi Bill, >> > I have uploaded my Python code. >> > check_point_loc.py >> > >> >> > Thanks, >> > Santosh >> > >> > >> > >> > -- >> > View this message in context: >> > http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728654.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 >> > >> > 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 >> >> 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/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728661.html >> To unsubscribe from vtkSelectEnclosedPoints filter inconsistent output of >> IsInside method, click here. >> NAML > > > > ________________________________ > View this message in context: Re: vtkSelectEnclosedPoints filter > inconsistent output of IsInside method > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From scbiradar at gmail.com Thu Sep 11 08:49:36 2014 From: scbiradar at gmail.com (santosh) Date: Thu, 11 Sep 2014 05:49:36 -0700 (PDT) Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> <1410293514372-5728642.post@n5.nabble.com> <1410352194329-5728654.post@n5.nabble.com> Message-ID: Bill, Thanks a lot. I get consistent output by setting tolerance to 0.000001. Thanks for your time and help. -Santosh On Thu, Sep 11, 2014 at 5:08 PM, Bill Lorensen [via VTK] < ml-node+s1045678n5728671h59 at n5.nabble.com> wrote: > Santosh, > > The default tolerance for ray-cell intersection is too large for your > dataset. The selection algorithm shoots random rays from the test > point through the surface. Since each call to Update generates > different random rays, you see varying results. Decrease the tolearce > and you will get consistent results. > > The default tolerate is .001. Try .00001 with your data: > filter.SetTolerance(.00001) > > Bill > > On Wed, Sep 10, 2014 at 11:50 AM, santosh <[hidden email] > > wrote: > > > Hi Bill, > > Thanks for trying out my code. As you notice, there is inconsistency in > the > > output. Eagerly waiting for your fix to this issue. > > Santosh > > > > On Wed, Sep 10, 2014 at 8:20 PM, Bill Lorensen [via VTK] <[hidden > email]> > > wrote: > >> > >> I can reproduce the problem with your script. There is something funny > >> about the repeated calls to getPolydata. If you move that call outside > >> the loop, it works. However, if you do > >> filter.Modified() in the loop the error returns. Looks like a bug. > >> I'll try to track it down. > >> > >> Bill > >> > >> On Wed, Sep 10, 2014 at 8:29 AM, santosh <[hidden email]> wrote: > >> > >> > Hi Bill, > >> > I have uploaded my Python code. > >> > check_point_loc.py > >> > > >> > >> > Thanks, > >> > Santosh > >> > > >> > > >> > > >> > -- > >> > View this message in context: > >> > > http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728654.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 > >> > > >> > 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 > >> > >> 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/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728661.html > >> To unsubscribe from vtkSelectEnclosedPoints filter inconsistent output > of > >> IsInside method, click here. > >> NAML > > > > > > > > ________________________________ > > View this message in context: Re: vtkSelectEnclosedPoints filter > > inconsistent output of IsInside method > > 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 > > > > 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 > > 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/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728671.html > To unsubscribe from vtkSelectEnclosedPoints filter inconsistent output of > IsInside method, click here > > . > NAML > > -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728673.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From da.angulo39 at uniandes.edu.co Thu Sep 11 10:31:30 2014 From: da.angulo39 at uniandes.edu.co (diego0020) Date: Thu, 11 Sep 2014 07:31:30 -0700 (PDT) Subject: [vtkusers] The recently introduce vtkPythonAlgorithm In-Reply-To: References: Message-ID: <1410445890475-5728674.post@n5.nabble.com> This looks great!!! Thanks a lot. Do you know when will this be available in the standalone vtk python installer? -- View this message in context: http://vtk.1045678.n5.nabble.com/The-recently-introduce-vtkPythonAlgorithm-tp5728665p5728674.html Sent from the VTK - Users mailing list archive at Nabble.com. From mdkhatami at gmail.com Thu Sep 11 11:04:42 2014 From: mdkhatami at gmail.com (Mohammad Khatami) Date: Thu, 11 Sep 2014 17:04:42 +0200 Subject: [vtkusers] Assigning opacity and color to each position of vtkImageData instead of its scalar value Message-ID: Hello all, I have a function that depends on some features (gradient magnitude, scalar value,? and second derivatives) returns the opacity for each voxel in my vtkimagedataset . The problem is when I read my file using vtkXMLImageDataReader I know how to assign opacity using just scalar value of the data, but don't know how to assign my customized opacity which is depends on different feature. In other words what is the best way to visualize vtkImageData by assigning color and opacity to each position of data instead of the scalar value of the data. For example I want to set as follow: position[23][10][21]->assignColor(1,1,1) position[23][11][21]->assignColor(1,0,1) position[23][12][21]->assignColor(1,1,0) . . . Or position[23][10][21]->assignOpacity(0.4) All the best, Mohammad -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Thu Sep 11 12:08:58 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Thu, 11 Sep 2014 16:08:58 +0000 Subject: [vtkusers] polyhedron in python In-Reply-To: <780E1C7E23W2621217-01@EMF_nv.doe.gov> References: <1410293986843-5728643.post@n5.nabble.com> <20140910000223.A509A843D7@public.kitware.com> <780E1C7E23W2621217-01@EMF_nv.doe.gov> Message-ID: I thought I could fix it for you - but there is a bug in my program. You need to write out a vtkUnstructuredGrid rather than a vtkPolyData if you wanted to be able to select the polyhedron as a cell. I hadn't worked with those before, so I figured that I would give it a shot. I think that the face stream is wrong ... which is why no faces show up in ParaVew. You can see the points with a glyph filter, but the facets don't show up. Anyone out there have an idea of where I went wrong? (modified version of old code below) # I am using VTK 6.1.0 import vtk # This is a Rhombic Dodecahedron. # First, you need to store the vertex locations. vertex_locations = vtk.vtkPoints() vertex_locations.SetNumberOfPoints(14) vertex_locations.SetPoint( 0, (-0.816497, -0.816497, 0.00000)) vertex_locations.SetPoint( 1, (-0.816497, 0.000000, -0.57735)) vertex_locations.SetPoint( 2, (-0.816497, 0.000000, 0.57735)) vertex_locations.SetPoint( 3, (-0.816497, 0.816497, 0.00000)) vertex_locations.SetPoint( 4, ( 0.000000, -0.816497, -0.57735)) vertex_locations.SetPoint( 5, ( 0.000000, -0.816497, 0.57735)) vertex_locations.SetPoint( 6, ( 0.000000, 0.000000, -1.15470)) vertex_locations.SetPoint( 7, ( 0.000000, 0.000000, 1.15470)) vertex_locations.SetPoint( 8, ( 0.000000, 0.816497, -0.57735)) vertex_locations.SetPoint( 9, ( 0.000000, 0.816497, 0.57735)) vertex_locations.SetPoint(10, ( 0.816497, -0.816497, 0.00000)) vertex_locations.SetPoint(11, ( 0.816497, 0.000000, -0.57735)) vertex_locations.SetPoint(12, ( 0.816497, 0.000000, 0.57735)) vertex_locations.SetPoint(13, ( 0.816497, 0.816497, 0.00000)) # Next, you describe the polygons that represent the faces using the vertex # indices in the vtkPoints that stores the vertex locations. There are a number # of ways to do this that you can find in examples on the Wiki. polygon_faces = vtk.vtkCellArray() q = vtk.vtkQuad() q.GetPointIds().SetId(0, 7) q.GetPointIds().SetId(1, 12) q.GetPointIds().SetId(2, 10) q.GetPointIds().SetId(3, 5) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 7) q.GetPointIds().SetId(1, 12) q.GetPointIds().SetId(2, 13) q.GetPointIds().SetId(3, 9) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 7) q.GetPointIds().SetId(1, 9) q.GetPointIds().SetId(2, 3) q.GetPointIds().SetId(3, 2) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 7) q.GetPointIds().SetId(1, 2) q.GetPointIds().SetId(2, 0) q.GetPointIds().SetId(3, 5) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 6) q.GetPointIds().SetId(1, 11) q.GetPointIds().SetId(2, 10) q.GetPointIds().SetId(3, 4) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 6) q.GetPointIds().SetId(1, 4) q.GetPointIds().SetId(2, 0) q.GetPointIds().SetId(3, 1) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 6) q.GetPointIds().SetId(1, 1) q.GetPointIds().SetId(2, 3) q.GetPointIds().SetId(3, 8) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 6) q.GetPointIds().SetId(1, 8) q.GetPointIds().SetId(2, 13) q.GetPointIds().SetId(3, 11) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 10) q.GetPointIds().SetId(1, 11) q.GetPointIds().SetId(2, 13) q.GetPointIds().SetId(3, 12) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 13) q.GetPointIds().SetId(1, 8) q.GetPointIds().SetId(2, 3) q.GetPointIds().SetId(3, 9) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 3) q.GetPointIds().SetId(1, 1) q.GetPointIds().SetId(2, 0) q.GetPointIds().SetId(3, 2) polygon_faces.InsertNextCell(q) q = vtk.vtkQuad() q.GetPointIds().SetId(0, 0) q.GetPointIds().SetId(1, 4) q.GetPointIds().SetId(2, 10) q.GetPointIds().SetId(3, 5) polygon_faces.InsertNextCell(q) # Next you create a vtkPolyData to store your face and vertex information that # represents your polyhedron. pd = vtk.vtkPolyData() pd.SetPoints(vertex_locations) pd.SetPolys(polygon_faces) # If you wanted to be able to load in the saved file and select the entire # polyhedron, you would need to save it as a vtkUnstructuredGrid, and you would # need to put the data into a vtkPolyhedron. This is a bit more involved than # the vtkPolyData that I used above. For a more in-depth discussion, see: # http://www.vtk.org/Wiki/VTK/Polyhedron_Support # Based on the link above, I need to construct a face stream: face_stream = vtk.vtkIdList() face_stream.InsertNextId(polygon_faces.GetNumberOfCells()) vertex_list = vtk.vtkIdList() polygon_faces.InitTraversal() while polygon_faces.GetNextCell(vertex_list) == 1: face_stream.InsertNextId(vertex_list.GetNumberOfIds()) for j in range(vertex_list.GetNumberOfIds()): face_stream.InsertNextId(vertex_list.GetId(j)) ug = vtk.vtkUnstructuredGrid() ug.SetPoints(vertex_locations) ug.InsertNextCell(vtk.VTK_POLYHEDRON, face_stream) #--------------# # output stuff # #--------------# writer = vtk.vtkUnstructuredGridWriter() writer.SetFileName("rhombic_dodecahedron.vtk") writer.SetInputData(ug) writer.Write() #---------------------# # visualization stuff # #---------------------# # mapper = vtk.vtkPolyDataMapper() # mapper.SetInputData(pd) mapper = vtk.vtkDataSetMapper() mapper.SetInputData(ug) actor = vtk.vtkActor() actor.SetMapper(mapper) ren = vtk.vtkRenderer() ren.AddActor(actor) renw = vtk.vtkRenderWindow() renw.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renw) ren.ResetCamera() renw.Render() iren.Start() On 9/10/14 2:34 PM, "George" wrote: >Hi, >The example of Meehan works quite well. >However, I see that each face of the polyhedron is listed as a cell. Is it >possible to hide these face 'cells', so that when you select the >polyhedron >in paraview it lists only 1 cell (the polyhedron itself)? > >Best regards, >George > > > >-- >View this message in context: >http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643p5728664.ht >ml >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 > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > From tim.hutton at gmail.com Thu Sep 11 12:21:49 2014 From: tim.hutton at gmail.com (Tim Hutton) Date: Thu, 11 Sep 2014 17:21:49 +0100 Subject: [vtkusers] polyhedron in python In-Reply-To: <20140911160823.CE79584DEF@public.kitware.com> References: <1410293986843-5728643.post@n5.nabble.com> <20140910000223.A509A843D7@public.kitware.com> <780E1C7E23W2621217-01@EMF_nv.doe.gov> <20140911160823.CE79584DEF@public.kitware.com> Message-ID: Hello, We generate polyhedral cells as part of Ready. Some C++ code here: https://code.google.com/p/reaction-diffusion/source/browse/trunk/Ready/src/readybase/MeshGenerators.cpp#738 Tim On 11 September 2014 17:08, Meehan, Bernard wrote: > I thought I could fix it for you - but there is a bug in my program. You > need to write out a vtkUnstructuredGrid rather than a vtkPolyData if you > wanted to be able to select the polyhedron as a cell. I hadn't worked with > those before, so I figured that I would give it a shot. I think that the > face stream is wrong ... which is why no faces show up in ParaVew. You can > see the points with a glyph filter, but the facets don't show up. Anyone > out there have an idea of where I went wrong? (modified version of old > code below) > > # I am using VTK 6.1.0 > import vtk > # This is a Rhombic Dodecahedron. > > # First, you need to store the vertex locations. > vertex_locations = vtk.vtkPoints() > vertex_locations.SetNumberOfPoints(14) > vertex_locations.SetPoint( 0, (-0.816497, -0.816497, 0.00000)) > vertex_locations.SetPoint( 1, (-0.816497, 0.000000, -0.57735)) > vertex_locations.SetPoint( 2, (-0.816497, 0.000000, 0.57735)) > vertex_locations.SetPoint( 3, (-0.816497, 0.816497, 0.00000)) > vertex_locations.SetPoint( 4, ( 0.000000, -0.816497, -0.57735)) > vertex_locations.SetPoint( 5, ( 0.000000, -0.816497, 0.57735)) > vertex_locations.SetPoint( 6, ( 0.000000, 0.000000, -1.15470)) > vertex_locations.SetPoint( 7, ( 0.000000, 0.000000, 1.15470)) > vertex_locations.SetPoint( 8, ( 0.000000, 0.816497, -0.57735)) > vertex_locations.SetPoint( 9, ( 0.000000, 0.816497, 0.57735)) > vertex_locations.SetPoint(10, ( 0.816497, -0.816497, 0.00000)) > vertex_locations.SetPoint(11, ( 0.816497, 0.000000, -0.57735)) > vertex_locations.SetPoint(12, ( 0.816497, 0.000000, 0.57735)) > vertex_locations.SetPoint(13, ( 0.816497, 0.816497, 0.00000)) > > # Next, you describe the polygons that represent the faces using the vertex > # indices in the vtkPoints that stores the vertex locations. There are a > number > # of ways to do this that you can find in examples on the Wiki. > > polygon_faces = vtk.vtkCellArray() > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 7) > q.GetPointIds().SetId(1, 12) > q.GetPointIds().SetId(2, 10) > q.GetPointIds().SetId(3, 5) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 7) > q.GetPointIds().SetId(1, 12) > q.GetPointIds().SetId(2, 13) > q.GetPointIds().SetId(3, 9) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 7) > q.GetPointIds().SetId(1, 9) > q.GetPointIds().SetId(2, 3) > q.GetPointIds().SetId(3, 2) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 7) > q.GetPointIds().SetId(1, 2) > q.GetPointIds().SetId(2, 0) > q.GetPointIds().SetId(3, 5) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 6) > q.GetPointIds().SetId(1, 11) > q.GetPointIds().SetId(2, 10) > q.GetPointIds().SetId(3, 4) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 6) > q.GetPointIds().SetId(1, 4) > q.GetPointIds().SetId(2, 0) > q.GetPointIds().SetId(3, 1) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 6) > q.GetPointIds().SetId(1, 1) > q.GetPointIds().SetId(2, 3) > q.GetPointIds().SetId(3, 8) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 6) > q.GetPointIds().SetId(1, 8) > q.GetPointIds().SetId(2, 13) > q.GetPointIds().SetId(3, 11) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 10) > q.GetPointIds().SetId(1, 11) > q.GetPointIds().SetId(2, 13) > q.GetPointIds().SetId(3, 12) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 13) > q.GetPointIds().SetId(1, 8) > q.GetPointIds().SetId(2, 3) > q.GetPointIds().SetId(3, 9) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 3) > q.GetPointIds().SetId(1, 1) > q.GetPointIds().SetId(2, 0) > q.GetPointIds().SetId(3, 2) > polygon_faces.InsertNextCell(q) > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 0) > q.GetPointIds().SetId(1, 4) > q.GetPointIds().SetId(2, 10) > q.GetPointIds().SetId(3, 5) > polygon_faces.InsertNextCell(q) > > # Next you create a vtkPolyData to store your face and vertex information > that > # represents your polyhedron. > pd = vtk.vtkPolyData() > pd.SetPoints(vertex_locations) > pd.SetPolys(polygon_faces) > > # If you wanted to be able to load in the saved file and select the entire > # polyhedron, you would need to save it as a vtkUnstructuredGrid, and you > would > # need to put the data into a vtkPolyhedron. This is a bit more involved > than > # the vtkPolyData that I used above. For a more in-depth discussion, see: > # http://www.vtk.org/Wiki/VTK/Polyhedron_Support > > # Based on the link above, I need to construct a face stream: > face_stream = vtk.vtkIdList() > face_stream.InsertNextId(polygon_faces.GetNumberOfCells()) > vertex_list = vtk.vtkIdList() > > polygon_faces.InitTraversal() > while polygon_faces.GetNextCell(vertex_list) == 1: > > face_stream.InsertNextId(vertex_list.GetNumberOfIds()) > > for j in range(vertex_list.GetNumberOfIds()): > face_stream.InsertNextId(vertex_list.GetId(j)) > > ug = vtk.vtkUnstructuredGrid() > ug.SetPoints(vertex_locations) > ug.InsertNextCell(vtk.VTK_POLYHEDRON, face_stream) > > #--------------# > # output stuff # > #--------------# > writer = vtk.vtkUnstructuredGridWriter() > writer.SetFileName("rhombic_dodecahedron.vtk") > writer.SetInputData(ug) > writer.Write() > > #---------------------# > # visualization stuff # > #---------------------# > # mapper = vtk.vtkPolyDataMapper() > # mapper.SetInputData(pd) > mapper = vtk.vtkDataSetMapper() > mapper.SetInputData(ug) > > actor = vtk.vtkActor() > actor.SetMapper(mapper) > > ren = vtk.vtkRenderer() > ren.AddActor(actor) > > renw = vtk.vtkRenderWindow() > renw.AddRenderer(ren) > > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renw) > > ren.ResetCamera() > renw.Render() > iren.Start() > > > On 9/10/14 2:34 PM, "George" wrote: > > >Hi, > >The example of Meehan works quite well. > >However, I see that each face of the polyhedron is listed as a cell. Is it > >possible to hide these face 'cells', so that when you select the > >polyhedron > >in paraview it lists only 1 cell (the polyhedron itself)? > > > >Best regards, > >George > > > > > > > >-- > >View this message in context: > > > http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643p5728664.ht > >ml > >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 > > > >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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Tim Hutton - http://www.sq3.org.uk - http://profiles.google.com/tim.hutton/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From cafaro at dis.uniroma1.it Thu Sep 11 14:00:16 2014 From: cafaro at dis.uniroma1.it (Bruno Cafaro) Date: Thu, 11 Sep 2014 20:00:16 +0200 Subject: [vtkusers] Obtain a mesh orthographic projections In-Reply-To: References: <1410293986843-5728643.post@n5.nabble.com> <20140910000223.A509A843D7@public.kitware.com> <780E1C7E23W2621217-01@EMF_nv.doe.gov> <20140911160823.CE79584DEF@public.kitware.com> Message-ID: <5411E330.8070606@dis.uniroma1.it> Dear vtkUsers, i have a mesh, and i need to extract its orthographic projections on the three planes 'xy', 'xz' and 'yz'. Here is my code snippet: void ImplicitFunctionRender::GetOrtho(float d) { // 'XY' plane camera->SetPosition(0,0,d); camera->SetViewUp(0,1,0); camera->SetViewPlaneNormal(0,0,-1); ImplicitFunctionRender::SavePNG(11,0); ImplicitFunctionRender::SaveTRANSFORM4x4(11,0,camera->GetViewPlaneNormal(),camera->GetPosition(),camera->GetViewUp()); // 'YZ' plane camera->SetPosition(0,d,0); camera->SetViewUp(1,0,0); camera->SetViewPlaneNormal(0,-1,0); ImplicitFunctionRender::SavePNG(22,0); ImplicitFunctionRender::SaveTRANSFORM4x4(22,0,camera->GetViewPlaneNormal(),camera->GetPosition(),camera->GetViewUp()); // 'XZ' plane camera->SetPosition(d,0,0); camera->SetViewUp(0,0,1); camera->SetViewPlaneNormal(-1,0,0); ImplicitFunctionRender::SavePNG(33,0); ImplicitFunctionRender::SaveTRANSFORM4x4(33,0,camera->GetViewPlaneNormal(),camera->GetPosition(),camera->GetViewUp()); } If I set View Up always to (0,0,1), which should be coherent with the 'z' direction, in the second case 'YZ' plane i get an empty image. First and third are ok. If I set View Up as in the code snippet I always have the object in the image, it works but in the 'YZ' plane case the image is rotated 90?, which is correct i suppose, but I want it again with 'Z' axis up.... Moreover setting or do not setting the view plane normal does not affect the results. I also attach my results using the code snippet reported. Hope someone can help me understanding how this work. Best Bruno -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot011.png Type: image/png Size: 32309 bytes Desc: not available URL: -------------- next part -------------- Position: 0 0 7.5 View Normal: 0 0 -1 View Up: 0 1 0 -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot022.png Type: image/png Size: 26164 bytes Desc: not available URL: -------------- next part -------------- Position: 0 7.5 0 View Normal: 0 -1 0 View Up: 1 0 0 -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot033.png Type: image/png Size: 24705 bytes Desc: not available URL: -------------- next part -------------- Position: 7.5 0 0 View Normal: -1 0 0 View Up: 0 0 1 From xpelaox at gmail.com Thu Sep 11 16:42:47 2014 From: xpelaox at gmail.com (ferluduena) Date: Thu, 11 Sep 2014 13:42:47 -0700 (PDT) Subject: [vtkusers] Interpolating 3D points Message-ID: <1410468167907-5728690.post@n5.nabble.com> Hi! I've been working on volumetric reconstruction from a stack of images. Basicaly my piece of software lets the user capture images and draw regions of interests on different axial images and my software should be able to make a volume out of it. This is what i have right now: Basically what i have is a stack of matrices filled with 0, but 1 on the roi, so it is pretty easy to search for points. In the middle of each matrix with a ROI i can insert empty matrices. What i need to do is some kind of interpolation to fill the empty matrices in between the rois. Then i can make a volumetric reconstruction using contour filter... but i need to give to it pretty close points in order to work. I've been trying to interpolate using linear interpolator or lagrenge... but still have no luck. I'm sure VTK must have some way of solving this.... may be anyone can give me any hint? Thanks a lot in advance! -- View this message in context: http://vtk.1045678.n5.nabble.com/Interpolating-3D-points-tp5728690.html Sent from the VTK - Users mailing list archive at Nabble.com. From cafaro at dis.uniroma1.it Fri Sep 12 06:02:38 2014 From: cafaro at dis.uniroma1.it (Bruno Cafaro) Date: Fri, 12 Sep 2014 12:02:38 +0200 Subject: [vtkusers] Obtain a mesh orthographic projections In-Reply-To: <5412C373.8090106@autistici.org> References: <5412C373.8090106@autistici.org> Message-ID: <5412C4BE.1010000@dis.uniroma1.it> Dear vtkUsers, sorry to send this again, but I wrongly sent the last message as a reply. If I have a mesh, and i need to extract its orthographic projections on the three planes 'xy', 'xz' and 'yz'. Here is my code snippet: void ImplicitFunctionRender::GetOrtho(float d) { // 'XY' plane camera->SetPosition(0,0,d); camera->SetViewUp(0,1,0); camera->SetViewPlaneNormal(0,0,-1); ImplicitFunctionRender::SavePNG(11,0); ImplicitFunctionRender::SaveTRANSFORM4x4(11,0,camera->GetViewPlaneNormal(),camera->GetPosition(),camera->GetViewUp()); // 'YZ' plane camera->SetPosition(0,d,0); camera->SetViewUp(1,0,0); camera->SetViewPlaneNormal(0,-1,0); ImplicitFunctionRender::SavePNG(22,0); ImplicitFunctionRender::SaveTRANSFORM4x4(22,0,camera->GetViewPlaneNormal(),camera->GetPosition(),camera->GetViewUp()); // 'XZ' plane camera->SetPosition(d,0,0); camera->SetViewUp(0,0,1); camera->SetViewPlaneNormal(-1,0,0); ImplicitFunctionRender::SavePNG(33,0); ImplicitFunctionRender::SaveTRANSFORM4x4(33,0,camera->GetViewPlaneNormal(),camera->GetPosition(),camera->GetViewUp()); } If I set View Up always to (0,0,1), which should be coherent with the 'z' direction, in the second case 'YZ' plane i get an empty image. First and third are ok. If I set View Up as in the code snippet I always have the object in the image, it works but in the 'YZ' plane case the image is rotated 90?, which is correct i suppose, but I want it again with 'Z' axis up.... Moreover setting or do not setting the view plane normal does not affect the results. I also attach my results using the code snippet reported. Hope someone can help me understanding how this work. Best Bruno -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot011.png Type: image/png Size: 32309 bytes Desc: not available URL: -------------- next part -------------- Position: 0 0 7.5 View Normal: 0 0 -1 View Up: 0 1 0 -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot022.png Type: image/png Size: 26164 bytes Desc: not available URL: -------------- next part -------------- Position: 0 7.5 0 View Normal: 0 -1 0 View Up: 1 0 0 -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot033.png Type: image/png Size: 24705 bytes Desc: not available URL: -------------- next part -------------- Position: 7.5 0 0 View Normal: -1 0 0 View Up: 0 0 1 From Gerrick.Bivins at halliburton.com Fri Sep 12 07:49:31 2014 From: Gerrick.Bivins at halliburton.com (Gerrick Bivins) Date: Fri, 12 Sep 2014 11:49:31 +0000 Subject: [vtkusers] The recently introduce vtkPythonAlgorithm In-Reply-To: <1410445890475-5728674.post@n5.nabble.com> References: <1410445890475-5728674.post@n5.nabble.com> Message-ID: This is awesome! Does anyone know if there are plans to provide this capability to some of the other wrapped languages, like Java? Gerrick -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of diego0020 Sent: Thursday, September 11, 2014 9:32 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] The recently introduce vtkPythonAlgorithm This looks great!!! Thanks a lot. Do you know when will this be available in the standalone vtk python installer? -- View this message in context: http://vtk.1045678.n5.nabble.com/The-recently-introduce-vtkPythonAlgorithm-tp5728665p5728674.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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ---------------------------------------------------------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. From berk.geveci at kitware.com Fri Sep 12 09:40:20 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Fri, 12 Sep 2014 09:40:20 -0400 Subject: [vtkusers] The recently introduce vtkPythonAlgorithm In-Reply-To: <1410445890475-5728674.post@n5.nabble.com> References: <1410445890475-5728674.post@n5.nabble.com> Message-ID: We are slowly making progress towards the next VTK release. Probably in 2 months. -berk On Thu, Sep 11, 2014 at 10:31 AM, diego0020 wrote: > This looks great!!! > > Thanks a lot. > > Do you know when will this be available in the standalone vtk python > installer? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/The-recently-introduce-vtkPythonAlgorithm-tp5728665p5728674.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Fri Sep 12 09:42:10 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Fri, 12 Sep 2014 09:42:10 -0400 Subject: [vtkusers] The recently introduce vtkPythonAlgorithm In-Reply-To: References: <1410445890475-5728674.post@n5.nabble.com> Message-ID: Sorry. This uses Python wrapper specific features. Unless someone improves the Java wrappers or writes a custom vtkJavaAlgorithm, it is not possible to support this in Java. As far as I know, we don't have any plans to do either. Best, -berk On Fri, Sep 12, 2014 at 7:49 AM, Gerrick Bivins < Gerrick.Bivins at halliburton.com> wrote: > This is awesome! > Does anyone know if there are plans to provide this capability to some of > the other wrapped languages, > like Java? > > Gerrick > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of diego0020 > Sent: Thursday, September 11, 2014 9:32 AM > To: vtkusers at vtk.org > Subject: Re: [vtkusers] The recently introduce vtkPythonAlgorithm > > This looks great!!! > > Thanks a lot. > > Do you know when will this be available in the standalone vtk python > installer? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/The-recently-introduce-vtkPythonAlgorithm-tp5728665p5728674.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > ---------------------------------------------------------------------- > This e-mail, including any attached files, may contain confidential and > privileged information for the sole use of the intended recipient. Any > review, use, distribution, or disclosure by others is strictly prohibited. > If you are not the intended recipient (or authorized to receive information > for the intended recipient), please contact the sender by reply e-mail and > delete all copies of this message. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simone.rapposelli at gmail.com Fri Sep 12 10:58:17 2014 From: simone.rapposelli at gmail.com (Simone Rapposelli) Date: Fri, 12 Sep 2014 16:58:17 +0200 Subject: [vtkusers] strange behavior with GetActiveCamera on vtkFollower Message-ID: Hi, I am a newbie on VTK and I am working on a software using it with PCL. I am facing with a strange behavior when trying to display 3d text on the renderer: if I add more than two different 3d text on the viewer, I get an annoying flickering when naivgating with mouse and sometimes all the actors (point cloud and text) disappear until I keep pressed mouse button and reappear only after releasing it. Doing some tests I have found that, if I have a vtkFollower object defined as follows: vtkSmartPointer textActor = vtkSmartoPointer::New(); and I comment the following line: textActor->setCamera(renderer->GetActiveCamera() the flickering disappear, but obviously I lose the text facing the camera. So the problem seems to be localized in GetActiveCamera: does any of you has experienced a similar issue? I am working on a Qt widget, I don't know if this can be a problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Fri Sep 12 18:09:30 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 12 Sep 2014 16:09:30 -0600 Subject: [vtkusers] VTK/Java - Disable NativeLibrary loading inside vtkPanel/vtkCanvas Message-ID: Hi all, I've just made a topic on VTK to remove the automatic loading of the native library that use to exist inside vtkPanel and vtkCanvas. (Which could induce quite some issue in modular large application) But before merging it to VTK/master, I wanted your opinion specially since it may change some behavior on your end. Specially if you were relying on vtkPanel or vtkCanvas to load the VTK native library for you. Instead, you will have to do it in your main by calling something like static { vtkNativeLibrary.LoadAllNativeLibraries(); } The topic can be found here: => http://review.source.kitware.com/#/t/4660/ I'm targeting to merge the topic by the end of next week. So please speak up if you have something to say... ;-) Happy VTK/Java ! Seb -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.schussman at gmail.com Fri Sep 12 20:04:25 2014 From: greg.schussman at gmail.com (Greg Schussman) Date: Fri, 12 Sep 2014 17:04:25 -0700 Subject: [vtkusers] renderer.GetActors() returning 3d actors, but not 2d actors. Message-ID: Hi. I'm using python-2.6 and vtk-5.10.1. I have a renderer, to which I'm adding actors. Some are 3d actors (surfaces, sets of cones), and some are 2d actors (filename text, scalarbar). To add them, I'm calling: self.renderer.AddActor(my_actor) # Also tried AddViewProp(my_actor) They seem to add in ok, and they do get rendered. However, based on user input, sometimes actors need to be removed and new ones added. So I need to take a look at what's already there, which I do this way: c = self.renderer.GetActors() c.InitTraversal() num_items = c.GetNumberOfItems() result = [] for i in xrange(num_items): result.append(c.GetNextActor()) I notice that when I add a 3d actor and I check before/adter, the num_items increments as expected. However, when I add 2d actors (ScalarBar, Text), although they also render, when I check before/after, the num_items does not increment, and they are not returned in the GetActors() list. How do I find out which 2d actors are in the renderer, so that I can optionally remove some of them? Should I be doing something different? Thanks. Greg p.s. I've tried calling renderer.GetActors2D(), but then when i try to call GetNextActor() on that, I get "AttributeError: GetNextActor". -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 12 20:20:43 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 12 Sep 2014 18:20:43 -0600 Subject: [vtkusers] renderer.GetActors() returning 3d actors, but not 2d actors. In-Reply-To: References: Message-ID: Use GetViewProps() and use IsA() to check the type of each prop. On Fri, Sep 12, 2014 at 6:04 PM, Greg Schussman wrote: > Hi. > > I'm using python-2.6 and vtk-5.10.1. > > I have a renderer, to which I'm adding actors. Some are 3d actors > (surfaces, sets of cones), and some are 2d actors (filename text, > scalarbar). To add them, I'm calling: > > self.renderer.AddActor(my_actor) # Also tried AddViewProp(my_actor) > > They seem to add in ok, and they do get rendered. > > However, based on user input, sometimes actors need to be removed and new > ones added. So I need to take a look at what's already there, which I do > this way: > > c = self.renderer.GetActors() > c.InitTraversal() > num_items = c.GetNumberOfItems() > result = [] > for i in xrange(num_items): > result.append(c.GetNextActor()) > > I notice that when I add a 3d actor and I check before/adter, the num_items > increments as expected. > > However, when I add 2d actors (ScalarBar, Text), although they also render, > when I check before/after, the num_items does not increment, and they are > not returned in the GetActors() list. > > How do I find out which 2d actors are in the renderer, so that I can > optionally remove some of them? > > Should I be doing something different? > > Thanks. > > Greg > > p.s. I've tried calling renderer.GetActors2D(), but then when i try to call > GetNextActor() on that, I get "AttributeError: GetNextActor". From m.sambin at gmail.com Sat Sep 13 02:31:11 2014 From: m.sambin at gmail.com (Marco Sambin) Date: Sat, 13 Sep 2014 08:31:11 +0200 Subject: [vtkusers] VTK/Java - Disable NativeLibrary loading inside vtkPanel/vtkCanvas In-Reply-To: References: Message-ID: Hi Seb, No problem for me, I load all required VTK libraries "manually" at startup of my VTK-based JWS application. So, green light from my side. Thanks for asking users feedback before proceeding. Regards, Marco Il 13/set/2014 00:09 "Sebastien Jourdain" ha scritto: > Hi all, > > I've just made a topic on VTK to remove the automatic loading of the > native library that use to exist inside vtkPanel and vtkCanvas. (Which > could induce quite some issue in modular large application) > > But before merging it to VTK/master, I wanted your opinion specially since > it may change some behavior on your end. Specially if you were relying on > vtkPanel or vtkCanvas to load the VTK native library for you. > > Instead, you will have to do it in your main by calling something like > > static { > vtkNativeLibrary.LoadAllNativeLibraries(); > } > > The topic can be found here: > => http://review.source.kitware.com/#/t/4660/ > > I'm targeting to merge the topic by the end of next week. So please speak > up if you have something to say... ;-) > > Happy VTK/Java ! > > Seb > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sid.murthy at gmail.com Sat Sep 13 15:51:03 2014 From: sid.murthy at gmail.com (Sid Murthy) Date: Sat, 13 Sep 2014 13:51:03 -0600 Subject: [vtkusers] vtkDistanceWidget not working In-Reply-To: <8D19994A16F19F5-1768-2BA34@webmail-m244.sysops.aol.com> References: <8D19994A16F19F5-1768-2BA34@webmail-m244.sysops.aol.com> Message-ID: That worked. Thanks for the tip, David. Sid On Mon, Sep 8, 2014 at 9:56 AM, David Cole wrote: > Hold the dWidget variable beyond the scope of whatever function it is > in.... > > i.e. -- when the widget goes away, it does not show up anymore. You need > to hold the reference alive by maintaining a smart pointer to it at a "more > outer" scope. Perhaps attaching it to whatever keeps your renderwindow > alive makes sense... > > > HTH, > David C. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.gerber at gmail.com Sun Sep 14 02:31:33 2014 From: george.gerber at gmail.com (George) Date: Sat, 13 Sep 2014 23:31:33 -0700 (PDT) Subject: [vtkusers] vtkGraph Edgeweigths example in python not working Message-ID: <1410676293516-5728706.post@n5.nabble.com> Good day, I am trying to visualize a pipe network composed of nodes and pipes. It would be nice to be able to select in Paraview a node and see its pressure (scalar-value) or a pipe and see its flow (scalar value) or even pipe stiffness matrix. vtkGraph appears to be useful for visualising such a network. However, when I try to run the Edgeweigths.py example I get the following error: Traceback (most recent call last): File "C:\Users\george limited\Desktop\VTK_Edgeweigths.py", line 30, in graphLayoutView = vtk.vtkGraphLayoutView() AttributeError: 'module' object has no attribute 'vtkGraphLayoutView' Can somebody tell me how to get this example working? Best regards, George -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkGraph-Edgeweigths-example-in-python-not-working-tp5728706.html Sent from the VTK - Users mailing list archive at Nabble.com. From linucks42 at gmail.com Sun Sep 14 07:29:59 2014 From: linucks42 at gmail.com (Jens) Date: Sun, 14 Sep 2014 12:29:59 +0100 Subject: [vtkusers] Missing libvtkRenderingPythonTkWidgets on OSX Message-ID: Hi, I downloaded the latest vtkpython bundle for OSX: http://www.vtk.org/files/release/6.1/vtkpython-6.1.0-Darwin-64bit.tar.gz and am trying to use it with Tk. I've tried to create the simplest script I can to illustrate the problem, which I've pasted in below. I run the script using the vtkpython binary. I firstly have to add the path to the vtk .so files to the python system path or the script fails with: import vtk.tk.vtkTkRenderWidget File "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkTkRenderWidget.py", line 51, in from vtkLoadPythonTkWidgets import vtkLoadPythonTkWidgets File "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkLoadPythonTkWidgets.py", line 2, in import vtkCommonCorePython ImportError: No module named vtkCommonCorePython Firstly, shouldn't vtkpython already do this, or am I using it incorrectly? If I add the path with the sys.insert... line, the script then fails with: pane = vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root,width=300,height=300) File "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkTkRenderWidget.py", line 81, in __init__ vtkLoadPythonTkWidgets(master.tk) File "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkLoadPythonTkWidgets.py", line 73, in vtkLoadPythonTkWidgets interp.call('load', filename, pkgname) _tkinter.TclError: dlopen(libvtkRenderingPythonTkWidgets-6.1.dylib, 10): image not found I've looked and the libvtkRenderingPythonTkWidgets-6.1.dylib library is nowhere to be found. Is it missing from the package, or is something else going on? Best wishes, Jens import sys # Need to add this manually sys.path.insert(0,"/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk") import vtk import Tkinter import vtk.tk.vtkTkRenderWidget # create root window root = Tkinter.Tk() # create vtkTkRenderWidget pane = vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root,width=300,height=300) ren = vtk.vtkRenderer() renWin = pane.GetRenderWindow() renWin.AddRenderer(ren) # pack the pane into the tk root pane.pack() -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1danielcoelho at gmail.com Sun Sep 14 13:27:54 2014 From: 1danielcoelho at gmail.com (Daniel Coelho) Date: Sun, 14 Sep 2014 19:27:54 +0200 Subject: [vtkusers] Plotting every point of a ImageData 3D grid Message-ID: Hello! I'm trying to create a 3D plot with a structured, rectangular grid of isolated points. It should look like the attached image (URL http://docs.luxology.com/modo/701/help/images/layout/ArraySample.png), except that instead of plotting every point as yellow, each point should have a different color based on a scalar that they hold. I've managed to plot the data with the correct color so far. The remaining problem is that only the very outer layer of points, all around the cube, gets rendered! None of the interior points get rendered at all, even though the dataArray that holds the scalars has 1000 points, and all the dimensions are set properly. See below for my code: //Create a vtkImageData vtkSmartPointer imageData = vtkSmartPointer::New(); //Configures the vtkImageData imageData->SetOrigin(0, 0, 0); imageData->SetSpacing(1, 1, 1); imageData->SetDimensions(10, 10, 10); imageData->SetExtent(0, 9, 0, 9, 0, 9); imageData->AllocateScalars(VTK_UNSIGNED_CHAR, 1); //Creates the vtkDataArray that imageData will hold vtkSmartPointer dataArray = vtkTypeUInt8Array::New(); //Copy data from a vector into the data array //vec is a 1D uint8_t vector holding the entire data dataArray->SetVoidArray(&(vec[0]), vec.size(), 1); //Adds the dataArray into the imageData imageData->GetPointData()->AddArray(dataArray); //Creates a vtkDataSetMapper vtkSmartPointer imageDataMapper = vtkSmartPointer::New(); //Configures the vtkDataSetMapper, adding imageData and making the mapper plot the scalars of every point imageDataMapper->SetInputDataObject(imageData); imageDataMapper->ScalarVisibilityOn(); //Creates a vtkActor vtkSmartPointer actor = vtkSmartPointer::New(); //Configures the actor actor->GetProperty()->SetInterpolation(0); actor->GetProperty()->SetPointSize(5); actor->GetProperty()->SetOpacity(0.5); actor->GetProperty()->SetRepresentationToPoints(); actor->SetMapper(imageDataMapper); //Renders the image renderer->ResetCamera(); renderer->Render(); I really appreciate any help! Thanks, Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 3DGrid.png Type: image/png Size: 83069 bytes Desc: not available URL: From linucks42 at gmail.com Sun Sep 14 16:57:35 2014 From: linucks42 at gmail.com (Jens) Date: Sun, 14 Sep 2014 21:57:35 +0100 Subject: [vtkusers] Failing VTK 6.1.1 build with Tk/Python on OSX 10.9.4 Message-ID: Hi, I'm trying to build VTK 6.1.1 with the Tk and Python bindings on OSX 10.9.4, with cmake 3.0.2 and At 5.3.1. The build is failing with: /usr/bin/c++ -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 1.0.0 -o ../../lib/libvtkCommonCoreTCL-6.1.1.dylib -install_name /opt/VTK-6.1.0/build/lib/libvtkCommonCoreTCL-6.1.1.dylib ...snip... CMakeFiles/vtkCommonCoreTCL.dir/vtkTypeFloat64ArrayTcl.cxx.o CMakeFiles/vtkCommonCoreTCL.dir/vtkCommonCoreTCLInit.cxx.o CMakeFiles/vtkCommonCoreTCL.dir/__/__/Wrapping/Tcl/vtkTclUtil.cxx.o ../../lib/libvtkCommonCore-6.1.1.dylib ../../lib/libvtksys-6.1.1.dylib -framework tcl -lm Undefined symbols for architecture x86_64: "_Tcl_GetErrorLine", referenced from: vtkTclVoidFunc(void*) in vtkTclUtil.cxx.o vtkTclCommand::Execute(vtkObject*, unsigned long, void*) in vtkTclUtil.cxx.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [lib/libvtkCommonCoreTCL-6.1.1.dylib] Error 1 make[1]: *** [Common/Core/CMakeFiles/vtkCommonCoreTCL.dir/all] Error 2 Can anyone suggest a workaround? Best wishes, Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Sep 14 17:34:02 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 14 Sep 2014 15:34:02 -0600 Subject: [vtkusers] Failing VTK 6.1.1 build with Tk/Python on OSX 10.9.4 In-Reply-To: References: Message-ID: Hi Jens, If the VTK build is looking for a function called Tcl_GetErrorLine(), that means that it is using a "tcl.h" for Tcl 8.6. This function doesn't exist in Tcl 8.5 or earlier versions of Tcl. My guess is that you have installed Tcl 8.6 on your system, and CMake has found the Tcl 8.6 headers, but is linking to the Tcl 8.5 libraries in the System folder. Make sure that your CMakeCache.txt use the same framework for all the Tcl variables: TCL_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tcl.framework/Headers TCL_LIBRARY:FILEPATH=/System/Library/Frameworks/Tcl.framework TCL_TCLSH:FILEPATH=/usr/bin/tclsh TK_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tk.framework/Headers TK_INTERNAL_PATH:PATH=/System/Library/Frameworks/Tk.framework/PrivateHeaders TK_LIBRARY:FILEPATH=/System/Library/Frameworks/Tk.framework If you still have problems after setting your cache as shown above, then you might have to find and remove the tcl.h file that is causing the error. - David On Sun, Sep 14, 2014 at 2:57 PM, Jens wrote: > Hi, > > I'm trying to build VTK 6.1.1 with the Tk and Python bindings on OSX 10.9.4, > with cmake 3.0.2 and At 5.3.1. > > The build is failing with: > > /usr/bin/c++ -g -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk > -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 > -current_version 1.0.0 -o ../../lib/libvtkCommonCoreTCL-6.1.1.dylib > -install_name /opt/VTK-6.1.0/build/lib/libvtkCommonCoreTCL-6.1.1.dylib > > ...snip... > > CMakeFiles/vtkCommonCoreTCL.dir/vtkTypeFloat64ArrayTcl.cxx.o > CMakeFiles/vtkCommonCoreTCL.dir/vtkCommonCoreTCLInit.cxx.o > CMakeFiles/vtkCommonCoreTCL.dir/__/__/Wrapping/Tcl/vtkTclUtil.cxx.o > ../../lib/libvtkCommonCore-6.1.1.dylib ../../lib/libvtksys-6.1.1.dylib > -framework tcl -lm > > Undefined symbols for architecture x86_64: > > "_Tcl_GetErrorLine", referenced from: > > vtkTclVoidFunc(void*) in vtkTclUtil.cxx.o > > vtkTclCommand::Execute(vtkObject*, unsigned long, void*) in > vtkTclUtil.cxx.o > > ld: symbol(s) not found for architecture x86_64 > > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > > make[2]: *** [lib/libvtkCommonCoreTCL-6.1.1.dylib] Error 1 > > make[1]: *** [Common/Core/CMakeFiles/vtkCommonCoreTCL.dir/all] Error 2 > > > Can anyone suggest a workaround? > > > Best wishes, > > > Jens From sebastien.jourdain at kitware.com Sun Sep 14 22:47:36 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Sun, 14 Sep 2014 20:47:36 -0600 Subject: [vtkusers] VTK/Java - Disable NativeLibrary loading inside vtkPanel/vtkCanvas In-Reply-To: References: Message-ID: Thanks Marco! On Sat, Sep 13, 2014 at 12:31 AM, Marco Sambin wrote: > Hi Seb, > > No problem for me, I load all required VTK libraries "manually" at startup > of my VTK-based JWS application. > So, green light from my side. > > Thanks for asking users feedback before proceeding. > > Regards, > > Marco > Il 13/set/2014 00:09 "Sebastien Jourdain" > ha scritto: > >> Hi all, >> >> I've just made a topic on VTK to remove the automatic loading of the >> native library that use to exist inside vtkPanel and vtkCanvas. (Which >> could induce quite some issue in modular large application) >> >> But before merging it to VTK/master, I wanted your opinion specially >> since it may change some behavior on your end. Specially if you were >> relying on vtkPanel or vtkCanvas to load the VTK native library for you. >> >> Instead, you will have to do it in your main by calling something like >> >> static { >> vtkNativeLibrary.LoadAllNativeLibraries(); >> } >> >> The topic can be found here: >> => http://review.source.kitware.com/#/t/4660/ >> >> I'm targeting to merge the topic by the end of next week. So please speak >> up if you have something to say... ;-) >> >> Happy VTK/Java ! >> >> Seb >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From linucks42 at gmail.com Mon Sep 15 05:21:47 2014 From: linucks42 at gmail.com (Jens) Date: Mon, 15 Sep 2014 10:21:47 +0100 Subject: [vtkusers] Failing VTK 6.1.1 build with Tk/Python on OSX 10.9.4 In-Reply-To: References: Message-ID: Hi David, Many thanks for the quick and very helpful reply. As you suspected there was a mismatch between the tcl/tk headers. The headers were coming from: /usr/local/include and the libraries from: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework I've pointed both at the /Applications/... directories and the build has now got beyond that point, so thanks again for your help. Would that be considered a bug in cmake, or just bad luck on my part? I hadn't knowingly installed anything tk/tcl related on my machine (it's a new macbook air and I've not loaded much software at all onto it), so I've no idea where the stuff in /usr/local came from. However, if cmake had found the include files in /usr/local, shouldn't it also have used the related libraries in /usr/local? Best wishes, Jens On 14 September 2014 22:34, David Gobbi wrote: > Hi Jens, > > If the VTK build is looking for a function called Tcl_GetErrorLine(), > that means that it is using a "tcl.h" for Tcl 8.6. This function doesn't > exist in Tcl 8.5 or earlier versions of Tcl. > > My guess is that you have installed Tcl 8.6 on your system, and > CMake has found the Tcl 8.6 headers, but is linking to the Tcl 8.5 > libraries in the System folder. > > Make sure that your CMakeCache.txt use the same framework for > all the Tcl variables: > > TCL_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tcl.framework/Headers > TCL_LIBRARY:FILEPATH=/System/Library/Frameworks/Tcl.framework > TCL_TCLSH:FILEPATH=/usr/bin/tclsh > TK_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tk.framework/Headers > > TK_INTERNAL_PATH:PATH=/System/Library/Frameworks/Tk.framework/PrivateHeaders > TK_LIBRARY:FILEPATH=/System/Library/Frameworks/Tk.framework > > If you still have problems after setting your cache as shown above, then > you might have to find and remove the tcl.h file that is causing the error. > > - David > > > On Sun, Sep 14, 2014 at 2:57 PM, Jens wrote: > > Hi, > > > > I'm trying to build VTK 6.1.1 with the Tk and Python bindings on OSX > 10.9.4, > > with cmake 3.0.2 and At 5.3.1. > > > > The build is failing with: > > > > /usr/bin/c++ -g -isysroot > > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk > > -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version > 1.0.0 > > -current_version 1.0.0 -o ../../lib/libvtkCommonCoreTCL-6.1.1.dylib > > -install_name /opt/VTK-6.1.0/build/lib/libvtkCommonCoreTCL-6.1.1.dylib > > > > ...snip... > > > > CMakeFiles/vtkCommonCoreTCL.dir/vtkTypeFloat64ArrayTcl.cxx.o > > CMakeFiles/vtkCommonCoreTCL.dir/vtkCommonCoreTCLInit.cxx.o > > CMakeFiles/vtkCommonCoreTCL.dir/__/__/Wrapping/Tcl/vtkTclUtil.cxx.o > > ../../lib/libvtkCommonCore-6.1.1.dylib ../../lib/libvtksys-6.1.1.dylib > > -framework tcl -lm > > > > Undefined symbols for architecture x86_64: > > > > "_Tcl_GetErrorLine", referenced from: > > > > vtkTclVoidFunc(void*) in vtkTclUtil.cxx.o > > > > vtkTclCommand::Execute(vtkObject*, unsigned long, void*) in > > vtkTclUtil.cxx.o > > > > ld: symbol(s) not found for architecture x86_64 > > > > clang: error: linker command failed with exit code 1 (use -v to see > > invocation) > > > > make[2]: *** [lib/libvtkCommonCoreTCL-6.1.1.dylib] Error 1 > > > > make[1]: *** [Common/Core/CMakeFiles/vtkCommonCoreTCL.dir/all] Error 2 > > > > > > Can anyone suggest a workaround? > > > > > > Best wishes, > > > > > > Jens > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Orlando.RIVERA at mtu.de Mon Sep 15 05:49:08 2014 From: Orlando.RIVERA at mtu.de (RIVERA, Orlando) Date: Mon, 15 Sep 2014 09:49:08 +0000 Subject: [vtkusers] vtkExtractBlock extend with search Message-ID: Hello Dear Vtk Users. I would to add a search textBox in the panel Properties of a Extract Block filte. In the attached picture I drew , more or less, what I would like to achieve. Once I type a text I would like to be able to check the tree leaves that mach . (I have done something similar for a reader, but that time I have to write the GUI code my self . so I knew where was everything.) I could understand how the vtkExtrackBlocks filter works . However , I couldn?t found more that the filter.xml definition , where can I find the GUI implementation for this filter in order to adapt or extend it ? Any Help will be gladly appreciated Regards -- MTU Aero Engines AG Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer Martens, Michael Schrey?gg, Dr. Stefan Weingartner Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt Sitz der Gesellschaft/Registered Office: Muenchen Handelsregister/Commercial Register: Muenchen HRB 157206 Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet. This e-mail and any attached documents are proprietary to MTU, confidential or protected by law. If you are not the intended recipient, please advise the sender and delete this message and its attachments. Any unauthorised storing, copying or distribution is prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ExtractBlock.jpeg Type: image/jpeg Size: 65060 bytes Desc: ExtractBlock.jpeg URL: From goodwin.lawlor.lists at gmail.com Mon Sep 15 08:25:03 2014 From: goodwin.lawlor.lists at gmail.com (Goodwin Lawlor) Date: Mon, 15 Sep 2014 13:25:03 +0100 Subject: [vtkusers] Missing libvtkRenderingPythonTkWidgets on OSX In-Reply-To: References: Message-ID: Hi Jens, I'll have a look at this. Thanks for reporting the problem. Goodwin On Sun, Sep 14, 2014 at 12:29 PM, Jens wrote: > Hi, > > I downloaded the latest vtkpython bundle for OSX: > > http://www.vtk.org/files/release/6.1/vtkpython-6.1.0-Darwin-64bit.tar.gz > > and am trying to use it with Tk. > > I've tried to create the simplest script I can to illustrate the problem, > which I've pasted in below. > > I run the script using the vtkpython binary. > > I firstly have to add the path to the vtk .so files to the python system > path or the script fails with: > > import vtk.tk.vtkTkRenderWidget > > File > "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkTkRenderWidget.py", > line 51, in > > from vtkLoadPythonTkWidgets import vtkLoadPythonTkWidgets > > File > "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkLoadPythonTkWidgets.py", > line 2, in > > import vtkCommonCorePython > > ImportError: No module named vtkCommonCorePython > > > Firstly, shouldn't vtkpython already do this, or am I using it incorrectly? > > > If I add the path with the sys.insert... line, the script then fails with: > > > pane = > vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root,width=300,height=300) > > File > "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkTkRenderWidget.py", > line 81, in __init__ > > vtkLoadPythonTkWidgets(master.tk) > > File > "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkLoadPythonTkWidgets.py", > line 73, in vtkLoadPythonTkWidgets > > interp.call('load', filename, pkgname) > > _tkinter.TclError: dlopen(libvtkRenderingPythonTkWidgets-6.1.dylib, 10): > image not found > > > I've looked and the libvtkRenderingPythonTkWidgets-6.1.dylib library is > nowhere to be found. > > > Is it missing from the package, or is something else going on? > > > Best wishes, > > > Jens > > > > import sys > > > # Need to add this manually > > sys.path.insert(0,"/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk") > > > import vtk > > import Tkinter > > import vtk.tk.vtkTkRenderWidget > > > # create root window > > root = Tkinter.Tk() > > > # create vtkTkRenderWidget > > pane = > vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root,width=300,height=300) > > > ren = vtk.vtkRenderer() > > renWin = pane.GetRenderWindow() > > renWin.AddRenderer(ren) > > > # pack the pane into the tk root > > pane.pack() > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Sep 15 08:27:57 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 15 Sep 2014 06:27:57 -0600 Subject: [vtkusers] Failing VTK 6.1.1 build with Tk/Python on OSX 10.9.4 In-Reply-To: References: Message-ID: Hi Jens, I looked through FindTCL.cmake, and it looks like it tries to match the header to the library. Since it tries but fails, this could be considered a bug. - David On Mon, Sep 15, 2014 at 3:21 AM, Jens wrote: > Hi David, > > Many thanks for the quick and very helpful reply. As you suspected there was > a mismatch between the tcl/tk headers. The headers were coming from: > > /usr/local/include > > and the libraries from: > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework > > I've pointed both at the /Applications/... directories and the build has now > got beyond that point, so thanks again for your help. > > Would that be considered a bug in cmake, or just bad luck on my part? > > I hadn't knowingly installed anything tk/tcl related on my machine (it's a > new macbook air and I've not loaded much software at all onto it), so I've > no idea where the stuff in /usr/local came from. > > However, if cmake had found the include files in /usr/local, shouldn't it > also have used the related libraries in /usr/local? > > Best wishes, > > Jens > > > > On 14 September 2014 22:34, David Gobbi wrote: >> >> Hi Jens, >> >> If the VTK build is looking for a function called Tcl_GetErrorLine(), >> that means that it is using a "tcl.h" for Tcl 8.6. This function doesn't >> exist in Tcl 8.5 or earlier versions of Tcl. >> >> My guess is that you have installed Tcl 8.6 on your system, and >> CMake has found the Tcl 8.6 headers, but is linking to the Tcl 8.5 >> libraries in the System folder. >> >> Make sure that your CMakeCache.txt use the same framework for >> all the Tcl variables: >> >> TCL_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tcl.framework/Headers >> TCL_LIBRARY:FILEPATH=/System/Library/Frameworks/Tcl.framework >> TCL_TCLSH:FILEPATH=/usr/bin/tclsh >> TK_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tk.framework/Headers >> >> TK_INTERNAL_PATH:PATH=/System/Library/Frameworks/Tk.framework/PrivateHeaders >> TK_LIBRARY:FILEPATH=/System/Library/Frameworks/Tk.framework >> >> If you still have problems after setting your cache as shown above, then >> you might have to find and remove the tcl.h file that is causing the >> error. >> >> - David >> >> >> On Sun, Sep 14, 2014 at 2:57 PM, Jens wrote: >> > Hi, >> > >> > I'm trying to build VTK 6.1.1 with the Tk and Python bindings on OSX >> > 10.9.4, >> > with cmake 3.0.2 and At 5.3.1. >> > >> > The build is failing with: >> > >> > /usr/bin/c++ -g -isysroot >> > >> > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk >> > -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version >> > 1.0.0 >> > -current_version 1.0.0 -o ../../lib/libvtkCommonCoreTCL-6.1.1.dylib >> > -install_name /opt/VTK-6.1.0/build/lib/libvtkCommonCoreTCL-6.1.1.dylib >> > >> > ...snip... >> > >> > CMakeFiles/vtkCommonCoreTCL.dir/vtkTypeFloat64ArrayTcl.cxx.o >> > CMakeFiles/vtkCommonCoreTCL.dir/vtkCommonCoreTCLInit.cxx.o >> > CMakeFiles/vtkCommonCoreTCL.dir/__/__/Wrapping/Tcl/vtkTclUtil.cxx.o >> > ../../lib/libvtkCommonCore-6.1.1.dylib ../../lib/libvtksys-6.1.1.dylib >> > -framework tcl -lm >> > >> > Undefined symbols for architecture x86_64: >> > >> > "_Tcl_GetErrorLine", referenced from: >> > >> > vtkTclVoidFunc(void*) in vtkTclUtil.cxx.o >> > >> > vtkTclCommand::Execute(vtkObject*, unsigned long, void*) in >> > vtkTclUtil.cxx.o >> > >> > ld: symbol(s) not found for architecture x86_64 >> > >> > clang: error: linker command failed with exit code 1 (use -v to see >> > invocation) >> > >> > make[2]: *** [lib/libvtkCommonCoreTCL-6.1.1.dylib] Error 1 >> > >> > make[1]: *** [Common/Core/CMakeFiles/vtkCommonCoreTCL.dir/all] Error 2 >> > >> > >> > Can anyone suggest a workaround? >> > >> > >> > Best wishes, >> > >> > >> > Jens > > From Gerrick.Bivins at halliburton.com Mon Sep 15 09:06:41 2014 From: Gerrick.Bivins at halliburton.com (Gerrick Bivins) Date: Mon, 15 Sep 2014 13:06:41 +0000 Subject: [vtkusers] VTK/Java - Disable NativeLibrary loading inside vtkPanel/vtkCanvas In-Reply-To: References: Message-ID: +1 Same here. That call doesn?t work very well in an OSGi or NBP environment so the natives have to be loaded manually. Gerrick From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Sebastien Jourdain Sent: Sunday, September 14, 2014 9:48 PM To: Marco Sambin Cc: vtkusers Subject: Re: [vtkusers] VTK/Java - Disable NativeLibrary loading inside vtkPanel/vtkCanvas Thanks Marco! On Sat, Sep 13, 2014 at 12:31 AM, Marco Sambin > wrote: Hi Seb, No problem for me, I load all required VTK libraries "manually" at startup of my VTK-based JWS application. So, green light from my side. Thanks for asking users feedback before proceeding. Regards, Marco Il 13/set/2014 00:09 "Sebastien Jourdain" > ha scritto: Hi all, I've just made a topic on VTK to remove the automatic loading of the native library that use to exist inside vtkPanel and vtkCanvas. (Which could induce quite some issue in modular large application) But before merging it to VTK/master, I wanted your opinion specially since it may change some behavior on your end. Specially if you were relying on vtkPanel or vtkCanvas to load the VTK native library for you. Instead, you will have to do it in your main by calling something like static { vtkNativeLibrary.LoadAllNativeLibraries(); } The topic can be found here: => http://review.source.kitware.com/#/t/4660/ I'm targeting to merge the topic by the end of next week. So please speak up if you have something to say... ;-) Happy VTK/Java ! Seb _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ---------------------------------------------------------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.baumes at kitware.com Mon Sep 15 11:49:20 2014 From: jeff.baumes at kitware.com (Jeff Baumes) Date: Mon, 15 Sep 2014 11:49:20 -0400 Subject: [vtkusers] vtkGraph Edgeweigths example in python not working In-Reply-To: <1410676293516-5728706.post@n5.nabble.com> References: <1410676293516-5728706.post@n5.nabble.com> Message-ID: What version of VTK are you using? Make sure you have VTK_Group_Views turned on in your build. On Sun, Sep 14, 2014 at 2:31 AM, George wrote: > Good day, > I am trying to visualize a pipe network composed of nodes and pipes. It > would be nice to be able to select in Paraview a node and see its pressure > (scalar-value) or a pipe and see its flow (scalar value) or even pipe > stiffness matrix. > > vtkGraph appears to be useful for visualising such a network. However, when > I try to run the Edgeweigths.py example I get the following error: > > Traceback (most recent call last): > File "C:\Users\george limited\Desktop\VTK_Edgeweigths.py", line 30, in > > graphLayoutView = vtk.vtkGraphLayoutView() > AttributeError: 'module' object has no attribute 'vtkGraphLayoutView' > > Can somebody tell me how to get this example working? > Best regards, > George > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkGraph-Edgeweigths-example-in-python-not-working-tp5728706.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor.lists at gmail.com Mon Sep 15 12:20:30 2014 From: goodwin.lawlor.lists at gmail.com (Goodwin Lawlor) Date: Mon, 15 Sep 2014 17:20:30 +0100 Subject: [vtkusers] Missing libvtkRenderingPythonTkWidgets on OSX In-Reply-To: References: Message-ID: Hi Jens, I've just checked on Linux and libvtkRenderingPythonTkWidgets-6.1 is missing from the tarball for download on vtk.org. I guess it's the same on OSX. Tk also wasn't packaged (bug has been submitted to tracker previously) so I got an error trying to import _tkinter module. Goodwin -------------- next part -------------- An HTML attachment was scrubbed... URL: From linucks42 at gmail.com Mon Sep 15 12:46:40 2014 From: linucks42 at gmail.com (Jens) Date: Mon, 15 Sep 2014 17:46:40 +0100 Subject: [vtkusers] Missing libvtkRenderingPythonTkWidgets on OSX In-Reply-To: References: Message-ID: Hi Goodwin, Thanks for the update and confirming that missing libraries was the problem. Is there anything more I need to do - i.e. file a bug report - or have you already done that? Best wishes, Jens On 15 September 2014 17:20, Goodwin Lawlor wrote: > Hi Jens, > > I've just checked on Linux and libvtkRenderingPythonTkWidgets-6.1 is > missing from the tarball for download on vtk.org. I guess it's the same > on OSX. > > Tk also wasn't packaged (bug has been submitted to tracker previously) so > I got an error trying to import _tkinter module. > > Goodwin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.schussman at gmail.com Mon Sep 15 13:16:40 2014 From: greg.schussman at gmail.com (Greg Schussman) Date: Mon, 15 Sep 2014 10:16:40 -0700 Subject: [vtkusers] renderer.GetActors() returning 3d actors, but not 2d actors. In-Reply-To: References: Message-ID: Hi, David. Thanks! That worked perfectly. Greg On Fri, Sep 12, 2014 at 5:20 PM, David Gobbi wrote: > Use GetViewProps() and use IsA() to check the type of each prop. > > On Fri, Sep 12, 2014 at 6:04 PM, Greg Schussman > wrote: > > Hi. > > > > I'm using python-2.6 and vtk-5.10.1. > > > > I have a renderer, to which I'm adding actors. Some are 3d actors > > (surfaces, sets of cones), and some are 2d actors (filename text, > > scalarbar). To add them, I'm calling: > > > > self.renderer.AddActor(my_actor) # Also tried AddViewProp(my_actor) > > > > They seem to add in ok, and they do get rendered. > > > > However, based on user input, sometimes actors need to be removed and new > > ones added. So I need to take a look at what's already there, which I do > > this way: > > > > c = self.renderer.GetActors() > > c.InitTraversal() > > num_items = c.GetNumberOfItems() > > result = [] > > for i in xrange(num_items): > > result.append(c.GetNextActor()) > > > > I notice that when I add a 3d actor and I check before/adter, the > num_items > > increments as expected. > > > > However, when I add 2d actors (ScalarBar, Text), although they also > render, > > when I check before/after, the num_items does not increment, and they are > > not returned in the GetActors() list. > > > > How do I find out which 2d actors are in the renderer, so that I can > > optionally remove some of them? > > > > Should I be doing something different? > > > > Thanks. > > > > Greg > > > > p.s. I've tried calling renderer.GetActors2D(), but then when i try to > call > > GetNextActor() on that, I get "AttributeError: GetNextActor". > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.marsh at usask.ca Mon Sep 15 17:59:56 2014 From: chris.marsh at usask.ca (chrism) Date: Mon, 15 Sep 2014 14:59:56 -0700 (PDT) Subject: [vtkusers] Unstructured grid to structured grid? Message-ID: <1410818396714-5728728.post@n5.nabble.com> Is it possible to (easily) convert an unstructured grid to a structured grid (Image data)? Is unstructured -> polydata -> image data the only way? If so, how example (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter ??) Ultimately, the unstructured grid represents a topography, and I am looking to 'rasterize' it for use in a GIS. -- View this message in context: http://vtk.1045678.n5.nabble.com/Unstructured-grid-to-structured-grid-tp5728728.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon Sep 15 18:10:27 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 15 Sep 2014 16:10:27 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: <1410818396714-5728728.post@n5.nabble.com> References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Hi Chris, This sounds like a job for vtkProbeFilter. The probe filter takes two inputs, the "input" and the "source". The idea is that it resamples the scalars from the "source" onto the geometry of the "input". So, in this case, the "source" is your unstructured grid, and the "input" is any vtkImageData that has the origin, spacing, and extent that you want to use for the regridding. The output of vtkProbeFilter will be an image that has the same geometry as the input, but that has pixel values that have been interpolated from your unstructured grid. You should be able to find several examples on the wiki. - David On Mon, Sep 15, 2014 at 3:59 PM, chrism wrote: > Is it possible to (easily) convert an unstructured grid to a structured grid > (Image data)? > > Is unstructured -> polydata -> image data the only way? If so, how example > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter ??) > > Ultimately, the unstructured grid represents a topography, and I am looking > to 'rasterize' it for use in a GIS. From chris.marsh at usask.ca Mon Sep 15 18:23:13 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Mon, 15 Sep 2014 16:23:13 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Thanks David, this looks perfect. On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi wrote: > Hi Chris, > > This sounds like a job for vtkProbeFilter. The probe filter takes two > inputs, > the "input" and the "source". The idea is that it resamples the scalars > from > the "source" onto the geometry of the "input". So, in this case, the > "source" > is your unstructured grid, and the "input" is any vtkImageData that has the > origin, spacing, and extent that you want to use for the regridding. The > output of vtkProbeFilter will be an image that has the same geometry as > the input, but that has pixel values that have been interpolated from your > unstructured grid. You should be able to find several examples on the > wiki. > > - David > > > On Mon, Sep 15, 2014 at 3:59 PM, chrism wrote: > > Is it possible to (easily) convert an unstructured grid to a structured > grid > > (Image data)? > > > > Is unstructured -> polydata -> image data the only way? If so, how > example > > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter > ??) > > > > Ultimately, the unstructured grid represents a topography, and I am > looking > > to 'rasterize' it for use in a GIS. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Sep 15 18:39:52 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 15 Sep 2014 16:39:52 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Another filter that might work is vtkShepardMethod, which takes unstructured points (e.g. an arbitrary set of samples) as input and produces a vtkImageData as output. The difference between vtkProbeFilter and vtkShepardMethod is that the former performs the interpolation based on the connectivity of the points (i.e. based on the cells), while the latter ignores the connectivity and does the interpolation purely based on distance. - David On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh wrote: > Thanks David, this looks perfect. > > > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi wrote: >> >> Hi Chris, >> >> This sounds like a job for vtkProbeFilter. The probe filter takes two >> inputs, >> the "input" and the "source". The idea is that it resamples the scalars >> from >> the "source" onto the geometry of the "input". So, in this case, the >> "source" >> is your unstructured grid, and the "input" is any vtkImageData that has >> the >> origin, spacing, and extent that you want to use for the regridding. The >> output of vtkProbeFilter will be an image that has the same geometry as >> the input, but that has pixel values that have been interpolated from your >> unstructured grid. You should be able to find several examples on the >> wiki. >> >> - David >> >> >> On Mon, Sep 15, 2014 at 3:59 PM, chrism wrote: >> > Is it possible to (easily) convert an unstructured grid to a structured >> > grid >> > (Image data)? >> > >> > Is unstructured -> polydata -> image data the only way? If so, how >> > example >> > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter >> > ??) >> > >> > Ultimately, the unstructured grid represents a topography, and I am >> > looking >> > to 'rasterize' it for use in a GIS. > > From sebastien.jourdain at kitware.com Mon Sep 15 18:43:35 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 15 Sep 2014 17:43:35 -0500 Subject: [vtkusers] VTK/Java - Disable NativeLibrary loading inside vtkPanel/vtkCanvas In-Reply-To: References: Message-ID: One more vote, and I'll merge it right away. ;-) Glad, you all feel that way so far... Seb PS: May merge it tomorrow then... On Mon, Sep 15, 2014 at 8:06 AM, Gerrick Bivins < Gerrick.Bivins at halliburton.com> wrote: > +1 > > Same here. That call doesn?t work very well in an OSGi or NBP environment > so > > the natives have to be loaded manually. > > Gerrick > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Sebastien > Jourdain > *Sent:* Sunday, September 14, 2014 9:48 PM > *To:* Marco Sambin > *Cc:* vtkusers > *Subject:* Re: [vtkusers] VTK/Java - Disable NativeLibrary loading inside > vtkPanel/vtkCanvas > > > > Thanks Marco! > > > > > > On Sat, Sep 13, 2014 at 12:31 AM, Marco Sambin wrote: > > Hi Seb, > > No problem for me, I load all required VTK libraries "manually" at startup > of my VTK-based JWS application. > So, green light from my side. > > Thanks for asking users feedback before proceeding. > > Regards, > > Marco > > Il 13/set/2014 00:09 "Sebastien Jourdain" > ha scritto: > > Hi all, > > > > I've just made a topic on VTK to remove the automatic loading of the > native library that use to exist inside vtkPanel and vtkCanvas. (Which > could induce quite some issue in modular large application) > > > > But before merging it to VTK/master, I wanted your opinion specially since > it may change some behavior on your end. Specially if you were relying on > vtkPanel or vtkCanvas to load the VTK native library for you. > > > > Instead, you will have to do it in your main by calling something like > > > > static { > > vtkNativeLibrary.LoadAllNativeLibraries(); > > } > > > > The topic can be found here: > > => http://review.source.kitware.com/#/t/4660/ > > > > I'm targeting to merge the topic by the end of next week. So please speak > up if you have something to say... ;-) > > > > Happy VTK/Java ! > > > > Seb > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > ------------------------------ > This e-mail, including any attached files, may contain confidential and > privileged information for the sole use of the intended recipient. Any > review, use, distribution, or disclosure by others is strictly prohibited. > If you are not the intended recipient (or authorized to receive information > for the intended recipient), please contact the sender by reply e-mail and > delete all copies of this message. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.matthaeus at web.de Tue Sep 16 02:58:35 2014 From: lars.matthaeus at web.de (=?windows-1252?Q?Lars_Matth=E4us?=) Date: Tue, 16 Sep 2014 08:58:35 +0200 Subject: [vtkusers] VTK/Java - Disable NativeLibrary loading inside vtkPanel/vtkCanvas In-Reply-To: References: Message-ID: <5417DF9B.3020403@web.de> +1 If well documented, it should cause no problems whatsoever. Lars Am 16.09.2014 um 00:43 schrieb Sebastien Jourdain: > One more vote, and I'll merge it right away. ;-) > > Glad, you all feel that way so far... > > Seb > > PS: May merge it tomorrow then... > > Il 13/set/2014 00:09 "Sebastien Jourdain" > > ha scritto:____ > > Hi all,____ > > __ __ > > I've just made a topic on VTK to remove the automatic loading of the > native library that use to exist inside vtkPanel and vtkCanvas. > (Which could induce quite some issue in modular large application)____ > > __ __ > > But before merging it to VTK/master, I wanted your opinion specially > since it may change some behavior on your end. Specially if you were > relying on vtkPanel or vtkCanvas to load the VTK native library for > you.____ > > __ __ > > Instead, you will have to do it in your main by calling something > like ____ > > __ __ > > static { ____ > > vtkNativeLibrary.LoadAllNativeLibraries();____ > > }____ > > __ __ > > The topic can be found here: ____ > > => http://review.source.kitware.com/#/t/4660/____ > > __ __ > > I'm targeting to merge the topic by the end of next week. So please > speak up if you have something to say... ;-)____ > > __ __ > > Happy VTK/Java !____ > > __ __ > > Seb____ > > __ __ From wulihouxiaoshuai at 163.com Tue Sep 16 04:09:30 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Tue, 16 Sep 2014 01:09:30 -0700 (PDT) Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS Message-ID: <1410854970670-5728736.post@n5.nabble.com> Recently I am focusing on Volume Rendering using VTK ubuntu OS, recently I found a problem releated memory.It seemly takes more memory on linux os than windows os with the same code and same input image. In order to test my idea, I have done the following things: In the VTK's directory, there is an Example named GPURenderDemo,so I compile this example and run on linux and windows operating system, and my inout image data's size is 335 MB. And the occupied memory on windows is 460 MB, but 739 MB on linux. Someone can tell me what happened on window os and on linux os? Many thanks and best wishes! Looking forward to everyone reply! -- View this message in context: http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728736.html Sent from the VTK - Users mailing list archive at Nabble.com. From dennis.juve at gmail.com Tue Sep 16 05:18:23 2014 From: dennis.juve at gmail.com (technOslerphile) Date: Tue, 16 Sep 2014 02:18:23 -0700 (PDT) Subject: [vtkusers] What is the difference between ViewTransformMatrix and ProjectTransformMatrix of vtkCamera? Message-ID: <1410859103781-5728737.post@n5.nabble.com> What exactly is this matrix which is returned by GetViewTransformMatrix(); Is this an extrinsic matrix of the vtk Camera? Or is it the product of intrinsic and extrinsic matrix? Also, what is the difference between GetViewTransformMatrix() and GetProjectionTransformMatrix()? Remove Ads -- View this message in context: http://vtk.1045678.n5.nabble.com/What-is-the-difference-between-ViewTransformMatrix-and-ProjectTransformMatrix-of-vtkCamera-tp5728737.html Sent from the VTK - Users mailing list archive at Nabble.com. From goodwin.lawlor.lists at gmail.com Tue Sep 16 08:14:51 2014 From: goodwin.lawlor.lists at gmail.com (Goodwin Lawlor) Date: Tue, 16 Sep 2014 13:14:51 +0100 Subject: [vtkusers] Missing libvtkRenderingPythonTkWidgets on OSX In-Reply-To: References: Message-ID: Hi Jens, It's the same issue as here: http://www.vtk.org/pipermail/vtkusers/2014-January/082672.html And the bug that was subsequently filed is here: http://www.vtk.org/Bug/view.php?id=14517 So just a comment on the bug report above to encourage David DeMarle should be sufficient :-) Thanks, Goodwin PS VTK 6.2 won't be out for at least 2 months so your only option now is to compile VTK with python wrappers and Tk enabled yourself. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Sep 16 09:23:18 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 16 Sep 2014 08:23:18 -0500 Subject: [vtkusers] VTK/Java - Disable NativeLibrary loading inside vtkPanel/vtkCanvas In-Reply-To: <5417DF9B.3020403@web.de> References: <5417DF9B.3020403@web.de> Message-ID: Merged... Thanks everyone for your feedback! Seb On Tue, Sep 16, 2014 at 1:58 AM, Lars Matth?us wrote: > +1 > > If well documented, it should cause no problems whatsoever. > > Lars > > Am 16.09.2014 um 00:43 schrieb Sebastien Jourdain: > > One more vote, and I'll merge it right away. ;-) > > > > Glad, you all feel that way so far... > > > > Seb > > > > PS: May merge it tomorrow then... > > > > Il 13/set/2014 00:09 "Sebastien Jourdain" > > > > ha scritto:____ > > > > Hi all,____ > > > > __ __ > > > > I've just made a topic on VTK to remove the automatic loading of the > > native library that use to exist inside vtkPanel and vtkCanvas. > > (Which could induce quite some issue in modular large > application)____ > > > > __ __ > > > > But before merging it to VTK/master, I wanted your opinion specially > > since it may change some behavior on your end. Specially if you were > > relying on vtkPanel or vtkCanvas to load the VTK native library for > > you.____ > > > > __ __ > > > > Instead, you will have to do it in your main by calling something > > like ____ > > > > __ __ > > > > static { ____ > > > > vtkNativeLibrary.LoadAllNativeLibraries();____ > > > > }____ > > > > __ __ > > > > The topic can be found here: ____ > > > > => http://review.source.kitware.com/#/t/4660/____ > > > > __ __ > > > > I'm targeting to merge the topic by the end of next week. So please > > speak up if you have something to say... ;-)____ > > > > __ __ > > > > Happy VTK/Java !____ > > > > __ __ > > > > Seb____ > > > > __ __ > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Tue Sep 16 09:26:13 2014 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Tue, 16 Sep 2014 13:26:13 +0000 Subject: [vtkusers] How to get a slice from a VTK volume actor and not a reader Message-ID: <46CB11F12B9DC24D860D4082451B318A12C2E362@exchange3.microbrightfield.com> Hey all, In our application, I don't use a reader to create our vtkvolumes. Instead, I create them from the pixel data from another source. I need to reslice the data but I don't have a reader for my vtkvolume. Any ideas for getting the slices from the vtkvolume directly? Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 16 09:34:10 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Sep 2014 07:34:10 -0600 Subject: [vtkusers] How to get a slice from a VTK volume actor and not a reader In-Reply-To: <46CB11F12B9DC24D860D4082451B318A12C2E362@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A12C2E362@exchange3.microbrightfield.com> Message-ID: Hi Doug, I think the class you are looking for is vtkImageImport. - David On Tue, Sep 16, 2014 at 7:26 AM, Doug Hoppes wrote: > Hey all, > > > > In our application, I don't use a reader to create our > vtkvolumes. Instead, I create them from the pixel data from another source. > I need to reslice the data but I don't have a reader for my vtkvolume. Any > ideas for getting the slices from the vtkvolume directly? > > > > Doug From chris.marsh at usask.ca Tue Sep 16 13:52:11 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Tue, 16 Sep 2014 11:52:11 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Mmh thanks. I think I'll stick with the probe filter. I've been able to get this example working http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid if I have a real-world pt cloud, I'm a bit unclear how I should make the grid. If xll and yll are the lower x and y coordinates of an axis aligned bounding box size_t gridSize = 100; for ( size_t x = 0; x < gridSize; x++ ) { for ( size_t y = 0; y < gridSize; y++ ) { gridPoints->InsertNextPoint ( x+xll, y+yll, 0); } } does not seem to produce any output. Any suggestions? On Mon, Sep 15, 2014 at 4:39 PM, David Gobbi wrote: > Another filter that might work is vtkShepardMethod, which takes > unstructured points (e.g. an arbitrary set of samples) as input and > produces a vtkImageData as output. > > The difference between vtkProbeFilter and vtkShepardMethod is > that the former performs the interpolation based on the connectivity > of the points (i.e. based on the cells), while the latter ignores the > connectivity and does the interpolation purely based on distance. > > - David > > On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh wrote: > > Thanks David, this looks perfect. > > > > > > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi > wrote: > >> > >> Hi Chris, > >> > >> This sounds like a job for vtkProbeFilter. The probe filter takes two > >> inputs, > >> the "input" and the "source". The idea is that it resamples the scalars > >> from > >> the "source" onto the geometry of the "input". So, in this case, the > >> "source" > >> is your unstructured grid, and the "input" is any vtkImageData that has > >> the > >> origin, spacing, and extent that you want to use for the regridding. > The > >> output of vtkProbeFilter will be an image that has the same geometry as > >> the input, but that has pixel values that have been interpolated from > your > >> unstructured grid. You should be able to find several examples on the > >> wiki. > >> > >> - David > >> > >> > >> On Mon, Sep 15, 2014 at 3:59 PM, chrism wrote: > >> > Is it possible to (easily) convert an unstructured grid to a > structured > >> > grid > >> > (Image data)? > >> > > >> > Is unstructured -> polydata -> image data the only way? If so, how > >> > example > >> > ( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter > >> > ??) > >> > > >> > Ultimately, the unstructured grid represents a topography, and I am > >> > looking > >> > to 'rasterize' it for use in a GIS. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 16 14:07:03 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Sep 2014 12:07:03 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: If you want to create a polydata that is a regular grid, then use vtkPlaneSource with SetResolution(gridSize, gridSize). If you want your regular grid to be a vtkImageData, then use vtkImageGridSource with SetDataExtent(), SetDataSpacing(), an SetDataOrigin() to create the needed dimensions. Note that if your point cloud is just points without any connectivity between the points (i.e. without any cells), then you cannot use vtkProbeFilter. On Tue, Sep 16, 2014 at 11:52 AM, Chris Marsh wrote: > Mmh thanks. I think I'll stick with the probe filter. > > I've been able to get this example working > http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid > if I have a real-world pt cloud, I'm a bit unclear how I should make the > grid. > > If xll and yll are the lower x and y coordinates of an axis aligned bounding > box > > size_t gridSize = 100; > for ( size_t x = 0; x < gridSize; x++ ) > { > for ( size_t y = 0; y < gridSize; y++ ) > { > gridPoints->InsertNextPoint ( x+xll, y+yll, 0); > } > } > > does not seem to produce any output. > > Any suggestions? > > On Mon, Sep 15, 2014 at 4:39 PM, David Gobbi wrote: >> >> Another filter that might work is vtkShepardMethod, which takes >> unstructured points (e.g. an arbitrary set of samples) as input and >> produces a vtkImageData as output. >> >> The difference between vtkProbeFilter and vtkShepardMethod is >> that the former performs the interpolation based on the connectivity >> of the points (i.e. based on the cells), while the latter ignores the >> connectivity and does the interpolation purely based on distance. >> >> - David >> >> On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh wrote: >> > Thanks David, this looks perfect. >> > >> > >> > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi >> > wrote: >> >> >> >> Hi Chris, >> >> >> >> This sounds like a job for vtkProbeFilter. The probe filter takes two >> >> inputs, >> >> the "input" and the "source". The idea is that it resamples the >> >> scalars >> >> from >> >> the "source" onto the geometry of the "input". So, in this case, the >> >> "source" >> >> is your unstructured grid, and the "input" is any vtkImageData that has >> >> the >> >> origin, spacing, and extent that you want to use for the regridding. >> >> The >> >> output of vtkProbeFilter will be an image that has the same geometry as >> >> the input, but that has pixel values that have been interpolated from >> >> your >> >> unstructured grid. You should be able to find several examples on the >> >> wiki. >> >> >> >> - David >> >> >> >> >> >> On Mon, Sep 15, 2014 at 3:59 PM, chrism wrote: >> >> > Is it possible to (easily) convert an unstructured grid to a >> >> > structured >> >> > grid >> >> > (Image data)? >> >> > >> >> > Is unstructured -> polydata -> image data the only way? If so, how >> >> > example >> >> > >> >> > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter >> >> > ??) >> >> > >> >> > Ultimately, the unstructured grid represents a topography, and I am >> >> > looking >> >> > to 'rasterize' it for use in a GIS. >> > >> > > > From chris.marsh at usask.ca Tue Sep 16 15:49:11 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Tue, 16 Sep 2014 13:49:11 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Hi David, To clarify: I want to take an unstructured grid (x,y) with face data (z) and make it a 2D structured grid. I have connectivity information (triangulation). Looking at vtkPlaneSource: looks like it should work/make my life easier However, even with the above linked demo with the slight modification, I cannot make this work. This is most likely a PEBKAC as a result of my lack of familiarity with VTK so I appreciate you taking the time to help. The minimum working example is below, based upon this code http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer data = vtkSmartPointer::New(); data->SetName("elevation"); unsigned int gridSize = 10; float maxHeight = 5; for ( unsigned int i = 0; i < 100; ++i ) { double x = vtkMath::Random(0, gridSize); double y = vtkMath::Random(0, gridSize); double z = vtkMath::Random(0, maxHeight); points->InsertNextPoint ( x, y, 0); data->InsertNextValue(z); } // Add the grid points to a polydata object vtkSmartPointer polydata = vtkSmartPointer::New(); polydata->SetPoints ( points ); polydata->GetPointData()->SetScalars(data); // Triangulate the grid points. If you do not have a mesh (points // only), the output will not be interpolated! vtkSmartPointer tri = vtkSmartPointer::New(); tri->SetInputData ( polydata ); tri->Update(); // Create a grid of points to interpolate over vtkSmartPointer gridPoints = vtkSmartPointer::New(); gridPoints->SetResolution(gridSize, gridSize); gridPoints->SetOrigin(0, 0, 0); // Perform the interpolation vtkSmartPointer probeFilter = vtkSmartPointer::New(); probeFilter->SetSourceConnection(tri->GetOutputPort()); probeFilter->SetInputData(gridPoints->GetOutput()); // // Interpolate 'Source' at these points probeFilter->Update(); vtkSmartPointer gridDelaunay = vtkSmartPointer::New(); gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() ); vtkSmartPointer gridWriter = vtkSmartPointer::New(); gridWriter->SetFileName ( "gridSurface.vtp" ); gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); gridWriter->Write(); On Tue, Sep 16, 2014 at 12:07 PM, David Gobbi wrote: > If you want to create a polydata that is a regular grid, then > use vtkPlaneSource with SetResolution(gridSize, gridSize). > > If you want your regular grid to be a vtkImageData, then > use vtkImageGridSource with SetDataExtent(), SetDataSpacing(), > an SetDataOrigin() to create the needed dimensions. > > Note that if your point cloud is just points without any connectivity > between the points (i.e. without any cells), then you cannot use > vtkProbeFilter. > > > > > On Tue, Sep 16, 2014 at 11:52 AM, Chris Marsh > wrote: > > Mmh thanks. I think I'll stick with the probe filter. > > > > I've been able to get this example working > > http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid > > if I have a real-world pt cloud, I'm a bit unclear how I should make the > > grid. > > > > If xll and yll are the lower x and y coordinates of an axis aligned > bounding > > box > > > > size_t gridSize = 100; > > for ( size_t x = 0; x < gridSize; x++ ) > > { > > for ( size_t y = 0; y < gridSize; y++ ) > > { > > gridPoints->InsertNextPoint ( x+xll, y+yll, 0); > > } > > } > > > > does not seem to produce any output. > > > > Any suggestions? > > > > On Mon, Sep 15, 2014 at 4:39 PM, David Gobbi > wrote: > >> > >> Another filter that might work is vtkShepardMethod, which takes > >> unstructured points (e.g. an arbitrary set of samples) as input and > >> produces a vtkImageData as output. > >> > >> The difference between vtkProbeFilter and vtkShepardMethod is > >> that the former performs the interpolation based on the connectivity > >> of the points (i.e. based on the cells), while the latter ignores the > >> connectivity and does the interpolation purely based on distance. > >> > >> - David > >> > >> On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh > wrote: > >> > Thanks David, this looks perfect. > >> > > >> > > >> > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi > >> > wrote: > >> >> > >> >> Hi Chris, > >> >> > >> >> This sounds like a job for vtkProbeFilter. The probe filter takes > two > >> >> inputs, > >> >> the "input" and the "source". The idea is that it resamples the > >> >> scalars > >> >> from > >> >> the "source" onto the geometry of the "input". So, in this case, the > >> >> "source" > >> >> is your unstructured grid, and the "input" is any vtkImageData that > has > >> >> the > >> >> origin, spacing, and extent that you want to use for the regridding. > >> >> The > >> >> output of vtkProbeFilter will be an image that has the same geometry > as > >> >> the input, but that has pixel values that have been interpolated from > >> >> your > >> >> unstructured grid. You should be able to find several examples on > the > >> >> wiki. > >> >> > >> >> - David > >> >> > >> >> > >> >> On Mon, Sep 15, 2014 at 3:59 PM, chrism > wrote: > >> >> > Is it possible to (easily) convert an unstructured grid to a > >> >> > structured > >> >> > grid > >> >> > (Image data)? > >> >> > > >> >> > Is unstructured -> polydata -> image data the only way? If so, how > >> >> > example > >> >> > > >> >> > ( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter > >> >> > ??) > >> >> > > >> >> > Ultimately, the unstructured grid represents a topography, and I am > >> >> > looking > >> >> > to 'rasterize' it for use in a GIS. > >> > > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 16 16:02:46 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Sep 2014 14:02:46 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: The default plane size is 1x1, so you might need this: gridPoints->SetResolution(gridSize, gridSize); gridPoints->SetOrigin(0, 0, 0); gridPoints->SetPoint1(gridSize, 0, 0); gridPoints->SetPoint1(0, gridSize, 0); On Tue, Sep 16, 2014 at 1:49 PM, Chris Marsh wrote: > Hi David, > > To clarify: I want to take an unstructured grid (x,y) with face data (z) and > make it a 2D structured grid. I have connectivity information > (triangulation). > > Looking at vtkPlaneSource: looks like it should work/make my life easier > > However, even with the above linked demo with the slight modification, I > cannot make this work. This is most likely a PEBKAC as a result of my lack > of familiarity with VTK so I appreciate you taking the time to help. The > minimum working example is below, based upon this code > http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid > > vtkSmartPointer points = vtkSmartPointer::New(); > vtkSmartPointer data = > vtkSmartPointer::New(); > data->SetName("elevation"); > > unsigned int gridSize = 10; > float maxHeight = 5; > for ( unsigned int i = 0; i < 100; ++i ) > { > double x = vtkMath::Random(0, gridSize); > double y = vtkMath::Random(0, gridSize); > double z = vtkMath::Random(0, maxHeight); > points->InsertNextPoint ( x, y, 0); > data->InsertNextValue(z); > } > > // Add the grid points to a polydata object > vtkSmartPointer polydata = > vtkSmartPointer::New(); > polydata->SetPoints ( points ); > polydata->GetPointData()->SetScalars(data); > > // Triangulate the grid points. If you do not have a mesh (points > // only), the output will not be interpolated! > vtkSmartPointer tri = > vtkSmartPointer::New(); > tri->SetInputData ( polydata ); > tri->Update(); > > // Create a grid of points to interpolate over > vtkSmartPointer gridPoints = > vtkSmartPointer::New(); > gridPoints->SetResolution(gridSize, gridSize); > gridPoints->SetOrigin(0, 0, 0); > > // Perform the interpolation > vtkSmartPointer probeFilter = > vtkSmartPointer::New(); > probeFilter->SetSourceConnection(tri->GetOutputPort()); > probeFilter->SetInputData(gridPoints->GetOutput()); // > // Interpolate 'Source' at these points > probeFilter->Update(); > > vtkSmartPointer gridDelaunay = > vtkSmartPointer::New(); > gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() ); > > vtkSmartPointer gridWriter = > vtkSmartPointer::New(); > gridWriter->SetFileName ( "gridSurface.vtp" ); > gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); > gridWriter->Write(); > > > > > On Tue, Sep 16, 2014 at 12:07 PM, David Gobbi wrote: >> >> If you want to create a polydata that is a regular grid, then >> use vtkPlaneSource with SetResolution(gridSize, gridSize). >> >> If you want your regular grid to be a vtkImageData, then >> use vtkImageGridSource with SetDataExtent(), SetDataSpacing(), >> an SetDataOrigin() to create the needed dimensions. >> >> Note that if your point cloud is just points without any connectivity >> between the points (i.e. without any cells), then you cannot use >> vtkProbeFilter. >> >> >> >> >> On Tue, Sep 16, 2014 at 11:52 AM, Chris Marsh >> wrote: >> > Mmh thanks. I think I'll stick with the probe filter. >> > >> > I've been able to get this example working >> > http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid >> > if I have a real-world pt cloud, I'm a bit unclear how I should make the >> > grid. >> > >> > If xll and yll are the lower x and y coordinates of an axis aligned >> > bounding >> > box >> > >> > size_t gridSize = 100; >> > for ( size_t x = 0; x < gridSize; x++ ) >> > { >> > for ( size_t y = 0; y < gridSize; y++ ) >> > { >> > gridPoints->InsertNextPoint ( x+xll, y+yll, 0); >> > } >> > } >> > >> > does not seem to produce any output. >> > >> > Any suggestions? >> > >> > On Mon, Sep 15, 2014 at 4:39 PM, David Gobbi >> > wrote: >> >> >> >> Another filter that might work is vtkShepardMethod, which takes >> >> unstructured points (e.g. an arbitrary set of samples) as input and >> >> produces a vtkImageData as output. >> >> >> >> The difference between vtkProbeFilter and vtkShepardMethod is >> >> that the former performs the interpolation based on the connectivity >> >> of the points (i.e. based on the cells), while the latter ignores the >> >> connectivity and does the interpolation purely based on distance. >> >> >> >> - David >> >> >> >> On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh >> >> wrote: >> >> > Thanks David, this looks perfect. >> >> > >> >> > >> >> > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi >> >> > wrote: >> >> >> >> >> >> Hi Chris, >> >> >> >> >> >> This sounds like a job for vtkProbeFilter. The probe filter takes >> >> >> two >> >> >> inputs, >> >> >> the "input" and the "source". The idea is that it resamples the >> >> >> scalars >> >> >> from >> >> >> the "source" onto the geometry of the "input". So, in this case, >> >> >> the >> >> >> "source" >> >> >> is your unstructured grid, and the "input" is any vtkImageData that >> >> >> has >> >> >> the >> >> >> origin, spacing, and extent that you want to use for the regridding. >> >> >> The >> >> >> output of vtkProbeFilter will be an image that has the same geometry >> >> >> as >> >> >> the input, but that has pixel values that have been interpolated >> >> >> from >> >> >> your >> >> >> unstructured grid. You should be able to find several examples on >> >> >> the >> >> >> wiki. >> >> >> >> >> >> - David >> >> >> >> >> >> >> >> >> On Mon, Sep 15, 2014 at 3:59 PM, chrism >> >> >> wrote: >> >> >> > Is it possible to (easily) convert an unstructured grid to a >> >> >> > structured >> >> >> > grid >> >> >> > (Image data)? >> >> >> > >> >> >> > Is unstructured -> polydata -> image data the only way? If so, >> >> >> > how >> >> >> > example >> >> >> > >> >> >> > >> >> >> > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter >> >> >> > ??) >> >> >> > >> >> >> > Ultimately, the unstructured grid represents a topography, and I >> >> >> > am >> >> >> > looking >> >> >> > to 'rasterize' it for use in a GIS. >> >> > >> >> > >> > >> > > > From berk.geveci at kitware.com Tue Sep 16 16:03:04 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 16 Sep 2014 16:03:04 -0400 Subject: [vtkusers] REMINDER: Bug tracker hack-a-ton Message-ID: Hi folks, This is a reminder that on October 2nd, we are holding a bug tracker hack-a-ton, 9am-5pm. The goal is to clean up our bug tracker as best as we can. We will be hosting folks at our Clifton Park office as well as holding a Google Hangout for those attending remotely. Here is the list of attendees that I know so far: - Bill Lorensen, - Dave Cole, - Sean McBride, - Will Schroeder, - me, - Ben Boeckel, - Chuck Atkins, - Shawn Waldon, - Marcus Hanwell, - Dave DeMarle, - Jamie Wright, - Tim Meehan. If you are not on this list and you are interested in attending, please let me know. Best, -berk -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 16 16:03:34 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Sep 2014 14:03:34 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Oops, the second "SetPoint1" should be "SetPoint2". On Tue, Sep 16, 2014 at 2:02 PM, David Gobbi wrote: > The default plane size is 1x1, so you might need this: > > gridPoints->SetResolution(gridSize, gridSize); > gridPoints->SetOrigin(0, 0, 0); > gridPoints->SetPoint1(gridSize, 0, 0); > gridPoints->SetPoint1(0, gridSize, 0); > > On Tue, Sep 16, 2014 at 1:49 PM, Chris Marsh wrote: >> Hi David, >> >> To clarify: I want to take an unstructured grid (x,y) with face data (z) and >> make it a 2D structured grid. I have connectivity information >> (triangulation). >> >> Looking at vtkPlaneSource: looks like it should work/make my life easier >> >> However, even with the above linked demo with the slight modification, I >> cannot make this work. This is most likely a PEBKAC as a result of my lack >> of familiarity with VTK so I appreciate you taking the time to help. The >> minimum working example is below, based upon this code >> http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid >> >> vtkSmartPointer points = vtkSmartPointer::New(); >> vtkSmartPointer data = >> vtkSmartPointer::New(); >> data->SetName("elevation"); >> >> unsigned int gridSize = 10; >> float maxHeight = 5; >> for ( unsigned int i = 0; i < 100; ++i ) >> { >> double x = vtkMath::Random(0, gridSize); >> double y = vtkMath::Random(0, gridSize); >> double z = vtkMath::Random(0, maxHeight); >> points->InsertNextPoint ( x, y, 0); >> data->InsertNextValue(z); >> } >> >> // Add the grid points to a polydata object >> vtkSmartPointer polydata = >> vtkSmartPointer::New(); >> polydata->SetPoints ( points ); >> polydata->GetPointData()->SetScalars(data); >> >> // Triangulate the grid points. If you do not have a mesh (points >> // only), the output will not be interpolated! >> vtkSmartPointer tri = >> vtkSmartPointer::New(); >> tri->SetInputData ( polydata ); >> tri->Update(); >> >> // Create a grid of points to interpolate over >> vtkSmartPointer gridPoints = >> vtkSmartPointer::New(); >> gridPoints->SetResolution(gridSize, gridSize); >> gridPoints->SetOrigin(0, 0, 0); >> >> // Perform the interpolation >> vtkSmartPointer probeFilter = >> vtkSmartPointer::New(); >> probeFilter->SetSourceConnection(tri->GetOutputPort()); >> probeFilter->SetInputData(gridPoints->GetOutput()); // >> // Interpolate 'Source' at these points >> probeFilter->Update(); >> >> vtkSmartPointer gridDelaunay = >> vtkSmartPointer::New(); >> gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() ); >> >> vtkSmartPointer gridWriter = >> vtkSmartPointer::New(); >> gridWriter->SetFileName ( "gridSurface.vtp" ); >> gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); >> gridWriter->Write(); >> >> >> >> >> On Tue, Sep 16, 2014 at 12:07 PM, David Gobbi wrote: >>> >>> If you want to create a polydata that is a regular grid, then >>> use vtkPlaneSource with SetResolution(gridSize, gridSize). >>> >>> If you want your regular grid to be a vtkImageData, then >>> use vtkImageGridSource with SetDataExtent(), SetDataSpacing(), >>> an SetDataOrigin() to create the needed dimensions. >>> >>> Note that if your point cloud is just points without any connectivity >>> between the points (i.e. without any cells), then you cannot use >>> vtkProbeFilter. >>> >>> >>> >>> >>> On Tue, Sep 16, 2014 at 11:52 AM, Chris Marsh >>> wrote: >>> > Mmh thanks. I think I'll stick with the probe filter. >>> > >>> > I've been able to get this example working >>> > http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid >>> > if I have a real-world pt cloud, I'm a bit unclear how I should make the >>> > grid. >>> > >>> > If xll and yll are the lower x and y coordinates of an axis aligned >>> > bounding >>> > box >>> > >>> > size_t gridSize = 100; >>> > for ( size_t x = 0; x < gridSize; x++ ) >>> > { >>> > for ( size_t y = 0; y < gridSize; y++ ) >>> > { >>> > gridPoints->InsertNextPoint ( x+xll, y+yll, 0); >>> > } >>> > } >>> > >>> > does not seem to produce any output. >>> > >>> > Any suggestions? >>> > >>> > On Mon, Sep 15, 2014 at 4:39 PM, David Gobbi >>> > wrote: >>> >> >>> >> Another filter that might work is vtkShepardMethod, which takes >>> >> unstructured points (e.g. an arbitrary set of samples) as input and >>> >> produces a vtkImageData as output. >>> >> >>> >> The difference between vtkProbeFilter and vtkShepardMethod is >>> >> that the former performs the interpolation based on the connectivity >>> >> of the points (i.e. based on the cells), while the latter ignores the >>> >> connectivity and does the interpolation purely based on distance. >>> >> >>> >> - David >>> >> >>> >> On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh >>> >> wrote: >>> >> > Thanks David, this looks perfect. >>> >> > >>> >> > >>> >> > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi >>> >> > wrote: >>> >> >> >>> >> >> Hi Chris, >>> >> >> >>> >> >> This sounds like a job for vtkProbeFilter. The probe filter takes >>> >> >> two >>> >> >> inputs, >>> >> >> the "input" and the "source". The idea is that it resamples the >>> >> >> scalars >>> >> >> from >>> >> >> the "source" onto the geometry of the "input". So, in this case, >>> >> >> the >>> >> >> "source" >>> >> >> is your unstructured grid, and the "input" is any vtkImageData that >>> >> >> has >>> >> >> the >>> >> >> origin, spacing, and extent that you want to use for the regridding. >>> >> >> The >>> >> >> output of vtkProbeFilter will be an image that has the same geometry >>> >> >> as >>> >> >> the input, but that has pixel values that have been interpolated >>> >> >> from >>> >> >> your >>> >> >> unstructured grid. You should be able to find several examples on >>> >> >> the >>> >> >> wiki. >>> >> >> >>> >> >> - David >>> >> >> >>> >> >> >>> >> >> On Mon, Sep 15, 2014 at 3:59 PM, chrism >>> >> >> wrote: >>> >> >> > Is it possible to (easily) convert an unstructured grid to a >>> >> >> > structured >>> >> >> > grid >>> >> >> > (Image data)? >>> >> >> > >>> >> >> > Is unstructured -> polydata -> image data the only way? If so, >>> >> >> > how >>> >> >> > example >>> >> >> > >>> >> >> > >>> >> >> > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter >>> >> >> > ??) >>> >> >> > >>> >> >> > Ultimately, the unstructured grid represents a topography, and I >>> >> >> > am >>> >> >> > looking >>> >> >> > to 'rasterize' it for use in a GIS. >>> >> > >>> >> > >>> > >>> > >> >> From chris.marsh at usask.ca Tue Sep 16 16:07:34 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Tue, 16 Sep 2014 14:07:34 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: No dice. With the examples code, I would get a blank plane uniform plane with the data name 'elevation' as per the SetName() call. However, now, I get no plane, and for coloring all I see (in paraview) is 'solid color' and 'elevation' is no longer present. Which suggests to me something else is perhaps wrong? On Tue, Sep 16, 2014 at 2:03 PM, David Gobbi wrote: > Oops, the second "SetPoint1" should be "SetPoint2". > > On Tue, Sep 16, 2014 at 2:02 PM, David Gobbi > wrote: > > The default plane size is 1x1, so you might need this: > > > > gridPoints->SetResolution(gridSize, gridSize); > > gridPoints->SetOrigin(0, 0, 0); > > gridPoints->SetPoint1(gridSize, 0, 0); > > gridPoints->SetPoint1(0, gridSize, 0); > > > > On Tue, Sep 16, 2014 at 1:49 PM, Chris Marsh > wrote: > >> Hi David, > >> > >> To clarify: I want to take an unstructured grid (x,y) with face data > (z) and > >> make it a 2D structured grid. I have connectivity information > >> (triangulation). > >> > >> Looking at vtkPlaneSource: looks like it should work/make my life easier > >> > >> However, even with the above linked demo with the slight modification, I > >> cannot make this work. This is most likely a PEBKAC as a result of my > lack > >> of familiarity with VTK so I appreciate you taking the time to help. The > >> minimum working example is below, based upon this code > >> http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid > >> > >> vtkSmartPointer points = vtkSmartPointer::New(); > >> vtkSmartPointer data = > >> vtkSmartPointer::New(); > >> data->SetName("elevation"); > >> > >> unsigned int gridSize = 10; > >> float maxHeight = 5; > >> for ( unsigned int i = 0; i < 100; ++i ) > >> { > >> double x = vtkMath::Random(0, gridSize); > >> double y = vtkMath::Random(0, gridSize); > >> double z = vtkMath::Random(0, maxHeight); > >> points->InsertNextPoint ( x, y, 0); > >> data->InsertNextValue(z); > >> } > >> > >> // Add the grid points to a polydata object > >> vtkSmartPointer polydata = > >> vtkSmartPointer::New(); > >> polydata->SetPoints ( points ); > >> polydata->GetPointData()->SetScalars(data); > >> > >> // Triangulate the grid points. If you do not have a mesh (points > >> // only), the output will not be interpolated! > >> vtkSmartPointer tri = > >> vtkSmartPointer::New(); > >> tri->SetInputData ( polydata ); > >> tri->Update(); > >> > >> // Create a grid of points to interpolate over > >> vtkSmartPointer gridPoints = > >> vtkSmartPointer::New(); > >> gridPoints->SetResolution(gridSize, gridSize); > >> gridPoints->SetOrigin(0, 0, 0); > >> > >> // Perform the interpolation > >> vtkSmartPointer probeFilter = > >> vtkSmartPointer::New(); > >> probeFilter->SetSourceConnection(tri->GetOutputPort()); > >> probeFilter->SetInputData(gridPoints->GetOutput()); // > >> // Interpolate 'Source' at these points > >> probeFilter->Update(); > >> > >> vtkSmartPointer gridDelaunay = > >> vtkSmartPointer::New(); > >> gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() ); > >> > >> vtkSmartPointer gridWriter = > >> vtkSmartPointer::New(); > >> gridWriter->SetFileName ( "gridSurface.vtp" ); > >> gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); > >> gridWriter->Write(); > >> > >> > >> > >> > >> On Tue, Sep 16, 2014 at 12:07 PM, David Gobbi > wrote: > >>> > >>> If you want to create a polydata that is a regular grid, then > >>> use vtkPlaneSource with SetResolution(gridSize, gridSize). > >>> > >>> If you want your regular grid to be a vtkImageData, then > >>> use vtkImageGridSource with SetDataExtent(), SetDataSpacing(), > >>> an SetDataOrigin() to create the needed dimensions. > >>> > >>> Note that if your point cloud is just points without any connectivity > >>> between the points (i.e. without any cells), then you cannot use > >>> vtkProbeFilter. > >>> > >>> > >>> > >>> > >>> On Tue, Sep 16, 2014 at 11:52 AM, Chris Marsh > >>> wrote: > >>> > Mmh thanks. I think I'll stick with the probe filter. > >>> > > >>> > I've been able to get this example working > >>> > > http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid > >>> > if I have a real-world pt cloud, I'm a bit unclear how I should make > the > >>> > grid. > >>> > > >>> > If xll and yll are the lower x and y coordinates of an axis aligned > >>> > bounding > >>> > box > >>> > > >>> > size_t gridSize = 100; > >>> > for ( size_t x = 0; x < gridSize; x++ ) > >>> > { > >>> > for ( size_t y = 0; y < gridSize; y++ ) > >>> > { > >>> > gridPoints->InsertNextPoint ( x+xll, y+yll, 0); > >>> > } > >>> > } > >>> > > >>> > does not seem to produce any output. > >>> > > >>> > Any suggestions? > >>> > > >>> > On Mon, Sep 15, 2014 at 4:39 PM, David Gobbi > >>> > wrote: > >>> >> > >>> >> Another filter that might work is vtkShepardMethod, which takes > >>> >> unstructured points (e.g. an arbitrary set of samples) as input and > >>> >> produces a vtkImageData as output. > >>> >> > >>> >> The difference between vtkProbeFilter and vtkShepardMethod is > >>> >> that the former performs the interpolation based on the connectivity > >>> >> of the points (i.e. based on the cells), while the latter ignores > the > >>> >> connectivity and does the interpolation purely based on distance. > >>> >> > >>> >> - David > >>> >> > >>> >> On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh > >>> >> wrote: > >>> >> > Thanks David, this looks perfect. > >>> >> > > >>> >> > > >>> >> > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi < > david.gobbi at gmail.com> > >>> >> > wrote: > >>> >> >> > >>> >> >> Hi Chris, > >>> >> >> > >>> >> >> This sounds like a job for vtkProbeFilter. The probe filter > takes > >>> >> >> two > >>> >> >> inputs, > >>> >> >> the "input" and the "source". The idea is that it resamples the > >>> >> >> scalars > >>> >> >> from > >>> >> >> the "source" onto the geometry of the "input". So, in this case, > >>> >> >> the > >>> >> >> "source" > >>> >> >> is your unstructured grid, and the "input" is any vtkImageData > that > >>> >> >> has > >>> >> >> the > >>> >> >> origin, spacing, and extent that you want to use for the > regridding. > >>> >> >> The > >>> >> >> output of vtkProbeFilter will be an image that has the same > geometry > >>> >> >> as > >>> >> >> the input, but that has pixel values that have been interpolated > >>> >> >> from > >>> >> >> your > >>> >> >> unstructured grid. You should be able to find several examples > on > >>> >> >> the > >>> >> >> wiki. > >>> >> >> > >>> >> >> - David > >>> >> >> > >>> >> >> > >>> >> >> On Mon, Sep 15, 2014 at 3:59 PM, chrism > >>> >> >> wrote: > >>> >> >> > Is it possible to (easily) convert an unstructured grid to a > >>> >> >> > structured > >>> >> >> > grid > >>> >> >> > (Image data)? > >>> >> >> > > >>> >> >> > Is unstructured -> polydata -> image data the only way? If so, > >>> >> >> > how > >>> >> >> > example > >>> >> >> > > >>> >> >> > > >>> >> >> > ( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter > >>> >> >> > ??) > >>> >> >> > > >>> >> >> > Ultimately, the unstructured grid represents a topography, and > I > >>> >> >> > am > >>> >> >> > looking > >>> >> >> > to 'rasterize' it for use in a GIS. > >>> >> > > >>> >> > > >>> > > >>> > > >> > >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 16 16:12:16 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Sep 2014 14:12:16 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: You also have to call gridPoints->Update(), because you are getting its output directly, rather than connecting to its output port. On Tue, Sep 16, 2014 at 2:07 PM, Chris Marsh wrote: > No dice. With the examples code, I would get a blank plane uniform plane > with the data name 'elevation' as per the SetName() call. However, now, I > get no plane, and for coloring all I see (in paraview) is 'solid color' and > 'elevation' is no longer present. Which suggests to me something else is > perhaps wrong? > > > > On Tue, Sep 16, 2014 at 2:03 PM, David Gobbi wrote: >> >> Oops, the second "SetPoint1" should be "SetPoint2". >> >> On Tue, Sep 16, 2014 at 2:02 PM, David Gobbi >> wrote: >> > The default plane size is 1x1, so you might need this: >> > >> > gridPoints->SetResolution(gridSize, gridSize); >> > gridPoints->SetOrigin(0, 0, 0); >> > gridPoints->SetPoint1(gridSize, 0, 0); >> > gridPoints->SetPoint1(0, gridSize, 0); >> > >> > On Tue, Sep 16, 2014 at 1:49 PM, Chris Marsh >> > wrote: >> >> Hi David, >> >> >> >> To clarify: I want to take an unstructured grid (x,y) with face data >> >> (z) and >> >> make it a 2D structured grid. I have connectivity information >> >> (triangulation). >> >> >> >> Looking at vtkPlaneSource: looks like it should work/make my life >> >> easier >> >> >> >> However, even with the above linked demo with the slight modification, >> >> I >> >> cannot make this work. This is most likely a PEBKAC as a result of my >> >> lack >> >> of familiarity with VTK so I appreciate you taking the time to help. >> >> The >> >> minimum working example is below, based upon this code >> >> http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid >> >> >> >> vtkSmartPointer points = vtkSmartPointer::New(); >> >> vtkSmartPointer data = >> >> vtkSmartPointer::New(); >> >> data->SetName("elevation"); >> >> >> >> unsigned int gridSize = 10; >> >> float maxHeight = 5; >> >> for ( unsigned int i = 0; i < 100; ++i ) >> >> { >> >> double x = vtkMath::Random(0, gridSize); >> >> double y = vtkMath::Random(0, gridSize); >> >> double z = vtkMath::Random(0, maxHeight); >> >> points->InsertNextPoint ( x, y, 0); >> >> data->InsertNextValue(z); >> >> } >> >> >> >> // Add the grid points to a polydata object >> >> vtkSmartPointer polydata = >> >> vtkSmartPointer::New(); >> >> polydata->SetPoints ( points ); >> >> polydata->GetPointData()->SetScalars(data); >> >> >> >> // Triangulate the grid points. If you do not have a mesh (points >> >> // only), the output will not be interpolated! >> >> vtkSmartPointer tri = >> >> vtkSmartPointer::New(); >> >> tri->SetInputData ( polydata ); >> >> tri->Update(); >> >> >> >> // Create a grid of points to interpolate over >> >> vtkSmartPointer gridPoints = >> >> vtkSmartPointer::New(); >> >> gridPoints->SetResolution(gridSize, gridSize); >> >> gridPoints->SetOrigin(0, 0, 0); >> >> >> >> // Perform the interpolation >> >> vtkSmartPointer probeFilter = >> >> vtkSmartPointer::New(); >> >> probeFilter->SetSourceConnection(tri->GetOutputPort()); >> >> probeFilter->SetInputData(gridPoints->GetOutput()); // >> >> // Interpolate 'Source' at these points >> >> probeFilter->Update(); >> >> >> >> vtkSmartPointer gridDelaunay = >> >> vtkSmartPointer::New(); >> >> gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() ); >> >> >> >> vtkSmartPointer gridWriter = >> >> vtkSmartPointer::New(); >> >> gridWriter->SetFileName ( "gridSurface.vtp" ); >> >> gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); >> >> gridWriter->Write(); >> >> >> >> >> >> >> >> >> >> On Tue, Sep 16, 2014 at 12:07 PM, David Gobbi >> >> wrote: >> >>> >> >>> If you want to create a polydata that is a regular grid, then >> >>> use vtkPlaneSource with SetResolution(gridSize, gridSize). >> >>> >> >>> If you want your regular grid to be a vtkImageData, then >> >>> use vtkImageGridSource with SetDataExtent(), SetDataSpacing(), >> >>> an SetDataOrigin() to create the needed dimensions. >> >>> >> >>> Note that if your point cloud is just points without any connectivity >> >>> between the points (i.e. without any cells), then you cannot use >> >>> vtkProbeFilter. >> >>> >> >>> >> >>> >> >>> >> >>> On Tue, Sep 16, 2014 at 11:52 AM, Chris Marsh >> >>> wrote: >> >>> > Mmh thanks. I think I'll stick with the probe filter. >> >>> > >> >>> > I've been able to get this example working >> >>> > >> >>> > http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid >> >>> > if I have a real-world pt cloud, I'm a bit unclear how I should make >> >>> > the >> >>> > grid. >> >>> > >> >>> > If xll and yll are the lower x and y coordinates of an axis aligned >> >>> > bounding >> >>> > box >> >>> > >> >>> > size_t gridSize = 100; >> >>> > for ( size_t x = 0; x < gridSize; x++ ) >> >>> > { >> >>> > for ( size_t y = 0; y < gridSize; y++ ) >> >>> > { >> >>> > gridPoints->InsertNextPoint ( x+xll, y+yll, 0); >> >>> > } >> >>> > } >> >>> > >> >>> > does not seem to produce any output. >> >>> > >> >>> > Any suggestions? >> >>> > >> >>> > On Mon, Sep 15, 2014 at 4:39 PM, David Gobbi >> >>> > wrote: >> >>> >> >> >>> >> Another filter that might work is vtkShepardMethod, which takes >> >>> >> unstructured points (e.g. an arbitrary set of samples) as input and >> >>> >> produces a vtkImageData as output. >> >>> >> >> >>> >> The difference between vtkProbeFilter and vtkShepardMethod is >> >>> >> that the former performs the interpolation based on the >> >>> >> connectivity >> >>> >> of the points (i.e. based on the cells), while the latter ignores >> >>> >> the >> >>> >> connectivity and does the interpolation purely based on distance. >> >>> >> >> >>> >> - David >> >>> >> >> >>> >> On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh >> >>> >> wrote: >> >>> >> > Thanks David, this looks perfect. >> >>> >> > >> >>> >> > >> >>> >> > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi >> >>> >> > >> >>> >> > wrote: >> >>> >> >> >> >>> >> >> Hi Chris, >> >>> >> >> >> >>> >> >> This sounds like a job for vtkProbeFilter. The probe filter >> >>> >> >> takes >> >>> >> >> two >> >>> >> >> inputs, >> >>> >> >> the "input" and the "source". The idea is that it resamples the >> >>> >> >> scalars >> >>> >> >> from >> >>> >> >> the "source" onto the geometry of the "input". So, in this >> >>> >> >> case, >> >>> >> >> the >> >>> >> >> "source" >> >>> >> >> is your unstructured grid, and the "input" is any vtkImageData >> >>> >> >> that >> >>> >> >> has >> >>> >> >> the >> >>> >> >> origin, spacing, and extent that you want to use for the >> >>> >> >> regridding. >> >>> >> >> The >> >>> >> >> output of vtkProbeFilter will be an image that has the same >> >>> >> >> geometry >> >>> >> >> as >> >>> >> >> the input, but that has pixel values that have been interpolated >> >>> >> >> from >> >>> >> >> your >> >>> >> >> unstructured grid. You should be able to find several examples >> >>> >> >> on >> >>> >> >> the >> >>> >> >> wiki. >> >>> >> >> >> >>> >> >> - David >> >>> >> >> >> >>> >> >> >> >>> >> >> On Mon, Sep 15, 2014 at 3:59 PM, chrism >> >>> >> >> wrote: >> >>> >> >> > Is it possible to (easily) convert an unstructured grid to a >> >>> >> >> > structured >> >>> >> >> > grid >> >>> >> >> > (Image data)? >> >>> >> >> > >> >>> >> >> > Is unstructured -> polydata -> image data the only way? If >> >>> >> >> > so, >> >>> >> >> > how >> >>> >> >> > example >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter >> >>> >> >> > ??) >> >>> >> >> > >> >>> >> >> > Ultimately, the unstructured grid represents a topography, and >> >>> >> >> > I >> >>> >> >> > am >> >>> >> >> > looking >> >>> >> >> > to 'rasterize' it for use in a GIS. >> >>> >> > >> >>> >> > >> >>> > >> >>> > >> >> >> >> > > From chris.marsh at usask.ca Tue Sep 16 18:49:56 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Tue, 16 Sep 2014 16:49:56 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Aha! Excellent, thanks. This all seems to work, mostly. The interpolation doesn't look very good, even after increasing the resolution. As well, it is flipped along the y-axis. Image is a mountain, variable is air temp (blue = cold, red = warm). See here: http://imgur.com/l1KpcS0 The code that converts my triangulation into the vtk format is shared between the mesh and plane code, so it should 'work' given the mesh is right. Secondly: I need to iterate over the rows/cols of this interpolated grid in order to write it to an ArcGIS ascii file. What would be the best way to do this? The fact it is now in a delaunay triangulation somewhat doesn't help (now that I think about it!) Thanks for all the help On Tue, Sep 16, 2014 at 2:12 PM, David Gobbi wrote: > You also have to call gridPoints->Update(), because you are getting > its output directly, rather than connecting to its output port. > > On Tue, Sep 16, 2014 at 2:07 PM, Chris Marsh wrote: > > No dice. With the examples code, I would get a blank plane uniform plane > > with the data name 'elevation' as per the SetName() call. However, now, I > > get no plane, and for coloring all I see (in paraview) is 'solid color' > and > > 'elevation' is no longer present. Which suggests to me something else is > > perhaps wrong? > > > > > > > > On Tue, Sep 16, 2014 at 2:03 PM, David Gobbi > wrote: > >> > >> Oops, the second "SetPoint1" should be "SetPoint2". > >> > >> On Tue, Sep 16, 2014 at 2:02 PM, David Gobbi > >> wrote: > >> > The default plane size is 1x1, so you might need this: > >> > > >> > gridPoints->SetResolution(gridSize, gridSize); > >> > gridPoints->SetOrigin(0, 0, 0); > >> > gridPoints->SetPoint1(gridSize, 0, 0); > >> > gridPoints->SetPoint1(0, gridSize, 0); > >> > > >> > On Tue, Sep 16, 2014 at 1:49 PM, Chris Marsh > >> > wrote: > >> >> Hi David, > >> >> > >> >> To clarify: I want to take an unstructured grid (x,y) with face data > >> >> (z) and > >> >> make it a 2D structured grid. I have connectivity information > >> >> (triangulation). > >> >> > >> >> Looking at vtkPlaneSource: looks like it should work/make my life > >> >> easier > >> >> > >> >> However, even with the above linked demo with the slight > modification, > >> >> I > >> >> cannot make this work. This is most likely a PEBKAC as a result of my > >> >> lack > >> >> of familiarity with VTK so I appreciate you taking the time to help. > >> >> The > >> >> minimum working example is below, based upon this code > >> >> > http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid > >> >> > >> >> vtkSmartPointer points = > vtkSmartPointer::New(); > >> >> vtkSmartPointer data = > >> >> vtkSmartPointer::New(); > >> >> data->SetName("elevation"); > >> >> > >> >> unsigned int gridSize = 10; > >> >> float maxHeight = 5; > >> >> for ( unsigned int i = 0; i < 100; ++i ) > >> >> { > >> >> double x = vtkMath::Random(0, gridSize); > >> >> double y = vtkMath::Random(0, gridSize); > >> >> double z = vtkMath::Random(0, maxHeight); > >> >> points->InsertNextPoint ( x, y, 0); > >> >> data->InsertNextValue(z); > >> >> } > >> >> > >> >> // Add the grid points to a polydata object > >> >> vtkSmartPointer polydata = > >> >> vtkSmartPointer::New(); > >> >> polydata->SetPoints ( points ); > >> >> polydata->GetPointData()->SetScalars(data); > >> >> > >> >> // Triangulate the grid points. If you do not have a mesh (points > >> >> // only), the output will not be interpolated! > >> >> vtkSmartPointer tri = > >> >> vtkSmartPointer::New(); > >> >> tri->SetInputData ( polydata ); > >> >> tri->Update(); > >> >> > >> >> // Create a grid of points to interpolate over > >> >> vtkSmartPointer gridPoints = > >> >> vtkSmartPointer::New(); > >> >> gridPoints->SetResolution(gridSize, gridSize); > >> >> gridPoints->SetOrigin(0, 0, 0); > >> >> > >> >> // Perform the interpolation > >> >> vtkSmartPointer probeFilter = > >> >> vtkSmartPointer::New(); > >> >> probeFilter->SetSourceConnection(tri->GetOutputPort()); > >> >> probeFilter->SetInputData(gridPoints->GetOutput()); // > >> >> // Interpolate 'Source' at these points > >> >> probeFilter->Update(); > >> >> > >> >> vtkSmartPointer gridDelaunay = > >> >> vtkSmartPointer::New(); > >> >> gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() > ); > >> >> > >> >> vtkSmartPointer gridWriter = > >> >> vtkSmartPointer::New(); > >> >> gridWriter->SetFileName ( "gridSurface.vtp" ); > >> >> gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); > >> >> gridWriter->Write(); > >> >> > >> >> > >> >> > >> >> > >> >> On Tue, Sep 16, 2014 at 12:07 PM, David Gobbi > > >> >> wrote: > >> >>> > >> >>> If you want to create a polydata that is a regular grid, then > >> >>> use vtkPlaneSource with SetResolution(gridSize, gridSize). > >> >>> > >> >>> If you want your regular grid to be a vtkImageData, then > >> >>> use vtkImageGridSource with SetDataExtent(), SetDataSpacing(), > >> >>> an SetDataOrigin() to create the needed dimensions. > >> >>> > >> >>> Note that if your point cloud is just points without any > connectivity > >> >>> between the points (i.e. without any cells), then you cannot use > >> >>> vtkProbeFilter. > >> >>> > >> >>> > >> >>> > >> >>> > >> >>> On Tue, Sep 16, 2014 at 11:52 AM, Chris Marsh > > >> >>> wrote: > >> >>> > Mmh thanks. I think I'll stick with the probe filter. > >> >>> > > >> >>> > I've been able to get this example working > >> >>> > > >> >>> > > http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid > >> >>> > if I have a real-world pt cloud, I'm a bit unclear how I should > make > >> >>> > the > >> >>> > grid. > >> >>> > > >> >>> > If xll and yll are the lower x and y coordinates of an axis > aligned > >> >>> > bounding > >> >>> > box > >> >>> > > >> >>> > size_t gridSize = 100; > >> >>> > for ( size_t x = 0; x < gridSize; x++ ) > >> >>> > { > >> >>> > for ( size_t y = 0; y < gridSize; y++ ) > >> >>> > { > >> >>> > gridPoints->InsertNextPoint ( x+xll, y+yll, 0); > >> >>> > } > >> >>> > } > >> >>> > > >> >>> > does not seem to produce any output. > >> >>> > > >> >>> > Any suggestions? > >> >>> > > >> >>> > On Mon, Sep 15, 2014 at 4:39 PM, David Gobbi < > david.gobbi at gmail.com> > >> >>> > wrote: > >> >>> >> > >> >>> >> Another filter that might work is vtkShepardMethod, which takes > >> >>> >> unstructured points (e.g. an arbitrary set of samples) as input > and > >> >>> >> produces a vtkImageData as output. > >> >>> >> > >> >>> >> The difference between vtkProbeFilter and vtkShepardMethod is > >> >>> >> that the former performs the interpolation based on the > >> >>> >> connectivity > >> >>> >> of the points (i.e. based on the cells), while the latter ignores > >> >>> >> the > >> >>> >> connectivity and does the interpolation purely based on distance. > >> >>> >> > >> >>> >> - David > >> >>> >> > >> >>> >> On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh < > chris.marsh at usask.ca> > >> >>> >> wrote: > >> >>> >> > Thanks David, this looks perfect. > >> >>> >> > > >> >>> >> > > >> >>> >> > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi > >> >>> >> > > >> >>> >> > wrote: > >> >>> >> >> > >> >>> >> >> Hi Chris, > >> >>> >> >> > >> >>> >> >> This sounds like a job for vtkProbeFilter. The probe filter > >> >>> >> >> takes > >> >>> >> >> two > >> >>> >> >> inputs, > >> >>> >> >> the "input" and the "source". The idea is that it resamples > the > >> >>> >> >> scalars > >> >>> >> >> from > >> >>> >> >> the "source" onto the geometry of the "input". So, in this > >> >>> >> >> case, > >> >>> >> >> the > >> >>> >> >> "source" > >> >>> >> >> is your unstructured grid, and the "input" is any vtkImageData > >> >>> >> >> that > >> >>> >> >> has > >> >>> >> >> the > >> >>> >> >> origin, spacing, and extent that you want to use for the > >> >>> >> >> regridding. > >> >>> >> >> The > >> >>> >> >> output of vtkProbeFilter will be an image that has the same > >> >>> >> >> geometry > >> >>> >> >> as > >> >>> >> >> the input, but that has pixel values that have been > interpolated > >> >>> >> >> from > >> >>> >> >> your > >> >>> >> >> unstructured grid. You should be able to find several > examples > >> >>> >> >> on > >> >>> >> >> the > >> >>> >> >> wiki. > >> >>> >> >> > >> >>> >> >> - David > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> On Mon, Sep 15, 2014 at 3:59 PM, chrism > > >> >>> >> >> wrote: > >> >>> >> >> > Is it possible to (easily) convert an unstructured grid to a > >> >>> >> >> > structured > >> >>> >> >> > grid > >> >>> >> >> > (Image data)? > >> >>> >> >> > > >> >>> >> >> > Is unstructured -> polydata -> image data the only way? If > >> >>> >> >> > so, > >> >>> >> >> > how > >> >>> >> >> > example > >> >>> >> >> > > >> >>> >> >> > > >> >>> >> >> > > >> >>> >> >> > ( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter > >> >>> >> >> > ??) > >> >>> >> >> > > >> >>> >> >> > Ultimately, the unstructured grid represents a topography, > and > >> >>> >> >> > I > >> >>> >> >> > am > >> >>> >> >> > looking > >> >>> >> >> > to 'rasterize' it for use in a GIS. > >> >>> >> > > >> >>> >> > > >> >>> > > >> >>> > > >> >> > >> >> > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Tue Sep 16 18:58:58 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 16 Sep 2014 18:58:58 -0400 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: I didn't follow the entire email but may be you can even try this filter http://www.vtk.org/doc/release/4.0/html/classvtkGaussianSplatter.html#_details for the purpose. You may have to adjust parameters. - Aashish On Tue, Sep 16, 2014 at 6:49 PM, Chris Marsh wrote: > Aha! Excellent, thanks. This all seems to work, mostly. > > The interpolation doesn't look very good, even after increasing the > resolution. As well, it is flipped along the y-axis. Image is a mountain, > variable is air temp (blue = cold, red = warm). > See here: http://imgur.com/l1KpcS0 > > The code that converts my triangulation into the vtk format is shared > between the mesh and plane code, so it should 'work' given the mesh is > right. > > Secondly: I need to iterate over the rows/cols of this interpolated grid > in order to write it to an ArcGIS ascii file. What would be the best way to > do this? The fact it is now in a delaunay triangulation somewhat doesn't > help (now that I think about it!) > > Thanks for all the help > > On Tue, Sep 16, 2014 at 2:12 PM, David Gobbi > wrote: > >> You also have to call gridPoints->Update(), because you are getting >> its output directly, rather than connecting to its output port. >> >> On Tue, Sep 16, 2014 at 2:07 PM, Chris Marsh >> wrote: >> > No dice. With the examples code, I would get a blank plane uniform plane >> > with the data name 'elevation' as per the SetName() call. However, now, >> I >> > get no plane, and for coloring all I see (in paraview) is 'solid color' >> and >> > 'elevation' is no longer present. Which suggests to me something else is >> > perhaps wrong? >> > >> > >> > >> > On Tue, Sep 16, 2014 at 2:03 PM, David Gobbi >> wrote: >> >> >> >> Oops, the second "SetPoint1" should be "SetPoint2". >> >> >> >> On Tue, Sep 16, 2014 at 2:02 PM, David Gobbi >> >> wrote: >> >> > The default plane size is 1x1, so you might need this: >> >> > >> >> > gridPoints->SetResolution(gridSize, gridSize); >> >> > gridPoints->SetOrigin(0, 0, 0); >> >> > gridPoints->SetPoint1(gridSize, 0, 0); >> >> > gridPoints->SetPoint1(0, gridSize, 0); >> >> > >> >> > On Tue, Sep 16, 2014 at 1:49 PM, Chris Marsh >> >> > wrote: >> >> >> Hi David, >> >> >> >> >> >> To clarify: I want to take an unstructured grid (x,y) with face data >> >> >> (z) and >> >> >> make it a 2D structured grid. I have connectivity information >> >> >> (triangulation). >> >> >> >> >> >> Looking at vtkPlaneSource: looks like it should work/make my life >> >> >> easier >> >> >> >> >> >> However, even with the above linked demo with the slight >> modification, >> >> >> I >> >> >> cannot make this work. This is most likely a PEBKAC as a result of >> my >> >> >> lack >> >> >> of familiarity with VTK so I appreciate you taking the time to help. >> >> >> The >> >> >> minimum working example is below, based upon this code >> >> >> >> http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid >> >> >> >> >> >> vtkSmartPointer points = >> vtkSmartPointer::New(); >> >> >> vtkSmartPointer data = >> >> >> vtkSmartPointer::New(); >> >> >> data->SetName("elevation"); >> >> >> >> >> >> unsigned int gridSize = 10; >> >> >> float maxHeight = 5; >> >> >> for ( unsigned int i = 0; i < 100; ++i ) >> >> >> { >> >> >> double x = vtkMath::Random(0, gridSize); >> >> >> double y = vtkMath::Random(0, gridSize); >> >> >> double z = vtkMath::Random(0, maxHeight); >> >> >> points->InsertNextPoint ( x, y, 0); >> >> >> data->InsertNextValue(z); >> >> >> } >> >> >> >> >> >> // Add the grid points to a polydata object >> >> >> vtkSmartPointer polydata = >> >> >> vtkSmartPointer::New(); >> >> >> polydata->SetPoints ( points ); >> >> >> polydata->GetPointData()->SetScalars(data); >> >> >> >> >> >> // Triangulate the grid points. If you do not have a mesh >> (points >> >> >> // only), the output will not be interpolated! >> >> >> vtkSmartPointer tri = >> >> >> vtkSmartPointer::New(); >> >> >> tri->SetInputData ( polydata ); >> >> >> tri->Update(); >> >> >> >> >> >> // Create a grid of points to interpolate over >> >> >> vtkSmartPointer gridPoints = >> >> >> vtkSmartPointer::New(); >> >> >> gridPoints->SetResolution(gridSize, gridSize); >> >> >> gridPoints->SetOrigin(0, 0, 0); >> >> >> >> >> >> // Perform the interpolation >> >> >> vtkSmartPointer probeFilter = >> >> >> vtkSmartPointer::New(); >> >> >> probeFilter->SetSourceConnection(tri->GetOutputPort()); >> >> >> probeFilter->SetInputData(gridPoints->GetOutput()); // >> >> >> // Interpolate 'Source' at these points >> >> >> probeFilter->Update(); >> >> >> >> >> >> vtkSmartPointer gridDelaunay = >> >> >> vtkSmartPointer::New(); >> >> >> gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() >> ); >> >> >> >> >> >> vtkSmartPointer gridWriter = >> >> >> vtkSmartPointer::New(); >> >> >> gridWriter->SetFileName ( "gridSurface.vtp" ); >> >> >> gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() >> ); >> >> >> gridWriter->Write(); >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> On Tue, Sep 16, 2014 at 12:07 PM, David Gobbi < >> david.gobbi at gmail.com> >> >> >> wrote: >> >> >>> >> >> >>> If you want to create a polydata that is a regular grid, then >> >> >>> use vtkPlaneSource with SetResolution(gridSize, gridSize). >> >> >>> >> >> >>> If you want your regular grid to be a vtkImageData, then >> >> >>> use vtkImageGridSource with SetDataExtent(), SetDataSpacing(), >> >> >>> an SetDataOrigin() to create the needed dimensions. >> >> >>> >> >> >>> Note that if your point cloud is just points without any >> connectivity >> >> >>> between the points (i.e. without any cells), then you cannot use >> >> >>> vtkProbeFilter. >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> On Tue, Sep 16, 2014 at 11:52 AM, Chris Marsh < >> chris.marsh at usask.ca> >> >> >>> wrote: >> >> >>> > Mmh thanks. I think I'll stick with the probe filter. >> >> >>> > >> >> >>> > I've been able to get this example working >> >> >>> > >> >> >>> > >> http://www.itk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateMeshOnGrid >> >> >>> > if I have a real-world pt cloud, I'm a bit unclear how I should >> make >> >> >>> > the >> >> >>> > grid. >> >> >>> > >> >> >>> > If xll and yll are the lower x and y coordinates of an axis >> aligned >> >> >>> > bounding >> >> >>> > box >> >> >>> > >> >> >>> > size_t gridSize = 100; >> >> >>> > for ( size_t x = 0; x < gridSize; x++ ) >> >> >>> > { >> >> >>> > for ( size_t y = 0; y < gridSize; y++ ) >> >> >>> > { >> >> >>> > gridPoints->InsertNextPoint ( x+xll, y+yll, 0); >> >> >>> > } >> >> >>> > } >> >> >>> > >> >> >>> > does not seem to produce any output. >> >> >>> > >> >> >>> > Any suggestions? >> >> >>> > >> >> >>> > On Mon, Sep 15, 2014 at 4:39 PM, David Gobbi < >> david.gobbi at gmail.com> >> >> >>> > wrote: >> >> >>> >> >> >> >>> >> Another filter that might work is vtkShepardMethod, which takes >> >> >>> >> unstructured points (e.g. an arbitrary set of samples) as input >> and >> >> >>> >> produces a vtkImageData as output. >> >> >>> >> >> >> >>> >> The difference between vtkProbeFilter and vtkShepardMethod is >> >> >>> >> that the former performs the interpolation based on the >> >> >>> >> connectivity >> >> >>> >> of the points (i.e. based on the cells), while the latter >> ignores >> >> >>> >> the >> >> >>> >> connectivity and does the interpolation purely based on >> distance. >> >> >>> >> >> >> >>> >> - David >> >> >>> >> >> >> >>> >> On Mon, Sep 15, 2014 at 4:23 PM, Chris Marsh < >> chris.marsh at usask.ca> >> >> >>> >> wrote: >> >> >>> >> > Thanks David, this looks perfect. >> >> >>> >> > >> >> >>> >> > >> >> >>> >> > On Mon, Sep 15, 2014 at 4:10 PM, David Gobbi >> >> >>> >> > >> >> >>> >> > wrote: >> >> >>> >> >> >> >> >>> >> >> Hi Chris, >> >> >>> >> >> >> >> >>> >> >> This sounds like a job for vtkProbeFilter. The probe filter >> >> >>> >> >> takes >> >> >>> >> >> two >> >> >>> >> >> inputs, >> >> >>> >> >> the "input" and the "source". The idea is that it resamples >> the >> >> >>> >> >> scalars >> >> >>> >> >> from >> >> >>> >> >> the "source" onto the geometry of the "input". So, in this >> >> >>> >> >> case, >> >> >>> >> >> the >> >> >>> >> >> "source" >> >> >>> >> >> is your unstructured grid, and the "input" is any >> vtkImageData >> >> >>> >> >> that >> >> >>> >> >> has >> >> >>> >> >> the >> >> >>> >> >> origin, spacing, and extent that you want to use for the >> >> >>> >> >> regridding. >> >> >>> >> >> The >> >> >>> >> >> output of vtkProbeFilter will be an image that has the same >> >> >>> >> >> geometry >> >> >>> >> >> as >> >> >>> >> >> the input, but that has pixel values that have been >> interpolated >> >> >>> >> >> from >> >> >>> >> >> your >> >> >>> >> >> unstructured grid. You should be able to find several >> examples >> >> >>> >> >> on >> >> >>> >> >> the >> >> >>> >> >> wiki. >> >> >>> >> >> >> >> >>> >> >> - David >> >> >>> >> >> >> >> >>> >> >> >> >> >>> >> >> On Mon, Sep 15, 2014 at 3:59 PM, chrism < >> chris.marsh at usask.ca> >> >> >>> >> >> wrote: >> >> >>> >> >> > Is it possible to (easily) convert an unstructured grid to >> a >> >> >>> >> >> > structured >> >> >>> >> >> > grid >> >> >>> >> >> > (Image data)? >> >> >>> >> >> > >> >> >>> >> >> > Is unstructured -> polydata -> image data the only way? If >> >> >>> >> >> > so, >> >> >>> >> >> > how >> >> >>> >> >> > example >> >> >>> >> >> > >> >> >>> >> >> > >> >> >>> >> >> > >> >> >>> >> >> > ( >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter >> >> >>> >> >> > ??) >> >> >>> >> >> > >> >> >>> >> >> > Ultimately, the unstructured grid represents a topography, >> and >> >> >>> >> >> > I >> >> >>> >> >> > am >> >> >>> >> >> > looking >> >> >>> >> >> > to 'rasterize' it for use in a GIS. >> >> >>> >> > >> >> >>> >> > >> >> >>> > >> >> >>> > >> >> >> >> >> >> >> > >> > >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 16 19:23:30 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Sep 2014 17:23:30 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: On Tue, Sep 16, 2014 at 4:49 PM, Chris Marsh wrote: > The interpolation doesn't look very good, even after increasing the > resolution. As well, it is flipped along the y-axis. Image is a mountain, > variable is air temp (blue = cold, red = warm). > See here: http://imgur.com/l1KpcS0 Honestly, I can't see any correspondence at all between the mountain and the interpolated data on that plane. Are you sure the size and position of the plane matches the size and position of your data? An easy way to check is to call GetBounds() on both of them and print out the bounds. They should match. > Secondly: I need to iterate over the rows/cols of this interpolated grid in > order to write it to an ArcGIS ascii file. What would be the best way to do > this? The fact it is now in a delaunay triangulation somewhat doesn't help > (now that I think about it!) The interpolated data can be retrieved via GetPointData()->GetScalars(), but I'm not sure what ordering the vtkPlaneSource uses for its points. You can print GetPoint(0) and GetPoint(1) to see whether the points increase in the X direction or Y direction first. Also, watch for off-by-one mistakes. SetResolution(1, 1) gives a plane with 4 points (the corners). So if you want a plane with 4x4 points, you would SetResolution(3, 3). - David From chris.marsh at usask.ca Tue Sep 16 20:16:20 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Tue, 16 Sep 2014 18:16:20 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Yes, I was trying to be optimistic :( Good call on the bounds: vtu export: xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 vtp export: xmin:1 xmax:-1 ymin:1 ymax:-1 Presumably the problem. I'm unclear why it is doing this though? vtkSmartPointer gridPoints = vtkSmartPointer::New(); int gridSize = 1000; gridPoints->SetResolution(gridSize, gridSize); gridPoints->SetOrigin(bbox.vertex(0).x(), bbox.vertex(0).y(), 0); gridPoints->SetPoint1(bbox.vertex(2).x(), bbox.vertex(0).y(), 0); gridPoints->SetPoint2(bbox.vertex(0).x(), bbox.vertex(2).y(), 0); gridPoints->Update(); where bbox is a bounding box (2D), index 0 is bottom left, indexing is increasing CCW. So 2 is upper right corner. As far as I can tell this is correct and corresponds to the vtu export numbers I had above. I feel like I perhaps don't understand resolution: I envision it as the size of each cell, however I don't think that is correct is it? On Tue, Sep 16, 2014 at 5:23 PM, David Gobbi wrote: > On Tue, Sep 16, 2014 at 4:49 PM, Chris Marsh wrote: > > > The interpolation doesn't look very good, even after increasing the > > resolution. As well, it is flipped along the y-axis. Image is a > mountain, > > variable is air temp (blue = cold, red = warm). > > See here: http://imgur.com/l1KpcS0 > > Honestly, I can't see any correspondence at all between the mountain > and the interpolated data on that plane. Are you sure the size and > position of the plane matches the size and position of your data? > An easy way to check is to call GetBounds() on both of them and > print out the bounds. They should match. > > > Secondly: I need to iterate over the rows/cols of this interpolated grid > in > > order to write it to an ArcGIS ascii file. What would be the best way to > do > > this? The fact it is now in a delaunay triangulation somewhat doesn't > help > > (now that I think about it!) > > The interpolated data can be retrieved via GetPointData()->GetScalars(), > but I'm not sure what ordering the vtkPlaneSource uses for its points. > You can print GetPoint(0) and GetPoint(1) to see whether the points > increase in the X direction or Y direction first. > > Also, watch for off-by-one mistakes. SetResolution(1, 1) gives a plane > with 4 points (the corners). So if you want a plane with 4x4 points, you > would SetResolution(3, 3). > > - David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.marsh at usask.ca Tue Sep 16 21:03:13 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Tue, 16 Sep 2014 19:03:13 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Ah I see resolution is just subdivisions. http://www.vtk.org/doc/nightly/html/classvtkPlaneSource.html#acd65f04a453ba87b766048f0e7597710 I have also confirmed bbox matches exactly the values that GetBounds() reports. On Tue, Sep 16, 2014 at 6:16 PM, Chris Marsh wrote: > Yes, I was trying to be optimistic :( Good call on the bounds: > vtu export: xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 > vtp export: xmin:1 xmax:-1 ymin:1 ymax:-1 > > Presumably the problem. I'm unclear why it is doing this though? > > vtkSmartPointer gridPoints = > vtkSmartPointer::New(); > > int gridSize = 1000; > gridPoints->SetResolution(gridSize, gridSize); > gridPoints->SetOrigin(bbox.vertex(0).x(), bbox.vertex(0).y(), 0); > gridPoints->SetPoint1(bbox.vertex(2).x(), bbox.vertex(0).y(), 0); > gridPoints->SetPoint2(bbox.vertex(0).x(), bbox.vertex(2).y(), 0); > gridPoints->Update(); > > where bbox is a bounding box (2D), index 0 is bottom left, indexing is > increasing CCW. So 2 is upper right corner. As far as I can tell this is > correct and corresponds to the vtu export numbers I had above. > > I feel like I perhaps don't understand resolution: I envision it as the > size of each cell, however I don't think that is correct is it? > > > > On Tue, Sep 16, 2014 at 5:23 PM, David Gobbi > wrote: > >> On Tue, Sep 16, 2014 at 4:49 PM, Chris Marsh >> wrote: >> >> > The interpolation doesn't look very good, even after increasing the >> > resolution. As well, it is flipped along the y-axis. Image is a >> mountain, >> > variable is air temp (blue = cold, red = warm). >> > See here: http://imgur.com/l1KpcS0 >> >> Honestly, I can't see any correspondence at all between the mountain >> and the interpolated data on that plane. Are you sure the size and >> position of the plane matches the size and position of your data? >> An easy way to check is to call GetBounds() on both of them and >> print out the bounds. They should match. >> >> > Secondly: I need to iterate over the rows/cols of this interpolated >> grid in >> > order to write it to an ArcGIS ascii file. What would be the best way >> to do >> > this? The fact it is now in a delaunay triangulation somewhat doesn't >> help >> > (now that I think about it!) >> >> The interpolated data can be retrieved via GetPointData()->GetScalars(), >> but I'm not sure what ordering the vtkPlaneSource uses for its points. >> You can print GetPoint(0) and GetPoint(1) to see whether the points >> increase in the X direction or Y direction first. >> >> Also, watch for off-by-one mistakes. SetResolution(1, 1) gives a plane >> with 4 points (the corners). So if you want a plane with 4x4 points, you >> would SetResolution(3, 3). >> >> - David >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From linucks42 at gmail.com Wed Sep 17 06:06:06 2014 From: linucks42 at gmail.com (Jens) Date: Wed, 17 Sep 2014 11:06:06 +0100 Subject: [vtkusers] Failing VTK 6.1.1 build with Tk/Python on OSX 10.9.4 In-Reply-To: References: Message-ID: Hi David, I'm still struggling to get this build to work. I pointed the CMakeCache.txt at the correct header and library directories (for tk 8.5), but it persisted in setting: TK_INTERNAL_PATH:PATH=/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.6 i.e. for version 8.6. In the end I manually set TK_INTERNAL_PATH so that it pointed at tk 8.5. The settings in my CMakeCache.txt are therefore: //Path to a file. TCL_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers //Path to a library. TCL_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework //Path to a program. TCL_TCLSH:FILEPATH=/usr/bin/tclsh //Path to a file. TK_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers //The path to the Tk internal headers (tkMacOSXDefault.h). TK_INTERNAL_PATH:PATH=/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.5 //Path to a library. TK_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework and just for reference, a long-listing of the tk.framework/Versions directory shows: Current -> 8.5 i.e. I'm pretty certain I should be using 8.5. If I now run the make, it dies as follows: [ 59%] Building CXX object Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o cd /opt/VTK-6.1.0/build/Rendering/Tk && /usr/bin/c++ -DVTK_IN_VTK -DvtkRenderingPythonTkWidgets_EXPORTS -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fPIC -I/opt/VTK-6.1.0/build/Interaction/Image -I/opt/VTK-6.1.0/Interaction/Image -I/opt/VTK-6.1.0/build/Imaging/Color -I/opt/VTK-6.1.0/Imaging/Color -I/opt/VTK-6.1.0/build/Imaging/Core -I/opt/VTK-6.1.0/Imaging/Core -I/opt/VTK-6.1.0/build/Common/ExecutionModel -I/opt/VTK-6.1.0/Common/ExecutionModel -I/opt/VTK-6.1.0/build/Common/DataModel -I/opt/VTK-6.1.0/Common/DataModel -I/opt/VTK-6.1.0/build/Common/Math -I/opt/VTK-6.1.0/Common/Math -I/opt/VTK-6.1.0/build/Common/Core -I/opt/VTK-6.1.0/Common/Core -I/opt/VTK-6.1.0/build/Utilities/KWSys -I/opt/VTK-6.1.0/Utilities/KWSys -I/opt/VTK-6.1.0/build/Common/Misc -I/opt/VTK-6.1.0/Common/Misc -I/opt/VTK-6.1.0/build/Common/System -I/opt/VTK-6.1.0/Common/System -I/opt/VTK-6.1.0/build/Common/Transforms -I/opt/VTK-6.1.0/Common/Transforms -I/opt/VTK-6.1.0/build/Interaction/Style -I/opt/VTK-6.1.0/Interaction/Style -I/opt/VTK-6.1.0/build/Filters/Extraction -I/opt/VTK-6.1.0/Filters/Extraction -I/opt/VTK-6.1.0/build/Filters/Core -I/opt/VTK-6.1.0/Filters/Core -I/opt/VTK-6.1.0/build/Filters/General -I/opt/VTK-6.1.0/Filters/General -I/opt/VTK-6.1.0/build/Common/ComputationalGeometry -I/opt/VTK-6.1.0/Common/ComputationalGeometry -I/opt/VTK-6.1.0/build/Filters/Statistics -I/opt/VTK-6.1.0/Filters/Statistics -I/opt/VTK-6.1.0/build/Imaging/Fourier -I/opt/VTK-6.1.0/Imaging/Fourier -I/opt/VTK-6.1.0/build/ThirdParty/alglib -I/opt/VTK-6.1.0/ThirdParty/alglib -I/opt/VTK-6.1.0/build/Filters/Sources -I/opt/VTK-6.1.0/Filters/Sources -I/opt/VTK-6.1.0/build/Rendering/Core -I/opt/VTK-6.1.0/Rendering/Core -I/opt/VTK-6.1.0/build/Filters/Geometry -I/opt/VTK-6.1.0/Filters/Geometry -I/opt/VTK-6.1.0/build/Interaction/Widgets -I/opt/VTK-6.1.0/Interaction/Widgets -I/opt/VTK-6.1.0/build/Filters/Hybrid -I/opt/VTK-6.1.0/Filters/Hybrid -I/opt/VTK-6.1.0/build/Imaging/Sources -I/opt/VTK-6.1.0/Imaging/Sources -I/opt/VTK-6.1.0/build/Filters/Modeling -I/opt/VTK-6.1.0/Filters/Modeling -I/opt/VTK-6.1.0/build/Imaging/General -I/opt/VTK-6.1.0/Imaging/General -I/opt/VTK-6.1.0/build/Imaging/Hybrid -I/opt/VTK-6.1.0/Imaging/Hybrid -I/opt/VTK-6.1.0/build/IO/Image -I/opt/VTK-6.1.0/IO/Image -I/opt/VTK-6.1.0/build/Utilities/DICOMParser -I/opt/VTK-6.1.0/Utilities/DICOMParser -I/opt/VTK-6.1.0/build/IO/Core -I/opt/VTK-6.1.0/IO/Core -I/opt/VTK-6.1.0/build/ThirdParty/zlib -I/opt/VTK-6.1.0/ThirdParty/zlib -I/opt/VTK-6.1.0/build/Utilities/MetaIO/vtkmetaio -I/opt/VTK-6.1.0/build/Utilities/MetaIO -I/opt/VTK-6.1.0/Utilities/MetaIO -I/opt/VTK-6.1.0/build/ThirdParty/jpeg -I/opt/VTK-6.1.0/ThirdParty/jpeg -I/opt/VTK-6.1.0/build/ThirdParty/png -I/opt/VTK-6.1.0/ThirdParty/png -I/opt/VTK-6.1.0/build/ThirdParty/tiff -I/opt/VTK-6.1.0/ThirdParty/tiff -I/opt/VTK-6.1.0/build/Rendering/Annotation -I/opt/VTK-6.1.0/Rendering/Annotation -I/opt/VTK-6.1.0/build/Rendering/FreeType -I/opt/VTK-6.1.0/Rendering/FreeType -I/opt/VTK-6.1.0/build/ThirdParty/freetype -I/opt/VTK-6.1.0/ThirdParty/freetype -I/opt/VTK-6.1.0/ThirdParty/ftgl/src -I/opt/VTK-6.1.0/build/ThirdParty/ftgl -I/opt/VTK-6.1.0/ThirdParty/ftgl -I/opt/VTK-6.1.0/build/Rendering/Volume -I/opt/VTK-6.1.0/Rendering/Volume -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks -I/opt/VTK-6.1.0/build/Rendering/OpenGL -I/opt/VTK-6.1.0/Rendering/OpenGL -I/opt/VTK-6.1.0/build/Utilities/ParseOGLExt -I/opt/VTK-6.1.0/Utilities/ParseOGLExt -I/opt/VTK-6.1.0/build/Utilities/EncodeString -I/opt/VTK-6.1.0/Utilities/EncodeString -I/opt/VTK-6.1.0/build/ThirdParty/TclTk -I/opt/VTK-6.1.0/ThirdParty/TclTk -I/opt/VTK-6.1.0/build/Rendering/Tk -I/opt/VTK-6.1.0/Rendering/Tk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers -I/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.5 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers -I/opt/VTK-6.1.0/Wrapping/Tcl -I/opt/VTK-6.1.0/build/Wrapping/Tcl -o CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o -c /opt/VTK-6.1.0/Rendering/Tk/vtkCocoaTkUtilities.mm /opt/VTK-6.1.0/Rendering/Tk/vtkCocoaTkUtilities.mm:57:28: error: no member named 'view' in 'TkWindowPrivate' NSView *result = macWin->view; ~~~~~~ ^ 1 error generated. make[2]: *** [Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o] Error 1 make[1]: *** [Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/all] Error 2 make: *** [all] Error 2 If I get clang to print out the tk.h and tcl.h header files, it shows the following: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers/tcl.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers/tk.h Do you have any suggestions as to what might be going wrong here? Best wishes, Jens On 15 September 2014 13:27, David Gobbi wrote: > Hi Jens, > > I looked through FindTCL.cmake, and it looks like it tries to match > the header to the library. Since it tries but fails, this could be > considered a bug. > > - David > > > On Mon, Sep 15, 2014 at 3:21 AM, Jens wrote: > > Hi David, > > > > Many thanks for the quick and very helpful reply. As you suspected there > was > > a mismatch between the tcl/tk headers. The headers were coming from: > > > > /usr/local/include > > > > and the libraries from: > > > > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework > > > > I've pointed both at the /Applications/... directories and the build has > now > > got beyond that point, so thanks again for your help. > > > > Would that be considered a bug in cmake, or just bad luck on my part? > > > > I hadn't knowingly installed anything tk/tcl related on my machine (it's > a > > new macbook air and I've not loaded much software at all onto it), so > I've > > no idea where the stuff in /usr/local came from. > > > > However, if cmake had found the include files in /usr/local, shouldn't it > > also have used the related libraries in /usr/local? > > > > Best wishes, > > > > Jens > > > > > > > > On 14 September 2014 22:34, David Gobbi wrote: > >> > >> Hi Jens, > >> > >> If the VTK build is looking for a function called Tcl_GetErrorLine(), > >> that means that it is using a "tcl.h" for Tcl 8.6. This function > doesn't > >> exist in Tcl 8.5 or earlier versions of Tcl. > >> > >> My guess is that you have installed Tcl 8.6 on your system, and > >> CMake has found the Tcl 8.6 headers, but is linking to the Tcl 8.5 > >> libraries in the System folder. > >> > >> Make sure that your CMakeCache.txt use the same framework for > >> all the Tcl variables: > >> > >> TCL_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tcl.framework/Headers > >> TCL_LIBRARY:FILEPATH=/System/Library/Frameworks/Tcl.framework > >> TCL_TCLSH:FILEPATH=/usr/bin/tclsh > >> TK_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tk.framework/Headers > >> > >> > TK_INTERNAL_PATH:PATH=/System/Library/Frameworks/Tk.framework/PrivateHeaders > >> TK_LIBRARY:FILEPATH=/System/Library/Frameworks/Tk.framework > >> > >> If you still have problems after setting your cache as shown above, then > >> you might have to find and remove the tcl.h file that is causing the > >> error. > >> > >> - David > >> > >> > >> On Sun, Sep 14, 2014 at 2:57 PM, Jens wrote: > >> > Hi, > >> > > >> > I'm trying to build VTK 6.1.1 with the Tk and Python bindings on OSX > >> > 10.9.4, > >> > with cmake 3.0.2 and At 5.3.1. > >> > > >> > The build is failing with: > >> > > >> > /usr/bin/c++ -g -isysroot > >> > > >> > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk > >> > -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version > >> > 1.0.0 > >> > -current_version 1.0.0 -o ../../lib/libvtkCommonCoreTCL-6.1.1.dylib > >> > -install_name /opt/VTK-6.1.0/build/lib/libvtkCommonCoreTCL-6.1.1.dylib > >> > > >> > ...snip... > >> > > >> > CMakeFiles/vtkCommonCoreTCL.dir/vtkTypeFloat64ArrayTcl.cxx.o > >> > CMakeFiles/vtkCommonCoreTCL.dir/vtkCommonCoreTCLInit.cxx.o > >> > CMakeFiles/vtkCommonCoreTCL.dir/__/__/Wrapping/Tcl/vtkTclUtil.cxx.o > >> > ../../lib/libvtkCommonCore-6.1.1.dylib ../../lib/libvtksys-6.1.1.dylib > >> > -framework tcl -lm > >> > > >> > Undefined symbols for architecture x86_64: > >> > > >> > "_Tcl_GetErrorLine", referenced from: > >> > > >> > vtkTclVoidFunc(void*) in vtkTclUtil.cxx.o > >> > > >> > vtkTclCommand::Execute(vtkObject*, unsigned long, void*) in > >> > vtkTclUtil.cxx.o > >> > > >> > ld: symbol(s) not found for architecture x86_64 > >> > > >> > clang: error: linker command failed with exit code 1 (use -v to see > >> > invocation) > >> > > >> > make[2]: *** [lib/libvtkCommonCoreTCL-6.1.1.dylib] Error 1 > >> > > >> > make[1]: *** [Common/Core/CMakeFiles/vtkCommonCoreTCL.dir/all] Error 2 > >> > > >> > > >> > Can anyone suggest a workaround? > >> > > >> > > >> > Best wishes, > >> > > >> > > >> > Jens > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Wed Sep 17 06:36:54 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Wed, 17 Sep 2014 03:36:54 -0700 (PDT) Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS Message-ID: <1410950214699-5728759.post@n5.nabble.com> Recently I am focusing on Volume Rendering using VTK ubuntu OS, recently I found a problem releated memory.It seemly takes more memory on linux os than windows os with the same code and same input image. In order to test my idea, I have done the following things: In the VTK's directory, there is an Example named GPURenderDemo,so I compile this example and run on linux and windows operating system, and my inout image data's size is 335 MB. And the occupied memory on windows is 460 MB, but 739 MB on linux. Someone can tell me what happened on window os and on linux os? Many thanks and best wishes! Looking forward to everyone reply! -- View this message in context: http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759.html Sent from the VTK - Users mailing list archive at Nabble.com. From majcjc at gmail.com Wed Sep 17 07:17:30 2014 From: majcjc at gmail.com (Lin M) Date: Wed, 17 Sep 2014 19:17:30 +0800 Subject: [vtkusers] How to get data ptr from the vtkpolydata? Message-ID: Hi all, I try to get the data ptr which I think is a double * pointing to a double array from vtkpolydata but I met an access violation when I use double *skullTemplate = vtkDoubleArray::SafeDownCast(m_SkullMesh->GetOutput()->GetPoints()->GetData())->GetPointer(0); m_SkullMesh is a vtkPolyData. How can I do to get it work? Thank you! Best, Lin -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Wed Sep 17 07:41:41 2014 From: daviddoria at gmail.com (David Doria) Date: Wed, 17 Sep 2014 07:41:41 -0400 Subject: [vtkusers] How to get data ptr from the vtkpolydata? In-Reply-To: References: Message-ID: On Wed, Sep 17, 2014 at 7:17 AM, Lin M wrote: > Hi all, > > I try to get the data ptr which I think is a double * pointing to a double > array from vtkpolydata but I met an access violation when I use > > double *skullTemplate = > vtkDoubleArray::SafeDownCast(m_SkullMesh->GetOutput()->GetPoints()->GetData())->GetPointer(0); > > m_SkullMesh is a vtkPolyData. > > How can I do to get it work? Thank you! > > Best, > Lin > Please post the smallest, compilable code you can that demonstrates the problem. From what you've shown, one error is that you shouldn't have to GetOutput() from a vtkPolyData. David -------------- next part -------------- An HTML attachment was scrubbed... URL: From majcjc at gmail.com Wed Sep 17 07:52:38 2014 From: majcjc at gmail.com (Lin M) Date: Wed, 17 Sep 2014 19:52:38 +0800 Subject: [vtkusers] How to get data ptr from the vtkpolydata? In-Reply-To: References: Message-ID: Thank you for your advice, David. I made a mistake, m_SkullMesh is a vtkOBJReader and the m_SkullMesh->GetOutput() should be a vtkPolyData. I hope to get the point array of it. The code I wrote before could work properly int meshNum = m_SkullMesh->GetOutput()->GetNumberOfPoints(); double *skullTemplate = new double[3*meshNum]; for(int i = 0; i < meshNum; ++i) { double* temp = m_SkullMesh->GetOutput()->GetPoint(i); skullTemplate[3*i] = temp[0]; skullTemplate[3*i+1] = temp[1]; skullTemplate[3*i+2] = temp[2]; } But I think it should have a better way to avoid the copy and get the data pointer directly. Can you give me some suggestion? Thank you! Best, Lin On Wed, Sep 17, 2014 at 7:41 PM, David Doria wrote: > On Wed, Sep 17, 2014 at 7:17 AM, Lin M wrote: > >> Hi all, >> >> I try to get the data ptr which I think is a double * pointing to a >> double array from vtkpolydata but I met an access violation when I use >> >> double *skullTemplate = >> vtkDoubleArray::SafeDownCast(m_SkullMesh->GetOutput()->GetPoints()->GetData())->GetPointer(0); >> >> m_SkullMesh is a vtkPolyData. >> >> How can I do to get it work? Thank you! >> >> Best, >> Lin >> > > Please post the smallest, compilable code you can that demonstrates the > problem. From what you've shown, one error is that you shouldn't have to > GetOutput() from a vtkPolyData. > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Wed Sep 17 07:56:07 2014 From: daviddoria at gmail.com (David Doria) Date: Wed, 17 Sep 2014 07:56:07 -0400 Subject: [vtkusers] How to get data ptr from the vtkpolydata? In-Reply-To: References: Message-ID: On Wed, Sep 17, 2014 at 7:52 AM, Lin M wrote: > Thank you for your advice, David. > > I made a mistake, m_SkullMesh is a vtkOBJReader and the > m_SkullMesh->GetOutput() should be a vtkPolyData. > > I hope to get the point array of it. The code I wrote before could work > properly > > int meshNum = m_SkullMesh->GetOutput()->GetNumberOfPoints(); > double *skullTemplate = new double[3*meshNum]; > for(int i = 0; i < meshNum; ++i) { > double* temp = m_SkullMesh->GetOutput()->GetPoint(i); > skullTemplate[3*i] = temp[0]; > skullTemplate[3*i+1] = temp[1]; > skullTemplate[3*i+2] = temp[2]; > } > > But I think it should have a better way to avoid the copy and get the data > pointer directly. Can you give me some suggestion? Thank you! > > Best, > Lin > Again, please post compilable code. My first guess would be that you did not update the reader before using the data you are expecting from GetOutput(). Try adding a m_SkullMesh->Update() before the block of code you've posted. David -------------- next part -------------- An HTML attachment was scrubbed... URL: From majcjc at gmail.com Wed Sep 17 08:26:52 2014 From: majcjc at gmail.com (Lin M) Date: Wed, 17 Sep 2014 20:26:52 +0800 Subject: [vtkusers] How to get data ptr from the vtkpolydata? In-Reply-To: References: Message-ID: My code is splitted in many parts... I hope this time it contains most related parts. It should be compilable if you put it into a main() function const char *fileName_str = "xxxxx.obj"; vtkSmartPointer< vtkOBJReader > m_SkullMesh = vtkSmartPointer< vtkOBJReader >::New(); m_SkullMesh->SetFileName(fileName_str); m_SkullMesh->Update(); double *skullTemplate = new double[3*meshNum]; int meshNum = m_SkullMesh->GetOutput()->GetNumberOfPoints(); for (int i = 0; i < meshNum; ++i) { double* temp = m_SkullMesh->GetOutput()->GetPoint(i); skullTemplate[3*i] = temp[0]; skullTemplate[3*i+1] = temp[1]; skullTemplate[3*i+2] = temp[2]; } I have called update before and I can indeed get access to each point using m_SkullMesh->GetOutput()->GetPoint(i). The code I post above is workable. After the for loop, all the points in vtkpolydata is stored in skullTemplate and have correct results. What I asked is that I think copy each point data into a double array is not a very efficient way and it should be possible to get the pointer to the internal array of all points. So I tried to use another way as below const char *fileName_str = ba.data(); m_SkullMesh = vtkSmartPointer< vtkOBJReader >::New(); m_SkullMesh->SetFileName(fileName_str); m_SkullMesh->Update(); double *skullTemplate = vtkDoubleArray::SafeDownCast(m_SkullMesh->GetOutput()->GetPoints()->GetData())->GetPointer(0); This will have a run-time error. Best, Lin On Wed, Sep 17, 2014 at 7:56 PM, David Doria wrote: > On Wed, Sep 17, 2014 at 7:52 AM, Lin M wrote: > >> Thank you for your advice, David. >> >> I made a mistake, m_SkullMesh is a vtkOBJReader and the >> m_SkullMesh->GetOutput() should be a vtkPolyData. >> >> I hope to get the point array of it. The code I wrote before could work >> properly >> >> int meshNum = m_SkullMesh->GetOutput()->GetNumberOfPoints(); >> double *skullTemplate = new double[3*meshNum]; >> for(int i = 0; i < meshNum; ++i) { >> double* temp = m_SkullMesh->GetOutput()->GetPoint(i); >> skullTemplate[3*i] = temp[0]; >> skullTemplate[3*i+1] = temp[1]; >> skullTemplate[3*i+2] = temp[2]; >> } >> >> But I think it should have a better way to avoid the copy and get the >> data pointer directly. Can you give me some suggestion? Thank you! >> >> Best, >> Lin >> > > Again, please post compilable code. My first guess would be that you did > not update the reader before using the data you are expecting from > GetOutput(). Try adding a m_SkullMesh->Update() before the block of code > you've posted. > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 17 08:38:32 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Sep 2014 06:38:32 -0600 Subject: [vtkusers] Failing VTK 6.1.1 build with Tk/Python on OSX 10.9.4 In-Reply-To: References: Message-ID: Hi Jens, On my machine (which is also 10.9.4), my cache has the following: TK_INTERNAL_PATH:PATH=/System/Library/Frameworks/Tk.framework/PrivateHeaders An "ls -l" of the framework directory shows this, where Current -> 8.5 PrivateHeaders -> Versions/Current/PrivateHeaders The above link should have been created by Xcode. The TK_INTERNAL_PATH variable is set in Rendering/Tk/CMakeLists.txt, and it definitely looks in PrivateHeaders before looking anywhere else. Does the PrivateHeaders directory exist in your framework directory? My machine has this: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/PrivateHeaders I have Xcode 5.1.1, and I also have the Xcode command-line tools installed. - David On Wed, Sep 17, 2014 at 4:06 AM, Jens wrote: > Hi David, > > I'm still struggling to get this build to work. I pointed the CMakeCache.txt > at the correct header and library directories (for tk 8.5), but it persisted > in setting: > > TK_INTERNAL_PATH:PATH=/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.6 > > i.e. for version 8.6. In the end I manually set TK_INTERNAL_PATH so that it > pointed at tk 8.5. > > The settings in my CMakeCache.txt are therefore: > > //Path to a file. > > TCL_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers > > //Path to a library. > > TCL_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework > > //Path to a program. > > TCL_TCLSH:FILEPATH=/usr/bin/tclsh > > //Path to a file. > > TK_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers > > //The path to the Tk internal headers (tkMacOSXDefault.h). > > TK_INTERNAL_PATH:PATH=/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.5 > > //Path to a library. > > TK_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework > > > and just for reference, a long-listing of the tk.framework/Versions > directory shows: > > Current -> 8.5 > > > i.e. I'm pretty certain I should be using 8.5. > > > If I now run the make, it dies as follows: > > > [ 59%] Building CXX object > Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o > > cd /opt/VTK-6.1.0/build/Rendering/Tk && /usr/bin/c++ -DVTK_IN_VTK > -DvtkRenderingPythonTkWidgets_EXPORTS -g -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk > -fPIC -I/opt/VTK-6.1.0/build/Interaction/Image > -I/opt/VTK-6.1.0/Interaction/Image -I/opt/VTK-6.1.0/build/Imaging/Color > -I/opt/VTK-6.1.0/Imaging/Color -I/opt/VTK-6.1.0/build/Imaging/Core > -I/opt/VTK-6.1.0/Imaging/Core -I/opt/VTK-6.1.0/build/Common/ExecutionModel > -I/opt/VTK-6.1.0/Common/ExecutionModel > -I/opt/VTK-6.1.0/build/Common/DataModel -I/opt/VTK-6.1.0/Common/DataModel > -I/opt/VTK-6.1.0/build/Common/Math -I/opt/VTK-6.1.0/Common/Math > -I/opt/VTK-6.1.0/build/Common/Core -I/opt/VTK-6.1.0/Common/Core > -I/opt/VTK-6.1.0/build/Utilities/KWSys -I/opt/VTK-6.1.0/Utilities/KWSys > -I/opt/VTK-6.1.0/build/Common/Misc -I/opt/VTK-6.1.0/Common/Misc > -I/opt/VTK-6.1.0/build/Common/System -I/opt/VTK-6.1.0/Common/System > -I/opt/VTK-6.1.0/build/Common/Transforms -I/opt/VTK-6.1.0/Common/Transforms > -I/opt/VTK-6.1.0/build/Interaction/Style -I/opt/VTK-6.1.0/Interaction/Style > -I/opt/VTK-6.1.0/build/Filters/Extraction > -I/opt/VTK-6.1.0/Filters/Extraction -I/opt/VTK-6.1.0/build/Filters/Core > -I/opt/VTK-6.1.0/Filters/Core -I/opt/VTK-6.1.0/build/Filters/General > -I/opt/VTK-6.1.0/Filters/General > -I/opt/VTK-6.1.0/build/Common/ComputationalGeometry > -I/opt/VTK-6.1.0/Common/ComputationalGeometry > -I/opt/VTK-6.1.0/build/Filters/Statistics > -I/opt/VTK-6.1.0/Filters/Statistics -I/opt/VTK-6.1.0/build/Imaging/Fourier > -I/opt/VTK-6.1.0/Imaging/Fourier -I/opt/VTK-6.1.0/build/ThirdParty/alglib > -I/opt/VTK-6.1.0/ThirdParty/alglib -I/opt/VTK-6.1.0/build/Filters/Sources > -I/opt/VTK-6.1.0/Filters/Sources -I/opt/VTK-6.1.0/build/Rendering/Core > -I/opt/VTK-6.1.0/Rendering/Core -I/opt/VTK-6.1.0/build/Filters/Geometry > -I/opt/VTK-6.1.0/Filters/Geometry -I/opt/VTK-6.1.0/build/Interaction/Widgets > -I/opt/VTK-6.1.0/Interaction/Widgets -I/opt/VTK-6.1.0/build/Filters/Hybrid > -I/opt/VTK-6.1.0/Filters/Hybrid -I/opt/VTK-6.1.0/build/Imaging/Sources > -I/opt/VTK-6.1.0/Imaging/Sources -I/opt/VTK-6.1.0/build/Filters/Modeling > -I/opt/VTK-6.1.0/Filters/Modeling -I/opt/VTK-6.1.0/build/Imaging/General > -I/opt/VTK-6.1.0/Imaging/General -I/opt/VTK-6.1.0/build/Imaging/Hybrid > -I/opt/VTK-6.1.0/Imaging/Hybrid -I/opt/VTK-6.1.0/build/IO/Image > -I/opt/VTK-6.1.0/IO/Image -I/opt/VTK-6.1.0/build/Utilities/DICOMParser > -I/opt/VTK-6.1.0/Utilities/DICOMParser -I/opt/VTK-6.1.0/build/IO/Core > -I/opt/VTK-6.1.0/IO/Core -I/opt/VTK-6.1.0/build/ThirdParty/zlib > -I/opt/VTK-6.1.0/ThirdParty/zlib > -I/opt/VTK-6.1.0/build/Utilities/MetaIO/vtkmetaio > -I/opt/VTK-6.1.0/build/Utilities/MetaIO -I/opt/VTK-6.1.0/Utilities/MetaIO > -I/opt/VTK-6.1.0/build/ThirdParty/jpeg -I/opt/VTK-6.1.0/ThirdParty/jpeg > -I/opt/VTK-6.1.0/build/ThirdParty/png -I/opt/VTK-6.1.0/ThirdParty/png > -I/opt/VTK-6.1.0/build/ThirdParty/tiff -I/opt/VTK-6.1.0/ThirdParty/tiff > -I/opt/VTK-6.1.0/build/Rendering/Annotation > -I/opt/VTK-6.1.0/Rendering/Annotation > -I/opt/VTK-6.1.0/build/Rendering/FreeType > -I/opt/VTK-6.1.0/Rendering/FreeType > -I/opt/VTK-6.1.0/build/ThirdParty/freetype > -I/opt/VTK-6.1.0/ThirdParty/freetype -I/opt/VTK-6.1.0/ThirdParty/ftgl/src > -I/opt/VTK-6.1.0/build/ThirdParty/ftgl -I/opt/VTK-6.1.0/ThirdParty/ftgl > -I/opt/VTK-6.1.0/build/Rendering/Volume -I/opt/VTK-6.1.0/Rendering/Volume > -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks > -I/opt/VTK-6.1.0/build/Rendering/OpenGL -I/opt/VTK-6.1.0/Rendering/OpenGL > -I/opt/VTK-6.1.0/build/Utilities/ParseOGLExt > -I/opt/VTK-6.1.0/Utilities/ParseOGLExt > -I/opt/VTK-6.1.0/build/Utilities/EncodeString > -I/opt/VTK-6.1.0/Utilities/EncodeString > -I/opt/VTK-6.1.0/build/ThirdParty/TclTk -I/opt/VTK-6.1.0/ThirdParty/TclTk > -I/opt/VTK-6.1.0/build/Rendering/Tk -I/opt/VTK-6.1.0/Rendering/Tk > -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers > -I/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.5 > -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers > -I/opt/VTK-6.1.0/Wrapping/Tcl -I/opt/VTK-6.1.0/build/Wrapping/Tcl -o > CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o -c > /opt/VTK-6.1.0/Rendering/Tk/vtkCocoaTkUtilities.mm > > /opt/VTK-6.1.0/Rendering/Tk/vtkCocoaTkUtilities.mm:57:28: error: no member > named 'view' in 'TkWindowPrivate' > > NSView *result = macWin->view; > > ~~~~~~ ^ > > 1 error generated. > > make[2]: *** > [Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o] > Error 1 > > make[1]: *** [Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/all] > Error 2 > > make: *** [all] Error 2 > > If I get clang to print out the tk.h and tcl.h header files, it shows the > following: > > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers/tcl.h > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers/tk.h > > > Do you have any suggestions as to what might be going wrong here? > > > Best wishes, > > > Jens > > > On 15 September 2014 13:27, David Gobbi wrote: >> >> Hi Jens, >> >> I looked through FindTCL.cmake, and it looks like it tries to match >> the header to the library. Since it tries but fails, this could be >> considered a bug. >> >> - David >> >> >> On Mon, Sep 15, 2014 at 3:21 AM, Jens wrote: >> > Hi David, >> > >> > Many thanks for the quick and very helpful reply. As you suspected there >> > was >> > a mismatch between the tcl/tk headers. The headers were coming from: >> > >> > /usr/local/include >> > >> > and the libraries from: >> > >> > >> > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework >> > >> > I've pointed both at the /Applications/... directories and the build has >> > now >> > got beyond that point, so thanks again for your help. >> > >> > Would that be considered a bug in cmake, or just bad luck on my part? >> > >> > I hadn't knowingly installed anything tk/tcl related on my machine (it's >> > a >> > new macbook air and I've not loaded much software at all onto it), so >> > I've >> > no idea where the stuff in /usr/local came from. >> > >> > However, if cmake had found the include files in /usr/local, shouldn't >> > it >> > also have used the related libraries in /usr/local? >> > >> > Best wishes, >> > >> > Jens >> > >> > >> > >> > On 14 September 2014 22:34, David Gobbi wrote: >> >> >> >> Hi Jens, >> >> >> >> If the VTK build is looking for a function called Tcl_GetErrorLine(), >> >> that means that it is using a "tcl.h" for Tcl 8.6. This function >> >> doesn't >> >> exist in Tcl 8.5 or earlier versions of Tcl. >> >> >> >> My guess is that you have installed Tcl 8.6 on your system, and >> >> CMake has found the Tcl 8.6 headers, but is linking to the Tcl 8.5 >> >> libraries in the System folder. >> >> >> >> Make sure that your CMakeCache.txt use the same framework for >> >> all the Tcl variables: >> >> >> >> TCL_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tcl.framework/Headers >> >> TCL_LIBRARY:FILEPATH=/System/Library/Frameworks/Tcl.framework >> >> TCL_TCLSH:FILEPATH=/usr/bin/tclsh >> >> TK_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tk.framework/Headers >> >> >> >> >> >> TK_INTERNAL_PATH:PATH=/System/Library/Frameworks/Tk.framework/PrivateHeaders >> >> TK_LIBRARY:FILEPATH=/System/Library/Frameworks/Tk.framework >> >> >> >> If you still have problems after setting your cache as shown above, >> >> then >> >> you might have to find and remove the tcl.h file that is causing the >> >> error. >> >> >> >> - David >> >> >> >> >> >> On Sun, Sep 14, 2014 at 2:57 PM, Jens wrote: >> >> > Hi, >> >> > >> >> > I'm trying to build VTK 6.1.1 with the Tk and Python bindings on OSX >> >> > 10.9.4, >> >> > with cmake 3.0.2 and At 5.3.1. >> >> > >> >> > The build is failing with: >> >> > >> >> > /usr/bin/c++ -g -isysroot >> >> > >> >> > >> >> > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk >> >> > -dynamiclib -Wl,-headerpad_max_install_names >> >> > -compatibility_version >> >> > 1.0.0 >> >> > -current_version 1.0.0 -o ../../lib/libvtkCommonCoreTCL-6.1.1.dylib >> >> > -install_name >> >> > /opt/VTK-6.1.0/build/lib/libvtkCommonCoreTCL-6.1.1.dylib >> >> > >> >> > ...snip... >> >> > >> >> > CMakeFiles/vtkCommonCoreTCL.dir/vtkTypeFloat64ArrayTcl.cxx.o >> >> > CMakeFiles/vtkCommonCoreTCL.dir/vtkCommonCoreTCLInit.cxx.o >> >> > CMakeFiles/vtkCommonCoreTCL.dir/__/__/Wrapping/Tcl/vtkTclUtil.cxx.o >> >> > ../../lib/libvtkCommonCore-6.1.1.dylib >> >> > ../../lib/libvtksys-6.1.1.dylib >> >> > -framework tcl -lm >> >> > >> >> > Undefined symbols for architecture x86_64: >> >> > >> >> > "_Tcl_GetErrorLine", referenced from: >> >> > >> >> > vtkTclVoidFunc(void*) in vtkTclUtil.cxx.o >> >> > >> >> > vtkTclCommand::Execute(vtkObject*, unsigned long, void*) in >> >> > vtkTclUtil.cxx.o >> >> > >> >> > ld: symbol(s) not found for architecture x86_64 >> >> > >> >> > clang: error: linker command failed with exit code 1 (use -v to see >> >> > invocation) >> >> > >> >> > make[2]: *** [lib/libvtkCommonCoreTCL-6.1.1.dylib] Error 1 >> >> > >> >> > make[1]: *** [Common/Core/CMakeFiles/vtkCommonCoreTCL.dir/all] Error >> >> > 2 >> >> > >> >> > >> >> > Can anyone suggest a workaround? >> >> > >> >> > >> >> > Best wishes, >> >> > >> >> > >> >> > Jens >> > >> > > > From aashish.chaudhary at kitware.com Wed Sep 17 09:18:58 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 17 Sep 2014 09:18:58 -0400 Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: <1410950214699-5728759.post@n5.nabble.com> References: <1410950214699-5728759.post@n5.nabble.com> Message-ID: <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> It could be that on Linux we are seeing two copies of the volume data in the main memory may be because the driver is keeping one as well. Is this nvidia or ati? Did you try different datasets? What version of the driver? Any chance you can post the data as well? Thanks Sent from my iPhone > On Sep 17, 2014, at 6:36 AM, Emptystack wrote: > > Recently I am focusing on Volume Rendering using VTK ubuntu OS, recently I > found a problem releated memory.It seemly takes more memory on linux os than > windows os with the same code and same input image. In order to test my > idea, I have done the following things: > In the VTK's directory, there is an Example named GPURenderDemo,so I > compile this example and run on linux and windows operating system, and my > inout image data's size is 335 MB. And the occupied memory on windows is 460 > MB, but 739 MB on linux. Someone can tell me what happened on window os and > on linux os? > > Many thanks and best wishes! > > Looking forward to everyone reply! > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From adrian.gabriel at 4plus.de Wed Sep 17 10:56:35 2014 From: adrian.gabriel at 4plus.de (Najzero) Date: Wed, 17 Sep 2014 07:56:35 -0700 (PDT) Subject: [vtkusers] Cut/Paste region of vtkImageData defined by a contour Message-ID: <1410965795568-5728767.post@n5.nabble.com> Hello everyone, I currently have the joy of refacturing some code from an old project to enable new functions. It is running on vtk 5.6 with some local patches ( saying that, because I can't use vtkLassooStencilSource ). *What I understand there is:* - a vtkImageData (filled/scaled from DICOM source) - a set of points that is defined as a "contour" drawn by an user ( can be in any 2d form, most of the time its a rectangle, but you user can free draw) - a button saying "cut" to extract the pixels from the vtkImageData, creating a new vtkImageData and leaving a black hole in the origin image. The old solution uses a bunch of nasty hacks, filling a mask with some magic numbers... long story short, only the guy who wrote that stuff 5 years ago knows what he did ( then ). *What I did/tried* Found example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageStencil hard coded an example by using the vtkImageToImageStencil and simply used two stencils; one with ReverseStencil on and one with off. Leaving me with the data to update the old plane texture and one to stick to the newly object. After that success, I thought to change it to use a vtkPolyDataToImageStencil and feed it with the contour-points. /Pseudo Code:/ vtkSmartPointer pol2stenc = ...; pol2stenc->SetInput( contourPoly ); + Update(); vtkSmartPointer imgstenc ...; imgstenc->SetInput(getBmpPixelData()); imgstenc->SetStencil(pol2stenc->GetOutput()); imgstenc->SetBackgroundValue(0); imgstenc->Update(); But it simply does not work - maybe I am missing some requirements for the polydata to feed to the vtkPolyDataToImageStencil? Or I simply forgot to set an vector for an filter ( image is orientated in world according to patient orientation in DICOM dataset ) As I am not quite aware of the vtk "language", it could be that I overlooked an awesomely easy example how to cut into 2d vtkImageData by an area defined by points, so any idea is welcome. Any hints, even RTFM ones are welcome Best Regards, Adrian -- View this message in context: http://vtk.1045678.n5.nabble.com/Cut-Paste-region-of-vtkImageData-defined-by-a-contour-tp5728767.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Sep 17 11:41:26 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Sep 2014 09:41:26 -0600 Subject: [vtkusers] Cut/Paste region of vtkImageData defined by a contour In-Reply-To: <1410965795568-5728767.post@n5.nabble.com> References: <1410965795568-5728767.post@n5.nabble.com> Message-ID: On Wed, Sep 17, 2014 at 8:56 AM, Najzero wrote: > Hello everyone, > > I currently have the joy of refacturing some code from an old project to > enable new functions. > It is running on vtk 5.6 with some local patches ( saying that, because I > can't use vtkLassooStencilSource ). Why not? It was never removed from VTK. E.g. in VTK 6: VTK/Imaging/Stencil/vtkLassoStencilSource.h Or do you mean that you're planning to stick with VTK 5.6? > *What I understand there is:* > - a vtkImageData (filled/scaled from DICOM source) > - a set of points that is defined as a "contour" drawn by an user ( can be > in any 2d form, most of the time its a rectangle, but you user can free > draw) > - a button saying "cut" to extract the pixels from the vtkImageData, > creating a new vtkImageData and leaving a black hole in the origin image. > > The old solution uses a bunch of nasty hacks, filling a mask with some magic > numbers... long story short, only the guy who wrote that stuff 5 years ago > knows what he did ( then ). Very common problem, with two solutions: 1) reverse engineer the code, or 2) rewrite from scratch ;) The tricky thing is that all the crazy stuff in the original code is probably there for a reason, so a re-write is likely to be just as crazy (but hopefully better documented). > *What I did/tried* > Found example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageStencil > hard coded an example by using the vtkImageToImageStencil and simply used > two stencils; one with ReverseStencil on and one with off. > Leaving me with the data to update the old plane texture and one to stick to > the newly object. > > After that success, I thought to change it to use a > vtkPolyDataToImageStencil and feed it with the contour-points. > > /Pseudo Code:/ > vtkSmartPointer pol2stenc = ...; > pol2stenc->SetInput( contourPoly ); + Update(); For vtkPolyDataToImageStencil, you also need to set the following: pol2stenc->SetOutputOrigin(origin); pol2stenc->SetOutputSpacing(spacing); pol2stenc->SetOutputWholeExtent(extent); Or you can call the SetInformationInput() with an updated image, which will copy the origin, spacing, and extent from that time. Also note the following: If you are using VTK 5.6 and cannot upgrade, then vtkPolyDataToImageStencil will not even work for you. Originally vtkPolyDataToImageStencil filter required that the input was a closed surface (i.e. made of triangle or polygon faces). It was only much later (either VTK 5.8 or VTK 5.10, I can't remember which) when it could use polyline contours. - David From chris.marsh at usask.ca Wed Sep 17 12:20:14 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Wed, 17 Sep 2014 10:20:14 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Further to this: Tri bounds xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 gridpoints bounds xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 gridDelaunay bounds xmin:1 xmax:-1 ymin:1 ymax:-1 It appears the final triangulation of the probed points is the problem vtkSmartPointer gridDelaunay = vtkSmartPointer::New(); gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() ); vtkSmartPointer gridWriter = vtkSmartPointer::New(); gridWriter->SetFileName ( file_name.c_str()); gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); gridWriter->Write(); Is this final triangulation required? Is there a better way of doing this? Thanks, Chris On Tue, Sep 16, 2014 at 7:03 PM, Chris Marsh wrote: > Ah I see resolution is just subdivisions. > http://www.vtk.org/doc/nightly/html/classvtkPlaneSource.html#acd65f04a453ba87b766048f0e7597710 > > I have also confirmed bbox matches exactly the values that GetBounds() > reports. > > On Tue, Sep 16, 2014 at 6:16 PM, Chris Marsh wrote: > >> Yes, I was trying to be optimistic :( Good call on the bounds: >> vtu export: xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 >> vtp export: xmin:1 xmax:-1 ymin:1 ymax:-1 >> >> Presumably the problem. I'm unclear why it is doing this though? >> >> vtkSmartPointer gridPoints = >> vtkSmartPointer::New(); >> >> int gridSize = 1000; >> gridPoints->SetResolution(gridSize, gridSize); >> gridPoints->SetOrigin(bbox.vertex(0).x(), bbox.vertex(0).y(), 0); >> gridPoints->SetPoint1(bbox.vertex(2).x(), bbox.vertex(0).y(), 0); >> gridPoints->SetPoint2(bbox.vertex(0).x(), bbox.vertex(2).y(), 0); >> gridPoints->Update(); >> >> where bbox is a bounding box (2D), index 0 is bottom left, indexing is >> increasing CCW. So 2 is upper right corner. As far as I can tell this is >> correct and corresponds to the vtu export numbers I had above. >> >> I feel like I perhaps don't understand resolution: I envision it as the >> size of each cell, however I don't think that is correct is it? >> >> >> >> On Tue, Sep 16, 2014 at 5:23 PM, David Gobbi >> wrote: >> >>> On Tue, Sep 16, 2014 at 4:49 PM, Chris Marsh >>> wrote: >>> >>> > The interpolation doesn't look very good, even after increasing the >>> > resolution. As well, it is flipped along the y-axis. Image is a >>> mountain, >>> > variable is air temp (blue = cold, red = warm). >>> > See here: http://imgur.com/l1KpcS0 >>> >>> Honestly, I can't see any correspondence at all between the mountain >>> and the interpolated data on that plane. Are you sure the size and >>> position of the plane matches the size and position of your data? >>> An easy way to check is to call GetBounds() on both of them and >>> print out the bounds. They should match. >>> >>> > Secondly: I need to iterate over the rows/cols of this interpolated >>> grid in >>> > order to write it to an ArcGIS ascii file. What would be the best way >>> to do >>> > this? The fact it is now in a delaunay triangulation somewhat doesn't >>> help >>> > (now that I think about it!) >>> >>> The interpolated data can be retrieved via GetPointData()->GetScalars(), >>> but I'm not sure what ordering the vtkPlaneSource uses for its points. >>> You can print GetPoint(0) and GetPoint(1) to see whether the points >>> increase in the X direction or Y direction first. >>> >>> Also, watch for off-by-one mistakes. SetResolution(1, 1) gives a plane >>> with 4 points (the corners). So if you want a plane with 4x4 points, you >>> would SetResolution(3, 3). >>> >>> - David >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 17 12:34:14 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Sep 2014 10:34:14 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Hi Chris, The plane is already composed of cells, so you should not run it through Delaunay. If you want to convert its polygons (rectangles) into triangles, you should do so with vtkTriangleFilter. Delanay2D: triangulate unconnected points TriangleFilter: triangulate cells (e.g. convert polys to triangles) But there is no need to triangulate the plane. It's original set of rectangular polygons should be just fine for what you are doing. As for the bad bounds you get from gridDelaunay, it looks like you didn't call Update on the filter before getting the bounds from its output. The output of a filter is always invalid until you call Update on the filter. - David On Wed, Sep 17, 2014 at 10:20 AM, Chris Marsh wrote: > Further to this: > > Tri bounds xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 > gridpoints bounds xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 > gridDelaunay bounds xmin:1 xmax:-1 ymin:1 ymax:-1 > > It appears the final triangulation of the probed points is the problem > > vtkSmartPointer gridDelaunay = > vtkSmartPointer::New(); > gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() ); > > vtkSmartPointer gridWriter = > vtkSmartPointer::New(); > gridWriter->SetFileName ( file_name.c_str()); > gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); > gridWriter->Write(); > > Is this final triangulation required? Is there a better way of doing this? > > Thanks, Chris > > On Tue, Sep 16, 2014 at 7:03 PM, Chris Marsh wrote: >> >> Ah I see resolution is just subdivisions. >> http://www.vtk.org/doc/nightly/html/classvtkPlaneSource.html#acd65f04a453ba87b766048f0e7597710 >> >> I have also confirmed bbox matches exactly the values that GetBounds() >> reports. >> >> On Tue, Sep 16, 2014 at 6:16 PM, Chris Marsh wrote: >>> >>> Yes, I was trying to be optimistic :( Good call on the bounds: >>> vtu export: xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 >>> vtp export: xmin:1 xmax:-1 ymin:1 ymax:-1 >>> >>> Presumably the problem. I'm unclear why it is doing this though? >>> >>> vtkSmartPointer gridPoints = >>> vtkSmartPointer::New(); >>> >>> int gridSize = 1000; >>> gridPoints->SetResolution(gridSize, gridSize); >>> gridPoints->SetOrigin(bbox.vertex(0).x(), bbox.vertex(0).y(), 0); >>> gridPoints->SetPoint1(bbox.vertex(2).x(), bbox.vertex(0).y(), 0); >>> gridPoints->SetPoint2(bbox.vertex(0).x(), bbox.vertex(2).y(), 0); >>> gridPoints->Update(); >>> >>> where bbox is a bounding box (2D), index 0 is bottom left, indexing is >>> increasing CCW. So 2 is upper right corner. As far as I can tell this is >>> correct and corresponds to the vtu export numbers I had above. >>> >>> I feel like I perhaps don't understand resolution: I envision it as the >>> size of each cell, however I don't think that is correct is it? >>> >>> >>> >>> On Tue, Sep 16, 2014 at 5:23 PM, David Gobbi >>> wrote: >>>> >>>> On Tue, Sep 16, 2014 at 4:49 PM, Chris Marsh >>>> wrote: >>>> >>>> > The interpolation doesn't look very good, even after increasing the >>>> > resolution. As well, it is flipped along the y-axis. Image is a >>>> > mountain, >>>> > variable is air temp (blue = cold, red = warm). >>>> > See here: http://imgur.com/l1KpcS0 >>>> >>>> Honestly, I can't see any correspondence at all between the mountain >>>> and the interpolated data on that plane. Are you sure the size and >>>> position of the plane matches the size and position of your data? >>>> An easy way to check is to call GetBounds() on both of them and >>>> print out the bounds. They should match. >>>> >>>> > Secondly: I need to iterate over the rows/cols of this interpolated >>>> > grid in >>>> > order to write it to an ArcGIS ascii file. What would be the best way >>>> > to do >>>> > this? The fact it is now in a delaunay triangulation somewhat doesn't >>>> > help >>>> > (now that I think about it!) >>>> >>>> The interpolated data can be retrieved via GetPointData()->GetScalars(), >>>> but I'm not sure what ordering the vtkPlaneSource uses for its points. >>>> You can print GetPoint(0) and GetPoint(1) to see whether the points >>>> increase in the X direction or Y direction first. >>>> >>>> Also, watch for off-by-one mistakes. SetResolution(1, 1) gives a plane >>>> with 4 points (the corners). So if you want a plane with 4x4 points, >>>> you >>>> would SetResolution(3, 3). >>>> >>>> - David >>> >>> >> > From chris.marsh at usask.ca Wed Sep 17 12:45:39 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Wed, 17 Sep 2014 10:45:39 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Hi David, Thanks for the reply, this is slowly starting to make sense. That call did in fact fix the bounds issues. However, the output still looks like it did in the above screenshot. >The plane is already composed of cells, so you should not run it through Delaunay. This is what perplexed me about the above linked example. What is the best way to write the probe results to a file then? Saving the after-probe'd grid does not produce the expected output. gridWriter->SetInputConnection ( gridPoints->GetOutputPort()); gridWriter->Write(); I feel like I am missing something simple. Thanks for the help. Chris Marsh PhD Student chrismarsh.ca 13 Kirk Hall University of Saskatchewan On Wed, Sep 17, 2014 at 10:34 AM, David Gobbi wrote: > Hi Chris, > > The plane is already composed of cells, so you should not run it > through Delaunay. If you want to convert its polygons (rectangles) > into triangles, you should do so with vtkTriangleFilter. > > Delanay2D: triangulate unconnected points > > TriangleFilter: triangulate cells (e.g. convert polys to triangles) > > But there is no need to triangulate the plane. It's original set of > rectangular polygons should be just fine for what you are doing. > > > As for the bad bounds you get from gridDelaunay, it looks like > you didn't call Update on the filter before getting the bounds from > its output. The output of a filter is always invalid until you call > Update on the filter. > > - David > > > On Wed, Sep 17, 2014 at 10:20 AM, Chris Marsh > wrote: > > Further to this: > > > > Tri bounds xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 > > gridpoints bounds xmin:624714 xmax:629904 ymin:5.64502e+06 > ymax:5.64877e+06 > > gridDelaunay bounds xmin:1 xmax:-1 ymin:1 ymax:-1 > > > > It appears the final triangulation of the probed points is the problem > > > > vtkSmartPointer gridDelaunay = > > vtkSmartPointer::New(); > > gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() ); > > > > vtkSmartPointer gridWriter = > > vtkSmartPointer::New(); > > gridWriter->SetFileName ( file_name.c_str()); > > gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); > > gridWriter->Write(); > > > > Is this final triangulation required? Is there a better way of doing > this? > > > > Thanks, Chris > > > > On Tue, Sep 16, 2014 at 7:03 PM, Chris Marsh > wrote: > >> > >> Ah I see resolution is just subdivisions. > >> > http://www.vtk.org/doc/nightly/html/classvtkPlaneSource.html#acd65f04a453ba87b766048f0e7597710 > >> > >> I have also confirmed bbox matches exactly the values that GetBounds() > >> reports. > >> > >> On Tue, Sep 16, 2014 at 6:16 PM, Chris Marsh > wrote: > >>> > >>> Yes, I was trying to be optimistic :( Good call on the bounds: > >>> vtu export: xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 > >>> vtp export: xmin:1 xmax:-1 ymin:1 ymax:-1 > >>> > >>> Presumably the problem. I'm unclear why it is doing this though? > >>> > >>> vtkSmartPointer gridPoints = > >>> vtkSmartPointer::New(); > >>> > >>> int gridSize = 1000; > >>> gridPoints->SetResolution(gridSize, gridSize); > >>> gridPoints->SetOrigin(bbox.vertex(0).x(), bbox.vertex(0).y(), 0); > >>> gridPoints->SetPoint1(bbox.vertex(2).x(), bbox.vertex(0).y(), 0); > >>> gridPoints->SetPoint2(bbox.vertex(0).x(), bbox.vertex(2).y(), 0); > >>> gridPoints->Update(); > >>> > >>> where bbox is a bounding box (2D), index 0 is bottom left, indexing is > >>> increasing CCW. So 2 is upper right corner. As far as I can tell this > is > >>> correct and corresponds to the vtu export numbers I had above. > >>> > >>> I feel like I perhaps don't understand resolution: I envision it as the > >>> size of each cell, however I don't think that is correct is it? > >>> > >>> > >>> > >>> On Tue, Sep 16, 2014 at 5:23 PM, David Gobbi > >>> wrote: > >>>> > >>>> On Tue, Sep 16, 2014 at 4:49 PM, Chris Marsh > >>>> wrote: > >>>> > >>>> > The interpolation doesn't look very good, even after increasing the > >>>> > resolution. As well, it is flipped along the y-axis. Image is a > >>>> > mountain, > >>>> > variable is air temp (blue = cold, red = warm). > >>>> > See here: http://imgur.com/l1KpcS0 > >>>> > >>>> Honestly, I can't see any correspondence at all between the mountain > >>>> and the interpolated data on that plane. Are you sure the size and > >>>> position of the plane matches the size and position of your data? > >>>> An easy way to check is to call GetBounds() on both of them and > >>>> print out the bounds. They should match. > >>>> > >>>> > Secondly: I need to iterate over the rows/cols of this interpolated > >>>> > grid in > >>>> > order to write it to an ArcGIS ascii file. What would be the best > way > >>>> > to do > >>>> > this? The fact it is now in a delaunay triangulation somewhat > doesn't > >>>> > help > >>>> > (now that I think about it!) > >>>> > >>>> The interpolated data can be retrieved via > GetPointData()->GetScalars(), > >>>> but I'm not sure what ordering the vtkPlaneSource uses for its points. > >>>> You can print GetPoint(0) and GetPoint(1) to see whether the points > >>>> increase in the X direction or Y direction first. > >>>> > >>>> Also, watch for off-by-one mistakes. SetResolution(1, 1) gives a > plane > >>>> with 4 points (the corners). So if you want a plane with 4x4 points, > >>>> you > >>>> would SetResolution(3, 3). > >>>> > >>>> - David > >>> > >>> > >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Sep 17 12:59:53 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 17 Sep 2014 12:59:53 -0400 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Not to confuse things, but this example uses two different methods to interpolate: http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/InterpolateTerrain Bill On Wed, Sep 17, 2014 at 12:45 PM, Chris Marsh wrote: > Hi David, > > Thanks for the reply, this is slowly starting to make sense. That call did > in fact fix the bounds issues. However, the output still looks like it did > in the above screenshot. > >>The plane is already composed of cells, so you should not run it > through Delaunay. > > This is what perplexed me about the above linked example. > > What is the best way to write the probe results to a file then? > > > Saving the after-probe'd grid does not produce the expected output. > gridWriter->SetInputConnection ( gridPoints->GetOutputPort()); > gridWriter->Write(); > > I feel like I am missing something simple. Thanks for the help. > > Chris Marsh > PhD Student > chrismarsh.ca > > 13 Kirk Hall > University of Saskatchewan > > On Wed, Sep 17, 2014 at 10:34 AM, David Gobbi wrote: >> >> Hi Chris, >> >> The plane is already composed of cells, so you should not run it >> through Delaunay. If you want to convert its polygons (rectangles) >> into triangles, you should do so with vtkTriangleFilter. >> >> Delanay2D: triangulate unconnected points >> >> TriangleFilter: triangulate cells (e.g. convert polys to triangles) >> >> But there is no need to triangulate the plane. It's original set of >> rectangular polygons should be just fine for what you are doing. >> >> >> As for the bad bounds you get from gridDelaunay, it looks like >> you didn't call Update on the filter before getting the bounds from >> its output. The output of a filter is always invalid until you call >> Update on the filter. >> >> - David >> >> >> On Wed, Sep 17, 2014 at 10:20 AM, Chris Marsh >> wrote: >> > Further to this: >> > >> > Tri bounds xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 >> > gridpoints bounds xmin:624714 xmax:629904 ymin:5.64502e+06 >> > ymax:5.64877e+06 >> > gridDelaunay bounds xmin:1 xmax:-1 ymin:1 ymax:-1 >> > >> > It appears the final triangulation of the probed points is the problem >> > >> > vtkSmartPointer gridDelaunay = >> > vtkSmartPointer::New(); >> > gridDelaunay->SetInputConnection ( probeFilter->GetOutputPort() ); >> > >> > vtkSmartPointer gridWriter = >> > vtkSmartPointer::New(); >> > gridWriter->SetFileName ( file_name.c_str()); >> > gridWriter->SetInputConnection ( gridDelaunay->GetOutputPort() ); >> > gridWriter->Write(); >> > >> > Is this final triangulation required? Is there a better way of doing >> > this? >> > >> > Thanks, Chris >> > >> > On Tue, Sep 16, 2014 at 7:03 PM, Chris Marsh >> > wrote: >> >> >> >> Ah I see resolution is just subdivisions. >> >> >> >> http://www.vtk.org/doc/nightly/html/classvtkPlaneSource.html#acd65f04a453ba87b766048f0e7597710 >> >> >> >> I have also confirmed bbox matches exactly the values that GetBounds() >> >> reports. >> >> >> >> On Tue, Sep 16, 2014 at 6:16 PM, Chris Marsh >> >> wrote: >> >>> >> >>> Yes, I was trying to be optimistic :( Good call on the bounds: >> >>> vtu export: xmin:624714 xmax:629904 ymin:5.64502e+06 ymax:5.64877e+06 >> >>> vtp export: xmin:1 xmax:-1 ymin:1 ymax:-1 >> >>> >> >>> Presumably the problem. I'm unclear why it is doing this though? >> >>> >> >>> vtkSmartPointer gridPoints = >> >>> vtkSmartPointer::New(); >> >>> >> >>> int gridSize = 1000; >> >>> gridPoints->SetResolution(gridSize, gridSize); >> >>> gridPoints->SetOrigin(bbox.vertex(0).x(), bbox.vertex(0).y(), 0); >> >>> gridPoints->SetPoint1(bbox.vertex(2).x(), bbox.vertex(0).y(), 0); >> >>> gridPoints->SetPoint2(bbox.vertex(0).x(), bbox.vertex(2).y(), 0); >> >>> gridPoints->Update(); >> >>> >> >>> where bbox is a bounding box (2D), index 0 is bottom left, indexing is >> >>> increasing CCW. So 2 is upper right corner. As far as I can tell this >> >>> is >> >>> correct and corresponds to the vtu export numbers I had above. >> >>> >> >>> I feel like I perhaps don't understand resolution: I envision it as >> >>> the >> >>> size of each cell, however I don't think that is correct is it? >> >>> >> >>> >> >>> >> >>> On Tue, Sep 16, 2014 at 5:23 PM, David Gobbi >> >>> wrote: >> >>>> >> >>>> On Tue, Sep 16, 2014 at 4:49 PM, Chris Marsh >> >>>> wrote: >> >>>> >> >>>> > The interpolation doesn't look very good, even after increasing the >> >>>> > resolution. As well, it is flipped along the y-axis. Image is a >> >>>> > mountain, >> >>>> > variable is air temp (blue = cold, red = warm). >> >>>> > See here: http://imgur.com/l1KpcS0 >> >>>> >> >>>> Honestly, I can't see any correspondence at all between the mountain >> >>>> and the interpolated data on that plane. Are you sure the size and >> >>>> position of the plane matches the size and position of your data? >> >>>> An easy way to check is to call GetBounds() on both of them and >> >>>> print out the bounds. They should match. >> >>>> >> >>>> > Secondly: I need to iterate over the rows/cols of this interpolated >> >>>> > grid in >> >>>> > order to write it to an ArcGIS ascii file. What would be the best >> >>>> > way >> >>>> > to do >> >>>> > this? The fact it is now in a delaunay triangulation somewhat >> >>>> > doesn't >> >>>> > help >> >>>> > (now that I think about it!) >> >>>> >> >>>> The interpolated data can be retrieved via >> >>>> GetPointData()->GetScalars(), >> >>>> but I'm not sure what ordering the vtkPlaneSource uses for its >> >>>> points. >> >>>> You can print GetPoint(0) and GetPoint(1) to see whether the points >> >>>> increase in the X direction or Y direction first. >> >>>> >> >>>> Also, watch for off-by-one mistakes. SetResolution(1, 1) gives a >> >>>> plane >> >>>> with 4 points (the corners). So if you want a plane with 4x4 points, >> >>>> you >> >>>> would SetResolution(3, 3). >> >>>> >> >>>> - David >> >>> >> >>> >> >> >> > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Wed Sep 17 13:00:30 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Sep 2014 11:00:30 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: On Wed, Sep 17, 2014 at 10:45 AM, Chris Marsh wrote: > Hi David, > > Thanks for the reply, this is slowly starting to make sense. That call did > in fact fix the bounds issues. However, the output still looks like it did > in the above screenshot. > >>The plane is already composed of cells, so you should not run it > through Delaunay. > > This is what perplexed me about the above linked example. > > What is the best way to write the probe results to a file then? At the beginning, I was hinting that you should probe with a vtkImageData, which you could have written out as an image (either as raw data, or as a png, etc). But now that you have the probed data as a polydata plane, you'll have to get the scalars that are associated with the points that make up the polydata. GetPointData()->GetScalars() will return an array that contains all the scalars. See the VTK text for an in-depth description of how data is stored in a VTK data set. - David From will.schroeder at kitware.com Wed Sep 17 13:39:16 2014 From: will.schroeder at kitware.com (Will Schroeder) Date: Wed, 17 Sep 2014 13:39:16 -0400 Subject: [vtkusers] [vtk-developers] REMINDER: Bug tracker hack-a-ton In-Reply-To: References: Message-ID: There is lots of room at our offices. And especially those in nearby areas like Cambridge, MA (e.g., Steve P. and Nicole) we'd love to have you come visit. W On Tue, Sep 16, 2014 at 4:03 PM, Berk Geveci wrote: > Hi folks, > > This is a reminder that on October 2nd, we are holding a bug tracker > hack-a-ton, 9am-5pm. The goal is to clean up our bug tracker as best as we > can. We will be hosting folks at our Clifton Park office as well as holding > a Google Hangout for those attending remotely. Here is the list of > attendees that I know so far: > > - Bill Lorensen, > - Dave Cole, > - Sean McBride, > - Will Schroeder, > - me, > - Ben Boeckel, > - Chuck Atkins, > - Shawn Waldon, > - Marcus Hanwell, > - Dave DeMarle, > - Jamie Wright, > - Tim Meehan. > > If you are not on this list and you are interested in attending, please > let me know. > > Best, > -berk > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -- William J. Schroeder, PhD Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cafaro at dis.uniroma1.it Wed Sep 17 13:58:58 2014 From: cafaro at dis.uniroma1.it (Bruno Cafaro) Date: Wed, 17 Sep 2014 19:58:58 +0200 Subject: [vtkusers] vtkCamera focal distance Message-ID: <5419CBE2.5040707@dis.uniroma1.it> Hi All, hope someone can help: I use vtk 5.8 and i'm tryng to get the K matrix for the vtkCamera, as defined in Hartley and Zisserman: alpha_x s p_x K = alpha_y p_y 1 I know it is based on the OpenGL camera, so i already gave a look to: http://ksimek.github.io/2013/06/03/calibrated_cameras_in_opengl/ and http://strawlab.org/2011/11/05/augmented-reality-with-OpenGL/ However i am not interesed in setting a particular value for the alpha_x and alpha_y, but only in retrieving their values, as the i need to reproject some points which are not in the renderer, in the same camera, for postprocessing. What i need is to know the alpha_x and alpha_y values, also with p_x and p_y. For what i have understood in the previous posts i should use vtkCamera::GetProjectionTransformMatrix(aspect,ranges[0],ranges[1]) where aspect=window_width/window_eight and ranges come from vtkCamera::GetClippingRange(ranges) the result i get is this: 2.79904 0 0 0 0 3.73205 0 0 0 0 -1000.02 -10.0001 0 0 -1 0 but i'm almost sure there is something wrong. -- Bruno Cafaro PhD Student Dip.to Ingegneria informatica, automatica e gestionale "Antonio Ruberti" Universit? "La Sapienza" Via Ariosto, 25 00185 Roma Tel: +390677274155 From david.gobbi at gmail.com Wed Sep 17 13:59:07 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Sep 2014 11:59:07 -0600 Subject: [vtkusers] [vtk-developers] REMINDER: Bug tracker hack-a-ton In-Reply-To: References: Message-ID: I can send some photons and be there as a telepresence. On Wed, Sep 17, 2014 at 11:39 AM, Will Schroeder wrote: > There is lots of room at our offices. And especially those in nearby areas > like Cambridge, MA (e.g., Steve P. and Nicole) we'd love to have you come > visit. > > W > > On Tue, Sep 16, 2014 at 4:03 PM, Berk Geveci > wrote: >> >> Hi folks, >> >> This is a reminder that on October 2nd, we are holding a bug tracker >> hack-a-ton, 9am-5pm. The goal is to clean up our bug tracker as best as we >> can. We will be hosting folks at our Clifton Park office as well as holding >> a Google Hangout for those attending remotely. Here is the list of attendees >> that I know so far: >> >> - Bill Lorensen, >> - Dave Cole, >> - Sean McBride, >> - Will Schroeder, >> - me, >> - Ben Boeckel, >> - Chuck Atkins, >> - Shawn Waldon, >> - Marcus Hanwell, >> - Dave DeMarle, >> - Jamie Wright, >> - Tim Meehan. >> >> If you are not on this list and you are interested in attending, please >> let me know. >> >> Best, >> -berk From adrian.gabriel at 4plus.de Wed Sep 17 14:01:37 2014 From: adrian.gabriel at 4plus.de (Najzero) Date: Wed, 17 Sep 2014 11:01:37 -0700 (PDT) Subject: [vtkusers] Cut/Paste region of vtkImageData defined by a contour In-Reply-To: References: <1410965795568-5728767.post@n5.nabble.com> Message-ID: <1410976897541-5728779.post@n5.nabble.com> Hi David, since you answered on a lot ImageStancil questions and wrote the Lassoo one yourself ( i believe ) I was hoping from a word from you. David Gobbi wrote > Why not? It was never removed from VTK. E.g. in VTK 6: > VTK/Imaging/Stencil/vtkLassoStencilSource.h > Or do you mean that you're planning to stick with VTK 5.6? Well, yes I am stuck at VTK 5.6 most likely ( thats why I started to patch some files by hand ) as the whole project used own classes for... everything ( rendermanager, windowmanger, widget... ). If any api changed ( and they did... like the good old SetInput() in some cases ) I will fall neck deep into [censored]. I already had the Origin/Spacing/Extend inside my code and took them from the vktImageData ( hoping it was correct ). As you said, vtkPolyDataToImageStencil will not work for me as I dont have a closed surfce ( damn it, I thought so, as it got improved alot with later versions where I used it once ).. so I am afraid I have to ask. Can I form one closed surface by myself? vtkDelauny(3d?) and vtkSurfaceReconstructionFilter comming to mind - the old programmer was so nice to ensure some things about the "self genius programmed contour". It has to have at least 3 points and the points are drawn "in a kind of order" ( by mouse movement if mouse 1 is pressed down or by single clicks at the current location ) and he even coded the logic to draw lines between the points and the "closing line" between point 1 and point n. As it is only 2d ( one coordinate always gets zero'ed ), the triangulation could work? -- View this message in context: http://vtk.1045678.n5.nabble.com/Cut-Paste-region-of-vtkImageData-defined-by-a-contour-tp5728767p5728779.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Sep 17 14:29:29 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Sep 2014 12:29:29 -0600 Subject: [vtkusers] Cut/Paste region of vtkImageData defined by a contour In-Reply-To: <1410976897541-5728779.post@n5.nabble.com> References: <1410965795568-5728767.post@n5.nabble.com> <1410976897541-5728779.post@n5.nabble.com> Message-ID: On Wed, Sep 17, 2014 at 12:01 PM, Najzero wrote: > > Well, yes I am stuck at VTK 5.6 most likely ( thats why I started to patch > some files by hand ) as the whole project used own classes for... everything > ( rendermanager, windowmanger, widget... ). > If any api changed ( and they did... like the good old SetInput() in some > cases ) I will fall neck deep into [censored]. I strongly suggest that you upgrade to at least VTK 5.10, otherwise a lot of advice that I give you will be useless. VTK 5.6 was so long ago that I can't even remember what features it does or doesn't have. > I already had the Origin/Spacing/Extend inside my code and took them from > the vktImageData ( hoping it was correct ). > As you said, vtkPolyDataToImageStencil will not work for me as I dont have a > closed surfce ( damn it, I thought so, as it got improved alot with later > versions where I used it once ).. so I am afraid I have to ask. > > Can I form one closed surface by myself? > vtkDelauny(3d?) and vtkSurfaceReconstructionFilter comming to mind - the old > programmer was so nice to ensure some things about the "self genius > programmed contour". The what? Anyway, no, neither delaunay or vtkSurfaceReconstructionFilter are the right approach. You can use vtkLinearExtrusionFilter to convert a contour into a surface (though the surface won't be closed). What you are attempting to do will be very messy with VTK 5.6. Either upgrade to a newer VTK, or at least backport vtkPolyDataToImageStencil and related classes from VTK 5.10. - David From chris.marsh at usask.ca Wed Sep 17 14:49:45 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Wed, 17 Sep 2014 12:49:45 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Hi all, Thanks for persevering with me. I got it working correctly with vtkPlaneSource. The problem ended up being a PEBKAC with how I was using the Delaunay2D class: When converting from CGAL to vtkUnstructuredgrid, you need to index the face values and vertices separately while maintaining connectivity. Because you are defining the connectivity, this works. However! with vtkDelaunay2D, you can't do this. Rather, for each vertex that is added to 'points', the face data must be added 3-times. Which this isn't quite perfect, it should work fine, unless there is a way of using an unstructured mesh and a probe filter? http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/GeometryFilter suggests you can? So I will have to play around with that more. Thanks again, much appreciated. Chris Marsh PhD Student chrismarsh.ca 13 Kirk Hall University of Saskatchewan On Wed, Sep 17, 2014 at 11:00 AM, David Gobbi wrote: > On Wed, Sep 17, 2014 at 10:45 AM, Chris Marsh > wrote: > > Hi David, > > > > Thanks for the reply, this is slowly starting to make sense. That call > did > > in fact fix the bounds issues. However, the output still looks like it > did > > in the above screenshot. > > > >>The plane is already composed of cells, so you should not run it > > through Delaunay. > > > > This is what perplexed me about the above linked example. > > > > What is the best way to write the probe results to a file then? > > At the beginning, I was hinting that you should probe with a > vtkImageData, which you could have written out as an image > (either as raw data, or as a png, etc). But now that you have > the probed data as a polydata plane, you'll have to get the > scalars that are associated with the points that make up the > polydata. GetPointData()->GetScalars() will return an array > that contains all the scalars. See the VTK text for an in-depth > description of how data is stored in a VTK data set. > > - David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 17 14:53:22 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Sep 2014 12:53:22 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: I'm not sure if I've understood, but if your original data already has connectivity (i.e. faces), then why are you using vtkDelaunay2D at all? On Wed, Sep 17, 2014 at 12:49 PM, Chris Marsh wrote: > Hi all, > > Thanks for persevering with me. I got it working correctly with > vtkPlaneSource. > > The problem ended up being a PEBKAC with how I was using the Delaunay2D > class: When converting from CGAL to vtkUnstructuredgrid, you need to index > the face values and vertices separately while maintaining connectivity. > Because you are defining the connectivity, this works. However! with > vtkDelaunay2D, you can't do this. Rather, for each vertex that is added to > 'points', the face data must be added 3-times. Which this isn't quite > perfect, it should work fine, unless there is a way of using an unstructured > mesh and a probe filter? > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/GeometryFilter suggests > you can? So I will have to play around with that more. > > Thanks again, much appreciated. > > Chris Marsh > PhD Student > chrismarsh.ca > > 13 Kirk Hall > University of Saskatchewan > > On Wed, Sep 17, 2014 at 11:00 AM, David Gobbi wrote: >> >> On Wed, Sep 17, 2014 at 10:45 AM, Chris Marsh >> wrote: >> > Hi David, >> > >> > Thanks for the reply, this is slowly starting to make sense. That call >> > did >> > in fact fix the bounds issues. However, the output still looks like it >> > did >> > in the above screenshot. >> > >> >>The plane is already composed of cells, so you should not run it >> > through Delaunay. >> > >> > This is what perplexed me about the above linked example. >> > >> > What is the best way to write the probe results to a file then? >> >> At the beginning, I was hinting that you should probe with a >> vtkImageData, which you could have written out as an image >> (either as raw data, or as a png, etc). But now that you have >> the probed data as a polydata plane, you'll have to get the >> scalars that are associated with the points that make up the >> polydata. GetPointData()->GetScalars() will return an array >> that contains all the scalars. See the VTK text for an in-depth >> description of how data is stored in a VTK data set. >> >> - David > > From chris.marsh at usask.ca Wed Sep 17 14:55:55 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Wed, 17 Sep 2014 12:55:55 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Because, at this point, I just wanted to get something working, and all the example code has Delaunay2D. Figured it was a good start :) Agreed though that it is non-optimal in the long run. Chris Marsh PhD Student chrismarsh.ca 13 Kirk Hall University of Saskatchewan On Wed, Sep 17, 2014 at 12:53 PM, David Gobbi wrote: > I'm not sure if I've understood, but if your original data already has > connectivity (i.e. faces), then why are you using vtkDelaunay2D at all? > > On Wed, Sep 17, 2014 at 12:49 PM, Chris Marsh > wrote: > > Hi all, > > > > Thanks for persevering with me. I got it working correctly with > > vtkPlaneSource. > > > > The problem ended up being a PEBKAC with how I was using the Delaunay2D > > class: When converting from CGAL to vtkUnstructuredgrid, you need to > index > > the face values and vertices separately while maintaining connectivity. > > Because you are defining the connectivity, this works. However! with > > vtkDelaunay2D, you can't do this. Rather, for each vertex that is added > to > > 'points', the face data must be added 3-times. Which this isn't quite > > perfect, it should work fine, unless there is a way of using an > unstructured > > mesh and a probe filter? > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/GeometryFilter > suggests > > you can? So I will have to play around with that more. > > > > Thanks again, much appreciated. > > > > Chris Marsh > > PhD Student > > chrismarsh.ca > > > > 13 Kirk Hall > > University of Saskatchewan > > > > On Wed, Sep 17, 2014 at 11:00 AM, David Gobbi > wrote: > >> > >> On Wed, Sep 17, 2014 at 10:45 AM, Chris Marsh > >> wrote: > >> > Hi David, > >> > > >> > Thanks for the reply, this is slowly starting to make sense. That call > >> > did > >> > in fact fix the bounds issues. However, the output still looks like it > >> > did > >> > in the above screenshot. > >> > > >> >>The plane is already composed of cells, so you should not run it > >> > through Delaunay. > >> > > >> > This is what perplexed me about the above linked example. > >> > > >> > What is the best way to write the probe results to a file then? > >> > >> At the beginning, I was hinting that you should probe with a > >> vtkImageData, which you could have written out as an image > >> (either as raw data, or as a png, etc). But now that you have > >> the probed data as a polydata plane, you'll have to get the > >> scalars that are associated with the points that make up the > >> polydata. GetPointData()->GetScalars() will return an array > >> that contains all the scalars. See the VTK text for an in-depth > >> description of how data is stored in a VTK data set. > >> > >> - David > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From linucks42 at gmail.com Wed Sep 17 14:57:10 2014 From: linucks42 at gmail.com (Jens) Date: Wed, 17 Sep 2014 19:57:10 +0100 Subject: [vtkusers] Failing VTK 6.1.1 build with Tk/Python on OSX 10.9.4 In-Reply-To: References: Message-ID: Hi David, I have the latter, but not the first: jmht$ ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/PrivateHeaders default.h tkInt.h tkIntPlatDecls.h tkMacOSXInt.h tkPort.h ttkTheme.h tkFont.h tkIntDecls.h tkMacOSXDefault.h tkMacOSXPort.h ttkDecls.h jmht$ ls /System/Library/Frameworks/Tk.framework/PrivateHeaders ls: /System/Library/Frameworks/Tk.framework/PrivateHeaders: No such file or directory In fact, there aren't any header files at all in /System/Library/Frameworks/Tk.framework I'm running Xcode 5.1.1 (5B1008) and also have the command-line tools installed. Best wishes, Jens On 17 September 2014 13:38, David Gobbi wrote: > Hi Jens, > > On my machine (which is also 10.9.4), my cache has the following: > > > TK_INTERNAL_PATH:PATH=/System/Library/Frameworks/Tk.framework/PrivateHeaders > > An "ls -l" of the framework directory shows this, where Current -> 8.5 > > PrivateHeaders -> Versions/Current/PrivateHeaders > > The above link should have been created by Xcode. > > The TK_INTERNAL_PATH variable is set in Rendering/Tk/CMakeLists.txt, > and it definitely looks in PrivateHeaders before looking anywhere else. > Does > the PrivateHeaders directory exist in your framework directory? My machine > has this: > > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/PrivateHeaders > > I have Xcode 5.1.1, and I also have the Xcode command-line tools installed. > > - David > > On Wed, Sep 17, 2014 at 4:06 AM, Jens wrote: > > Hi David, > > > > I'm still struggling to get this build to work. I pointed the > CMakeCache.txt > > at the correct header and library directories (for tk 8.5), but it > persisted > > in setting: > > > > TK_INTERNAL_PATH:PATH=/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.6 > > > > i.e. for version 8.6. In the end I manually set TK_INTERNAL_PATH so that > it > > pointed at tk 8.5. > > > > The settings in my CMakeCache.txt are therefore: > > > > //Path to a file. > > > > > TCL_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers > > > > //Path to a library. > > > > > TCL_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework > > > > //Path to a program. > > > > TCL_TCLSH:FILEPATH=/usr/bin/tclsh > > > > //Path to a file. > > > > > TK_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers > > > > //The path to the Tk internal headers (tkMacOSXDefault.h). > > > > TK_INTERNAL_PATH:PATH=/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.5 > > > > //Path to a library. > > > > > TK_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework > > > > > > and just for reference, a long-listing of the tk.framework/Versions > > directory shows: > > > > Current -> 8.5 > > > > > > i.e. I'm pretty certain I should be using 8.5. > > > > > > If I now run the make, it dies as follows: > > > > > > [ 59%] Building CXX object > > > Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o > > > > cd /opt/VTK-6.1.0/build/Rendering/Tk && /usr/bin/c++ -DVTK_IN_VTK > > -DvtkRenderingPythonTkWidgets_EXPORTS -g -isysroot > > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk > > -fPIC -I/opt/VTK-6.1.0/build/Interaction/Image > > -I/opt/VTK-6.1.0/Interaction/Image -I/opt/VTK-6.1.0/build/Imaging/Color > > -I/opt/VTK-6.1.0/Imaging/Color -I/opt/VTK-6.1.0/build/Imaging/Core > > -I/opt/VTK-6.1.0/Imaging/Core > -I/opt/VTK-6.1.0/build/Common/ExecutionModel > > -I/opt/VTK-6.1.0/Common/ExecutionModel > > -I/opt/VTK-6.1.0/build/Common/DataModel -I/opt/VTK-6.1.0/Common/DataModel > > -I/opt/VTK-6.1.0/build/Common/Math -I/opt/VTK-6.1.0/Common/Math > > -I/opt/VTK-6.1.0/build/Common/Core -I/opt/VTK-6.1.0/Common/Core > > -I/opt/VTK-6.1.0/build/Utilities/KWSys -I/opt/VTK-6.1.0/Utilities/KWSys > > -I/opt/VTK-6.1.0/build/Common/Misc -I/opt/VTK-6.1.0/Common/Misc > > -I/opt/VTK-6.1.0/build/Common/System -I/opt/VTK-6.1.0/Common/System > > -I/opt/VTK-6.1.0/build/Common/Transforms > -I/opt/VTK-6.1.0/Common/Transforms > > -I/opt/VTK-6.1.0/build/Interaction/Style > -I/opt/VTK-6.1.0/Interaction/Style > > -I/opt/VTK-6.1.0/build/Filters/Extraction > > -I/opt/VTK-6.1.0/Filters/Extraction -I/opt/VTK-6.1.0/build/Filters/Core > > -I/opt/VTK-6.1.0/Filters/Core -I/opt/VTK-6.1.0/build/Filters/General > > -I/opt/VTK-6.1.0/Filters/General > > -I/opt/VTK-6.1.0/build/Common/ComputationalGeometry > > -I/opt/VTK-6.1.0/Common/ComputationalGeometry > > -I/opt/VTK-6.1.0/build/Filters/Statistics > > -I/opt/VTK-6.1.0/Filters/Statistics > -I/opt/VTK-6.1.0/build/Imaging/Fourier > > -I/opt/VTK-6.1.0/Imaging/Fourier -I/opt/VTK-6.1.0/build/ThirdParty/alglib > > -I/opt/VTK-6.1.0/ThirdParty/alglib -I/opt/VTK-6.1.0/build/Filters/Sources > > -I/opt/VTK-6.1.0/Filters/Sources -I/opt/VTK-6.1.0/build/Rendering/Core > > -I/opt/VTK-6.1.0/Rendering/Core -I/opt/VTK-6.1.0/build/Filters/Geometry > > -I/opt/VTK-6.1.0/Filters/Geometry > -I/opt/VTK-6.1.0/build/Interaction/Widgets > > -I/opt/VTK-6.1.0/Interaction/Widgets > -I/opt/VTK-6.1.0/build/Filters/Hybrid > > -I/opt/VTK-6.1.0/Filters/Hybrid -I/opt/VTK-6.1.0/build/Imaging/Sources > > -I/opt/VTK-6.1.0/Imaging/Sources -I/opt/VTK-6.1.0/build/Filters/Modeling > > -I/opt/VTK-6.1.0/Filters/Modeling -I/opt/VTK-6.1.0/build/Imaging/General > > -I/opt/VTK-6.1.0/Imaging/General -I/opt/VTK-6.1.0/build/Imaging/Hybrid > > -I/opt/VTK-6.1.0/Imaging/Hybrid -I/opt/VTK-6.1.0/build/IO/Image > > -I/opt/VTK-6.1.0/IO/Image -I/opt/VTK-6.1.0/build/Utilities/DICOMParser > > -I/opt/VTK-6.1.0/Utilities/DICOMParser -I/opt/VTK-6.1.0/build/IO/Core > > -I/opt/VTK-6.1.0/IO/Core -I/opt/VTK-6.1.0/build/ThirdParty/zlib > > -I/opt/VTK-6.1.0/ThirdParty/zlib > > -I/opt/VTK-6.1.0/build/Utilities/MetaIO/vtkmetaio > > -I/opt/VTK-6.1.0/build/Utilities/MetaIO -I/opt/VTK-6.1.0/Utilities/MetaIO > > -I/opt/VTK-6.1.0/build/ThirdParty/jpeg -I/opt/VTK-6.1.0/ThirdParty/jpeg > > -I/opt/VTK-6.1.0/build/ThirdParty/png -I/opt/VTK-6.1.0/ThirdParty/png > > -I/opt/VTK-6.1.0/build/ThirdParty/tiff -I/opt/VTK-6.1.0/ThirdParty/tiff > > -I/opt/VTK-6.1.0/build/Rendering/Annotation > > -I/opt/VTK-6.1.0/Rendering/Annotation > > -I/opt/VTK-6.1.0/build/Rendering/FreeType > > -I/opt/VTK-6.1.0/Rendering/FreeType > > -I/opt/VTK-6.1.0/build/ThirdParty/freetype > > -I/opt/VTK-6.1.0/ThirdParty/freetype -I/opt/VTK-6.1.0/ThirdParty/ftgl/src > > -I/opt/VTK-6.1.0/build/ThirdParty/ftgl -I/opt/VTK-6.1.0/ThirdParty/ftgl > > -I/opt/VTK-6.1.0/build/Rendering/Volume -I/opt/VTK-6.1.0/Rendering/Volume > > > -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks > > -I/opt/VTK-6.1.0/build/Rendering/OpenGL -I/opt/VTK-6.1.0/Rendering/OpenGL > > -I/opt/VTK-6.1.0/build/Utilities/ParseOGLExt > > -I/opt/VTK-6.1.0/Utilities/ParseOGLExt > > -I/opt/VTK-6.1.0/build/Utilities/EncodeString > > -I/opt/VTK-6.1.0/Utilities/EncodeString > > -I/opt/VTK-6.1.0/build/ThirdParty/TclTk -I/opt/VTK-6.1.0/ThirdParty/TclTk > > -I/opt/VTK-6.1.0/build/Rendering/Tk -I/opt/VTK-6.1.0/Rendering/Tk > > > -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers > > -I/opt/VTK-6.1.0/ThirdParty/TclTk/internals/tk8.5 > > > -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers > > -I/opt/VTK-6.1.0/Wrapping/Tcl -I/opt/VTK-6.1.0/build/Wrapping/Tcl -o > > CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o -c > > /opt/VTK-6.1.0/Rendering/Tk/vtkCocoaTkUtilities.mm > > > > /opt/VTK-6.1.0/Rendering/Tk/vtkCocoaTkUtilities.mm:57:28: error: no > member > > named 'view' in 'TkWindowPrivate' > > > > NSView *result = macWin->view; > > > > ~~~~~~ ^ > > > > 1 error generated. > > > > make[2]: *** > > > [Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o] > > Error 1 > > > > make[1]: *** > [Rendering/Tk/CMakeFiles/vtkRenderingPythonTkWidgets.dir/all] > > Error 2 > > > > make: *** [all] Error 2 > > > > If I get clang to print out the tk.h and tcl.h header files, it shows the > > following: > > > > > > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework/Headers/tcl.h > > > > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tk.framework/Headers/tk.h > > > > > > Do you have any suggestions as to what might be going wrong here? > > > > > > Best wishes, > > > > > > Jens > > > > > > On 15 September 2014 13:27, David Gobbi wrote: > >> > >> Hi Jens, > >> > >> I looked through FindTCL.cmake, and it looks like it tries to match > >> the header to the library. Since it tries but fails, this could be > >> considered a bug. > >> > >> - David > >> > >> > >> On Mon, Sep 15, 2014 at 3:21 AM, Jens wrote: > >> > Hi David, > >> > > >> > Many thanks for the quick and very helpful reply. As you suspected > there > >> > was > >> > a mismatch between the tcl/tk headers. The headers were coming from: > >> > > >> > /usr/local/include > >> > > >> > and the libraries from: > >> > > >> > > >> > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/tcl.framework > >> > > >> > I've pointed both at the /Applications/... directories and the build > has > >> > now > >> > got beyond that point, so thanks again for your help. > >> > > >> > Would that be considered a bug in cmake, or just bad luck on my part? > >> > > >> > I hadn't knowingly installed anything tk/tcl related on my machine > (it's > >> > a > >> > new macbook air and I've not loaded much software at all onto it), so > >> > I've > >> > no idea where the stuff in /usr/local came from. > >> > > >> > However, if cmake had found the include files in /usr/local, shouldn't > >> > it > >> > also have used the related libraries in /usr/local? > >> > > >> > Best wishes, > >> > > >> > Jens > >> > > >> > > >> > > >> > On 14 September 2014 22:34, David Gobbi > wrote: > >> >> > >> >> Hi Jens, > >> >> > >> >> If the VTK build is looking for a function called Tcl_GetErrorLine(), > >> >> that means that it is using a "tcl.h" for Tcl 8.6. This function > >> >> doesn't > >> >> exist in Tcl 8.5 or earlier versions of Tcl. > >> >> > >> >> My guess is that you have installed Tcl 8.6 on your system, and > >> >> CMake has found the Tcl 8.6 headers, but is linking to the Tcl 8.5 > >> >> libraries in the System folder. > >> >> > >> >> Make sure that your CMakeCache.txt use the same framework for > >> >> all the Tcl variables: > >> >> > >> >> > TCL_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tcl.framework/Headers > >> >> TCL_LIBRARY:FILEPATH=/System/Library/Frameworks/Tcl.framework > >> >> TCL_TCLSH:FILEPATH=/usr/bin/tclsh > >> >> TK_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tk.framework/Headers > >> >> > >> >> > >> >> > TK_INTERNAL_PATH:PATH=/System/Library/Frameworks/Tk.framework/PrivateHeaders > >> >> TK_LIBRARY:FILEPATH=/System/Library/Frameworks/Tk.framework > >> >> > >> >> If you still have problems after setting your cache as shown above, > >> >> then > >> >> you might have to find and remove the tcl.h file that is causing the > >> >> error. > >> >> > >> >> - David > >> >> > >> >> > >> >> On Sun, Sep 14, 2014 at 2:57 PM, Jens wrote: > >> >> > Hi, > >> >> > > >> >> > I'm trying to build VTK 6.1.1 with the Tk and Python bindings on > OSX > >> >> > 10.9.4, > >> >> > with cmake 3.0.2 and At 5.3.1. > >> >> > > >> >> > The build is failing with: > >> >> > > >> >> > /usr/bin/c++ -g -isysroot > >> >> > > >> >> > > >> >> > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk > >> >> > -dynamiclib -Wl,-headerpad_max_install_names > >> >> > -compatibility_version > >> >> > 1.0.0 > >> >> > -current_version 1.0.0 -o ../../lib/libvtkCommonCoreTCL-6.1.1.dylib > >> >> > -install_name > >> >> > /opt/VTK-6.1.0/build/lib/libvtkCommonCoreTCL-6.1.1.dylib > >> >> > > >> >> > ...snip... > >> >> > > >> >> > CMakeFiles/vtkCommonCoreTCL.dir/vtkTypeFloat64ArrayTcl.cxx.o > >> >> > CMakeFiles/vtkCommonCoreTCL.dir/vtkCommonCoreTCLInit.cxx.o > >> >> > CMakeFiles/vtkCommonCoreTCL.dir/__/__/Wrapping/Tcl/vtkTclUtil.cxx.o > >> >> > ../../lib/libvtkCommonCore-6.1.1.dylib > >> >> > ../../lib/libvtksys-6.1.1.dylib > >> >> > -framework tcl -lm > >> >> > > >> >> > Undefined symbols for architecture x86_64: > >> >> > > >> >> > "_Tcl_GetErrorLine", referenced from: > >> >> > > >> >> > vtkTclVoidFunc(void*) in vtkTclUtil.cxx.o > >> >> > > >> >> > vtkTclCommand::Execute(vtkObject*, unsigned long, void*) in > >> >> > vtkTclUtil.cxx.o > >> >> > > >> >> > ld: symbol(s) not found for architecture x86_64 > >> >> > > >> >> > clang: error: linker command failed with exit code 1 (use -v to see > >> >> > invocation) > >> >> > > >> >> > make[2]: *** [lib/libvtkCommonCoreTCL-6.1.1.dylib] Error 1 > >> >> > > >> >> > make[1]: *** [Common/Core/CMakeFiles/vtkCommonCoreTCL.dir/all] > Error > >> >> > 2 > >> >> > > >> >> > > >> >> > Can anyone suggest a workaround? > >> >> > > >> >> > > >> >> > Best wishes, > >> >> > > >> >> > > >> >> > Jens > >> > > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Wed Sep 17 18:29:15 2014 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Thu, 18 Sep 2014 08:29:15 +1000 Subject: [vtkusers] REMINDER: Bug tracker hack-a-ton Message-ID: Hi Berk, Australia is a bit far from NY, so it's a bit difficult for me to be physically present :-) but I will be there in spirit! Let me know if there is anything I can help with, e.g code reviews etc. All the best with the hack-a-thon. Regards Andrew ---------- Forwarded message ---------- > From: Berk Geveci > To: VTK Developers , VTK Users > Cc: > Date: Tue, 16 Sep 2014 16:03:04 -0400 > Subject: [vtkusers] REMINDER: Bug tracker hack-a-ton > Hi folks, > > This is a reminder that on October 2nd, we are holding a bug tracker > hack-a-ton, 9am-5pm. The goal is to clean up our bug tracker as best as we > can. We will be hosting folks at our Clifton Park office as well as holding > a Google Hangout for those attending remotely. Here is the list of > attendees that I know so far: > > - Bill Lorensen, > - Dave Cole, > - Sean McBride, > - Will Schroeder, > - me, > - Ben Boeckel, > - Chuck Atkins, > - Shawn Waldon, > - Marcus Hanwell, > - Dave DeMarle, > - Jamie Wright, > - Tim Meehan. > > If you are not on this list and you are interested in attending, please > let me know. > > Best, > -berk > > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Wed Sep 17 21:54:32 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Wed, 17 Sep 2014 18:54:32 -0700 (PDT) Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> Message-ID: <1411005272089-5728793.post@n5.nabble.com> Thanks for your reply! My video display card is nvdia,and after testing some other data sets, I found that the extra memory is almost identical to the input data sets.As you said,It could be that on Linux there are two copies of the volume data in the main memory! But how can I solve this problem on linux operating system ? Best wishes! -- View this message in context: http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728793.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Wed Sep 17 22:17:22 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 17 Sep 2014 22:17:22 -0400 Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: <1411005272089-5728793.post@n5.nabble.com> References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> <1411005272089-5728793.post@n5.nabble.com> Message-ID: awesome. That confirms my suspicison. we have a new volume mapper and I would like to see if I can replicate this behavior with the new / old mapper on my system. I will report back tomorrow on this. - Aashish On Wed, Sep 17, 2014 at 9:54 PM, Emptystack wrote: > Thanks for your reply! My video display card is nvdia,and after testing > some > other data sets, I found that the extra memory is almost identical to the > input data sets.As you said,It could be that on Linux there are two copies > of the volume data in the main memory! But how can I solve this problem on > linux operating system ? > > Best wishes! > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728793.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.marsh at usask.ca Wed Sep 17 22:19:10 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Wed, 17 Sep 2014 20:19:10 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: Everything successfully works with the existing unstructured mesh instead of creating a 2nd Delaunauy2D. I did this via a geometry filter and a flattening transform filter. Are contributions to the wiki welcome? If so, I'd like to contribute a minimum example that is slightly more in-depth versus the existing examples for others like myself. Chris Marsh PhD Student chrismarsh.ca 13 Kirk Hall University of Saskatchewan On Wed, Sep 17, 2014 at 12:55 PM, Chris Marsh wrote: > Because, at this point, I just wanted to get something working, and all > the example code has Delaunay2D. Figured it was a good start :) Agreed > though that it is non-optimal in the long run. > > Chris Marsh > PhD Student > chrismarsh.ca > > 13 Kirk Hall > University of Saskatchewan > > On Wed, Sep 17, 2014 at 12:53 PM, David Gobbi > wrote: > >> I'm not sure if I've understood, but if your original data already has >> connectivity (i.e. faces), then why are you using vtkDelaunay2D at all? >> >> On Wed, Sep 17, 2014 at 12:49 PM, Chris Marsh >> wrote: >> > Hi all, >> > >> > Thanks for persevering with me. I got it working correctly with >> > vtkPlaneSource. >> > >> > The problem ended up being a PEBKAC with how I was using the Delaunay2D >> > class: When converting from CGAL to vtkUnstructuredgrid, you need to >> index >> > the face values and vertices separately while maintaining connectivity. >> > Because you are defining the connectivity, this works. However! with >> > vtkDelaunay2D, you can't do this. Rather, for each vertex that is added >> to >> > 'points', the face data must be added 3-times. Which this isn't quite >> > perfect, it should work fine, unless there is a way of using an >> unstructured >> > mesh and a probe filter? >> > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/GeometryFilter >> suggests >> > you can? So I will have to play around with that more. >> > >> > Thanks again, much appreciated. >> > >> > Chris Marsh >> > PhD Student >> > chrismarsh.ca >> > >> > 13 Kirk Hall >> > University of Saskatchewan >> > >> > On Wed, Sep 17, 2014 at 11:00 AM, David Gobbi >> wrote: >> >> >> >> On Wed, Sep 17, 2014 at 10:45 AM, Chris Marsh >> >> wrote: >> >> > Hi David, >> >> > >> >> > Thanks for the reply, this is slowly starting to make sense. That >> call >> >> > did >> >> > in fact fix the bounds issues. However, the output still looks like >> it >> >> > did >> >> > in the above screenshot. >> >> > >> >> >>The plane is already composed of cells, so you should not run it >> >> > through Delaunay. >> >> > >> >> > This is what perplexed me about the above linked example. >> >> > >> >> > What is the best way to write the probe results to a file then? >> >> >> >> At the beginning, I was hinting that you should probe with a >> >> vtkImageData, which you could have written out as an image >> >> (either as raw data, or as a png, etc). But now that you have >> >> the probed data as a polydata plane, you'll have to get the >> >> scalars that are associated with the points that make up the >> >> polydata. GetPointData()->GetScalars() will return an array >> >> that contains all the scalars. See the VTK text for an in-depth >> >> description of how data is stored in a VTK data set. >> >> >> >> - David >> > >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Wed Sep 17 22:22:31 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Wed, 17 Sep 2014 19:22:31 -0700 (PDT) Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> <1411005272089-5728793.post@n5.nabble.com> Message-ID: <1411006951765-5728796.post@n5.nabble.com> OK, Thanks! Looking forward to your reply! -- View this message in context: http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728796.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Sep 17 22:25:56 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Sep 2014 20:25:56 -0600 Subject: [vtkusers] Unstructured grid to structured grid? In-Reply-To: References: <1410818396714-5728728.post@n5.nabble.com> Message-ID: On Wed, Sep 17, 2014 at 8:19 PM, Chris Marsh wrote: > > Are contributions to the wiki welcome? Yes, definitely! Glad to hear that your code is working :) - David From adrian.gabriel at 4plus.de Thu Sep 18 04:56:14 2014 From: adrian.gabriel at 4plus.de (Najzero) Date: Thu, 18 Sep 2014 01:56:14 -0700 (PDT) Subject: [vtkusers] Cut/Paste region of vtkImageData defined by a contour In-Reply-To: References: <1410965795568-5728767.post@n5.nabble.com> <1410976897541-5728779.post@n5.nabble.com> Message-ID: <1411030574713-5728798.post@n5.nabble.com> David, thank you very much for your suggestions and clearifications. At least now I know I am not to stupid to read the examples. Would have been very nice of the old poly-stencil showed me an error if I try to input "wrong" poly data. Currently I try to build 5.10.1 into the old environment, as it is a huge moloch with win and unix hybrid build configuration of nearly every cross-target open source framework available, its gonna be alot of fun ;-). Our testers gonna scream in agony because they have to test everything before release ( if it works out anyway... still leery about that ). And before anyone thinks "omg where does this guy code?"... We are already writing a new application as an ancestor of the existing one from scratch. My manager asked me "hey, could you integrate histogram equalization and CLAHE into our existing product for quicker deployment" and I said... "suuuuure". My code for equalization works already, I just cant cut equalized images because of those darn hacks. Well, now I know why they are there and I dont wanna hunt down the old developer inventing them. Thanks again, /Adrian -- View this message in context: http://vtk.1045678.n5.nabble.com/Cut-Paste-region-of-vtkImageData-defined-by-a-contour-tp5728767p5728798.html Sent from the VTK - Users mailing list archive at Nabble.com. From eduardo.parrilla at ibv.upv.es Thu Sep 18 07:00:15 2014 From: eduardo.parrilla at ibv.upv.es (edparber_ibv) Date: Thu, 18 Sep 2014 04:00:15 -0700 (PDT) Subject: [vtkusers] Job offer Message-ID: <1411038015727-5728799.post@n5.nabble.com> Hello, I post a job offer at Biomechanics Institute of Valencia (Spain): The Instituto de Biomec?nica de Valencia (IBV ? Biomechanics Institute of Valencia) is a technological centre that studies the behavior of the human body and its interaction with products, environments and services. With the aim to improve competitiveness among the business sector, the IBV promotes people?s well-being through the combination of knowledge in areas such as biomechanics, ergonomics and emotional engineering. *JOB OFFER * JOB DESCRIPTION: RESEARCHER-TECHNOLOGIST R+D REFERENCE: PT PRS 01/14 PRIMARY LOCATION: SPAIN, VALENCIA CLOSING DATE: 3 OCTOBER 2014 EMPLOYEE STATUS: PERMANENT ________________________________________ As a Researcher-Technologist your responsibilities will cover the following areas: - Algorithms developer focused on the analysis 3D data to advance in the area related of knowledge in anthropometry and morphometry. - Take part in teams developing projects according to guidelines set by the Project Managers. - Contribute to standardization and monitoring technology. MINIMUM REQUIREMENTS: - Degree in Software, Telecommunications Engineering, Mathematics, Computer Science or similar related subject. - Minimum 3 years? experience focused on developing complex algorithms to analyse 3D data - Base advanced mathematics. - Expert in programming C++. - Expert in mesh processing. - Advanced level in analysis of 3D data. - Expert in using VTK library. - High level English spoken and written. If you are interested in this offer, do not hesitate to send us your CV: Marta Toro marta.toro at ibv.upv.es -- View this message in context: http://vtk.1045678.n5.nabble.com/Job-offer-tp5728799.html Sent from the VTK - Users mailing list archive at Nabble.com. From 15891495523 at 126.com Thu Sep 18 11:07:48 2014 From: 15891495523 at 126.com (zhq) Date: Thu, 18 Sep 2014 08:07:48 -0700 (PDT) Subject: [vtkusers] I want to write a matlab 3D matrix to vtk file ! Message-ID: <1411052868470-5728800.post@n5.nabble.com> http://www.mathworks.com/matlabcentral/fileexchange/23416-writetovtk this is a existed code , but I find it doesn't work ! I use VTK code to read a series of dicom file , and write to vtk format file . I find this file differ from the file generated by the existed code . And if I read the file generated by the existed code using VTK code , it doesn't work ! So , If anybody could tell me what's the vtk format file ? How can I write a 3D matrix to vtk format file using matlab ? Thanks in advance! Zhq -- View this message in context: http://vtk.1045678.n5.nabble.com/I-want-to-write-a-matlab-3D-matrix-to-vtk-file-tp5728800.html Sent from the VTK - Users mailing list archive at Nabble.com. From berk.geveci at kitware.com Thu Sep 18 11:10:01 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 18 Sep 2014 11:10:01 -0400 Subject: [vtkusers] REMINDER: Bug tracker hack-a-ton In-Reply-To: References: Message-ID: Hi folks, I just created a public Google event/hangout for our hack-a-ton: https://plus.google.com/events/cd0s6so0ijo45dsulg8and8p5tg Looking forward to seeing you there or in person at Kitware. -berk On Tue, Sep 16, 2014 at 4:03 PM, Berk Geveci wrote: > Hi folks, > > This is a reminder that on October 2nd, we are holding a bug tracker > hack-a-ton, 9am-5pm. The goal is to clean up our bug tracker as best as we > can. We will be hosting folks at our Clifton Park office as well as holding > a Google Hangout for those attending remotely. Here is the list of > attendees that I know so far: > > - Bill Lorensen, > - Dave Cole, > - Sean McBride, > - Will Schroeder, > - me, > - Ben Boeckel, > - Chuck Atkins, > - Shawn Waldon, > - Marcus Hanwell, > - Dave DeMarle, > - Jamie Wright, > - Tim Meehan. > > If you are not on this list and you are interested in attending, please > let me know. > > Best, > -berk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Thu Sep 18 15:00:23 2014 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Thu, 18 Sep 2014 19:00:23 +0000 Subject: [vtkusers] Outline of a result from a vtkimagereslicemapper Message-ID: <46CB11F12B9DC24D860D4082451B318A12C4C730@exchange3.microbrightfield.com> Hi all, I've gotten the image reslice mapper working beautifully for my image volume. However, I'm trying to get the outline filter to work so that I can show a bound region around my image slice. All I'm showing is a small square in the upper left corner: [cid:image001.png at 01CFD350.75909DD0] The code that I'm using is: First Function --------------------------- // Create the plane that will hold the slice results m_pSlicePlane = vtkSmartPointer::New(); // extract a slice from the volume m_pSliceMapper = vtkSmartPointer::New(); m_pSliceMapper->SetInputData(GetImageDefinition()->GetImage()->GetImageData()); m_pSliceMapper->SetSlicePlane(m_pSlicePlane); // Set it up so that the slice is not affected by the current lighting situation vtkSmartPointer m_sliceProperty = vtkSmartPointer::New(); m_sliceProperty->SetAmbient(1.0); m_sliceProperty->SetDiffuse(0.0); m_sliceProperty->SetOpacity(1.0); m_sliceProperty->SetInterpolationTypeToLinear(); // Create the mapper to display the slice m_pSliceActor = vtkSmartPointer::New(); m_pSliceActor->SetMapper(m_pSliceMapper); m_pSliceActor->SetProperty(m_sliceProperty); // Add the slice to the scene m_pSceneManager->AddActor(m_pSliceActor); --------------------------- Another Function --------------------------- // setup the outline actor vtkSmartPointer pOutlineFilter = vtkSmartPointer::New(); pOutlineFilter->SetInputConnection(m_pSliceMapper->GetOutputPort()); vtkSmartPointer pOutlineMapper = vtkSmartPointer::New(); pOutlineMapper->SetInputConnection(pOutlineFilter->GetOutputPort()); // Set the color of the slice double rgbColor[3]; SolidsColor::ToVTKRGB(rgbColor, GetImageDefinition()->GetColor()); m_pOutlineActor->GetProperty()->SetColor(rgbColor[0], rgbColor[1], rgbColor[2]); m_pOutlineActor->SetMapper(pOutlineMapper); --------------------------- Doug Hoppes I Senior Software Engineer I [cid:image007.png at 01CEF686.037AE7C0] T: 802-288-9290 E: dhoppes at mbfbioscience.com MBF Bioscience 185 Allen Brook Lane Williston, VT 05495 USA www.mbfbioscience.com http://www.mbfbioscience.com/blog [cid:image008.png at 01CEF686.037AE7C0] [cid:image011.png at 01CEF686.037AE7C0] [cid:image012.png at 01CEF686.037AE7C0] [cid:image014.png at 01CEF686.037AE7C0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 27393 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 2645 bytes Desc: image002.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 787 bytes Desc: image003.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 927 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 1170 bytes Desc: image005.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.png Type: image/png Size: 870 bytes Desc: image006.png URL: From chris.marsh at usask.ca Thu Sep 18 16:19:18 2014 From: chris.marsh at usask.ca (Chris Marsh) Date: Thu, 18 Sep 2014 14:19:18 -0600 Subject: [vtkusers] I want to write a matlab 3D matrix to vtk file ! In-Reply-To: <1411052868470-5728800.post@n5.nabble.com> References: <1411052868470-5728800.post@n5.nabble.com> Message-ID: This is a result of the FEX code writing in the legacy format whereas the the current VTK format is XML based. All the examples use the xml format so presumably that is what you are writting out. http://www.vtk.org/VTK/img/file-formats.pdf http://www.vtk.org/Wiki/VTK_XML_Formats http://www.vtk.org/Wiki/VTK/Writing_VTK_files_using_python#.22legacy.22 Cheers Chris On Thu, Sep 18, 2014 at 9:07 AM, zhq <15891495523 at 126.com> wrote: > http://www.mathworks.com/matlabcentral/fileexchange/23416-writetovtk > > this is a existed code , but I find it doesn't work ! > > I use VTK code to read a series of dicom file , and write to vtk format > file > . I find this file differ from the file generated by the existed code . > > And if I read the file generated by the existed code using VTK code , it > doesn't work ! > > So , If anybody could tell me what's the vtk format file ? How can I write > a > 3D matrix to vtk format file using matlab ? > > Thanks in advance! > > Zhq > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/I-want-to-write-a-matlab-3D-matrix-to-vtk-file-tp5728800.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Sep 18 16:22:21 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 18 Sep 2014 14:22:21 -0600 Subject: [vtkusers] Outline of a result from a vtkimagereslicemapper In-Reply-To: <46CB11F12B9DC24D860D4082451B318A12C4C730@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A12C4C730@exchange3.microbrightfield.com> Message-ID: Hi Doug, In order to create a polydata that outlines the slice, you'll need to use the vtkCutter: 1) use GenerateFacesOn() on the vtkOutlineFilter to make it create a closed box 2) use vtkCutter to cut the box with the slice plane from the mapper (mapper->GetSlicePlane() or mapper->GetSlicePlaneInDataCoords()) in order to create a polyline that outlines the slice 3) I also recommend passing the polyline through vtkTubeFilter in order to give the outline a finite thickness - David On Thu, Sep 18, 2014 at 1:00 PM, Doug Hoppes wrote: > Hi all, > > > > I've gotten the image reslice mapper working beautifully > for my image volume. However, I'm trying to get the outline filter to work > so that I can show a bound region around my image slice. All I'm showing > is a small square in the upper left corner: > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From josp.jorge at gmail.com Fri Sep 19 06:40:57 2014 From: josp.jorge at gmail.com (Jorge Perez) Date: Fri, 19 Sep 2014 12:40:57 +0200 Subject: [vtkusers] Wrong/Strange result from vtkImplicitPolyDataDistance + vtkSampleFunction Message-ID: http://vtk.org/Bug/view.php?id=15003 Attached is a test code (Bug_ImplicitPolyDataDistance_01.tcl) to reproduce a bug with a combination of vtkImplicitPolyDataDistance + vtkSampleFunction. In this test a triangle mesh of only one connected component is set as input to vtkImplicitPolyDataDistance then an implicit function is sampled with vtkSampleFunction. The result is contoured with vtkImageMarchingCubes and the vtkPolyData resulting from this last step shows more than one connected component. The original component is reconstructed well but other wrong components appear. Attached is also the snapshot of the result. The input mesh fix_mesh.vtk used in the test can be downloaded from https://www.dropbox.com/s/x3iwjvyl56sxvs3/fix_mesh.vtk?dl=0 The test has been executed on release 6.1. Any suggestion about how to fix that? Could it be due to wrong in the test code? best regards, Jorge -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Bug_ImplicitPolyDataDistance_01.tcl Type: application/x-tcl Size: 1076 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fix_mesh.png Type: image/png Size: 61349 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fix_mesh_contour.png Type: image/png Size: 57224 bytes Desc: not available URL: From sharmaatul11 at gmail.com Fri Sep 19 07:56:18 2014 From: sharmaatul11 at gmail.com (luta) Date: Fri, 19 Sep 2014 04:56:18 -0700 (PDT) Subject: [vtkusers] vtkCamera focal length to pixels Message-ID: <1411127778716-5728809.post@n5.nabble.com> Hi there, I am trying to convert vtkcamera focal length (mm) into pixels so that I can use this to create an intrinsic matrix of the vtkcamera. It would be a great help is someone would guide me in converting vtkcamera focal length into pixels. Thanks in advance. Regards, -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkCamera-focal-length-to-pixels-tp5728809.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Sep 19 10:46:31 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 19 Sep 2014 08:46:31 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil Message-ID: Hi Everyone, I've created a patch [1] that I hope will fix the "random bad lines" bug [2] in vtkPolyDataToImageStencil. In order to test the new code, I'm going to be using some randomly-generated surfaces, but if anyone out there is able to test this patch on difficult datasets, your feedback will be very helpful. - David [1] http://review.source.kitware.com/#/c/17021/ [2] http://www.vtk.org/Bug/view.php?id=14042 From david.gobbi at gmail.com Fri Sep 19 11:08:59 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 19 Sep 2014 09:08:59 -0600 Subject: [vtkusers] vtkCamera focal length to pixels In-Reply-To: <1411127778716-5728809.post@n5.nabble.com> References: <1411127778716-5728809.post@n5.nabble.com> Message-ID: By pixels, you mean screen pixels? The camera's vertical field of view, in pixels, is equal to the height of the viewport, which you can get by calling GetSize() on the renderer. The vertical field of view, in mm, is controlled by setting the ViewAngle and Distance of the camera. The distance, field of view, and view angle are related by a simple equation involving the arctan of half the view angle. Draw a diagram and you should be able to derive the equation without much trouble ;) - David On Fri, Sep 19, 2014 at 5:56 AM, luta wrote: > Hi there, I am trying to convert vtkcamera focal length (mm) into pixels so > that I can use this to create an intrinsic matrix of the vtkcamera. It would > be a great help is someone would guide me in converting vtkcamera focal > length into pixels. From david.gobbi at gmail.com Fri Sep 19 11:28:36 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 19 Sep 2014 09:28:36 -0600 Subject: [vtkusers] vtkCamera focal length to pixels In-Reply-To: References: <1411127778716-5728809.post@n5.nabble.com> Message-ID: Obvious error in my previous email: I should have said the tan() of half the view angle. Taking the arctan of an angle makes no sense. On Fri, Sep 19, 2014 at 9:08 AM, David Gobbi wrote: > By pixels, you mean screen pixels? The camera's vertical field of view, > in pixels, is equal to the height of the viewport, which you can get by > calling GetSize() on the renderer. The vertical field of view, in mm, is > controlled by setting the ViewAngle and Distance of the camera. The > distance, field of view, and view angle are related by a simple equation > involving the arctan of half the view angle. Draw a diagram and you > should be able to derive the equation without much trouble ;) > > - David > > > On Fri, Sep 19, 2014 at 5:56 AM, luta wrote: >> Hi there, I am trying to convert vtkcamera focal length (mm) into pixels so >> that I can use this to create an intrinsic matrix of the vtkcamera. It would >> be a great help is someone would guide me in converting vtkcamera focal >> length into pixels. From ra.corredor at gmail.com Fri Sep 19 12:47:04 2014 From: ra.corredor at gmail.com (Ricardo A Corredor) Date: Fri, 19 Sep 2014 09:47:04 -0700 (PDT) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: Message-ID: <1411145224024-5728814.post@n5.nabble.com> Great! I had many times this problem. My solution always was to decrease output image spacing and/or reduce tolerance, but the result was very random and I never understood the problem. I'll try to test it in some datasets. Ricardo -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5728814.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Sep 19 13:10:03 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 19 Sep 2014 11:10:03 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <1411145224024-5728814.post@n5.nabble.com> References: <1411145224024-5728814.post@n5.nabble.com> Message-ID: Hi Ricardo, Thanks for the feedback. I can briefly explain why the problem occurred. The algorithm has two major steps: 1) cutting the polydata surface into 2D contours, and 2) rasterizing the contours in order to make a binary stencil. My patch fixes numerical stability problems step 1, because I have very good reason to believe that step 1 was where the errors were occurring. - David On Fri, Sep 19, 2014 at 10:47 AM, Ricardo A Corredor wrote: > Great! > > I had many times this problem. My solution always was to decrease output > image spacing and/or reduce tolerance, but the result was very random and I > never understood the problem. > > I'll try to test it in some datasets. > > Ricardo From sid.murthy at gmail.com Fri Sep 19 17:17:23 2014 From: sid.murthy at gmail.com (Sid Murthy) Date: Fri, 19 Sep 2014 15:17:23 -0600 Subject: [vtkusers] Using vtkDiskSource/vtkLinearExtrusionFilter with vtkCubeSource - how to create the hole through the cube? Message-ID: Hi - I am using a vtkDiskSource and vtkLinearExtrusionFilter to create a pipe (with a hole). I'd like to put this pipe through a cube (vtkCubeSource) and still retain the hole in the middle. Is this possible - somehow - with vtkcutter or vtkclippolydata? Thanks, Sid -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cube_with_disksource.png Type: image/png Size: 3644 bytes Desc: not available URL: From samantrv at mail.uc.edu Fri Sep 19 17:23:57 2014 From: samantrv at mail.uc.edu (Samant, Rutuja (samantrv)) Date: Fri, 19 Sep 2014 21:23:57 +0000 Subject: [vtkusers] using vtkVoxelModeller Message-ID: Hello, I am currently using vtkVoxelModeller to voxelize my point cloud. I am doing the following conversion: vtkPolydata->vtkVoxelModeller->vtkImageData I want to delete some points from vtkPolydata based on the results obtained from voxelized vtkImageData. Can I get points in a voxel from its vtkImageData output ? Is it possible? Regards, Rutuja Samant -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 19 17:41:32 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 19 Sep 2014 15:41:32 -0600 Subject: [vtkusers] Using vtkDiskSource/vtkLinearExtrusionFilter with vtkCubeSource - how to create the hole through the cube? In-Reply-To: References: Message-ID: So you want to have a cube with a cylindrical hole that goes all the way through it? It's not easy, but it's possible. First, you'll want to reverse the sense of your pipe, so that the faces face inwards. This can be done with vtkReverseSense. Next, append it to your cube with vtkAppendPolyData. The third step is the tricky one: you have to re-build the faces of this combined polydata so that the faces form a single closed surface (i.e. instead of forming one surface for the cube and another separate surface for the pipe). This can be done with vtkClipClosedSurface, because it can clip away the old, unconnected surfaces and build new surfaces that connect the outside of the box with the inside of the pipe. I don't have an example that does this, but you can look at the wiki page http://www.vtk.org/Wiki/VTK/Closed_Surface_Clipping for hints. Basically, if you clip away the original cube faces (by setting clipping planes that are just inside of the original faces), you can get vtkClipClosedSurface to create new faces with good connectivity between the cube and the pipe. Note that I didn't say it will be easy... I just said it will be possible. - David On Fri, Sep 19, 2014 at 3:17 PM, Sid Murthy wrote: > Hi - > > I am using a vtkDiskSource and vtkLinearExtrusionFilter to create a pipe > (with a hole). I'd like to put this pipe through a cube (vtkCubeSource) and > still retain the hole in the middle. Is this possible - somehow - with > vtkcutter or vtkclippolydata? > > > Thanks, > Sid From simone.rapposelli at gmail.com Fri Sep 19 17:59:37 2014 From: simone.rapposelli at gmail.com (Simone Rapposelli) Date: Fri, 19 Sep 2014 23:59:37 +0200 Subject: [vtkusers] vtkaviwriter link error lnk2001 In-Reply-To: References: Message-ID: Hi all, I am having a link error with vtkAVIWriter class using Visual Studio 2010 on a Win7 pro 64bit machine. I have correctly included the lib path and added vtkIO.lib in Project properties but I get link errors as follows: ... vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol _AVIStreamSetFormat at 16 ... I have already tried "googling" without founding solutions... -------------- next part -------------- An HTML attachment was scrubbed... URL: From cool at pluto.dti.ne.jp Fri Sep 19 21:22:30 2014 From: cool at pluto.dti.ne.jp (shunya sato) Date: Sat, 20 Sep 2014 10:22:30 +0900 Subject: [vtkusers] freelance opportunity for vtk expert Message-ID: Hi, I need a help from VTK expert and set up as a freelance opportunity. https://www.freelancer.com/projects/threed-modelling-English-US/Convert-image-solid-with-texture.6473138.html?t=i&utm_expid=294858-243.MbqRoaFlTxyhvoB95c24Yg.2&utm_referrer=https%3A%2F%2Fwww.freelancer.com%2Fjobs%2FMatlab-Mathematica%2F It is about converting 2D pictures into 3D printabale STL and VRML(or X3D) files, by interpreting grayscale color value of pixel as height. Hope it is of interest to some of you. I'm sorry if this kind of post is not appropriate to this mailing list. Best regards, Shunya Sato -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Sep 19 22:04:14 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 19 Sep 2014 22:04:14 -0400 Subject: [vtkusers] Using vtkDiskSource/vtkLinearExtrusionFilter with vtkCubeSource - how to create the hole through the cube? In-Reply-To: References: Message-ID: If you want a box with a hole through it, you could also try the vtkBooleanOperationPolyDataFilter with the first input set to the output of a vtkCubeSource and the second input set to a vtkCylinderSource where the cylinder ends lie somewhat outside the cube bounds. Set the operation to difference and you should get a cube with a hole through it. See http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter for an example. There are some cases on which the vtkBooleanOperationPolyDataFilter fails, but this application sounds simple enough that it should work. Cory On Fri, Sep 19, 2014 at 5:41 PM, David Gobbi wrote: > So you want to have a cube with a cylindrical hole that goes all the > way through it? It's not easy, but it's possible. > > First, you'll want to reverse the sense of your pipe, so that the > faces face inwards. This can be done with vtkReverseSense. > > Next, append it to your cube with vtkAppendPolyData. > > The third step is the tricky one: you have to re-build the faces of > this combined polydata so that the faces form a single closed surface > (i.e. instead of forming one surface for the cube and another separate > surface for the pipe). This can be done with vtkClipClosedSurface, > because it can clip away the old, unconnected surfaces and build new > surfaces that connect the outside of the box with the inside of the > pipe. > > I don't have an example that does this, but you can look at the > wiki page http://www.vtk.org/Wiki/VTK/Closed_Surface_Clipping > for hints. Basically, if you clip away the original cube faces (by > setting clipping planes that are just inside of the original faces), > you can get vtkClipClosedSurface to create new faces with good > connectivity between the cube and the pipe. > > Note that I didn't say it will be easy... I just said it will be possible. > > - David > > > > On Fri, Sep 19, 2014 at 3:17 PM, Sid Murthy wrote: >> Hi - >> >> I am using a vtkDiskSource and vtkLinearExtrusionFilter to create a pipe >> (with a hole). I'd like to put this pipe through a cube (vtkCubeSource) and >> still retain the hole in the middle. Is this possible - somehow - with >> vtkcutter or vtkclippolydata? >> >> >> Thanks, >> Sid > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From simone.rapposelli at gmail.com Sat Sep 20 02:25:29 2014 From: simone.rapposelli at gmail.com (Simone Rapposelli) Date: Sat, 20 Sep 2014 06:25:29 +0000 (UTC) Subject: [vtkusers] vtkaviwriter link error lnk2001 References: Message-ID: Simone Rapposelli gmail.com> writes: > > > Hi all, > I am having a link error with vtkAVIWriter class using Visual Studio 2010 on a Win7 pro 64bit machine. > I have correctly included the lib path and added vtkIO.lib in Project properties but I get link errors as follows: > ... > vtkIO.lib(vtkAVIWriter.obj) : > error LNK2001: unresolved external symbol _AVIStreamSetFormat 16 > ... > I have already tried "googling" without founding solutions... > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > I have just found the solution: add #pragma comment(lib,"Vfw32.lib") From wulihouxiaoshuai at 163.com Sun Sep 21 21:18:40 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Sun, 21 Sep 2014 18:18:40 -0700 (PDT) Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> <1411005272089-5728793.post@n5.nabble.com> Message-ID: <1411348720077-5728824.post@n5.nabble.com> I am very sorry to trouble you again. Have you found the cause of my problem ? -- View this message in context: http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728824.html Sent from the VTK - Users mailing list archive at Nabble.com. From sharmaatul11 at gmail.com Mon Sep 22 09:12:46 2014 From: sharmaatul11 at gmail.com (Atul Kumar) Date: Mon, 22 Sep 2014 21:12:46 +0800 Subject: [vtkusers] vtkCamera focal length to pixels In-Reply-To: References: <1411127778716-5728809.post@n5.nabble.com> Message-ID: Thank you so much David. I am trying your suggested way. I hope it will work. Regards, Atul On Fri, Sep 19, 2014 at 11:08 PM, David Gobbi wrote: > By pixels, you mean screen pixels? The camera's vertical field of view, > in pixels, is equal to the height of the viewport, which you can get by > calling GetSize() on the renderer. The vertical field of view, in mm, is > controlled by setting the ViewAngle and Distance of the camera. The > distance, field of view, and view angle are related by a simple equation > involving the arctan of half the view angle. Draw a diagram and you > should be able to derive the equation without much trouble ;) > > - David > > > On Fri, Sep 19, 2014 at 5:56 AM, luta wrote: > > Hi there, I am trying to convert vtkcamera focal length (mm) into pixels > so > > that I can use this to create an intrinsic matrix of the vtkcamera. It > would > > be a great help is someone would guide me in converting vtkcamera focal > > length into pixels. > -- Atul Kumar MBBS MMST PhD Research Fellow IRCAD-Taiwan -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Sep 22 09:36:37 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 22 Sep 2014 09:36:37 -0400 Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: <1411348720077-5728824.post@n5.nabble.com> References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> <1411005272089-5728793.post@n5.nabble.com> <1411348720077-5728824.post@n5.nabble.com> Message-ID: Hi There, I did some just to verify my thoughts. So typically if you see memory usage of an application that is running a OpenGL application, 1) it may also include the video memory used by the application (which is also dynamically allocated). This is mostly the case on a linux system. 2) Now if we verify that is not the case then, the driver keeps a copy on the RAM if it does not have enough space on the Video RAM. Now if you have the NVIDIA card (which you said you have), you can use nvidia-smi command line utility. You should run it before and after to see the VRAM usage by your app. That difference should be very close to what you see extra in the top / htop. The other way to verify this is to look into the /proc and idenfity the usage there. Let me know if this helps. On Sun, Sep 21, 2014 at 9:18 PM, Emptystack wrote: > I am very sorry to trouble you again. Have you found the cause of my > problem > ? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728824.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Sep 22 11:48:49 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 22 Sep 2014 09:48:49 -0600 Subject: [vtkusers] announce: VTK and ParaView scripting training October 21 at Kitware's North Carolina office Message-ID: Kitware is hosting a VTK-ParaView training course in Carrboro, NC. The course will be held on October 21, 2014. Attendees will gain practical experience in both ParaView, a scalable application for general purpose scientific visualization, and The Visualization Toolkit (VTK), the underlying open-source library from which ParaView is built. The training mixes theory and application to guide attendees through a set of exercises, which are all given in the python programming language. Upon completion of this course, attendees will not only know how to use ParaView and VTK, but they will also know how to extend ParaView at run time, use it in concert with other Python capable applications, and run it in batch processing HPC contexts. Additional details and registration information are available on the Kitware website . The price of the course via early registration is $650. Early registration is available through October 8, 2014. The price of the course via regular registration is $815. In addition, Kitware will be hosting a ?Project Lifecycle Management with the CMake Family of Tools? training course on October 20, 2014. This course will also be hosted in Carrboro. For more information, please visit http://www.kitware.com/products/protraining.php. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharmaatul11 at gmail.com Mon Sep 22 12:04:06 2014 From: sharmaatul11 at gmail.com (luta) Date: Mon, 22 Sep 2014 09:04:06 -0700 (PDT) Subject: [vtkusers] vtkCamera focal length to pixels In-Reply-To: References: <1411127778716-5728809.post@n5.nabble.com> Message-ID: <1411401846618-5728829.post@n5.nabble.com> Hi David, what does the "distance" of camera mean ? is it from the distance from focal point ? Thanks for your help. Regards, Atul -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkCamera-focal-length-to-pixels-tp5728809p5728829.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon Sep 22 12:53:00 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 22 Sep 2014 10:53:00 -0600 Subject: [vtkusers] vtkCamera focal length to pixels In-Reply-To: <1411401846618-5728829.post@n5.nabble.com> References: <1411127778716-5728809.post@n5.nabble.com> <1411401846618-5728829.post@n5.nabble.com> Message-ID: On Mon, Sep 22, 2014 at 10:04 AM, luta wrote: > Hi David, > what does the "distance" of camera mean ? is it from the distance from focal > point ? Yes. The distance from the camera to the focal point. From remy.trichet at zimmercas.com Mon Sep 22 13:24:07 2014 From: remy.trichet at zimmercas.com (Remy Trichet) Date: Mon, 22 Sep 2014 10:24:07 -0700 (PDT) Subject: [vtkusers] PolyData Boolean operation problem In-Reply-To: References: <1343290317.27509.YahooMailNeo@web171204.mail.ir2.yahoo.com> <1343663209.27519.YahooMailNeo@web171205.mail.ir2.yahoo.com> Message-ID: <1411406647071-5728831.post@n5.nabble.com> Hi James, I was having the same problems with boolean operations(due to bug http://vtk.org/Bug/bug_relationship_graph.php?bug_id=14035&graph=relation), and your code did work well to fix it. I used it with vtk5.10. I am trying to upgrade to VTK 6.1 but your code seems difficult to import. The bug doesn't seem to be fixed in 6.1. I can't include VtkOBBTree in vtkImplicitPolyDataDistance, as it is now part of Filter/Core, and VtkOBBTree is in Filter/General. It's not possible to add General to the dependencies of Core, because this will create a circular dependency. Do you or somebody have an idea to fix this problem with VTK 6.1 ? Thank you R?my -- View this message in context: http://vtk.1045678.n5.nabble.com/PolyData-Boolean-operation-problem-tp5714926p5728831.html Sent from the VTK - Users mailing list archive at Nabble.com. From cafaro at dis.uniroma1.it Mon Sep 22 13:30:07 2014 From: cafaro at dis.uniroma1.it (Bruno Cafaro) Date: Mon, 22 Sep 2014 19:30:07 +0200 Subject: [vtkusers] vtkCamera focal length to pixels In-Reply-To: References: <1411127778716-5728809.post@n5.nabble.com> <1411401846618-5728829.post@n5.nabble.com> Message-ID: <54205C9F.6070609@dis.uniroma1.it> hi all i have found the following to be the calibration matrix for the vtkCamera: |f_x alpha p_x | |1113.2 1 299.4 | | f_y p_y | = | 1110.5 399.7 | | 1 | | 1 | i think this should be correct (there is a rounding error), as i get always the rigth reprojection of my mesh vertex, as you can see in the attached images. Regards Bruno p.s. (screensot00.png is taken using vtk write png, and figure.tiff i obtained reprojecting the same mash vertexes using matlab) On 09/22/2014 06:53 PM, David Gobbi wrote: > On Mon, Sep 22, 2014 at 10:04 AM, luta wrote: >> Hi David, >> what does the "distance" of camera mean ? is it from the distance from focal >> point ? > Yes. The distance from the camera to the focal point. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Bruno Cafaro PhD Student Dip.to Ingegneria informatica, automatica e gestionale "Antonio Ruberti" Universit? "La Sapienza" Via Ariosto, 25 00185 Roma Tel: +390677274155 -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot00.png Type: image/png Size: 46435 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure.tiff Type: image/tiff Size: 11416 bytes Desc: not available URL: From david.gobbi at gmail.com Mon Sep 22 13:47:35 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 22 Sep 2014 11:47:35 -0600 Subject: [vtkusers] vtkCamera focal length to pixels In-Reply-To: <54205C9F.6070609@dis.uniroma1.it> References: <1411127778716-5728809.post@n5.nabble.com> <1411401846618-5728829.post@n5.nabble.com> <54205C9F.6070609@dis.uniroma1.it> Message-ID: Glad to hear that it worked! On Mon, Sep 22, 2014 at 11:30 AM, Bruno Cafaro wrote: > hi all > i have found the following to be the calibration matrix for the vtkCamera: > > |f_x alpha p_x | |1113.2 1 299.4 | > | f_y p_y | = | 1110.5 399.7 | > | 1 | | 1 | > > i think this should be correct (there is a rounding error), as i get always > the rigth reprojection of my mesh vertex, as you can see in the attached > images. > > Regards > > Bruno From jcplatt at dsl.pipex.com Mon Sep 22 14:09:43 2014 From: jcplatt at dsl.pipex.com (John Platt) Date: Mon, 22 Sep 2014 19:09:43 +0100 Subject: [vtkusers] vtkChartHistogram2D - smoothing the colour boundaries Message-ID: Hi, I have displayed some vtkImageData as a map in vtkChartHistogram2D. The boundaries between the adjacent colours appear to follow the cell edges as though each cell has been coloured with a single scalar. I am looking to obtain the same as a colour map of equivalent polydata using point scalars. Does any one have any ideas on how this can be done? Many thanks, John. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdrahos at robodoc.com Mon Sep 22 19:40:48 2014 From: mdrahos at robodoc.com (Miro Drahos) Date: Mon, 22 Sep 2014 16:40:48 -0700 Subject: [vtkusers] volume rendering LOD Message-ID: <5420B380.6070606@robodoc.com> Hi all, I am using vtkVolume + vtkSmartVolumeMapper to render a 3D image of medium size. I am trying to figure out how to disable the LOD subsampling when interacting with the scene, so that the volume always stays the same. [The camera position and orientation is fixed in this scene]. I tried to do renderWindow->SetDesiredUpdateRate(0); but that does not do it. Any hint or advice very much appreciated! Cheers, Miro -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Sep 22 19:56:41 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 22 Sep 2014 19:56:41 -0400 Subject: [vtkusers] volume rendering LOD In-Reply-To: <5420B380.6070606@robodoc.com> References: <5420B380.6070606@robodoc.com> Message-ID: You want to call SetInteractiveUpdateRate on your mapper as well. http://www.vtk.org/doc/nightly/html/classvtkSmartVolumeMapper.html#ad389c25593c27f85b292a66efe143984 On Mon, Sep 22, 2014 at 7:40 PM, Miro Drahos wrote: > Hi all, > I am using vtkVolume + vtkSmartVolumeMapper to render a 3D image of medium > size. > I am trying to figure out how to disable the LOD subsampling when > interacting with the scene, so that the volume always stays the same. [The > camera position and orientation is fixed in this scene]. > I tried to do > renderWindow->SetDesiredUpdateRate(0); > but that does not do it. > Any hint or advice very much appreciated! > Cheers, > Miro > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Tue Sep 23 03:15:42 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Tue, 23 Sep 2014 00:15:42 -0700 (PDT) Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> <1411005272089-5728793.post@n5.nabble.com> <1411348720077-5728824.post@n5.nabble.com> Message-ID: <1411456542209-5728838.post@n5.nabble.com> I have used the gnome-system-monitor and top commands to test the memory of my applications. The result is almost same. So I used gdb to test the memory increasing point, which happened at the following lines of the vtkOpenGLGPUVolumeRayCastMapper.cxx: if(1) // !this->SupportsPixelBufferObjects) { vtkgl::TexImage3D(vtkgl::TEXTURE_3D, 0, internalFormat, textureSize[0],textureSize[1],textureSize[2], 0,format,type,dataPtr); } the increasing memory is almost the size of the input image data. But on windows system,the occupied memory didn't increase on this point. Maybe just as you said, the RES memory of the top command may also include the video memory used by the application,but I cannot find the evidence to prove this comment. I will spend the following several days to solve this interesting problem. Many thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728838.html Sent from the VTK - Users mailing list archive at Nabble.com. From scbiradar at gmail.com Tue Sep 23 05:27:06 2014 From: scbiradar at gmail.com (santosh) Date: Tue, 23 Sep 2014 02:27:06 -0700 (PDT) Subject: [vtkusers] How to use vtkBooleanOperationPolyDataFilter correctly Message-ID: <1411464425998-5728839.post@n5.nabble.com> Hi All, I am trying to use vtkBooleanOperationPolyDataFilter to find union/difference/intersection of two STL surfaces. Even if I use two disconnected surfaces I am getting a hole in the STL which I provide as first input to the filter if I do a Union operation. I am doing the following operations to read the input files #read file_one stl1 = vtk.vtkSTLReader() stl1.SetFileName(file_name) stl1.Update() poly1 = stl1.GetOutput() # Smooth the polyData smoothf0 = vtk.vtkSmoothPolyDataFilter() smoothf0.SetInput(poly1) smoothf0.Update() # Remove Duplicate points/unused points/degenerate cells cleanf1 = vtk.vtkCleanPolyData() cleanf1.SetInput(smoothf0.GetOutput()) cleanf1.ConvertStripsToPolysOn() cleanf1.ConvertPolysToLinesOn() cleanf1.ConvertLinesToPointsOn() cleanf1.Update() # Conversion to Triangles trif0 = vtk.vtkTriangleFilter() trif0.SetInput(cleanf1.GetOutput()) trif0.PassVertsOff() trif0.PassLinesOff() trif0.Update() # Recompute Normals normalf0 = vtk.vtkPolyDataNormals() normalf0.SetInput(trif0.GetOutput()) normalf0.ComputePointNormalsOn() normalf0.ComputeCellNormalsOff() normalf0.SplittingOff() normalf0.ConsistencyOn() normalf0.AutoOrientNormalsOff() normalf0.Update() Now , I use normalf0's output port as input connection to the filter. Is there any thing else I need to do to ensure I am providing the correct input to the filter. I am attaching images of the two STL files and the image of the output of the union operation on the input files. input.png contains both the input STL files union.png contains the result of the union operation on the two STL files input.png union.png cheers, Santosh -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkBooleanOperationPolyDataFilter-correctly-tp5728839.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Sep 23 08:31:20 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 23 Sep 2014 08:31:20 -0400 Subject: [vtkusers] How to use vtkBooleanOperationPolyDataFilter correctly In-Reply-To: <1411464425998-5728839.post@n5.nabble.com> References: <1411464425998-5728839.post@n5.nabble.com> Message-ID: Hi Santosh, The vtkBooleanOperationPolyDataFilter won't work for these inputs. It expects the input surfaces to enclose a volume, and the output surface it will attempt to produce is the boundary of the union of the enclosed volumes. The input surfaces don't necessarily need to be water tight, but if they don't enclose a volume, results are going to be unexpected. If you want the union of these particular inputs, I would suggest using the vtkAppendPolyData filter. Hope that helps, Cory On Tue, Sep 23, 2014 at 5:27 AM, santosh wrote: > Hi All, > > I am trying to use vtkBooleanOperationPolyDataFilter to find > union/difference/intersection of two STL surfaces. Even if I use two > disconnected surfaces I am getting a hole in the STL which I provide as > first input to the filter if I do a Union operation. I am doing the > following operations to read the input files > > #read file_one > stl1 = vtk.vtkSTLReader() > stl1.SetFileName(file_name) > stl1.Update() > > > poly1 = stl1.GetOutput() > > # Smooth the polyData > smoothf0 = vtk.vtkSmoothPolyDataFilter() > smoothf0.SetInput(poly1) > smoothf0.Update() > > # Remove Duplicate points/unused points/degenerate cells > cleanf1 = vtk.vtkCleanPolyData() > cleanf1.SetInput(smoothf0.GetOutput()) > cleanf1.ConvertStripsToPolysOn() > cleanf1.ConvertPolysToLinesOn() > cleanf1.ConvertLinesToPointsOn() > cleanf1.Update() > > # Conversion to Triangles > trif0 = vtk.vtkTriangleFilter() > trif0.SetInput(cleanf1.GetOutput()) > trif0.PassVertsOff() > trif0.PassLinesOff() > trif0.Update() > > # Recompute Normals > normalf0 = vtk.vtkPolyDataNormals() > normalf0.SetInput(trif0.GetOutput()) > normalf0.ComputePointNormalsOn() > normalf0.ComputeCellNormalsOff() > normalf0.SplittingOff() > normalf0.ConsistencyOn() > normalf0.AutoOrientNormalsOff() > normalf0.Update() > > Now , I use normalf0's output port as input connection to the filter. > Is there any thing else I need to do to ensure I am providing the correct > input to the filter. > I am attaching images of the two STL files and the image of the output of > the union operation on the input files. > input.png contains both the input STL files > union.png contains the result of the union operation on the two STL files > input.png > union.png > > cheers, > Santosh > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkBooleanOperationPolyDataFilter-correctly-tp5728839.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From francois.touvet at inria.fr Tue Sep 23 08:52:08 2014 From: francois.touvet at inria.fr (ftouvet) Date: Tue, 23 Sep 2014 05:52:08 -0700 (PDT) Subject: [vtkusers] vtkSelectEnclosedPoints filter inconsistent output of IsInside method In-Reply-To: References: <1409923254872-5728587.post@n5.nabble.com> <1410188769756-5728610.post@n5.nabble.com> <1410293514372-5728642.post@n5.nabble.com> <1410352194329-5728654.post@n5.nabble.com> Message-ID: <1411476728042-5728841.post@n5.nabble.com> Hello Bill and thanks for the explanations, I am possibly facing the same problem, and would like to be sure about my results anyway. So my question is: how is it possible to evaluate what value 'Tolerance' must be set to? What is the criterion regarding the polyData that is tested? Regards, Francois -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-filter-inconsistent-output-of-IsInside-method-tp5728587p5728841.html Sent from the VTK - Users mailing list archive at Nabble.com. From ich_daniel at habmalnefrage.de Tue Sep 23 09:10:14 2014 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Tue, 23 Sep 2014 06:10:14 -0700 (PDT) Subject: [vtkusers] Contourline (vtkContourWidget) without mouse-interactions In-Reply-To: <1400331259769-5727146.post@n5.nabble.com> References: <1399400342352-5726998.post@n5.nabble.com> <1400331259769-5727146.post@n5.nabble.com> Message-ID: <1411477814838-5728842.post@n5.nabble.com> I dig this thread out again... How can i create a contourline on a surface with two points (only by x-y-z coordinates)? This points were not set with mouse-interactions. your hints are welcome! -- View this message in context: http://vtk.1045678.n5.nabble.com/set-points-for-vtkContourWidget-without-interactions-tp5726998p5728842.html Sent from the VTK - Users mailing list archive at Nabble.com. From 15891495523 at 126.com Tue Sep 23 09:41:26 2014 From: 15891495523 at 126.com (zhq) Date: Tue, 23 Sep 2014 06:41:26 -0700 (PDT) Subject: [vtkusers] How can I write a picture to VTK format file ? Message-ID: <1411479686401-5728843.post@n5.nabble.com> Deal all : I want to write a picture into VTK format file . And following code is my test code : (VS2012+VTK6.0) vtkSmartPointer writer = vtkSmartPointer::New(); vtkSmartPointer Img = vtkSmartPointer::New(); Img->SetDimensions(3,3,3); Img->AllocateScalars(VTK_INT,1); int cur=1; for (int i=0;i<3;i++) { for (int j=0;j<3;j++) { for (int k=0;k<3;k++) { int * pixel = (int *)Img->GetScalarPointer(i,j,k); *pixel=cur; cur++; } } } writer->SetInputData(Img); writer->SetFileName("C:\\Users\\zhq\\Desktop\\1.vtk"); writer->Update(); writer->Write(); And the error is : ERROR: In D:\Program Files\ITK_VTK\VTK6.0\VTK6.0.0\Common\ExecutionModel\vtkDema ndDrivenPipeline.cxx, line 815 vtkCompositeDataPipeline (00000000002CA5D0): Input for connection index 0 on inp ut port index 0 for algorithm vtkStructuredGridWriter(00000000002C7860) is of ty pe vtkImageData, but a vtkStructuredGrid is required. Could somebody give me some help ! Thanks in advance ! Zhq -- View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-write-a-picture-to-VTK-format-file-tp5728843.html Sent from the VTK - Users mailing list archive at Nabble.com. From guillaume.jacquenot at gmail.com Tue Sep 23 09:52:42 2014 From: guillaume.jacquenot at gmail.com (Guillaume Jacquenot) Date: Tue, 23 Sep 2014 15:52:42 +0200 Subject: [vtkusers] Possible bug in python vtkXMLMultiBlockDataWriter Message-ID: Dear VTK users, I try to write a VTM file from a python script. I use an instance of vtkXMLMultiBlockDataWriter My code works on fine small data. However on large data, the result files are not valid and can not be imported in Paraview. Paraview complains about a VTU header file that is not valid: Error parsing XML in stream at line 1, column 7, byte index 7: not well-formed As the VTU file is large, the file can not be opened in a text-file software. A 'head' on the VTU file reveals the problem, and shows that the XML header are not correct. On my file, I got these lines (head -5 file.vtu) offset="369942984"?> Obviously the first line is not valid I corrected the header with sed '1s/.*//' file.vtu > newfile.vtu However, I am afraid that my data are corrupted. Is it a bug? Any advice to fix? Any advice to check my data are not corrupted? The bug occur with VTK 5.10 and VTK 6.1 Here is basically the code I use to write a VTM file import vtk VTKMajorVersion = vtk.vtkVersion.GetVTKMajorVersion() w = vtk.vtkXMLMultiBlockDataWriter() w.SetByteOrderToLittleEndian() w.SetIdTypeToInt64() w.SetCompressorTypeToNone() w.SetFileName(outputFilename) if VTKMajorVersion <= 5: w.SetInput(rr) else: w.SetInputData(rr) w.Update() Guillaume Jacquenot -------------- next part -------------- An HTML attachment was scrubbed... URL: From 505473930 at qq.com Tue Sep 23 10:15:21 2014 From: 505473930 at qq.com (=?gb18030?B?sNfJq7XExKs=?=) Date: Tue, 23 Sep 2014 22:15:21 +0800 Subject: [vtkusers] I don't get "vtkMFC.lib" after compile the vtk solution Message-ID: Hello my friends: Here is the problem that occurs to me, I don't get "vtkMFC.lib" after compile the vtk solution though I'm sure I've selected the "use_gui" and the "use_mfc" options. I've been working on this problem for two days and haven't had any idea of it. I hope that you can help me! Thannnnnnnnnnnnnnnnnnnnnnnnnnnnnks a lot! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kicki.Frisch at icr.ac.uk Tue Sep 23 10:35:59 2014 From: Kicki.Frisch at icr.ac.uk (Kicki Frisch) Date: Tue, 23 Sep 2014 15:35:59 +0100 Subject: [vtkusers] Migrating mixed unmanaged C++/C# project from VTK 5.4 to VTK 6.0 Message-ID: I have a project relying on VTK 5.6 which I want to migrate to VTK 6.0. The core algorithms are written I C++. The unmanaged C++ classes are wrapped and called from C#/.NET code. Our .NET wrapped interface uses VTK classes as parameters and return values from methods. In VTK 5.4, the class libraries containing the wrapped managed .NET classes for the VTK classes. Therefore, the .NET wrapped VTK classes can be used in our own .NET wrappers of our unmanaged C++ classes. However, if I understand it correctly, as of VTK 5.8, the source code is no longer available for download and the .NET wrappers only available as pre-compiled binaries. Is that correct? If so, I'm not entirely sure how to proceed, since moving to VTK 6.0 breaks the interface between our C++ back-end and the .NET front-end. Here's an example of a wrapper class: public ref class IcrImageAccumulate { public: // const char *GetClassName (); System::String^ GetClassName(); virtual System::String^ ToString() override; void Calculate(Kitware.VTK.vtkImageData^ image); // <-- problem, since I don't have access to the managed VTK source code // ... } Best regards, Kicki. The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Sep 23 14:13:10 2014 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 23 Sep 2014 20:13:10 +0200 Subject: [vtkusers] Migrating mixed unmanaged C++/C# project from VTK 5.4 to VTK 6.0 In-Reply-To: References: Message-ID: <5421B836.3010109@kitware.com> Hi Kicki, The ActiViz source code should be available in a couple of weeks. You are correct that the pre-compiled binaries are available with our support contract. Julien On 23/09/2014 16:35, Kicki Frisch wrote: > I have a project relying on VTK 5.6 which I want to migrate to VTK 6.0. > > The core algorithms are written I C++. The unmanaged C++ classes are > wrapped and called from C#/.NET code. Our .NET wrapped interface uses > VTK classes as parameters and return values from methods. > > In VTK 5.4, the class libraries containing the wrapped managed .NET > classes for the VTK classes. Therefore, the .NET wrapped VTK classes can > be used in our own .NET wrappers of our unmanaged C++ classes. > > However, if I understand it correctly, as of VTK 5.8, the source code is > no longer available for download and the .NET wrappers only available as > pre-compiled binaries. > > Is that correct? > > If so, I?m not entirely sure how to proceed, since moving to VTK 6.0 > breaks the interface between our C++ back-end and the .NET front-end. > > Here?s an example of a wrapper class: > > publicrefclassIcrImageAccumulate > > { > > public: > > // const char *GetClassName (); > > System::String^ GetClassName(); > > virtualSystem::String^ ToString() override; > > voidCalculate(Kitware.VTK.vtkImageData^ image); // ?problem, since I > don?t have access to the managed VTK source code > > // ? > > } > > Best regards, > > Kicki. > > > The Institute of Cancer Research: Royal Cancer Hospital, a charitable > Company Limited by Guarantee, Registered in England under Company No. > 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer and network. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From aashish.chaudhary at kitware.com Tue Sep 23 14:24:21 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 23 Sep 2014 14:24:21 -0400 Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: <1411456542209-5728838.post@n5.nabble.com> References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> <1411005272089-5728793.post@n5.nabble.com> <1411348720077-5728824.post@n5.nabble.com> <1411456542209-5728838.post@n5.nabble.com> Message-ID: On Tue, Sep 23, 2014 at 3:15 AM, Emptystack wrote: > I have used the gnome-system-monitor and top commands to test the memory of > my applications. The result is almost same. So I used gdb to test the > memory > increasing point, which happened at the following lines of the > vtkOpenGLGPUVolumeRayCastMapper.cxx: > > if(1) // !this->SupportsPixelBufferObjects) > { > vtkgl::TexImage3D(vtkgl::TEXTURE_3D, 0, internalFormat, > > textureSize[0],textureSize[1],textureSize[2], > 0,format,type,dataPtr); > } > > That would make sense since at this point you will expect the data to be transferred to the GPU. > the increasing memory is almost the size of the input image data. But on > windows system,the occupied memory didn't increase on this point. Maybe > just > as you said, the RES memory of the top command may also include the video > memory used by the application,but I cannot find the evidence to prove > this > comment. I will spend the following several days to solve this interesting > problem. > You can look at the more detailed log in */proc. *there might be better tools out there that can give you detain information on memory consumption used by the app. Let us know if you find something. I will look as well. You can also write a code which would consume just enough memory to skip disk swap but which will need part of the memory reported by the htop or top. Thanks, > > > Many thanks! > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728838.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattgoh01 at gmail.com Tue Sep 23 18:00:08 2014 From: mattgoh01 at gmail.com (Matt Goh) Date: Tue, 23 Sep 2014 15:00:08 -0700 Subject: [vtkusers] combine vtk Message-ID: Dear all, I have vtk files in POLYDATA format that I wish to combine into one. Does anyone know how I can do this? ?Thanks Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Tue Sep 23 18:48:06 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Tue, 23 Sep 2014 22:48:06 +0000 Subject: [vtkusers] combine vtk In-Reply-To: <783F32F429C468060-01@EMF_nv.doe.gov> References: <783F32F429C468060-01@EMF_nv.doe.gov> Message-ID: Try this example out: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/AppendFilter You would read your files in with a vtkPolyDataReader, then use the vtkAppendPolyData filter to combine them - you can then write out the composite file with a vtkPolyDataWriter ... From: Matt Goh > Date: Tuesday, September 23, 2014 3:00 PM To: "vtkusers at vtk.org" > Subject: [vtkusers] combine vtk Dear all, I have vtk files in POLYDATA format that I wish to combine into one. Does anyone know how I can do this? ?Thanks Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at guillaumedumont.com Tue Sep 23 19:15:23 2014 From: me at guillaumedumont.com (Guillaume DUMONT) Date: Tue, 23 Sep 2014 19:15:23 -0400 Subject: [vtkusers] vtkShader2 and Samplers Message-ID: Hi everyone, I am currently trying to use shaders with VTK (GLSL) and I have managed so far to run a vertex & fragment shader using the vtkShader2 and vtkShaderProgram2 classes. However, I am now trying to set the sampler2D of my shader but I haven't been very successful at all and it has been bugging me for a while. In order to use shaders, I based myself on the code snippet given in this answer ( http://vtk.1045678.n5.nabble.com/GLSL-Shader-on-a-vtkActor-VTK-6-1-and-Qt-5-2-1-tt5727788.html#a5728023 ). Here is my shader: #version 130 uniform sampler2D tex; out vec4 color; void propFuncFS(void) { color = texture(tex, vec2(100, 100)); color[3] = 1; } This is very simple test that I use to verify that I get a color from the texture. And here is the C++ code to set the sampler2D "tex", that comes after the snippet mentioned above: // load the texture vtkSmartPointer jpegReader = vtkSmartPointer::New(); jpegReader->SetFileName("path/to/image"); jpegReader->Update(); vtkSmartPointer texture = vtkSmartPointer::New(); texture->SetInputConnection(jpegReader->GetOutputPort()); // try to set the sampler2D here int index = texture->GetIndex(); vtkSmartPointer uniformVariables = vtkSmartPointer::New(); uniformVariables->SetUniformi("tex", 1, &index); program->SetUniformVariables(uniformVariables); With this code, I get a black texture. So my guess was that the uniforms weren't actually copied onto the GPU, so I tried: program->SetContext(m_renderWindow); program->Build(); program->SendUniforms(); But the Build() fails with the linking error: "no program". At this point, I would really appreciate any help/indication/snippet. Thanks a lot in advance. -- Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmalsoaz at yahoo.fr Wed Sep 24 06:52:20 2014 From: jmalsoaz at yahoo.fr (Malsoaz James) Date: Wed, 24 Sep 2014 11:52:20 +0100 Subject: [vtkusers] PolyData Boolean operation problem In-Reply-To: <1411406647071-5728831.post@n5.nabble.com> References: <1343290317.27509.YahooMailNeo@web171204.mail.ir2.yahoo.com> <1343663209.27519.YahooMailNeo@web171205.mail.ir2.yahoo.com> <1411406647071-5728831.post@n5.nabble.com> Message-ID: <1411555940.24786.YahooMailNeo@web171502.mail.ir2.yahoo.com> Please find the vtkImplicitPolyDataFilter class I used for VTK6. This is working for me. Best. Le Lundi 22 septembre 2014 19h24, Remy Trichet a ?crit : Hi James, I was having the same problems with boolean operations(due to bug http://vtk.org/Bug/bug_relationship_graph.php?bug_id=14035&graph=relation), and your code did work well to fix it. I used it with vtk5.10. I am trying to upgrade to VTK 6.1 but your code seems difficult to import. The bug doesn't seem to be fixed in 6.1. I can't include VtkOBBTree in vtkImplicitPolyDataDistance, as it is now part of Filter/Core, and VtkOBBTree is in Filter/General. It's not possible to add General to the dependencies of Core, because this will create a circular dependency. Do you or somebody have an idea to fix this problem with VTK 6.1 ? Thank you R?my -- View this message in context: http://vtk.1045678.n5.nabble.com/PolyData-Boolean-operation-problem-tp5714926p5728831.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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vtkImplicitPolyDataDistance2.cpp URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vtkImplicitPolyDataDistance2.h URL: From emptytanka at web.de Wed Sep 24 08:33:37 2014 From: emptytanka at web.de (Tankard) Date: Wed, 24 Sep 2014 05:33:37 -0700 (PDT) Subject: [vtkusers] vtkRenderWindow::New() returns null Message-ID: <1411562017935-5728854.post@n5.nabble.com> Hi, I'm trying to display 3D Data within a QT-GUI. Therefore, I want to use the QVTKWidget. My problem is, that there is an access violation when I set a parent to the QVTKWidget. I have a QWidget (name: wid3D) in my gui. Then, after setting up the gui, I construct a QVTKWidget and set the QWidget as parent. vtkWidget = std::make_unique(); vtkWidget->setParent(ui.wid3D); Within setParent, the following method is called vtkRenderWindow* QVTKWidget::GetRenderWindow() { if (!this->mRenWin) { // create a default vtk window vtkRenderWindow* win = vtkRenderWindow::New(); this->SetRenderWindow(win); win->Delete(); } return this->mRenWin; } There, vtkRenderWindow::New() returned null and the call win->Delete() crashes the application. In the VTK-OutputWindow is a generic warning that points to somewhere in the VTK Build Folder, but I cannot figure out where exactly, because I cannot interact with this window after the application crashed. There is also an error message that there was no override found for vtkRenderWindow. Has anyone an idea how to fix this? I use QT 5.3 and VTK 6.1 which I build by myself with CMake. I also use Visual Studio 2013 on Windows 8.1 (64 Bit). regards, Tankard -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderWindow-New-returns-null-tp5728854.html Sent from the VTK - Users mailing list archive at Nabble.com. From samantrv at mail.uc.edu Wed Sep 24 09:03:19 2014 From: samantrv at mail.uc.edu (Samant, Rutuja (samantrv)) Date: Wed, 24 Sep 2014 13:03:19 +0000 Subject: [vtkusers] vtkUGFacetReader Message-ID: <1411563799624.8588@mail.uc.edu> ?Hello, Would someone be able to help me with the input file format for the vtkUGFacetReader? Does this UGFacetReader refer to UG NX Facet type? Regards, Rutuja Samant Graduate Student, Mechanical Engineering University of Cincinnati -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 24 10:47:23 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 24 Sep 2014 08:47:23 -0600 Subject: [vtkusers] vtkRenderWindow::New() returns null In-Reply-To: <1411562017935-5728854.post@n5.nabble.com> References: <1411562017935-5728854.post@n5.nabble.com> Message-ID: This can happen if you don't include the vtkRenderingOpenGL library in your project. - David On Wed, Sep 24, 2014 at 6:33 AM, Tankard wrote: > Hi, > > I'm trying to display 3D Data within a QT-GUI. Therefore, I want to use the > QVTKWidget. > > My problem is, that there is an access violation when I set a parent to the > QVTKWidget. I have a QWidget (name: wid3D) in my gui. Then, after setting up > the gui, I construct a QVTKWidget and set the QWidget as parent. > > vtkWidget = std::make_unique(); > vtkWidget->setParent(ui.wid3D); > > Within setParent, the following method is called > > vtkRenderWindow* QVTKWidget::GetRenderWindow() > { > if (!this->mRenWin) > { > // create a default vtk window > vtkRenderWindow* win = vtkRenderWindow::New(); > this->SetRenderWindow(win); > win->Delete(); > } > > return this->mRenWin; > } > > There, vtkRenderWindow::New() returned null and the call win->Delete() > crashes the application. > In the VTK-OutputWindow is a generic warning that points to somewhere in the > VTK Build Folder, but I cannot figure out where exactly, because I cannot > interact with this window after the application crashed. There is also an > error message that there was no override found for vtkRenderWindow. > > Has anyone an idea how to fix this? > > I use QT 5.3 and VTK 6.1 which I build by myself with CMake. I also use > Visual Studio 2013 on Windows 8.1 (64 Bit). > > > regards, > > Tankard From someshsandbox at gmail.com Wed Sep 24 11:12:23 2014 From: someshsandbox at gmail.com (Somesh) Date: Wed, 24 Sep 2014 11:12:23 -0400 Subject: [vtkusers] Undesirable smoothing/anti-aliasing when displaying image Message-ID: Hi, I am displaying an image with sharp boundaries in VTK. However, the boundaries seem to have some kind of smoothing/anti-aliasing effect. I have turned of all smoothing feature in the render window, but I still see this effect. Viewing the image in ITK-SNAP shows sharp boundaries, which is consistent with the image. I have created a test program to illustrate this. The code and data can be found @ https://github.com/someshSandbox/vtkImageSmoothingBug The following screenshots should illustrate the problem clearly : https://github.com/someshSandbox/vtkImageSmoothingBug/tree/master/screenshots Thanks, Somesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 24 11:30:44 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 24 Sep 2014 09:30:44 -0600 Subject: [vtkusers] Undesirable smoothing/anti-aliasing when displaying image In-Reply-To: References: Message-ID: Hi Somesh, It's definitely not a bug. Interpolation is turned on by default, in order to reduce a certain artifact known as "pixels" that can occur when displaying a uniformly sampled data set ;) In VTK 5, use this method: actor->InterpolateOff(); In VTK 6, you can have even more control via the Property and the Mapper for the image: actor->GetProperty()->SetInterpolationTypeToNearest(); actor->GetMapper()->BorderOn(); - David On Wed, Sep 24, 2014 at 9:12 AM, Somesh wrote: > Hi, > I am displaying an image with sharp boundaries in VTK. > However, the boundaries seem to have some kind of smoothing/anti-aliasing > effect. > I have turned of all smoothing feature in the render window, but I still see > this effect. > Viewing the image in ITK-SNAP shows sharp boundaries, which is consistent > with the image. > > I have created a test program to illustrate this. The code and data can be > found @ > > https://github.com/someshSandbox/vtkImageSmoothingBug > > The following screenshots should illustrate the problem clearly : > https://github.com/someshSandbox/vtkImageSmoothingBug/tree/master/screenshots > > > Thanks, > Somesh From emptytanka at web.de Wed Sep 24 11:32:13 2014 From: emptytanka at web.de (Tankard) Date: Wed, 24 Sep 2014 08:32:13 -0700 (PDT) Subject: [vtkusers] vtkRenderWindow::New() returns null In-Reply-To: References: <1411562017935-5728854.post@n5.nabble.com> Message-ID: <1411572733570-5728859.post@n5.nabble.com> In the linker settings, I included the path to the /lib folder of my VTK installation (not the build-folder). I also added all *.lib files from the VTK/lib, including the vtkRenderingOpenGL-6.1.lib. David Gobbi wrote > This can happen if you don't include the vtkRenderingOpenGL library > in your project. > > - David -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderWindow-New-returns-null-tp5728854p5728859.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Wed Sep 24 11:38:55 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 24 Sep 2014 11:38:55 -0400 Subject: [vtkusers] vtkRenderWindow::New() returns null In-Reply-To: <1411572733570-5728859.post@n5.nabble.com> References: <1411562017935-5728854.post@n5.nabble.com> <1411572733570-5728859.post@n5.nabble.com> Message-ID: You are probably not using cmake, and thus not automatically getting the runtime initialization of the vtkRenderingOpenGL module. Which is an implementation of the vtkRenderingModule. From: http://www.vtk.org/Wiki/VTK/Build_System_Migration #include VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkInteractionStyle); David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Sep 24, 2014 at 11:32 AM, Tankard wrote: > In the linker settings, I included the path to the /lib folder of my VTK > installation (not the build-folder). I also added all *.lib files from the > VTK/lib, including the vtkRenderingOpenGL-6.1.lib. > > > David Gobbi wrote > > This can happen if you don't include the vtkRenderingOpenGL library > > in your project. > > > > - David > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkRenderWindow-New-returns-null-tp5728854p5728859.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From someshsandbox at gmail.com Wed Sep 24 11:39:55 2014 From: someshsandbox at gmail.com (Somesh) Date: Wed, 24 Sep 2014 11:39:55 -0400 Subject: [vtkusers] Undesirable smoothing/anti-aliasing when displaying image In-Reply-To: References: Message-ID: Thanks David, That fixed it :) -Somesh On Wed, Sep 24, 2014 at 11:30 AM, David Gobbi wrote: > Hi Somesh, > > It's definitely not a bug. Interpolation is turned on by default, in > order to > reduce a certain artifact known as "pixels" that can occur when displaying > a uniformly sampled data set ;) > > In VTK 5, use this method: > > actor->InterpolateOff(); > > In VTK 6, you can have even more control via the Property and the Mapper > for the image: > > actor->GetProperty()->SetInterpolationTypeToNearest(); > actor->GetMapper()->BorderOn(); > > - David > > > On Wed, Sep 24, 2014 at 9:12 AM, Somesh wrote: > > Hi, > > I am displaying an image with sharp boundaries in VTK. > > However, the boundaries seem to have some kind of smoothing/anti-aliasing > > effect. > > I have turned of all smoothing feature in the render window, but I still > see > > this effect. > > Viewing the image in ITK-SNAP shows sharp boundaries, which is consistent > > with the image. > > > > I have created a test program to illustrate this. The code and data can > be > > found @ > > > > https://github.com/someshSandbox/vtkImageSmoothingBug > > > > The following screenshots should illustrate the problem clearly : > > > https://github.com/someshSandbox/vtkImageSmoothingBug/tree/master/screenshots > > > > > > Thanks, > > Somesh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emptytanka at web.de Wed Sep 24 11:50:07 2014 From: emptytanka at web.de (Tankard) Date: Wed, 24 Sep 2014 08:50:07 -0700 (PDT) Subject: [vtkusers] vtkRenderWindow::New() returns null In-Reply-To: References: <1411562017935-5728854.post@n5.nabble.com> <1411572733570-5728859.post@n5.nabble.com> Message-ID: <1411573807332-5728862.post@n5.nabble.com> Thanks a lot. I don't use CMake and this fixed the problem. David E DeMarle wrote > You are probably not using cmake, and thus not automatically getting the > runtime initialization of the vtkRenderingOpenGL module. Which is an > implementation of the vtkRenderingModule. > > From: http://www.vtk.org/Wiki/VTK/Build_System_Migration > > #include > > VTK_MODULE_INIT(vtkRenderingOpenGL); > VTK_MODULE_INIT(vtkInteractionStyle); > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderWindow-New-returns-null-tp5728854p5728862.html Sent from the VTK - Users mailing list archive at Nabble.com. From robin.picou at audiogaming.net Wed Sep 24 12:25:08 2014 From: robin.picou at audiogaming.net (Robin Picou) Date: Wed, 24 Sep 2014 18:25:08 +0200 Subject: [vtkusers] Smart volumetric rendering like Paraview Message-ID: Hi there ! I'm new to the VTK world, and I'm a bit lost at the moment. I need to get a volumetric rendering of .vtk files (structured points), like in Paraview ( see example here : http://imgur.com/qAKvynv ). The HAVSVVolumeMapper example seems to do something very similar, but I'm unable to load my files : ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line 314 vtkIdTypeArray (029CCDC0): Unable to allocate 145475925 elements of size 4 bytes. ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line 314 vtkIdTypeArray (029CB710): Unable to allocate 72737961 elements of size 4 bytes. My files are quite big (50-60 mo, almost 20 million points), but in Paraview it's loaded without any issues and the visualization is fast enough for my needs. The SmarlVolumeMapper example seems to be able to do this kind of rendering, but I don't know how to use it with .vtk files, so if someone has some hints on how to achieve this, I'll be deeply grateful ! Thanks in advance, Robin -------------- next part -------------- An HTML attachment was scrubbed... URL: From szilardszaloki at gmail.com Wed Sep 24 14:15:55 2014 From: szilardszaloki at gmail.com (szilardszaloki) Date: Wed, 24 Sep 2014 11:15:55 -0700 (PDT) Subject: [vtkusers] VTK 6.2 with BGL -> "VTK_USE_BOOST" issue. In-Reply-To: <1404408073823.4791@uwyo.edu> References: <1404408073823.4791@uwyo.edu> Message-ID: <1411582555368-5728864.post@n5.nabble.com> Hi! I have the same issue. Did you manage to solve the problem? Thanks in advance! Szilard -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-6-2-with-BGL-VTK-USE-BOOST-issue-tp5727740p5728864.html Sent from the VTK - Users mailing list archive at Nabble.com. From robert.maynard at kitware.com Wed Sep 24 14:27:52 2014 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 24 Sep 2014 14:27:52 -0400 Subject: [vtkusers] Smart volumetric rendering like Paraview In-Reply-To: References: Message-ID: Have you tried compiling VTK as 64bit? This looks like you have ran out of process memory for a 32bit program. On Wed, Sep 24, 2014 at 12:25 PM, Robin Picou wrote: > Hi there ! > > I'm new to the VTK world, and I'm a bit lost at the moment. > I need to get a volumetric rendering of .vtk files (structured points), like > in Paraview ( see example here : http://imgur.com/qAKvynv ). > > The HAVSVVolumeMapper example seems to do something very similar, but I'm > unable to load my files : > > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line 314 > vtkIdTypeArray (029CCDC0): Unable to allocate 145475925 elements of size 4 > bytes. > > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line 314 > vtkIdTypeArray (029CB710): Unable to allocate 72737961 elements of size 4 > bytes. > > My files are quite big (50-60 mo, almost 20 million points), but in Paraview > it's loaded without any issues and the visualization is fast enough for my > needs. > > > The SmarlVolumeMapper example seems to be able to do this kind of rendering, > but I don't know how to use it with .vtk files, so if someone has some hints > on how to achieve this, I'll be deeply grateful ! > > > Thanks in advance, > Robin > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From gpwright at gmail.com Wed Sep 24 15:51:56 2014 From: gpwright at gmail.com (gpwright) Date: Wed, 24 Sep 2014 12:51:56 -0700 (PDT) Subject: [vtkusers] How to add custom shaders in OpenGL2 backend In-Reply-To: References: <1407905880602-5728201.post@n5.nabble.com> Message-ID: <1411588316024-5728866.post@n5.nabble.com> FYI I encountered the issue described on this thread. I addressed it by subclassing vtkOpenGLPolyDataMapper and overriding the BuildShader function to substitute in my own shader code. Works fine... Geoff -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-add-custom-shaders-in-OpenGL2-backend-tp5728201p5728866.html Sent from the VTK - Users mailing list archive at Nabble.com. From wulihouxiaoshuai at 163.com Thu Sep 25 03:49:31 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Thu, 25 Sep 2014 00:49:31 -0700 (PDT) Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> <1411005272089-5728793.post@n5.nabble.com> <1411348720077-5728824.post@n5.nabble.com> <1411456542209-5728838.post@n5.nabble.com> Message-ID: <1411631371754-5728868.post@n5.nabble.com> Finally I found the cause of my problem, I made a mistake when I configured the VTK: I set the VTK_USE_NVCONTROL to ON according to http://vtk.1045678.n5.nabble.com/dashboard-maintainers-To-make-TestGPUInfo-works-properly-td1244762.html. After setting VTK_USE_NVCONTROL to OFF and configuring and building VTK again, the occupied memory of my applications decreased. But I still don't know why? -- View this message in context: http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728868.html Sent from the VTK - Users mailing list archive at Nabble.com. From robin.picou at audiogaming.net Thu Sep 25 05:20:53 2014 From: robin.picou at audiogaming.net (Robin Picou) Date: Thu, 25 Sep 2014 11:20:53 +0200 Subject: [vtkusers] Smart volumetric rendering like Paraview In-Reply-To: References: Message-ID: Ok, I've just rebuilt VTK and the examples in 64 bits. No more crash, but the process takes 1.8 gb in RAM then freeze. I don't get why a 35mo file (the smaller I have) will take 1.8 gb after reading, especially while Paraview only needs something like 150 mb : / . 2014-09-24 20:27 GMT+02:00 Robert Maynard : > Have you tried compiling VTK as 64bit? This looks like you have ran > out of process memory for a 32bit program. > > On Wed, Sep 24, 2014 at 12:25 PM, Robin Picou > wrote: > > Hi there ! > > > > I'm new to the VTK world, and I'm a bit lost at the moment. > > I need to get a volumetric rendering of .vtk files (structured points), > like > > in Paraview ( see example here : http://imgur.com/qAKvynv ). > > > > The HAVSVVolumeMapper example seems to do something very similar, but I'm > > unable to load my files : > > > > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line 314 > > vtkIdTypeArray (029CCDC0): Unable to allocate 145475925 elements of size > 4 > > bytes. > > > > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line 314 > > vtkIdTypeArray (029CB710): Unable to allocate 72737961 elements of size 4 > > bytes. > > > > My files are quite big (50-60 mo, almost 20 million points), but in > Paraview > > it's loaded without any issues and the visualization is fast enough for > my > > needs. > > > > > > The SmarlVolumeMapper example seems to be able to do this kind of > rendering, > > but I don't know how to use it with .vtk files, so if someone has some > hints > > on how to achieve this, I'll be deeply grateful ! > > > > > > Thanks in advance, > > Robin > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.salatin at gmail.com Thu Sep 25 06:08:20 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Thu, 25 Sep 2014 03:08:20 -0700 (PDT) Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 Message-ID: <1411639700092-5728870.post@n5.nabble.com> Hi, how can i compile VTK under Mac Os X 10.9.5 with python 2.7.8? First i download source, then cmake . , make and sudo make install. But python don't find vtk: ImportError: No module named vtk Thanks for help! -- View this message in context: http://vtk.1045678.n5.nabble.com/Compile-VTK-under-Mac-Os-X-10-9-5-with-python-2-7-8-tp5728870.html Sent from the VTK - Users mailing list archive at Nabble.com. From chafey at gmail.com Thu Sep 25 07:32:03 2014 From: chafey at gmail.com (Chris Hafey) Date: Thu, 25 Sep 2014 06:32:03 -0500 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images Message-ID: VTK 6.1.0 Mac OS X Mavericks 10.9.5 Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB My program uses VTK to do off screen volume rendering of medical images. I suspect this is a bug in VTK and not my software because: 1) GPURenderMode works fine on Windows (both in a VM running on same Mac and on two other Windows 7 boxes with an nVidia GPUs) 2) RayCastRenderMode works fine on Mac OS X 3) TextureRenderMode works fine on Mac OS X I tried searching the mailing list and google and couldn't find anything. The rendering code is about as basic as it can be - it simply sets the color, opacity, clip planes and matrix. Any ideas on what I might be doing wrong or how I can debug? Thanks Chris Hafey -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Sep 25 07:46:10 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 25 Sep 2014 07:46:10 -0400 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: Hi Chris, Are you using osmesa for the offscreen rendering? Are you getting any error on the console? Thanks On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey wrote: > VTK 6.1.0 > Mac OS X Mavericks 10.9.5 > Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB > > My program uses VTK to do off screen volume rendering of medical images. > I suspect this is a bug in VTK and not my software because: > 1) GPURenderMode works fine on Windows (both in a VM running on same Mac > and on two other Windows 7 boxes with an nVidia GPUs) > 2) RayCastRenderMode works fine on Mac OS X > 3) TextureRenderMode works fine on Mac OS X > > I tried searching the mailing list and google and couldn't find anything. > The rendering code is about as basic as it can be - it simply sets the > color, opacity, clip planes and matrix. Any ideas on what I might be doing > wrong or how I can debug? > > Thanks > > Chris Hafey > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From chafey at gmail.com Thu Sep 25 08:05:01 2014 From: chafey at gmail.com (Chris Hafey) Date: Thu, 25 Sep 2014 07:05:01 -0500 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: Hi Aashish, Forgive my ignorance but I don't know much about osmesa or whether I am using it. I am using VTK as built by homebrew and don't see any options related to osmesa. I have not installed osmesa on the machine. No errors or warnings are issued on the console. Chris On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Hi Chris, > > Are you using osmesa for the offscreen rendering? Are you getting any > error on the console? > > Thanks > > > On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey wrote: > >> VTK 6.1.0 >> Mac OS X Mavericks 10.9.5 >> Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB >> >> My program uses VTK to do off screen volume rendering of medical images. >> I suspect this is a bug in VTK and not my software because: >> 1) GPURenderMode works fine on Windows (both in a VM running on same Mac >> and on two other Windows 7 boxes with an nVidia GPUs) >> 2) RayCastRenderMode works fine on Mac OS X >> 3) TextureRenderMode works fine on Mac OS X >> >> I tried searching the mailing list and google and couldn't find >> anything. The rendering code is about as basic as it can be - it simply >> sets the color, opacity, clip planes and matrix. Any ideas on what I might >> be doing wrong or how I can debug? >> >> Thanks >> >> Chris Hafey >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Sep 25 08:21:41 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 25 Sep 2014 08:21:41 -0400 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: No problem. How did you enable the offscreen? Can you post your code somewhere? Thanks, Aashish On Thu, Sep 25, 2014 at 8:05 AM, Chris Hafey wrote: > Hi Aashish, > Forgive my ignorance but I don't know much about osmesa or whether I am > using it. I am using VTK as built by homebrew and don't see any options > related to osmesa. I have not installed osmesa on the machine. No errors > or warnings are issued on the console. > > Chris > > On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> Hi Chris, >> >> Are you using osmesa for the offscreen rendering? Are you getting any >> error on the console? >> >> Thanks >> >> >> On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey wrote: >> >>> VTK 6.1.0 >>> Mac OS X Mavericks 10.9.5 >>> Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB >>> >>> My program uses VTK to do off screen volume rendering of medical >>> images. I suspect this is a bug in VTK and not my software because: >>> 1) GPURenderMode works fine on Windows (both in a VM running on same Mac >>> and on two other Windows 7 boxes with an nVidia GPUs) >>> 2) RayCastRenderMode works fine on Mac OS X >>> 3) TextureRenderMode works fine on Mac OS X >>> >>> I tried searching the mailing list and google and couldn't find >>> anything. The rendering code is about as basic as it can be - it simply >>> sets the color, opacity, clip planes and matrix. Any ideas on what I might >>> be doing wrong or how I can debug? >>> >>> Thanks >>> >>> Chris Hafey >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Sep 25 08:31:07 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 25 Sep 2014 06:31:07 -0600 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: <1411639700092-5728870.post@n5.nabble.com> References: <1411639700092-5728870.post@n5.nabble.com> Message-ID: Hi Marco, The easiest thing to do is set this variable in your cmake cache and then run "make" and "make install" again: VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages By default, VTK installs all files within the "install prefix" /usr/local, so the python modules go into /usr/local/lib/python2.7/site-packages. Unfortunately, Apple's python doesn't look for packages there. - David On Thu, Sep 25, 2014 at 4:08 AM, Marco Salatin wrote: > Hi, > how can i compile VTK under Mac Os X 10.9.5 with python 2.7.8? > > First i download source, then cmake . , make and sudo make install. But > python don't find vtk: > ImportError: No module named vtk > > > Thanks for help! > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Compile-VTK-under-Mac-Os-X-10-9-5-with-python-2-7-8-tp5728870.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From chafey at gmail.com Thu Sep 25 08:32:06 2014 From: chafey at gmail.com (Chris Hafey) Date: Thu, 25 Sep 2014 07:32:06 -0500 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: I am enabling off screen rendering by calling SetOffScreenRendering(1) on the vtkRenderWindow. Should I be using osmesa? I can create a standalone example to reproduce if needed. Chris On Thu, Sep 25, 2014 at 7:21 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > No problem. How did you enable the offscreen? Can you post your code > somewhere? > > Thanks, > Aashish > > On Thu, Sep 25, 2014 at 8:05 AM, Chris Hafey wrote: > >> Hi Aashish, >> Forgive my ignorance but I don't know much about osmesa or whether I am >> using it. I am using VTK as built by homebrew and don't see any options >> related to osmesa. I have not installed osmesa on the machine. No errors >> or warnings are issued on the console. >> >> Chris >> >> On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> Hi Chris, >>> >>> Are you using osmesa for the offscreen rendering? Are you getting any >>> error on the console? >>> >>> Thanks >>> >>> >>> On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey wrote: >>> >>>> VTK 6.1.0 >>>> Mac OS X Mavericks 10.9.5 >>>> Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB >>>> >>>> My program uses VTK to do off screen volume rendering of medical >>>> images. I suspect this is a bug in VTK and not my software because: >>>> 1) GPURenderMode works fine on Windows (both in a VM running on same >>>> Mac and on two other Windows 7 boxes with an nVidia GPUs) >>>> 2) RayCastRenderMode works fine on Mac OS X >>>> 3) TextureRenderMode works fine on Mac OS X >>>> >>>> I tried searching the mailing list and google and couldn't find >>>> anything. The rendering code is about as basic as it can be - it simply >>>> sets the color, opacity, clip planes and matrix. Any ideas on what I might >>>> be doing wrong or how I can debug? >>>> >>>> Thanks >>>> >>>> Chris Hafey >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Sep 25 08:34:07 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 25 Sep 2014 08:34:07 -0400 Subject: [vtkusers] Smart volumetric rendering like Paraview In-Reply-To: References: Message-ID: Hi Robin, If you can reproduce this behavior with a small example code and post it somewhere, then can probably guide you better. But it seems that you are running into some sort of loop may be? What OS and VTK version is this? Thanks On Thu, Sep 25, 2014 at 5:20 AM, Robin Picou wrote: > Ok, I've just rebuilt VTK and the examples in 64 bits. No more crash, but > the process takes 1.8 gb in RAM then freeze. I don't get why a 35mo file > (the smaller I have) will take 1.8 gb after reading, especially while > Paraview only needs something like 150 mb : / . > > 2014-09-24 20:27 GMT+02:00 Robert Maynard : > >> Have you tried compiling VTK as 64bit? This looks like you have ran >> out of process memory for a 32bit program. >> >> On Wed, Sep 24, 2014 at 12:25 PM, Robin Picou >> wrote: >> > Hi there ! >> > >> > I'm new to the VTK world, and I'm a bit lost at the moment. >> > I need to get a volumetric rendering of .vtk files (structured points), >> like >> > in Paraview ( see example here : http://imgur.com/qAKvynv ). >> > >> > The HAVSVVolumeMapper example seems to do something very similar, but >> I'm >> > unable to load my files : >> > >> > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line >> 314 >> > vtkIdTypeArray (029CCDC0): Unable to allocate 145475925 elements of >> size 4 >> > bytes. >> > >> > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line >> 314 >> > vtkIdTypeArray (029CB710): Unable to allocate 72737961 elements of size >> 4 >> > bytes. >> > >> > My files are quite big (50-60 mo, almost 20 million points), but in >> Paraview >> > it's loaded without any issues and the visualization is fast enough for >> my >> > needs. >> > >> > >> > The SmarlVolumeMapper example seems to be able to do this kind of >> rendering, >> > but I don't know how to use it with .vtk files, so if someone has some >> hints >> > on how to achieve this, I'll be deeply grateful ! >> > >> > >> > Thanks in advance, >> > Robin >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Sep 25 08:37:06 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 25 Sep 2014 08:37:06 -0400 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: This is good to know. Do you get any errors on the console? A standalone example will be nice. - Aashish On Thu, Sep 25, 2014 at 8:32 AM, Chris Hafey wrote: > I am enabling off screen rendering by calling SetOffScreenRendering(1) on > the vtkRenderWindow. Should I be using osmesa? I can create a standalone > example to reproduce if needed. > > Chris > > On Thu, Sep 25, 2014 at 7:21 AM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> No problem. How did you enable the offscreen? Can you post your code >> somewhere? >> >> Thanks, >> Aashish >> >> On Thu, Sep 25, 2014 at 8:05 AM, Chris Hafey wrote: >> >>> Hi Aashish, >>> Forgive my ignorance but I don't know much about osmesa or whether I >>> am using it. I am using VTK as built by homebrew and don't see any options >>> related to osmesa. I have not installed osmesa on the machine. No errors >>> or warnings are issued on the console. >>> >>> Chris >>> >>> On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> Hi Chris, >>>> >>>> Are you using osmesa for the offscreen rendering? Are you getting any >>>> error on the console? >>>> >>>> Thanks >>>> >>>> >>>> On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey wrote: >>>> >>>>> VTK 6.1.0 >>>>> Mac OS X Mavericks 10.9.5 >>>>> Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB >>>>> >>>>> My program uses VTK to do off screen volume rendering of medical >>>>> images. I suspect this is a bug in VTK and not my software because: >>>>> 1) GPURenderMode works fine on Windows (both in a VM running on same >>>>> Mac and on two other Windows 7 boxes with an nVidia GPUs) >>>>> 2) RayCastRenderMode works fine on Mac OS X >>>>> 3) TextureRenderMode works fine on Mac OS X >>>>> >>>>> I tried searching the mailing list and google and couldn't find >>>>> anything. The rendering code is about as basic as it can be - it simply >>>>> sets the color, opacity, clip planes and matrix. Any ideas on what I might >>>>> be doing wrong or how I can debug? >>>>> >>>>> Thanks >>>>> >>>>> Chris Hafey >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From chafey at gmail.com Thu Sep 25 08:38:10 2014 From: chafey at gmail.com (Chris Hafey) Date: Thu, 25 Sep 2014 07:38:10 -0500 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: No errors on the console. I will work on a standalone example. Can you please clarify whether or not I should be using mesa / osmesa for GPU rendering on Mac OS X? Chris On Thu, Sep 25, 2014 at 7:37 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > This is good to know. Do you get any errors on the console? A standalone > example will be nice. > > - Aashish > > On Thu, Sep 25, 2014 at 8:32 AM, Chris Hafey wrote: > >> I am enabling off screen rendering by calling SetOffScreenRendering(1) on >> the vtkRenderWindow. Should I be using osmesa? I can create a standalone >> example to reproduce if needed. >> >> Chris >> >> On Thu, Sep 25, 2014 at 7:21 AM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> No problem. How did you enable the offscreen? Can you post your code >>> somewhere? >>> >>> Thanks, >>> Aashish >>> >>> On Thu, Sep 25, 2014 at 8:05 AM, Chris Hafey wrote: >>> >>>> Hi Aashish, >>>> Forgive my ignorance but I don't know much about osmesa or whether I >>>> am using it. I am using VTK as built by homebrew and don't see any options >>>> related to osmesa. I have not installed osmesa on the machine. No errors >>>> or warnings are issued on the console. >>>> >>>> Chris >>>> >>>> On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com> wrote: >>>> >>>>> Hi Chris, >>>>> >>>>> Are you using osmesa for the offscreen rendering? Are you getting any >>>>> error on the console? >>>>> >>>>> Thanks >>>>> >>>>> >>>>> On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey wrote: >>>>> >>>>>> VTK 6.1.0 >>>>>> Mac OS X Mavericks 10.9.5 >>>>>> Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB >>>>>> >>>>>> My program uses VTK to do off screen volume rendering of medical >>>>>> images. I suspect this is a bug in VTK and not my software because: >>>>>> 1) GPURenderMode works fine on Windows (both in a VM running on same >>>>>> Mac and on two other Windows 7 boxes with an nVidia GPUs) >>>>>> 2) RayCastRenderMode works fine on Mac OS X >>>>>> 3) TextureRenderMode works fine on Mac OS X >>>>>> >>>>>> I tried searching the mailing list and google and couldn't find >>>>>> anything. The rendering code is about as basic as it can be - it simply >>>>>> sets the color, opacity, clip planes and matrix. Any ideas on what I might >>>>>> be doing wrong or how I can debug? >>>>>> >>>>>> Thanks >>>>>> >>>>>> Chris Hafey >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Sep 25 08:42:06 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 25 Sep 2014 08:42:06 -0400 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: On Thu, Sep 25, 2014 at 8:38 AM, Chris Hafey wrote: > No errors on the console. I will work on a standalone example. Can you > please clarify whether or not I should be using mesa / osmesa for GPU > rendering on Mac OS X? > In theory your regular driver should work with the offscreen rendering setting. As per my understanding, that will just not open the window but will create a context in which the rendering is performed. But if the image is black and if it is not if you don't set that flag then it means the context was not created properly. VTK should have given you a error but may be it is fooled by the system itself. You can try osmesa, make sure that VTK detects it, and see if that works. - Aashish > > Chris > > On Thu, Sep 25, 2014 at 7:37 AM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> This is good to know. Do you get any errors on the console? A standalone >> example will be nice. >> >> - Aashish >> >> On Thu, Sep 25, 2014 at 8:32 AM, Chris Hafey wrote: >> >>> I am enabling off screen rendering by calling SetOffScreenRendering(1) >>> on the vtkRenderWindow. Should I be using osmesa? I can create a >>> standalone example to reproduce if needed. >>> >>> Chris >>> >>> On Thu, Sep 25, 2014 at 7:21 AM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> No problem. How did you enable the offscreen? Can you post your code >>>> somewhere? >>>> >>>> Thanks, >>>> Aashish >>>> >>>> On Thu, Sep 25, 2014 at 8:05 AM, Chris Hafey wrote: >>>> >>>>> Hi Aashish, >>>>> Forgive my ignorance but I don't know much about osmesa or whether I >>>>> am using it. I am using VTK as built by homebrew and don't see any options >>>>> related to osmesa. I have not installed osmesa on the machine. No errors >>>>> or warnings are issued on the console. >>>>> >>>>> Chris >>>>> >>>>> On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com> wrote: >>>>> >>>>>> Hi Chris, >>>>>> >>>>>> Are you using osmesa for the offscreen rendering? Are you getting any >>>>>> error on the console? >>>>>> >>>>>> Thanks >>>>>> >>>>>> >>>>>> On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey >>>>>> wrote: >>>>>> >>>>>>> VTK 6.1.0 >>>>>>> Mac OS X Mavericks 10.9.5 >>>>>>> Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB >>>>>>> >>>>>>> My program uses VTK to do off screen volume rendering of medical >>>>>>> images. I suspect this is a bug in VTK and not my software because: >>>>>>> 1) GPURenderMode works fine on Windows (both in a VM running on same >>>>>>> Mac and on two other Windows 7 boxes with an nVidia GPUs) >>>>>>> 2) RayCastRenderMode works fine on Mac OS X >>>>>>> 3) TextureRenderMode works fine on Mac OS X >>>>>>> >>>>>>> I tried searching the mailing list and google and couldn't find >>>>>>> anything. The rendering code is about as basic as it can be - it simply >>>>>>> sets the color, opacity, clip planes and matrix. Any ideas on what I might >>>>>>> be doing wrong or how I can debug? >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>>> Chris Hafey >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Sep 25 08:51:38 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 25 Sep 2014 08:51:38 -0400 Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: <1411631371754-5728868.post@n5.nabble.com> References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> <1411005272089-5728793.post@n5.nabble.com> <1411348720077-5728824.post@n5.nabble.com> <1411456542209-5728838.post@n5.nabble.com> <1411631371754-5728868.post@n5.nabble.com> Message-ID: This is great finding. Thanks. Can you print out the values by calling PrintSelf on the mapper? After and before you change this flag to ON and OFF. Look for MaxMemoryInBytes os << indent << "MaxMemoryInBytes: " << this->MaxMemoryInBytes << endl; Also, see if your can put a break point here: Rendering/OpenGL/vtkXGPUInfoList.cxx:81 - Aashish On Thu, Sep 25, 2014 at 3:49 AM, Emptystack wrote: > Finally I found the cause of my problem, I made a mistake when I > configured > the VTK: I set the VTK_USE_NVCONTROL to ON according to > > http://vtk.1045678.n5.nabble.com/dashboard-maintainers-To-make-TestGPUInfo-works-properly-td1244762.html > . > After setting VTK_USE_NVCONTROL to OFF and configuring and building VTK > again, the occupied memory of my applications decreased. But I still don't > know why? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728868.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From sfaisal.ali91 at gmail.com Thu Sep 25 09:11:40 2014 From: sfaisal.ali91 at gmail.com (sfaisalali91) Date: Thu, 25 Sep 2014 06:11:40 -0700 (PDT) Subject: [vtkusers] 3D presets calculation Message-ID: <1411650700534-5728883.post@n5.nabble.com> Hi, Of late i have been working on 3D presets and i have succeeded in adding many presets, Now i am aiming at changing the 3D presets continuously on MouseMoveEvent (like window width/level interaction). i don't want to hard code these parametrc values passed to vtkColorTransferFunction and vtkPiecewiseFunction. Please can some one guide me How to calculate these values and pass it to the CallBack funtion directly without hardcoding them?? vtkColorTransferFunction::AddRGBPoint( double x, double r, double g, double b, double midpoint, double sharpness ); vtkPieceWiseFunction::AddPoint( double x, double y, double midpoint, double sharpness ); Thank you in advance! Thanks & best regards Syed Faisal Ali -- View this message in context: http://vtk.1045678.n5.nabble.com/3D-presets-calculation-tp5728883.html Sent from the VTK - Users mailing list archive at Nabble.com. From chafey at gmail.com Thu Sep 25 09:39:04 2014 From: chafey at gmail.com (Chris Hafey) Date: Thu, 25 Sep 2014 08:39:04 -0500 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: The follow code will reproduce the problem - change the line commented out near the top to switch between GPU and RayCast rendering to see it working and not working. Let me know if you need a CMakefile and DICOM files (I assume you have DICOM files and can plug this code into an existing project if needed ) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char** argv) { //int renderMode =vtkSmartVolumeMapper::RayCastRenderMode; // this works int renderMode =vtkSmartVolumeMapper::GPURenderMode; // this generates black image // Read the DICOM Data vtkSmartPointer reader = vtkSmartPointer< vtkDICOMImageReader>::New(); reader->SetDirectoryName("/Users/chafey/DICOM/Volume3"); reader->Update(); vtkSmartPointer imageData(reader->GetOutput()); // Translate origin to center of volume double xSpacing, ySpacing, zSpacing; imageData->GetSpacing(xSpacing, ySpacing, zSpacing); int* dims = imageData->GetDimensions(); double xCenter = dims[0] * xSpacing / 2.0; double yCenter = dims[1] * ySpacing / 2.0; double zCenter = dims[2] * zSpacing / 2.0; imageData->SetOrigin(-xCenter, -yCenter, -zCenter); // Setup the renderer for offscreen rendering vtkSmartPointer renderer = vtkSmartPointer:: New(); // Setup the render window vtkSmartPointer render_window = vtkSmartPointer< vtkRenderWindow>::New(); render_window->SetOffScreenRendering(1); render_window->AddRenderer(renderer); render_window->SetSize(512, 512); // Setup the volume mapper vtkSmartPointer volume_mapper = vtkSmartPointer< vtkSmartVolumeMapper>::New(); volume_mapper->SetRequestedRenderMode(renderMode); volume_mapper->SetInputData(imageData); // Setup the volume vtkSmartPointer volume = vtkSmartPointer::New(); volume->SetMapper(volume_mapper); renderer->AddViewProp(volume); // Render the image render_window->Render(); vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(render_window); windowToImageFilter->Update(); // Create a JPEG in memory vtkSmartPointer writer = vtkSmartPointer:: New(); writer->WriteToMemoryOn(); writer->SetInputConnection(windowToImageFilter->GetOutputPort()); writer->Write(); vtkSmartPointer dataPtr = writer->GetResult(); dataPtr->Squeeze(); // write the jpeg to disk ofstream myFile ("image.jpg", ios::out | ios::binary); myFile.write ((const char*)dataPtr->GetPointer(0), dataPtr->GetSize()); return 0; } On Thu, Sep 25, 2014 at 7:42 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > On Thu, Sep 25, 2014 at 8:38 AM, Chris Hafey wrote: > >> No errors on the console. I will work on a standalone example. Can you >> please clarify whether or not I should be using mesa / osmesa for GPU >> rendering on Mac OS X? >> > > In theory your regular driver should work with the offscreen rendering > setting. As per my understanding, that will just not open the window but > will create a context in which the rendering is performed. But if the > image is black and if it is not if you don't set that flag then it means > the context was not created properly. VTK should have given you a error but > may be it is fooled by the system itself. > > You can try osmesa, make sure that VTK detects it, and see if that works. > > - Aashish > >> >> Chris >> >> On Thu, Sep 25, 2014 at 7:37 AM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> This is good to know. Do you get any errors on the console? A standalone >>> example will be nice. >>> >>> - Aashish >>> >>> On Thu, Sep 25, 2014 at 8:32 AM, Chris Hafey wrote: >>> >>>> I am enabling off screen rendering by calling SetOffScreenRendering(1) >>>> on the vtkRenderWindow. Should I be using osmesa? I can create a >>>> standalone example to reproduce if needed. >>>> >>>> Chris >>>> >>>> On Thu, Sep 25, 2014 at 7:21 AM, Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com> wrote: >>>> >>>>> No problem. How did you enable the offscreen? Can you post your code >>>>> somewhere? >>>>> >>>>> Thanks, >>>>> Aashish >>>>> >>>>> On Thu, Sep 25, 2014 at 8:05 AM, Chris Hafey wrote: >>>>> >>>>>> Hi Aashish, >>>>>> Forgive my ignorance but I don't know much about osmesa or whether >>>>>> I am using it. I am using VTK as built by homebrew and don't see any >>>>>> options related to osmesa. I have not installed osmesa on the machine. No >>>>>> errors or warnings are issued on the console. >>>>>> >>>>>> Chris >>>>>> >>>>>> On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>> >>>>>>> Hi Chris, >>>>>>> >>>>>>> Are you using osmesa for the offscreen rendering? Are you getting >>>>>>> any error on the console? >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>>> >>>>>>> On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey >>>>>>> wrote: >>>>>>> >>>>>>>> VTK 6.1.0 >>>>>>>> Mac OS X Mavericks 10.9.5 >>>>>>>> Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB >>>>>>>> >>>>>>>> My program uses VTK to do off screen volume rendering of medical >>>>>>>> images. I suspect this is a bug in VTK and not my software because: >>>>>>>> 1) GPURenderMode works fine on Windows (both in a VM running on >>>>>>>> same Mac and on two other Windows 7 boxes with an nVidia GPUs) >>>>>>>> 2) RayCastRenderMode works fine on Mac OS X >>>>>>>> 3) TextureRenderMode works fine on Mac OS X >>>>>>>> >>>>>>>> I tried searching the mailing list and google and couldn't find >>>>>>>> anything. The rendering code is about as basic as it can be - it simply >>>>>>>> sets the color, opacity, clip planes and matrix. Any ideas on what I might >>>>>>>> be doing wrong or how I can debug? >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>>> Chris Hafey >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cdavid.tran at gmail.com Thu Sep 25 09:55:56 2014 From: cdavid.tran at gmail.com (eternallite2) Date: Thu, 25 Sep 2014 06:55:56 -0700 (PDT) Subject: [vtkusers] How to add custom shaders in OpenGL2 backend In-Reply-To: <1411588316024-5728866.post@n5.nabble.com> References: <1407905880602-5728201.post@n5.nabble.com> <1411588316024-5728866.post@n5.nabble.com> Message-ID: <1411653356730-5728885.post@n5.nabble.com> Thank you, that sounds like a good idea for adding custom shaders. Another question: I also want to do some sort of multi-pass rendering as well (if possible), like rendering to a framebuffer object's textures and reuse them in a following shader... do you have any hints for getting that working :) (I'm a beginner with FBOs so some sample code would be great!) - In the older versions of VTK they had render passes, which I could plug in code for every pass. Is it easy to plug in our own passes in VTK 6.2 with the OpenGL2 backend? :) -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-add-custom-shaders-in-OpenGL2-backend-tp5728201p5728885.html Sent from the VTK - Users mailing list archive at Nabble.com. From dhoppes at mbfbioscience.com Thu Sep 25 10:40:10 2014 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Thu, 25 Sep 2014 14:40:10 +0000 Subject: [vtkusers] Outline of a result from a vtkimagereslicemapper In-Reply-To: References: <46CB11F12B9DC24D860D4082451B318A12C4C730@exchange3.microbrightfield.com> Message-ID: <46CB11F12B9DC24D860D4082451B318A12C5C1BA@exchange3.microbrightfield.com> Thanks for the reply, David. I still think that I'm missing something obvious (once I get the outline working, I'll add the tube filter). Here's the pipeline that I'm trying to implement but the outlines seems to be a small box in the upper corner of my volume rather than outlining the slice. ------------ // Create the plane to cut into the volume m_pSlicePlane = vtkSmartPointer::New(); // the slice mapper extracts a slice from the volume m_pSliceMapper = vtkSmartPointer::New(); m_pSliceMapper->SetInputData(GetImageDefinition()->GetImage()->GetImageData()); m_pSliceMapper->SetSlicePlane(m_pSlicePlane); // Set it up so that the slice is not affected by the current lighting situation vtkSmartPointer m_sliceProperty = vtkSmartPointer::New(); m_sliceProperty->SetAmbient(1.0); m_sliceProperty->SetDiffuse(0.0); m_sliceProperty->SetOpacity(1.0); m_sliceProperty->SetInterpolationTypeToLinear(); // Create the mapper to display the slice m_pSliceActor = vtkSmartPointer::New(); m_pSliceActor->SetMapper(m_pSliceMapper); m_pSliceActor->SetProperty(m_sliceProperty); // Add the slice to the scene m_pSceneManager->AddActor(m_pSliceActor); // Cut the slice plane so that we can put an outline around it vtkSmartPointer pCutter = vtkSmartPointer::New(); pCutter->SetCutFunction(m_pSliceMapper->GetSlicePlane()); pCutter->SetInputConnection(m_pSliceMapper->GetOutputPort()); // setup the outline actor vtkSmartPointer pOutlineFilter = vtkSmartPointer::New(); pOutlineFilter->GenerateFacesOn(); pOutlineFilter->SetInputConnection(pCutter->GetOutputPort()); // Create the mapper to display the outline vtkSmartPointer pOutlineMapper = vtkSmartPointer::New(); pOutlineMapper->SetInputConnection(pOutlineFilter->GetOutputPort()); // Create the actor to display the outline m_pOutlineActor = vtkSmartPointer::New(); m_pOutlineActor->GetProperty()->SetColor(1.0,1,0); m_pOutlineActor->GetProperty()->SetLineWidth(10); m_pOutlineActor->SetMapper(pOutlineMapper); // Add the actor to the scene m_pSceneManager->AddActor(m_pOutlineActor); ------------ From: David Gobbi [mailto:david.gobbi at gmail.com] Sent: Thursday, September 18, 2014 4:22 PM To: Doug Hoppes Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Outline of a result from a vtkimagereslicemapper Hi Doug, In order to create a polydata that outlines the slice, you'll need to use the vtkCutter: 1) use GenerateFacesOn() on the vtkOutlineFilter to make it create a closed box 2) use vtkCutter to cut the box with the slice plane from the mapper (mapper->GetSlicePlane() or mapper->GetSlicePlaneInDataCoords()) in order to create a polyline that outlines the slice 3) I also recommend passing the polyline through vtkTubeFilter in order to give the outline a finite thickness - David On Thu, Sep 18, 2014 at 1:00 PM, Doug Hoppes > wrote: Hi all, I've gotten the image reslice mapper working beautifully for my image volume. However, I'm trying to get the outline filter to work so that I can show a bound region around my image slice. All I'm showing is a small square in the upper left corner: -------------- next part -------------- An HTML attachment was scrubbed... URL: From robin.picou at audiogaming.net Thu Sep 25 10:40:58 2014 From: robin.picou at audiogaming.net (Robin Picou) Date: Thu, 25 Sep 2014 16:40:58 +0200 Subject: [vtkusers] Smart volumetric rendering like Paraview In-Reply-To: References: Message-ID: Hi Aashish, Here's a link with the source file and some .vtk files to test (two smalls, and a big one, the one I need to load and visualize : volume.vtk) : http://www34.zippyshare.com/v/60134475/file.html I'm using VTK 6.1 on Windows 7 64 bits with Visual Studio 2010. 2014-09-25 14:34 GMT+02:00 Aashish Chaudhary : > Hi Robin, > > If you can reproduce this behavior with a small example code and post it > somewhere, then can probably guide you better. But it seems that you are > running into some sort of loop may be? What OS and VTK version is this? > > Thanks > > > On Thu, Sep 25, 2014 at 5:20 AM, Robin Picou > wrote: > >> Ok, I've just rebuilt VTK and the examples in 64 bits. No more crash, but >> the process takes 1.8 gb in RAM then freeze. I don't get why a 35mo file >> (the smaller I have) will take 1.8 gb after reading, especially while >> Paraview only needs something like 150 mb : / . >> >> 2014-09-24 20:27 GMT+02:00 Robert Maynard : >> >>> Have you tried compiling VTK as 64bit? This looks like you have ran >>> out of process memory for a 32bit program. >>> >>> On Wed, Sep 24, 2014 at 12:25 PM, Robin Picou >>> wrote: >>> > Hi there ! >>> > >>> > I'm new to the VTK world, and I'm a bit lost at the moment. >>> > I need to get a volumetric rendering of .vtk files (structured >>> points), like >>> > in Paraview ( see example here : http://imgur.com/qAKvynv ). >>> > >>> > The HAVSVVolumeMapper example seems to do something very similar, but >>> I'm >>> > unable to load my files : >>> > >>> > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line >>> 314 >>> > vtkIdTypeArray (029CCDC0): Unable to allocate 145475925 elements of >>> size 4 >>> > bytes. >>> > >>> > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line >>> 314 >>> > vtkIdTypeArray (029CB710): Unable to allocate 72737961 elements of >>> size 4 >>> > bytes. >>> > >>> > My files are quite big (50-60 mo, almost 20 million points), but in >>> Paraview >>> > it's loaded without any issues and the visualization is fast enough >>> for my >>> > needs. >>> > >>> > >>> > The SmarlVolumeMapper example seems to be able to do this kind of >>> rendering, >>> > but I don't know how to use it with .vtk files, so if someone has some >>> hints >>> > on how to achieve this, I'll be deeply grateful ! >>> > >>> > >>> > Thanks in advance, >>> > Robin >>> > >>> > _______________________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Please keep messages on-topic and check the VTK FAQ at: >>> > http://www.vtk.org/Wiki/VTK_FAQ >>> > >>> > 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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Sep 25 10:45:16 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 25 Sep 2014 08:45:16 -0600 Subject: [vtkusers] Outline of a result from a vtkimagereslicemapper In-Reply-To: <46CB11F12B9DC24D860D4082451B318A12C5C1BA@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A12C4C730@exchange3.microbrightfield.com> <46CB11F12B9DC24D860D4082451B318A12C5C1BA@exchange3.microbrightfield.com> Message-ID: Hi Chris, Cut the box, not the slice. - David On Thu, Sep 25, 2014 at 8:40 AM, Doug Hoppes wrote: > Thanks for the reply, David. I still think that I'm missing something > obvious (once I get the outline working, I'll add the tube filter). > > > > Here's the pipeline that I'm trying to implement but the outlines seems to > be a small box in the upper corner of my volume rather than outlining the > slice. > > > > ------------ > > // Create the plane to cut into the volume > > m_pSlicePlane = vtkSmartPointer::New(); > > > > // the slice mapper extracts a slice from the volume > > m_pSliceMapper = vtkSmartPointer::New(); > > m_pSliceMapper->SetInputData(GetImageDefinition()->GetImage()->GetImageData()); > > m_pSliceMapper->SetSlicePlane(m_pSlicePlane); > > > > // Set it up so that the slice is not affected by the current lighting > situation > > vtkSmartPointer m_sliceProperty = > vtkSmartPointer::New(); > > m_sliceProperty->SetAmbient(1.0); > > m_sliceProperty->SetDiffuse(0.0); > > m_sliceProperty->SetOpacity(1.0); > > m_sliceProperty->SetInterpolationTypeToLinear(); > > > > // Create the mapper to display the slice > > m_pSliceActor = vtkSmartPointer::New(); > > m_pSliceActor->SetMapper(m_pSliceMapper); > > m_pSliceActor->SetProperty(m_sliceProperty); > > > > // Add the slice to the scene > > m_pSceneManager->AddActor(m_pSliceActor); > > > > // Cut the slice plane so that we can put an outline around it > > vtkSmartPointer pCutter = vtkSmartPointer::New(); > > pCutter->SetCutFunction(m_pSliceMapper->GetSlicePlane()); > > pCutter->SetInputConnection(m_pSliceMapper->GetOutputPort()); > > > > // setup the outline actor > > vtkSmartPointer pOutlineFilter = > vtkSmartPointer::New(); > > pOutlineFilter->GenerateFacesOn(); > > pOutlineFilter->SetInputConnection(pCutter->GetOutputPort()); > > > > // Create the mapper to display the outline > > vtkSmartPointer pOutlineMapper = > vtkSmartPointer::New(); > > pOutlineMapper->SetInputConnection(pOutlineFilter->GetOutputPort()); > > > > // Create the actor to display the outline > > m_pOutlineActor = vtkSmartPointer::New(); > > m_pOutlineActor->GetProperty()->SetColor(1.0,1,0); > > m_pOutlineActor->GetProperty()->SetLineWidth(10); > > m_pOutlineActor->SetMapper(pOutlineMapper); > > > > // Add the actor to the scene > > m_pSceneManager->AddActor(m_pOutlineActor); > > ------------ > > > > From: David Gobbi [mailto:david.gobbi at gmail.com] > Sent: Thursday, September 18, 2014 4:22 PM > To: Doug Hoppes > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Outline of a result from a vtkimagereslicemapper > > > > Hi Doug, > > > > In order to create a polydata that outlines the slice, you'll need > > to use the vtkCutter: > > > > 1) use GenerateFacesOn() on the vtkOutlineFilter to make it create > > a closed box > > > > 2) use vtkCutter to cut the box with the slice plane from the mapper > > (mapper->GetSlicePlane() or mapper->GetSlicePlaneInDataCoords()) > > in order to create a polyline that outlines the slice > > > > 3) I also recommend passing the polyline through vtkTubeFilter in > > order to give the outline a finite thickness > > > > - David > > > > > > > > On Thu, Sep 18, 2014 at 1:00 PM, Doug Hoppes > wrote: > > Hi all, > > > > I've gotten the image reslice mapper working beautifully for > my image volume. However, I'm trying to get the outline filter to work so > that I can show a bound region around my image slice. All I'm showing is a > small square in the upper left corner: From marco.salatin at gmail.com Thu Sep 25 12:15:20 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Thu, 25 Sep 2014 09:15:20 -0700 (PDT) Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> Message-ID: <1411661720516-5728891.post@n5.nabble.com> I add this: VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages is correct? -- View this message in context: http://vtk.1045678.n5.nabble.com/Compile-VTK-under-Mac-Os-X-10-9-5-with-python-2-7-8-tp5728870p5728891.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Sep 25 12:30:32 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 25 Sep 2014 10:30:32 -0600 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: <1411661720516-5728891.post@n5.nabble.com> References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin wrote: > I add this: > > VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages > > is correct? No, I don't think that will work. The setting that I recommended was the following, because it is where all third-party python modules are installed on my system: VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages Did you install your own python, instead of using the python that comes with OS X? If so, you might have to check to see what its default module path is: import sys print sys.path - David From marco.salatin at gmail.com Thu Sep 25 12:32:34 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Thu, 25 Sep 2014 18:32:34 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: >>> print sys.path ['', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] 2014-09-25 18:30 GMT+02:00 David Gobbi : > On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin > wrote: > > I add this: > > > > > VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages > > > > is correct? > > No, I don't think that will work. The setting that I recommended was > the following, because it is where all third-party python modules are > installed on my system: > > VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages > > Did you install your own python, instead of using the python that > comes with OS X? If so, you might have to check to see what its > default module path is: > > import sys > print sys.path > > - David > -- --- www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Sep 25 12:39:13 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 25 Sep 2014 10:39:13 -0600 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: In that case, yes, the directory you mentioned should work for your python. On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin wrote: >>>> print sys.path > ['', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] > > > 2014-09-25 18:30 GMT+02:00 David Gobbi : >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin >> wrote: >> > I add this: >> > >> > >> > VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >> > >> > is correct? >> >> No, I don't think that will work. The setting that I recommended was >> the following, because it is where all third-party python modules are >> installed on my system: >> >> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages >> >> Did you install your own python, instead of using the python that >> comes with OS X? If so, you might have to check to see what its >> default module path is: >> >> import sys >> print sys.path >> >> - David > > > > > -- > --- > www.salatin.eu From dhoppes at mbfbioscience.com Thu Sep 25 12:47:50 2014 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Thu, 25 Sep 2014 16:47:50 +0000 Subject: [vtkusers] Outline of a result from a vtkimagereslicemapper In-Reply-To: References: <46CB11F12B9DC24D860D4082451B318A12C4C730@exchange3.microbrightfield.com> <46CB11F12B9DC24D860D4082451B318A12C5C1BA@exchange3.microbrightfield.com> Message-ID: <46CB11F12B9DC24D860D4082451B318A12C5C256@exchange3.microbrightfield.com> Thank you! That worked perfectly! -----Original Message----- From: David Gobbi [mailto:david.gobbi at gmail.com] Sent: Thursday, September 25, 2014 10:45 AM To: Doug Hoppes Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Outline of a result from a vtkimagereslicemapper Hi Chris, Cut the box, not the slice. - David On Thu, Sep 25, 2014 at 8:40 AM, Doug Hoppes wrote: > Thanks for the reply, David. I still think that I'm missing something > obvious (once I get the outline working, I'll add the tube filter). > > > > Here's the pipeline that I'm trying to implement but the outlines > seems to be a small box in the upper corner of my volume rather than > outlining the slice. > > > > ------------ > > // Create the plane to cut into the volume > > m_pSlicePlane = vtkSmartPointer::New(); > > > > // the slice mapper extracts a slice from the volume > > m_pSliceMapper = vtkSmartPointer::New(); > > m_pSliceMapper->SetInputData(GetImageDefinition()->GetImage()->GetImag > eData()); > > m_pSliceMapper->SetSlicePlane(m_pSlicePlane); > > > > // Set it up so that the slice is not affected by the current lighting > situation > > vtkSmartPointer m_sliceProperty = > vtkSmartPointer::New(); > > m_sliceProperty->SetAmbient(1.0); > > m_sliceProperty->SetDiffuse(0.0); > > m_sliceProperty->SetOpacity(1.0); > > m_sliceProperty->SetInterpolationTypeToLinear(); > > > > // Create the mapper to display the slice > > m_pSliceActor = vtkSmartPointer::New(); > > m_pSliceActor->SetMapper(m_pSliceMapper); > > m_pSliceActor->SetProperty(m_sliceProperty); > > > > // Add the slice to the scene > > m_pSceneManager->AddActor(m_pSliceActor); > > > > // Cut the slice plane so that we can put an outline around it > > vtkSmartPointer pCutter = > vtkSmartPointer::New(); > > pCutter->SetCutFunction(m_pSliceMapper->GetSlicePlane()); > > pCutter->SetInputConnection(m_pSliceMapper->GetOutputPort()); > > > > // setup the outline actor > > vtkSmartPointer pOutlineFilter = > vtkSmartPointer::New(); > > pOutlineFilter->GenerateFacesOn(); > > pOutlineFilter->SetInputConnection(pCutter->GetOutputPort()); > > > > // Create the mapper to display the outline > > vtkSmartPointer pOutlineMapper = > vtkSmartPointer::New(); > > pOutlineMapper->SetInputConnection(pOutlineFilter->GetOutputPort()); > > > > // Create the actor to display the outline > > m_pOutlineActor = vtkSmartPointer::New(); > > m_pOutlineActor->GetProperty()->SetColor(1.0,1,0); > > m_pOutlineActor->GetProperty()->SetLineWidth(10); > > m_pOutlineActor->SetMapper(pOutlineMapper); > > > > // Add the actor to the scene > > m_pSceneManager->AddActor(m_pOutlineActor); > > ------------ > > > > From: David Gobbi [mailto:david.gobbi at gmail.com] > Sent: Thursday, September 18, 2014 4:22 PM > To: Doug Hoppes > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Outline of a result from a > vtkimagereslicemapper > > > > Hi Doug, > > > > In order to create a polydata that outlines the slice, you'll need > > to use the vtkCutter: > > > > 1) use GenerateFacesOn() on the vtkOutlineFilter to make it create > > a closed box > > > > 2) use vtkCutter to cut the box with the slice plane from the mapper > > (mapper->GetSlicePlane() or mapper->GetSlicePlaneInDataCoords()) > > in order to create a polyline that outlines the slice > > > > 3) I also recommend passing the polyline through vtkTubeFilter in > > order to give the outline a finite thickness > > > > - David > > > > > > > > On Thu, Sep 18, 2014 at 1:00 PM, Doug Hoppes > > wrote: > > Hi all, > > > > I've gotten the image reslice mapper working > beautifully for my image volume. However, I'm trying to get the > outline filter to work so that I can show a bound region around my > image slice. All I'm showing is a small square in the upper left corner: From aashish.chaudhary at kitware.com Thu Sep 25 13:15:25 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 25 Sep 2014 13:15:25 -0400 Subject: [vtkusers] Smart volumetric rendering like Paraview In-Reply-To: References: Message-ID: Got it. On Thu, Sep 25, 2014 at 10:40 AM, Robin Picou wrote: > Hi Aashish, > > Here's a link with the source file and some .vtk files to test (two > smalls, and a big one, the one I need to load and visualize : volume.vtk) : > http://www34.zippyshare.com/v/60134475/file.html > I'm using VTK 6.1 on Windows 7 64 bits with Visual Studio 2010. > > 2014-09-25 14:34 GMT+02:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Hi Robin, >> >> If you can reproduce this behavior with a small example code and post it >> somewhere, then can probably guide you better. But it seems that you are >> running into some sort of loop may be? What OS and VTK version is this? >> >> Thanks >> >> >> On Thu, Sep 25, 2014 at 5:20 AM, Robin Picou > > wrote: >> >>> Ok, I've just rebuilt VTK and the examples in 64 bits. No more crash, >>> but the process takes 1.8 gb in RAM then freeze. I don't get why a 35mo >>> file (the smaller I have) will take 1.8 gb after reading, especially while >>> Paraview only needs something like 150 mb : / . >>> >>> 2014-09-24 20:27 GMT+02:00 Robert Maynard : >>> >>>> Have you tried compiling VTK as 64bit? This looks like you have ran >>>> out of process memory for a 32bit program. >>>> >>>> On Wed, Sep 24, 2014 at 12:25 PM, Robin Picou >>>> wrote: >>>> > Hi there ! >>>> > >>>> > I'm new to the VTK world, and I'm a bit lost at the moment. >>>> > I need to get a volumetric rendering of .vtk files (structured >>>> points), like >>>> > in Paraview ( see example here : http://imgur.com/qAKvynv ). >>>> > >>>> > The HAVSVVolumeMapper example seems to do something very similar, but >>>> I'm >>>> > unable to load my files : >>>> > >>>> > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line >>>> 314 >>>> > vtkIdTypeArray (029CCDC0): Unable to allocate 145475925 elements of >>>> size 4 >>>> > bytes. >>>> > >>>> > ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line >>>> 314 >>>> > vtkIdTypeArray (029CB710): Unable to allocate 72737961 elements of >>>> size 4 >>>> > bytes. >>>> > >>>> > My files are quite big (50-60 mo, almost 20 million points), but in >>>> Paraview >>>> > it's loaded without any issues and the visualization is fast enough >>>> for my >>>> > needs. >>>> > >>>> > >>>> > The SmarlVolumeMapper example seems to be able to do this kind of >>>> rendering, >>>> > but I don't know how to use it with .vtk files, so if someone has >>>> some hints >>>> > on how to achieve this, I'll be deeply grateful ! >>>> > >>>> > >>>> > Thanks in advance, >>>> > Robin >>>> > >>>> > _______________________________________________ >>>> > Powered by www.kitware.com >>>> > >>>> > Visit other Kitware open-source projects at >>>> > http://www.kitware.com/opensource/opensource.html >>>> > >>>> > Please keep messages on-topic and check the VTK FAQ at: >>>> > http://www.vtk.org/Wiki/VTK_FAQ >>>> > >>>> > 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 >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From kwilliams at llu.edu Thu Sep 25 17:27:27 2014 From: kwilliams at llu.edu (Williams, Kenneth (LLU)) Date: Thu, 25 Sep 2014 21:27:27 +0000 Subject: [vtkusers] Issues handling very large files Message-ID: <5F627BB5EE5D494DB4ABAA636AF77253999A0B@LLUDBS1.llu.ad.lluahsc.org> ?Hello, I'm currently running into issues trying to analyze very large .vti data files (~110 GB and up) generated with VTK 5.8. Each file contains several arrays within the point data that describes properties of simulated particles (e.g., tuples of the particles' x, y, and z coordinates). We generate one .vti file per simulation and then use VTK to combine these files into a single large .vti file. We then use Python with VTK to generate e.g. histograms of particle position from the .vti files. Here is some test code that produces the error I am seeing: #!/usr/bin/env python import vtk from sys import argv reader = vtk.vtkXMLImageDataReader() reader.SetFileName(argv[1]) reader.Update() data = reader.GetOutput() ptdata = data.GetPointData() array = ptdata.GetArray(0) npts = array.GetNumberOfTuples() for ii in range(npts): print array.GetTuple3(ii) The error: ERROR: In /build/buildd/vtk-5.8.0/IO/vtkXMLStructuredDataReader.cxx, line 325 vtkXMLImageDataReader (0x1caa160): Error reading extent 0 195310399 0 0 0 0 from piece 0 ERROR: In /build/buildd/vtk-5.8.0/IO/vtkXMLDataReader.cxx, line 510 vtkXMLImageDataReader (0x1caa160): Cannot read point data array "DistalAperturePlus0cm\PhasePosition" from PointData in piece 0. The data array in the element may be too short. Traceback (most recent call last): File "test.py", line 13, in npts = array.GetNumberOfTuples() AttributeError: 'NoneType' object has no attribute 'GetNumberOfTuples' For testing purposes, I have generated files slightly smaller in size (~82 GB) that do work correctly, and the only difference is the number of particles generated. Is there a known issue or workaround for dealing with such large files, or am I possibly looking in the wrong place as to the cause of this error? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattgoh01 at gmail.com Thu Sep 25 18:11:39 2014 From: mattgoh01 at gmail.com (jetvermillion) Date: Thu, 25 Sep 2014 15:11:39 -0700 (PDT) Subject: [vtkusers] combine vtk In-Reply-To: <20140923224832.82BAC8B659@public.kitware.com> References: <20140923224832.82BAC8B659@public.kitware.com> Message-ID: <1411683099171-5728900.post@n5.nabble.com> Thanks for the link. Unfortunately I'm not a programmer by any means, so I'm still a bit lost. I have VTK and vtkAppendFilter built on my machine. Could you give me an example on how to read in the data using vtkPolyDataReader? I have a general understanding on what tools' functions, but not so much on how to execute them. Thank you -- View this message in context: http://vtk.1045678.n5.nabble.com/combine-vtk-tp5728850p5728900.html Sent from the VTK - Users mailing list archive at Nabble.com. From mattgoh01 at gmail.com Thu Sep 25 18:14:09 2014 From: mattgoh01 at gmail.com (Matt Goh) Date: Thu, 25 Sep 2014 15:14:09 -0700 (PDT) Subject: [vtkusers] combine vtk In-Reply-To: <20140923224832.82BAC8B659@public.kitware.com> References: <20140923224832.82BAC8B659@public.kitware.com> Message-ID: <1411683249261-5728902.post@n5.nabble.com> Thank you for the link. Unfortunately I'm not a programmer by any means, so I'm still a bit lost. I have VTK and vtkAppendFilter built on my machine (linux). Can you give me an example on how to read in the data and combine them? I have a general understanding on the tools' functions, but not so much when it comes to how to execute them (script? command line?) Thanks, Matt -- View this message in context: http://vtk.1045678.n5.nabble.com/combine-vtk-tp5728850p5728902.html Sent from the VTK - Users mailing list archive at Nabble.com. From MEEHANBT at nv.doe.gov Thu Sep 25 21:08:02 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Fri, 26 Sep 2014 01:08:02 +0000 Subject: [vtkusers] combine vtk In-Reply-To: <783A4CA029C625110-01@EMF_nv.doe.gov> References: <20140923224832.82BAC8B659@public.kitware.com> <783A4CA029C625110-01@EMF_nv.doe.gov> Message-ID: This is a python script, and I haven't actually run this but it should work something like the following: import glob, vtk # get a list of VTK polydata files in your current directory files = glob.glob("*vtp") # create an append filter to hold your data append = vtk.vtkAppendPolyData() # loop over your files for f in files: rdr = vtk.vtkPolyDataReader() rdr.SetFileName(f) append.AddInputData(rdr.GetData()) # make sure your data is updated append.Update() # write out your appended data writer = vtk.vtkPolyDataWriter() writer.SetFileName("big_glob_of_polydata.vtp") writer.SetInputConnection(append.GetOutputPort()) writer.Write() On 9/25/14 3:11 PM, "jetvermillion" > wrote: Thanks for the link. Unfortunately I'm not a programmer by any means, so I'm still a bit lost. I have VTK and vtkAppendFilter built on my machine. Could you give me an example on how to read in the data using vtkPolyDataReader? I have a general understanding on what tools' functions, but not so much on how to execute them. Thank you -- View this message in context: http://vtk.1045678.n5.nabble.com/combine-vtk-tp5728850p5728900.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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Thu Sep 25 21:18:23 2014 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Fri, 26 Sep 2014 01:18:23 +0000 Subject: [vtkusers] combine vtk In-Reply-To: <783A4C4829C625248-01@EMF_nv.doe.gov> References: <20140923224832.82BAC8B659@public.kitware.com> <783A4C4829C625248-01@EMF_nv.doe.gov> Message-ID: If you're not a programmer - you might consider using ParaView ... simply load in your polydata files using the "open" button, then use the "AppendDatasets" filter. You will have to select all of your datasets (command-click with a Mac, for instance), then select the filter from the pulldown box. You will have to save them as a "Legacy VTK" file format - "*.vtk" but the result will be a merged polydata file. On 9/25/14 3:14 PM, "Matt Goh" wrote: >Thank you for the link. Unfortunately I'm not a programmer by any means, >so >I'm still a bit lost. I have VTK and vtkAppendFilter built on my machine >(linux). Can you give me an example on how to read in the data and combine >them? I have a general understanding on the tools' functions, but not so >much when it comes to how to execute them (script? command line?) > >Thanks, > >Matt > > > >-- >View this message in context: >http://vtk.1045678.n5.nabble.com/combine-vtk-tp5728850p5728902.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 > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > From wulihouxiaoshuai at 163.com Thu Sep 25 22:22:39 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Thu, 25 Sep 2014 19:22:39 -0700 (PDT) Subject: [vtkusers] GPURenderDemo- Difference between linux OS and Windows OS In-Reply-To: References: <1410950214699-5728759.post@n5.nabble.com> <691B339D-0A7D-49CC-8819-D4555E379572@kitware.com> <1411005272089-5728793.post@n5.nabble.com> <1411348720077-5728824.post@n5.nabble.com> <1411456542209-5728838.post@n5.nabble.com> <1411631371754-5728868.post@n5.nabble.com> Message-ID: <1411698159085-5728905.post@n5.nabble.com> In the vtkGPUVolumeRaycastMapper.cxx , the following lines are used to check the GPUInfo: this->MaxMemoryInBytes=0; vtkGPUInfoList *l=vtkGPUInfoList::New(); l->Probe(); if(l->GetNumberOfGPUs()>0) { vtkGPUInfo *info=l->GetGPUInfo(0); this->MaxMemoryInBytes=info->GetDedicatedVideoMemory(); if(this->MaxMemoryInBytes==0) { this->MaxMemoryInBytes=info->GetDedicatedSystemMemory(); } // we ignore info->GetSharedSystemMemory(); as this is very slow. } l->Delete(); if(this->MaxMemoryInBytes==0) // use some default value: 128MB. { this->MaxMemoryInBytes=128*1024*1024; } 1. VTK_USE_NVCONTROL flag is off. The MaxMemoryInBytes is 128MB.Because the vtkGPUInfoList cannot find my GPU,as a result, the MaxMemoryInBytes is the default value 128MB. After debugging I found that vtkGPUInfoList *l=vtkGPUInfoList::New() didn't invoke the vtkXGPUInfoList constructor, but the vtkDummyGPUInfoList constructor. 2.VTK_USE_NVCONTRL flag is on. The MaxMemoryInBytes is 1024MB,that is the VRAM of my nvidia card. And the vtkGPUInfoList *l=vtkGPUInfoList::New() did invoke the vtkXGPUInfoList constructor, and the l->Probe() invoked the Proble() function of vtkXGPUInfoList class: void vtkXGPUInfoList::Probe() { if(!this->Probed) { this->Probed=true; this->Array=new vtkGPUInfoListArray; bool found=false; #ifdef VTK_USE_NVCONTROL // see sample code in nvidia-settings-1.0/samples/nv-control-info.c Display *dpy=XOpenDisplay(NULL); // we use the environment variable DISPLAY if(dpy!=NULL) { int eventBase; int errorBase; if(XNVCTRLQueryExtension(dpy,&eventBase,&errorBase)==True) { int screenCount=XScreenCount(dpy); int nvScreenCount=0; int i=0; while(i0; if(found) { this->Array->v.resize(nvScreenCount); int j=0; i=0; while(iSetDedicatedVideoMemory(ramSize*1024); // ramSize is in KB this->Array->v[j]=info; ++j; } ++i; } } } XCloseDisplay(dpy); } #endif // #ifdef VTK_USE_NVCONTROL if(!found) { this->Array->v.resize(0); // no GPU. } } assert("post: probed" && this->IsProbed()); } Because we have set VTK_USE_NVCONTROL flag ON, so the code between #ifdef and #endif works,and as a result, The information of my GPU is detected.Everything works well except the problem of memory I have said. -- View this message in context: http://vtk.1045678.n5.nabble.com/GPURenderDemo-Difference-between-linux-OS-and-Windows-OS-tp5728759p5728905.html Sent from the VTK - Users mailing list archive at Nabble.com. From mattgoh01 at gmail.com Thu Sep 25 22:53:56 2014 From: mattgoh01 at gmail.com (Matt Goh) Date: Thu, 25 Sep 2014 19:53:56 -0700 (PDT) Subject: [vtkusers] combine vtk In-Reply-To: <20140926011835.043458DEA9@public.kitware.com> References: <20140923224832.82BAC8B659@public.kitware.com> <20140926011835.043458DEA9@public.kitware.com> Message-ID: <1411700036706-5728906.post@n5.nabble.com> Bernard - this is great - I sincerely appreciate your thorough responses. I do have a bit of experience with pseudo languages like matlab (and have learned some c++ eons ago) so I should be able to debug your python script, if needed. If that fails I'll certainly try paraview. Thanks a ton, Matt -- View this message in context: http://vtk.1045678.n5.nabble.com/combine-vtk-tp5728850p5728906.html Sent from the VTK - Users mailing list archive at Nabble.com. From marco.salatin at gmail.com Fri Sep 26 02:20:09 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Fri, 26 Sep 2014 08:20:09 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: Ok thaks for help! If i need to use vtk and pyqt5 is possible? 2014-09-25 18:39 GMT+02:00 David Gobbi : > In that case, yes, the directory you mentioned should work for your python. > > > On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin > wrote: > >>>> print sys.path > > ['', > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', > > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', > > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', > > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', > > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', > > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', > > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] > > > > > > 2014-09-25 18:30 GMT+02:00 David Gobbi : > >> > >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin < > marco.salatin at gmail.com> > >> wrote: > >> > I add this: > >> > > >> > > >> > > VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages > >> > > >> > is correct? > >> > >> No, I don't think that will work. The setting that I recommended was > >> the following, because it is where all third-party python modules are > >> installed on my system: > >> > >> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages > >> > >> Did you install your own python, instead of using the python that > >> comes with OS X? If so, you might have to check to see what its > >> default module path is: > >> > >> import sys > >> print sys.path > >> > >> - David > > > > > > > > > > -- > > --- > > www.salatin.eu > -- --- www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From selcukcalli at gmail.com Fri Sep 26 03:08:28 2014 From: selcukcalli at gmail.com (=?UTF-8?Q?Selcuk_=C3=87ALLI?=) Date: Fri, 26 Sep 2014 10:08:28 +0300 Subject: [vtkusers] How to create vtkStructuredPoints Message-ID: How to create vtkStructuredPoints data? How to set vtkStructuredPoints value? I need set my array value on vtkStructuredPoints? I want to convert my array to vtkStructuredPoints. -------------- next part -------------- An HTML attachment was scrubbed... URL: From selcukcalli at gmail.com Fri Sep 26 06:39:52 2014 From: selcukcalli at gmail.com (=?UTF-8?Q?Selcuk_=C3=87ALLI?=) Date: Fri, 26 Sep 2014 13:39:52 +0300 Subject: [vtkusers] structuredPoints Set Scalars Message-ID: I want to to set scalars in below code but not support VTK 6.1.0 version. structuredPoints->GetPointData()->SetScalars( scalars ); -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 26 08:23:49 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 26 Sep 2014 06:23:49 -0600 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: The QVTKRenderWindowInteractor.py hasn't been updated for PyQt5 yet, but you might be able to do the modifications yourself. On Fri, Sep 26, 2014 at 12:20 AM, Marco Salatin wrote: > Ok thaks for help! > > If i need to use vtk and pyqt5 is possible? > > 2014-09-25 18:39 GMT+02:00 David Gobbi : >> >> In that case, yes, the directory you mentioned should work for your >> python. >> >> >> On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin >> wrote: >> >>>> print sys.path >> > ['', >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', >> > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', >> > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', >> > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >> > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', >> > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', >> > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', >> > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] >> > >> > >> > 2014-09-25 18:30 GMT+02:00 David Gobbi : >> >> >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin >> >> >> >> wrote: >> >> > I add this: >> >> > >> >> > >> >> > >> >> > VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >> >> > >> >> > is correct? >> >> >> >> No, I don't think that will work. The setting that I recommended was >> >> the following, because it is where all third-party python modules are >> >> installed on my system: >> >> >> >> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages >> >> >> >> Did you install your own python, instead of using the python that >> >> comes with OS X? If so, you might have to check to see what its >> >> default module path is: >> >> >> >> import sys >> >> print sys.path >> >> >> >> - David >> > >> > >> > >> > >> > -- >> > --- >> > www.salatin.eu > > > > > -- > --- > www.salatin.eu From bill.lorensen at gmail.com Fri Sep 26 10:42:01 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 26 Sep 2014 07:42:01 -0700 Subject: [vtkusers] How to create vtkStructuredPoints In-Reply-To: References: Message-ID: Look at: http://vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport On Fri, Sep 26, 2014 at 12:08 AM, Selcuk ?ALLI wrote: > How to create vtkStructuredPoints data? How to set vtkStructuredPoints > value? I need set my array value on vtkStructuredPoints? I want to convert > my array to vtkStructuredPoints. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From mattgoh01 at gmail.com Fri Sep 26 13:26:59 2014 From: mattgoh01 at gmail.com (Matt Goh) Date: Fri, 26 Sep 2014 10:26:59 -0700 (PDT) Subject: [vtkusers] combine vtk In-Reply-To: <1411700036706-5728906.post@n5.nabble.com> References: <20140923224832.82BAC8B659@public.kitware.com> <20140926011835.043458DEA9@public.kitware.com> <1411700036706-5728906.post@n5.nabble.com> Message-ID: <1411752419032-5728913.post@n5.nabble.com> My Python environment isn't set up properly. I've tried: cd /my/VTK/build/directory ccmake /path/to/VTK then i turned on VTK_WRAPPER_PYTHON, and configured and generated. After I do make, I still don't see the wrapper files in my build folder. Any idea on what's going on? On another note, when I open paraview, all the filters are grayed out. not sure what's going on there either. -- View this message in context: http://vtk.1045678.n5.nabble.com/combine-vtk-tp5728850p5728913.html Sent from the VTK - Users mailing list archive at Nabble.com. From Michael.Bachmann at synopsys.com Fri Sep 26 14:12:34 2014 From: Michael.Bachmann at synopsys.com (Michael Bachmann) Date: Fri, 26 Sep 2014 18:12:34 +0000 Subject: [vtkusers] VTK6: vtkTextActor scaling and justification Message-ID: Hi all! I'm having trouble with getting the same (or at least similar) text scaling and justification behavior using vtkTextActor in VTK 6 like it was in VTK 5. Therefore I reported a bug on Mantis with scripts which allow to reproduce the issue I'm facing and a description how to reproduce the issue: http://www.vtk.org/Bug/view.php?id=14963 The problem description reads as follows: --------------------------------------------------------------------------------- In the attached example, the text actor is configured such that the text to display has a height of 3% of the viewport and is centered to the viewport. When starting the example the text is centered and the height of the text is OK. However: when maximizing the Window, the text is not centered anymore and it is also not scaled up to 3% of the maximized window. Using vtk 5.10.1 scaling/justification worked as expected. Using vtk 6.1.0 the described issue can be reproduced. --------------------------------------------------------------------------------- Is there simply some setting missing in the script or is this indeed a bug in VTK6? Kind regards, Michael From totte at dunescientific.com Fri Sep 26 17:24:57 2014 From: totte at dunescientific.com (Totte Karlsson) Date: Fri, 26 Sep 2014 14:24:57 -0700 Subject: [vtkusers] How to restore a camera view? Message-ID: <5425D9A9.9040509@dunescientific.com> Hello, I am creating a renderwindow/interactor, allowing a client to render a 'scene' interactively. I would like to capture the 'current' view after such an interactive session, so that the view can be 'restored' in consecutive sessions. Any pointers to what numbers I need to capture? tk -- ......................... Totte Karlsson, Ph.D. Dune Scientific, LLC 425-296 1980 (office) 425-780 9648 (cell) www.dunescientific.com ......................... From david.gobbi at gmail.com Fri Sep 26 18:01:30 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 26 Sep 2014 16:01:30 -0600 Subject: [vtkusers] How to restore a camera view? In-Reply-To: <5425D9A9.9040509@dunescientific.com> References: <5425D9A9.9040509@dunescientific.com> Message-ID: The parameters to save and restore are these: Position FocalPoint ViewUp ViewAngle If you are using a parallel projection, then these must be saved as well: ParallelProjection ParallelScale Saving the following is not mandatory, because you can call ResetCameraClippingRange() on the renderer to re-compute a good clipping range for your scene: ClippingRange - David On Fri, Sep 26, 2014 at 3:24 PM, Totte Karlsson wrote: > Hello, > I am creating a renderwindow/interactor, allowing a client to render a > 'scene' interactively. > > I would like to capture the 'current' view after such an interactive > session, so that the view can be 'restored' in consecutive sessions. > > Any pointers to what numbers I need to capture? > > tk > > -- > ......................... > Totte Karlsson, Ph.D. > Dune Scientific, LLC > 425-296 1980 (office) > 425-780 9648 (cell) > www.dunescientific.com > ......................... From david.gobbi at gmail.com Fri Sep 26 18:03:21 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 26 Sep 2014 16:03:21 -0600 Subject: [vtkusers] How to restore a camera view? In-Reply-To: References: <5425D9A9.9040509@dunescientific.com> Message-ID: On Fri, Sep 26, 2014 at 4:01 PM, David Gobbi wrote: > The parameters to save and restore are these: > > Position > FocalPoint > ViewUp > ViewAngle > > > If you are using a parallel projection, then these must > be saved as well: > > ParallelProjection > ParallelScale > > > Saving the following is not mandatory, because you > can call ResetCameraClippingRange() on the renderer > to re-compute a good clipping range for your scene: > > ClippingRange Note: these are all camera parameters. From sid.murthy at gmail.com Fri Sep 26 18:32:01 2014 From: sid.murthy at gmail.com (Sid Murthy) Date: Fri, 26 Sep 2014 16:32:01 -0600 Subject: [vtkusers] Using vtkDiskSource/vtkLinearExtrusionFilter with vtkCubeSource - how to create the hole through the cube? In-Reply-To: References: Message-ID: Thanks for the help - I'll give both a try. Maybe write up an example if I have time. -Sid On Fri, Sep 19, 2014 at 8:04 PM, Cory Quammen wrote: > If you want a box with a hole through it, you could also try the > vtkBooleanOperationPolyDataFilter with the first input set to the > output of a vtkCubeSource and the second input set to a > vtkCylinderSource where the cylinder ends lie somewhat outside the > cube bounds. Set the operation to difference and you should get a cube > with a hole through it. > > See > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/BooleanOperationPolyDataFilter > for an example. > > There are some cases on which the vtkBooleanOperationPolyDataFilter > fails, but this application sounds simple enough that it should work. > > Cory > > On Fri, Sep 19, 2014 at 5:41 PM, David Gobbi > wrote: > > So you want to have a cube with a cylindrical hole that goes all the > > way through it? It's not easy, but it's possible. > > > > First, you'll want to reverse the sense of your pipe, so that the > > faces face inwards. This can be done with vtkReverseSense. > > > > Next, append it to your cube with vtkAppendPolyData. > > > > The third step is the tricky one: you have to re-build the faces of > > this combined polydata so that the faces form a single closed surface > > (i.e. instead of forming one surface for the cube and another separate > > surface for the pipe). This can be done with vtkClipClosedSurface, > > because it can clip away the old, unconnected surfaces and build new > > surfaces that connect the outside of the box with the inside of the > > pipe. > > > > I don't have an example that does this, but you can look at the > > wiki page http://www.vtk.org/Wiki/VTK/Closed_Surface_Clipping > > for hints. Basically, if you clip away the original cube faces (by > > setting clipping planes that are just inside of the original faces), > > you can get vtkClipClosedSurface to create new faces with good > > connectivity between the cube and the pipe. > > > > Note that I didn't say it will be easy... I just said it will be > possible. > > > > - David > > > > > > > > On Fri, Sep 19, 2014 at 3:17 PM, Sid Murthy > wrote: > >> Hi - > >> > >> I am using a vtkDiskSource and vtkLinearExtrusionFilter to create a > pipe > >> (with a hole). I'd like to put this pipe through a cube (vtkCubeSource) > and > >> still retain the hole in the middle. Is this possible - somehow - with > >> vtkcutter or vtkclippolydata? > >> > >> > >> Thanks, > >> Sid > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sid.murthy at gmail.com Fri Sep 26 18:35:44 2014 From: sid.murthy at gmail.com (Sid Murthy) Date: Fri, 26 Sep 2014 16:35:44 -0600 Subject: [vtkusers] vtkDistanceWidget - changing the bound shape Message-ID: I was wondering if the cross shape at the endpoints can be changed (or removed)? I don't see anything in the docs that let me do this. Or maybe just reduce the size? thanks, Sid -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.salatin at gmail.com Sat Sep 27 02:55:19 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Sat, 27 Sep 2014 08:55:19 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: Ok, to use vtk with pyqt4 i need to configure something when i install vtk? Thanks 2014-09-26 14:23 GMT+02:00 David Gobbi : > The QVTKRenderWindowInteractor.py hasn't been updated for PyQt5 yet, > but you might be able to do the modifications yourself. > > On Fri, Sep 26, 2014 at 12:20 AM, Marco Salatin > wrote: > > Ok thaks for help! > > > > If i need to use vtk and pyqt5 is possible? > > > > 2014-09-25 18:39 GMT+02:00 David Gobbi : > >> > >> In that case, yes, the directory you mentioned should work for your > >> python. > >> > >> > >> On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin < > marco.salatin at gmail.com> > >> wrote: > >> >>>> print sys.path > >> > ['', > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', > >> > > >> > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', > >> > > >> > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', > >> > > >> > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', > >> > > >> > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', > >> > > >> > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', > >> > > >> > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', > >> > > >> > > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] > >> > > >> > > >> > 2014-09-25 18:30 GMT+02:00 David Gobbi : > >> >> > >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin > >> >> > >> >> wrote: > >> >> > I add this: > >> >> > > >> >> > > >> >> > > >> >> > > VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages > >> >> > > >> >> > is correct? > >> >> > >> >> No, I don't think that will work. The setting that I recommended was > >> >> the following, because it is where all third-party python modules are > >> >> installed on my system: > >> >> > >> >> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages > >> >> > >> >> Did you install your own python, instead of using the python that > >> >> comes with OS X? If so, you might have to check to see what its > >> >> default module path is: > >> >> > >> >> import sys > >> >> print sys.path > >> >> > >> >> - David > >> > > >> > > >> > > >> > > >> > -- > >> > --- > >> > www.salatin.eu > > > > > > > > > > -- > > --- > > www.salatin.eu > -- --- www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.salatin at gmail.com Sat Sep 27 02:57:51 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Sat, 27 Sep 2014 08:57:51 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: Like QT_QMAKE_EXECUTABLE? 2014-09-27 8:55 GMT+02:00 Marco Salatin : > Ok, > to use vtk with pyqt4 i need to configure something when i install > vtk? > > Thanks > > 2014-09-26 14:23 GMT+02:00 David Gobbi : > >> The QVTKRenderWindowInteractor.py hasn't been updated for PyQt5 yet, >> but you might be able to do the modifications yourself. >> >> On Fri, Sep 26, 2014 at 12:20 AM, Marco Salatin >> wrote: >> > Ok thaks for help! >> > >> > If i need to use vtk and pyqt5 is possible? >> > >> > 2014-09-25 18:39 GMT+02:00 David Gobbi : >> >> >> >> In that case, yes, the directory you mentioned should work for your >> >> python. >> >> >> >> >> >> On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin < >> marco.salatin at gmail.com> >> >> wrote: >> >> >>>> print sys.path >> >> > ['', >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', >> >> > >> >> > >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', >> >> > >> >> > >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', >> >> > >> >> > >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >> >> > >> >> > >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', >> >> > >> >> > >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', >> >> > >> >> > >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', >> >> > >> >> > >> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] >> >> > >> >> > >> >> > 2014-09-25 18:30 GMT+02:00 David Gobbi : >> >> >> >> >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin >> >> >> >> >> >> wrote: >> >> >> > I add this: >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >> >> >> > >> >> >> > is correct? >> >> >> >> >> >> No, I don't think that will work. The setting that I recommended >> was >> >> >> the following, because it is where all third-party python modules >> are >> >> >> installed on my system: >> >> >> >> >> >> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages >> >> >> >> >> >> Did you install your own python, instead of using the python that >> >> >> comes with OS X? If so, you might have to check to see what its >> >> >> default module path is: >> >> >> >> >> >> import sys >> >> >> print sys.path >> >> >> >> >> >> - David >> >> > >> >> > >> >> > >> >> > >> >> > -- >> >> > --- >> >> > www.salatin.eu >> > >> > >> > >> > >> > -- >> > --- >> > www.salatin.eu >> > > > > -- > --- > www.salatin.eu > -- --- www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From abhishek at meddiff.com Sat Sep 27 03:34:26 2014 From: abhishek at meddiff.com (abhishek) Date: Sat, 27 Sep 2014 00:34:26 -0700 (PDT) Subject: [vtkusers] Help needed: calculate slicer position from image to display co-ordinate system? Message-ID: <1411803266020-5728923.post@n5.nabble.com> Hello Users, I am implementing oblique MPR view and need help in determining the reslicer position in oblique view. For axial reslice, the output image dimensions are 512 x 512, but for sagittal & coronal orthogonal slices it is 512 x 490. Data parameters: Dimensions: 512 x 512 x 297 Spacing: 0.4, 0.4, -0.7 How, can I transfer the slicer position from image to display co-ordinate system? - Abhishek -- View this message in context: http://vtk.1045678.n5.nabble.com/Help-needed-calculate-slicer-position-from-image-to-display-co-ordinate-system-tp5728923.html Sent from the VTK - Users mailing list archive at Nabble.com. From marco.salatin at gmail.com Sat Sep 27 03:59:55 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Sat, 27 Sep 2014 09:59:55 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: If i use brew is better? 2014-09-27 8:57 GMT+02:00 Marco Salatin : > Like QT_QMAKE_EXECUTABLE? > > 2014-09-27 8:55 GMT+02:00 Marco Salatin : > >> Ok, >> to use vtk with pyqt4 i need to configure something when i install >> vtk? >> >> Thanks >> >> 2014-09-26 14:23 GMT+02:00 David Gobbi : >> >>> The QVTKRenderWindowInteractor.py hasn't been updated for PyQt5 yet, >>> but you might be able to do the modifications yourself. >>> >>> On Fri, Sep 26, 2014 at 12:20 AM, Marco Salatin >>> wrote: >>> > Ok thaks for help! >>> > >>> > If i need to use vtk and pyqt5 is possible? >>> > >>> > 2014-09-25 18:39 GMT+02:00 David Gobbi : >>> >> >>> >> In that case, yes, the directory you mentioned should work for your >>> >> python. >>> >> >>> >> >>> >> On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin < >>> marco.salatin at gmail.com> >>> >> wrote: >>> >> >>>> print sys.path >>> >> > ['', >>> >> > >>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', >>> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', >>> >> > >>> >> > >>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', >>> >> > >>> >> > >>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', >>> >> > >>> >> > >>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >>> >> > >>> >> > >>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', >>> >> > >>> >> > >>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', >>> >> > >>> >> > >>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', >>> >> > >>> >> > >>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] >>> >> > >>> >> > >>> >> > 2014-09-25 18:30 GMT+02:00 David Gobbi : >>> >> >> >>> >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin >>> >> >> >>> >> >> wrote: >>> >> >> > I add this: >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >>> >> >> > >>> >> >> > is correct? >>> >> >> >>> >> >> No, I don't think that will work. The setting that I recommended >>> was >>> >> >> the following, because it is where all third-party python modules >>> are >>> >> >> installed on my system: >>> >> >> >>> >> >> >>> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages >>> >> >> >>> >> >> Did you install your own python, instead of using the python that >>> >> >> comes with OS X? If so, you might have to check to see what its >>> >> >> default module path is: >>> >> >> >>> >> >> import sys >>> >> >> print sys.path >>> >> >> >>> >> >> - David >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > -- >>> >> > --- >>> >> > www.salatin.eu >>> > >>> > >>> > >>> > >>> > -- >>> > --- >>> > www.salatin.eu >>> >> >> >> >> -- >> --- >> www.salatin.eu >> > > > > -- > --- > www.salatin.eu > -- --- www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlinhosmp87 at gmail.com Sat Sep 27 04:14:41 2014 From: carlinhosmp87 at gmail.com (Carlos Martinez) Date: Sat, 27 Sep 2014 10:14:41 +0200 Subject: [vtkusers] vtkDistanceWidget - changing the bound shape In-Reply-To: References: Message-ID: Hello Sid, Yes it is possible, as you can see in the documentation: http://www.vtk.org/doc/nightly/html/classvtkDistanceRepresentation.html#details you can create a vtkDistanceRepresentation and use this method: *SetHandleRepresentation(vtkHandleRepresentation). * Then u can pass a *vtkSphereHandleRepresentation *to this method, because this class inherits from *vtkHandleRepresentation* and use spheres as the handles of the widget! Regards! 2014-09-27 0:35 GMT+02:00 Sid Murthy : > I was wondering if the cross shape at the endpoints can be changed (or > removed)? I don't see anything in the docs that let me do this. Or maybe > just reduce the size? > > thanks, > Sid > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Sat Sep 27 04:32:15 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sat, 27 Sep 2014 10:32:15 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: Hi brew should work out of the box. If you need a fast installation, and don?t mind using brewed python, you can try my binaries: https://github.com/iMichka/homebrew-MacVTKITKPythonBottles brew install iMichka/MacVTKITKPythonBottles/imichka-vtk Michka On 27 sept. 2014, at 09:59, Marco Salatin wrote: > If i use brew is better? > > 2014-09-27 8:57 GMT+02:00 Marco Salatin : > Like QT_QMAKE_EXECUTABLE? > > 2014-09-27 8:55 GMT+02:00 Marco Salatin : > Ok, > to use vtk with pyqt4 i need to configure something when i install vtk? > > Thanks > > 2014-09-26 14:23 GMT+02:00 David Gobbi : > The QVTKRenderWindowInteractor.py hasn't been updated for PyQt5 yet, > but you might be able to do the modifications yourself. > > On Fri, Sep 26, 2014 at 12:20 AM, Marco Salatin wrote: > > Ok thaks for help! > > > > If i need to use vtk and pyqt5 is possible? > > > > 2014-09-25 18:39 GMT+02:00 David Gobbi : > >> > >> In that case, yes, the directory you mentioned should work for your > >> python. > >> > >> > >> On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin > >> wrote: > >> >>>> print sys.path > >> > ['', > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', > >> > > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', > >> > > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', > >> > > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', > >> > > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', > >> > > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', > >> > > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', > >> > > >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] > >> > > >> > > >> > 2014-09-25 18:30 GMT+02:00 David Gobbi : > >> >> > >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin > >> >> > >> >> wrote: > >> >> > I add this: > >> >> > > >> >> > > >> >> > > >> >> > VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages > >> >> > > >> >> > is correct? > >> >> > >> >> No, I don't think that will work. The setting that I recommended was > >> >> the following, because it is where all third-party python modules are > >> >> installed on my system: > >> >> > >> >> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages > >> >> > >> >> Did you install your own python, instead of using the python that > >> >> comes with OS X? If so, you might have to check to see what its > >> >> default module path is: > >> >> > >> >> import sys > >> >> print sys.path > >> >> > >> >> - David > >> > > >> > > >> > > >> > > >> > -- > >> > --- > >> > www.salatin.eu > > > > > > > > > > -- > > --- > > www.salatin.eu > > > > -- > --- > www.salatin.eu > > > > -- > --- > www.salatin.eu > > > > -- > --- > www.salatin.eu > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From sid.murthy at gmail.com Sat Sep 27 10:19:55 2014 From: sid.murthy at gmail.com (Sid Murthy) Date: Sat, 27 Sep 2014 08:19:55 -0600 Subject: [vtkusers] vtkDistanceWidget - changing the bound shape In-Reply-To: References: Message-ID: Thanks Carlos - That did work although I noticed the size of handle doesn't scale properly as the user zooms out (it gets bigger). I ended up setting handle size to a small amount (essentially making it not visible to the user and just having a straight line with the measurement label). I am positioning this widget programmatically with SetPoint1WorldPosition/SetPoint2WorldPosition and don't want users to change it's position (although I can't get the widgets to be "locked" in place to avoid this). -Sid On Sat, Sep 27, 2014 at 2:14 AM, Carlos Martinez wrote: > Hello Sid, > > Yes it is possible, as you can see in the documentation: > > > http://www.vtk.org/doc/nightly/html/classvtkDistanceRepresentation.html#details > > you can create a vtkDistanceRepresentation and use this method: > > *SetHandleRepresentation(vtkHandleRepresentation). * > > Then u can pass a *vtkSphereHandleRepresentation *to this method, because > this class inherits from *vtkHandleRepresentation* and use spheres as the > handles of the widget! > > Regards! > > 2014-09-27 0:35 GMT+02:00 Sid Murthy : > >> I was wondering if the cross shape at the endpoints can be changed (or >> removed)? I don't see anything in the docs that let me do this. Or maybe >> just reduce the size? >> >> thanks, >> Sid >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sistephan at gmail.com Sat Sep 27 19:00:52 2014 From: sistephan at gmail.com (Sam) Date: Sat, 27 Sep 2014 16:00:52 -0700 (PDT) Subject: [vtkusers] Building ActiViz .NET OpenSource Edition 6.1.0 In-Reply-To: <53F99800.4030008@kitware.com> References: <1408815437762-5728343.post@n5.nabble.com> <53F99800.4030008@kitware.com> Message-ID: <1411858852309-5728930.post@n5.nabble.com> Hello Julien, Any updates on upgrading the source code for ActiViz to the latest VTK 6.1 release? Thanks! This is what the ActiViz site says: ActiViz .NET OpenSource Edition 6.1.0 64-bit Windows XP or later Contact us for details -- View this message in context: http://vtk.1045678.n5.nabble.com/Building-ActiViz-NET-OpenSource-Edition-6-1-0-tp5728343p5728930.html Sent from the VTK - Users mailing list archive at Nabble.com. From kevnull at phutureshock.com Sat Sep 27 19:41:36 2014 From: kevnull at phutureshock.com (kevnull at phutureshock.com) Date: Sat, 27 Sep 2014 16:41:36 -0700 Subject: [vtkusers] point cloud simplification question Message-ID: Apologizes for the cross post to those on the dev list, I mistakenly added this as an addendum to a dev-related post. I have what seems to be a simple question about thinning point clouds that I have been struggling with lately, that is, extracting topologically clean 2-surfaces from a CT scan that has some "thickness" to it. I would like to use only the points on the "exterior of the sampled surface" to eventually run marching cubes on (or whatever reconstruction algorithm...), is there a filter or set of transformations that I can do on the data to thin my data set to those points on the "outside surface" of the point cloud? Details images and the data set here: http://www.phutureshock.com/mememap/poor-quality-meshes-and-vertex-normals-from-a-point-cloud-with-densitythickness/ My data is in the form of an .xyz file not images, but perhaps someone knows of something that would work that is ITK-related if I transformed my point cloud into a stack of images somehow? Just a thought. Thanks in advance! Best, Kevin From marco.salatin at gmail.com Sun Sep 28 07:45:42 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Sun, 28 Sep 2014 13:45:42 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: Thanks 2014-09-27 10:32 GMT+02:00 Michka Popoff : > Hi > > brew should work out of the box. > If you need a fast installation, and don't mind using brewed python, > you can try my binaries: > > https://github.com/iMichka/homebrew-MacVTKITKPythonBottles > > brew install iMichka/MacVTKITKPythonBottles/imichka-vtk > > Michka > > On 27 sept. 2014, at 09:59, Marco Salatin wrote: > > If i use brew is better? > > 2014-09-27 8:57 GMT+02:00 Marco Salatin : > >> Like QT_QMAKE_EXECUTABLE? >> >> 2014-09-27 8:55 GMT+02:00 Marco Salatin : >> >>> Ok, >>> to use vtk with pyqt4 i need to configure something when i install >>> vtk? >>> >>> Thanks >>> >>> 2014-09-26 14:23 GMT+02:00 David Gobbi : >>> >>>> The QVTKRenderWindowInteractor.py hasn't been updated for PyQt5 yet, >>>> but you might be able to do the modifications yourself. >>>> >>>> On Fri, Sep 26, 2014 at 12:20 AM, Marco Salatin < >>>> marco.salatin at gmail.com> wrote: >>>> > Ok thaks for help! >>>> > >>>> > If i need to use vtk and pyqt5 is possible? >>>> > >>>> > 2014-09-25 18:39 GMT+02:00 David Gobbi : >>>> >> >>>> >> In that case, yes, the directory you mentioned should work for your >>>> >> python. >>>> >> >>>> >> >>>> >> On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin < >>>> marco.salatin at gmail.com> >>>> >> wrote: >>>> >> >>>> print sys.path >>>> >> > ['', >>>> >> > >>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', >>>> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', >>>> >> > >>>> >> > >>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', >>>> >> > >>>> >> > >>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', >>>> >> > >>>> >> > >>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >>>> >> > >>>> >> > >>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', >>>> >> > >>>> >> > >>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', >>>> >> > >>>> >> > >>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', >>>> >> > >>>> >> > >>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] >>>> >> > >>>> >> > >>>> >> > 2014-09-25 18:30 GMT+02:00 David Gobbi : >>>> >> >> >>>> >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin >>>> >> >> >>>> >> >> wrote: >>>> >> >> > I add this: >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >>>> >> >> > >>>> >> >> > is correct? >>>> >> >> >>>> >> >> No, I don't think that will work. The setting that I recommended >>>> was >>>> >> >> the following, because it is where all third-party python modules >>>> are >>>> >> >> installed on my system: >>>> >> >> >>>> >> >> >>>> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages >>>> >> >> >>>> >> >> Did you install your own python, instead of using the python that >>>> >> >> comes with OS X? If so, you might have to check to see what its >>>> >> >> default module path is: >>>> >> >> >>>> >> >> import sys >>>> >> >> print sys.path >>>> >> >> >>>> >> >> - David >>>> >> > >>>> >> > >>>> >> > >>>> >> > >>>> >> > -- >>>> >> > --- >>>> >> > www.salatin.eu >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > --- >>>> > www.salatin.eu >>>> >>> >>> >>> >>> -- >>> --- >>> www.salatin.eu >>> >> >> >> >> -- >> --- >> www.salatin.eu >> > > > > -- > --- > www.salatin.eu > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > -- --- www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From gistersoft at 126.com Sun Sep 28 08:41:55 2014 From: gistersoft at 126.com (gistersoft) Date: Sun, 28 Sep 2014 12:41:55 -0000 Subject: [vtkusers] how to interactor with vtkChartXY on existing renderWindow Message-ID: <201009282041557610092@126.com> hello, I am trying to plot 2D plots using vtkChartXY, when I set vtkContextView view = vtkContextView.New(); view.SetRenderWindow(renWin); the plots can show on the existing renderwindow, but it can't iteractor with mouse, please guide to do it. Thanks Regards gistersoft 2010-09-28 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gistersoft at 126.com Sun Sep 28 11:18:04 2014 From: gistersoft at 126.com (gistersoft) Date: Sun, 28 Sep 2014 23:18:04 +0800 Subject: [vtkusers] how to interactor with vtkChartXY on existingrenderWindow Message-ID: <201409282318041610990@126.com> hello, all I am trying to plot 2D plots using vtkChartXY example shown here ./Charts\Testing\Cxx\TestMultipleChartRenderers.cxx all plots can show ,but the chartxy can't iteractor with mouse, meahwhile, the cube can zoom&scale&rotate, I don't know what happen, please guide to do it. Thanks Regards gistersoft 2010-09-28 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.salatin at gmail.com Sun Sep 28 13:44:01 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Sun, 28 Sep 2014 19:44:01 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: There aren't an IDE that support vtk installation? 2014-09-28 13:45 GMT+02:00 Marco Salatin : > Thanks > > 2014-09-27 10:32 GMT+02:00 Michka Popoff : > >> Hi >> >> brew should work out of the box. >> If you need a fast installation, and don't mind using brewed python, >> you can try my binaries: >> >> https://github.com/iMichka/homebrew-MacVTKITKPythonBottles >> >> brew install iMichka/MacVTKITKPythonBottles/imichka-vtk >> >> Michka >> >> On 27 sept. 2014, at 09:59, Marco Salatin >> wrote: >> >> If i use brew is better? >> >> 2014-09-27 8:57 GMT+02:00 Marco Salatin : >> >>> Like QT_QMAKE_EXECUTABLE? >>> >>> 2014-09-27 8:55 GMT+02:00 Marco Salatin : >>> >>>> Ok, >>>> to use vtk with pyqt4 i need to configure something when i >>>> install vtk? >>>> >>>> Thanks >>>> >>>> 2014-09-26 14:23 GMT+02:00 David Gobbi : >>>> >>>>> The QVTKRenderWindowInteractor.py hasn't been updated for PyQt5 yet, >>>>> but you might be able to do the modifications yourself. >>>>> >>>>> On Fri, Sep 26, 2014 at 12:20 AM, Marco Salatin < >>>>> marco.salatin at gmail.com> wrote: >>>>> > Ok thaks for help! >>>>> > >>>>> > If i need to use vtk and pyqt5 is possible? >>>>> > >>>>> > 2014-09-25 18:39 GMT+02:00 David Gobbi : >>>>> >> >>>>> >> In that case, yes, the directory you mentioned should work for your >>>>> >> python. >>>>> >> >>>>> >> >>>>> >> On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin < >>>>> marco.salatin at gmail.com> >>>>> >> wrote: >>>>> >> >>>> print sys.path >>>>> >> > ['', >>>>> >> > >>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', >>>>> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', >>>>> >> > >>>>> >> > >>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', >>>>> >> > >>>>> >> > >>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', >>>>> >> > >>>>> >> > >>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >>>>> >> > >>>>> >> > >>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', >>>>> >> > >>>>> >> > >>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', >>>>> >> > >>>>> >> > >>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', >>>>> >> > >>>>> >> > >>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] >>>>> >> > >>>>> >> > >>>>> >> > 2014-09-25 18:30 GMT+02:00 David Gobbi : >>>>> >> >> >>>>> >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin >>>>> >> >> >>>>> >> >> wrote: >>>>> >> >> > I add this: >>>>> >> >> > >>>>> >> >> > >>>>> >> >> > >>>>> >> >> > >>>>> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >>>>> >> >> > >>>>> >> >> > is correct? >>>>> >> >> >>>>> >> >> No, I don't think that will work. The setting that I >>>>> recommended was >>>>> >> >> the following, because it is where all third-party python >>>>> modules are >>>>> >> >> installed on my system: >>>>> >> >> >>>>> >> >> >>>>> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages >>>>> >> >> >>>>> >> >> Did you install your own python, instead of using the python that >>>>> >> >> comes with OS X? If so, you might have to check to see what its >>>>> >> >> default module path is: >>>>> >> >> >>>>> >> >> import sys >>>>> >> >> print sys.path >>>>> >> >> >>>>> >> >> - David >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > -- >>>>> >> > --- >>>>> >> > www.salatin.eu >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > --- >>>>> > www.salatin.eu >>>>> >>>> >>>> >>>> >>>> -- >>>> --- >>>> www.salatin.eu >>>> >>> >>> >>> >>> -- >>> --- >>> www.salatin.eu >>> >> >> >> >> -- >> --- >> www.salatin.eu >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > > > -- > --- > www.salatin.eu > -- --- www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From isimtic at gmail.com Sun Sep 28 19:25:32 2014 From: isimtic at gmail.com (=?UTF-8?B?QWhtZXQgRG/En2Fu?=) Date: Mon, 29 Sep 2014 02:25:32 +0300 Subject: [vtkusers] Error: no override found for 'vtkScalarsToColorsPainter'. Message-ID: <542898EC.9080008@gmail.com> I used auto init for opengl2 like this: #pragma once #include VTK_MODULE_INIT(vtkRenderingOpenGL2) VTK_MODULE_INIT(vtkInteractionStyle) VTK_MODULE_INIT(vtkRenderingFreeType) but when I used vtkCompositePolyDataMapper2 vtk gives me this error: "Generic Warning: In vtkScalarsToColorsPainter.cxx, line 70,Error: no override found for 'vtkScalarsToColorsPainter'." How can I solve that weird problem? Kind Regards. Ahmet Do?an -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Mon Sep 29 09:25:11 2014 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 29 Sep 2014 09:25:11 -0400 Subject: [vtkusers] how to interactor with vtkChartXY on existing renderWindow In-Reply-To: <201009282041557610092@126.com> References: <201009282041557610092@126.com> Message-ID: On Tue, Sep 28, 2010 at 8:41 AM, gistersoft wrote: > hello, > > I am trying to plot 2D plots using vtkChartXY, when I set > vtkContextView view = vtkContextView.New(); > view.SetRenderWindow(renWin); > > the plots can show on the existing renderwindow, but it can't iteractor with > mouse, please guide to do it. > Interaction is not currently possible when rendering on to a 3D scene. I need to look into the hand off when using multiple interactors in order to make it work, and have not had the time/a project that needed this thus far. Marcus From sebastian.ordas at gmail.com Mon Sep 29 11:25:26 2014 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Mon, 29 Sep 2014 12:25:26 -0300 Subject: [vtkusers] VTK6 migration and vtkImageData: "No scalar values found for texture input!" error in vtkOpenGLTexture Message-ID: <542979E6.6090304@gmail.com> Dear List, (I just realized I sent my message to ITK list instead of VTK!) I have started getting the error "No scalar values found for texture input!" coming from vtkOpenGLTexture, while porting my code to VTK6 More precisely, I have a vtkImageData, generated by itkImageToVTKImageFilter, which is mapped through vtkImageResliceMapper I have tried adding the following to itkImageToVTKImageFilter: m_Importer->UpdateInformation(); vtkStreamingDemandDrivenPipeline::SetUpdateExtent( m_Importer->GetOutputInformation(0 /*port number*/), 0 /*piece*/, 2 /*number of pieces*/, 0 /*number of ghost levels*/); m_Importer->Update(); .. but no luck! I have also tried: m_ImageData->GetPointData()->SetActiveAttribute (0, vtkPointData::SCALARS); didn?t work either... Any hint? thank you, sebastian -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Sep 29 11:32:26 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 29 Sep 2014 11:32:26 -0400 Subject: [vtkusers] VTK6 migration and vtkImageData: "No scalar values found for texture input!" error in vtkOpenGLTexture In-Reply-To: <542979E6.6090304@gmail.com> References: <542979E6.6090304@gmail.com> Message-ID: Sebastian, Could you post a small, working example program that demonstrates the problem? Thank you, Cory On Mon, Sep 29, 2014 at 11:25 AM, Sebastian Ordas wrote: > Dear List, > > (I just realized I sent my message to ITK list instead of VTK!) > > I have started getting the error "No scalar values found for texture input!" > coming from vtkOpenGLTexture, while porting my code to VTK6 > > More precisely, I have a vtkImageData, generated by > itkImageToVTKImageFilter, which is mapped through vtkImageResliceMapper > > I have tried adding the following to itkImageToVTKImageFilter: > > m_Importer->UpdateInformation(); > vtkStreamingDemandDrivenPipeline::SetUpdateExtent( > m_Importer->GetOutputInformation(0 /*port number*/), > 0 /*piece*/, > 2 /*number of pieces*/, > 0 /*number of ghost levels*/); > m_Importer->Update(); > > .. but no luck! > > I have also tried: > > m_ImageData->GetPointData()->SetActiveAttribute (0, vtkPointData::SCALARS); > > didn?t work either... > > Any hint? > > thank you, > sebastian > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From marco.salatin at gmail.com Mon Sep 29 13:03:47 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Mon, 29 Sep 2014 19:03:47 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: Hi, i install successfull vtk but when i start python and import vt i receive this error: 2014-09-28 19:44 GMT+02:00 Marco Salatin : > There aren't an IDE that support vtk installation? > > > > 2014-09-28 13:45 GMT+02:00 Marco Salatin : > >> Thanks >> >> 2014-09-27 10:32 GMT+02:00 Michka Popoff : >> >>> Hi >>> >>> brew should work out of the box. >>> If you need a fast installation, and don't mind using brewed python, >>> you can try my binaries: >>> >>> https://github.com/iMichka/homebrew-MacVTKITKPythonBottles >>> >>> brew install iMichka/MacVTKITKPythonBottles/imichka-vtk >>> >>> Michka >>> >>> On 27 sept. 2014, at 09:59, Marco Salatin >>> wrote: >>> >>> If i use brew is better? >>> >>> 2014-09-27 8:57 GMT+02:00 Marco Salatin : >>> >>>> Like QT_QMAKE_EXECUTABLE? >>>> >>>> 2014-09-27 8:55 GMT+02:00 Marco Salatin : >>>> >>>>> Ok, >>>>> to use vtk with pyqt4 i need to configure something when i >>>>> install vtk? >>>>> >>>>> Thanks >>>>> >>>>> 2014-09-26 14:23 GMT+02:00 David Gobbi : >>>>> >>>>>> The QVTKRenderWindowInteractor.py hasn't been updated for PyQt5 yet, >>>>>> but you might be able to do the modifications yourself. >>>>>> >>>>>> On Fri, Sep 26, 2014 at 12:20 AM, Marco Salatin < >>>>>> marco.salatin at gmail.com> wrote: >>>>>> > Ok thaks for help! >>>>>> > >>>>>> > If i need to use vtk and pyqt5 is possible? >>>>>> > >>>>>> > 2014-09-25 18:39 GMT+02:00 David Gobbi : >>>>>> >> >>>>>> >> In that case, yes, the directory you mentioned should work for your >>>>>> >> python. >>>>>> >> >>>>>> >> >>>>>> >> On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin < >>>>>> marco.salatin at gmail.com> >>>>>> >> wrote: >>>>>> >> >>>> print sys.path >>>>>> >> > ['', >>>>>> >> > >>>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', >>>>>> >> > >>>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', >>>>>> >> > >>>>>> >> > >>>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', >>>>>> >> > >>>>>> >> > >>>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', >>>>>> >> > >>>>>> >> > >>>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >>>>>> >> > >>>>>> >> > >>>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', >>>>>> >> > >>>>>> >> > >>>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', >>>>>> >> > >>>>>> >> > >>>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', >>>>>> >> > >>>>>> >> > >>>>>> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] >>>>>> >> > >>>>>> >> > >>>>>> >> > 2014-09-25 18:30 GMT+02:00 David Gobbi : >>>>>> >> >> >>>>>> >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin >>>>>> >> >> >>>>>> >> >> wrote: >>>>>> >> >> > I add this: >>>>>> >> >> > >>>>>> >> >> > >>>>>> >> >> > >>>>>> >> >> > >>>>>> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >>>>>> >> >> > >>>>>> >> >> > is correct? >>>>>> >> >> >>>>>> >> >> No, I don't think that will work. The setting that I >>>>>> recommended was >>>>>> >> >> the following, because it is where all third-party python >>>>>> modules are >>>>>> >> >> installed on my system: >>>>>> >> >> >>>>>> >> >> >>>>>> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages >>>>>> >> >> >>>>>> >> >> Did you install your own python, instead of using the python >>>>>> that >>>>>> >> >> comes with OS X? If so, you might have to check to see what its >>>>>> >> >> default module path is: >>>>>> >> >> >>>>>> >> >> import sys >>>>>> >> >> print sys.path >>>>>> >> >> >>>>>> >> >> - David >>>>>> >> > >>>>>> >> > >>>>>> >> > >>>>>> >> > >>>>>> >> > -- >>>>>> >> > --- >>>>>> >> > www.salatin.eu >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > -- >>>>>> > --- >>>>>> > www.salatin.eu >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> --- >>>>> www.salatin.eu >>>>> >>>> >>>> >>>> >>>> -- >>>> --- >>>> www.salatin.eu >>>> >>> >>> >>> >>> -- >>> --- >>> www.salatin.eu >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >> >> >> -- >> --- >> www.salatin.eu >> > > > > -- > --- > www.salatin.eu > -- --- www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Mon Sep 29 13:25:09 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Mon, 29 Sep 2014 19:25:09 +0200 Subject: [vtkusers] Compile VTK under Mac Os X 10.9.5 with python 2.7.8 In-Reply-To: References: <1411639700092-5728870.post@n5.nabble.com> <1411661720516-5728891.post@n5.nabble.com> Message-ID: Hi you did not send the error message with your mail. With it, can you also send us the result of the ?which python? command, so that we know what python you are calling. Michka On 29 sept. 2014, at 19:03, Marco Salatin wrote: > Hi, > i install successfull vtk but when i start python and import vt i receive this error: > > > 2014-09-28 19:44 GMT+02:00 Marco Salatin : > There aren't an IDE that support vtk installation? > > > > 2014-09-28 13:45 GMT+02:00 Marco Salatin : > Thanks > > 2014-09-27 10:32 GMT+02:00 Michka Popoff : > Hi > > brew should work out of the box. > If you need a fast installation, and don?t mind using brewed python, > you can try my binaries: > > https://github.com/iMichka/homebrew-MacVTKITKPythonBottles > > brew install iMichka/MacVTKITKPythonBottles/imichka-vtk > > Michka > > On 27 sept. 2014, at 09:59, Marco Salatin wrote: > >> If i use brew is better? >> >> 2014-09-27 8:57 GMT+02:00 Marco Salatin : >> Like QT_QMAKE_EXECUTABLE? >> >> 2014-09-27 8:55 GMT+02:00 Marco Salatin : >> Ok, >> to use vtk with pyqt4 i need to configure something when i install vtk? >> >> Thanks >> >> 2014-09-26 14:23 GMT+02:00 David Gobbi : >> The QVTKRenderWindowInteractor.py hasn't been updated for PyQt5 yet, >> but you might be able to do the modifications yourself. >> >> On Fri, Sep 26, 2014 at 12:20 AM, Marco Salatin wrote: >> > Ok thaks for help! >> > >> > If i need to use vtk and pyqt5 is possible? >> > >> > 2014-09-25 18:39 GMT+02:00 David Gobbi : >> >> >> >> In that case, yes, the directory you mentioned should work for your >> >> python. >> >> >> >> >> >> On Thu, Sep 25, 2014 at 10:32 AM, Marco Salatin >> >> wrote: >> >> >>>> print sys.path >> >> > ['', >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', >> >> > >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', >> >> > >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', >> >> > >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >> >> > >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', >> >> > >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', >> >> > >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', >> >> > >> >> > '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] >> >> > >> >> > >> >> > 2014-09-25 18:30 GMT+02:00 David Gobbi : >> >> >> >> >> >> On Thu, Sep 25, 2014 at 10:15 AM, Marco Salatin >> >> >> >> >> >> wrote: >> >> >> > I add this: >> >> >> > >> >> >> > >> >> >> > >> >> >> > VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >> >> >> > >> >> >> > is correct? >> >> >> >> >> >> No, I don't think that will work. The setting that I recommended was >> >> >> the following, because it is where all third-party python modules are >> >> >> installed on my system: >> >> >> >> >> >> VTK_INSTALL_PYTHON_MODULE_DIR:PATH=/Library/Python/2.7/site-packages >> >> >> >> >> >> Did you install your own python, instead of using the python that >> >> >> comes with OS X? If so, you might have to check to see what its >> >> >> default module path is: >> >> >> >> >> >> import sys >> >> >> print sys.path >> >> >> >> >> >> - David >> >> > >> >> > >> >> > >> >> > >> >> > -- >> >> > --- >> >> > www.salatin.eu >> > >> > >> > >> > >> > -- >> > --- >> > www.salatin.eu >> >> >> >> -- >> --- >> www.salatin.eu >> >> >> >> -- >> --- >> www.salatin.eu >> >> >> >> -- >> --- >> www.salatin.eu >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > --- > www.salatin.eu > > > > -- > --- > www.salatin.eu > > > > -- > --- > www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Mon Sep 29 16:40:41 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 29 Sep 2014 16:40:41 -0400 Subject: [vtkusers] VTK bug tracker hackaton logistics Message-ID: Hi folks, For Thursday's hackaton, we need a way of organizing and assigning bugs. I suggest that we use our bug tracker for this. We can assign tags to bugs as well as assign them to people in there. I already created a "hackaton" tag that you can use. So if you are planning on attending, please quickly go over the bug tracker and tag any bug that look interesting to you with the "hackaton" tag. Also, assign it to yourself if you'd like to work on it, as long as it is not already tagged and assigned to someone else. You can use the "View Issues" view and the tags filter there to list all bugs already tagged as "hackaton". (1 as of this writing). For those attending by Google Hangout, here the link: https://plus.google.com/events/cd0s6so0ijo45dsulg8and8p5tg For those attending in person, if you didn't already let me know please do so soon. Looking forward to it. -berk -------------- next part -------------- An HTML attachment was scrubbed... URL: From isimtic at gmail.com Mon Sep 29 17:10:05 2014 From: isimtic at gmail.com (=?UTF-8?B?QWhtZXQgRG/En2Fu?=) Date: Tue, 30 Sep 2014 00:10:05 +0300 Subject: [vtkusers] how to override my own mapper Message-ID: <5429CAAD.2040103@gmail.com> I have written my own mapper it compiles but it cant override it is almost same with polydatamapper how can I override with vtkopenglpolydatamapper(in opengl2)? Kind Regards Ahmet Dogan From marcus.hanwell at kitware.com Mon Sep 29 19:58:45 2014 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 29 Sep 2014 19:58:45 -0400 Subject: [vtkusers] how to override my own mapper In-Reply-To: <5429CAAD.2040103@gmail.com> References: <5429CAAD.2040103@gmail.com> Message-ID: On Mon, Sep 29, 2014 at 5:10 PM, Ahmet Do?an wrote: > I have written my own mapper it compiles but it cant override it is almost > same with polydatamapper how can I override with vtkopenglpolydatamapper(in > opengl2)? > The simplest way is to simply create a new instance of your mapper, i.e. vtkNew mapper; You can than set this as the mapper on your actor without worrying about the object factory mechanism. Otherwise you must remove the override for the VTK supplied mapper, and set your own. I don't know of a good example right now, but I will try and add something to the wiki that shows how to do this when I get a chance (or if you figure it out, please add an example). Marcus From gistersoft at 126.com Mon Sep 29 22:37:58 2014 From: gistersoft at 126.com (=?utf-8?B?Z2lzdGVyc29mdA==?=) Date: Tue, 30 Sep 2014 10:37:58 +0800 Subject: [vtkusers] =?utf-8?q?how_to_interactor_with_vtkChartXY_on_existin?= =?utf-8?q?g_renderWindow?= References: <201009282041557610092@126.com>, Message-ID: <201409301037583669237@126.com> thanks gistersoft 2014-09-30 ???? Marcus D. Hanwell ????? 2014-09-29 21:25:14 ???? gistersoft ??? vtkusers ??? Re: [vtkusers] how to interactor with vtkChartXY on existing renderWindow On Tue, Sep 28, 2010 at 8:41 AM, gistersoft wrote: > hello, > > I am trying to plot 2D plots using vtkChartXY, when I set > vtkContextView view = vtkContextView.New(); > view.SetRenderWindow(renWin); > > the plots can show on the existing renderwindow, but it can't iteractor with > mouse, please guide to do it. > Interaction is not currently possible when rendering on to a 3D scene. I need to look into the hand off when using multiple interactors in order to make it work, and have not had the time/a project that needed this thus far. Marcus . -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastian.ordas at gmail.com Tue Sep 30 17:02:22 2014 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Tue, 30 Sep 2014 18:02:22 -0300 Subject: [vtkusers] VTK6 migration and vtkImageData: "No scalar values found for texture input!" error in vtkOpenGLTexture In-Reply-To: References: <542979E6.6090304@gmail.com> Message-ID: <542B1A5E.7000609@gmail.com> Hi Cory, I set up an example code, but I could not reproduce the error :-( The example is attached anyway, in case someone wants to have a look at it I will keep searching the source of the error in my application and will come back to the list with any finding thank you! sebastian On 29/09/2014 12:32 p.m., Cory Quammen wrote: > Sebastian, > > Could you post a small, working example program that demonstrates the problem? > > Thank you, > Cory > > On Mon, Sep 29, 2014 at 11:25 AM, Sebastian Ordas > wrote: >> Dear List, >> >> (I just realized I sent my message to ITK list instead of VTK!) >> >> I have started getting the error "No scalar values found for texture input!" >> coming from vtkOpenGLTexture, while porting my code to VTK6 >> >> More precisely, I have a vtkImageData, generated by >> itkImageToVTKImageFilter, which is mapped through vtkImageResliceMapper >> >> I have tried adding the following to itkImageToVTKImageFilter: >> >> m_Importer->UpdateInformation(); >> vtkStreamingDemandDrivenPipeline::SetUpdateExtent( >> m_Importer->GetOutputInformation(0 /*port number*/), >> 0 /*piece*/, >> 2 /*number of pieces*/, >> 0 /*number of ghost levels*/); >> m_Importer->Update(); >> >> .. but no luck! >> >> I have also tried: >> >> m_ImageData->GetPointData()->SetActiveAttribute (0, vtkPointData::SCALARS); >> >> didn?t work either... >> >> Any hint? >> >> thank you, >> sebastian >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> -------------- next part -------------- PROJECT (ImageReslice) IF(NOT ITKWikiExamples_BINARY_DIR) FIND_PACKAGE(ITK REQUIRED) INCLUDE(${ITK_USE_FILE}) ENDIF(NOT ITKWikiExamples_BINARY_DIR) #FIND_PACKAGE(VTK REQUIRED) FIND_PACKAGE( VTK REQUIRED vtkRenderingImage vtkRenderingFreeType vtkRenderingFreeTypeOpenGL NO_MODULE) INCLUDE(${VTK_USE_FILE}) # # Build all .cxx files in the directory FILE(GLOB ALL_FILES *.cxx) include(${ITKWikiExamples_SOURCE_DIR}/CMake/RequiresVersion.cmake) set(VERSION_MIN "4.0") #Requires_Version(TransformFileWriter 4.0 ALL_FILES) foreach(SOURCE_FILE ${ALL_FILES}) STRING(REPLACE ".cxx" "" TMP ${SOURCE_FILE}) STRING(REPLACE ${CMAKE_CURRENT_SOURCE_DIR}/ "" EXAMPLE ${TMP}) ADD_EXECUTABLE(${EXAMPLE} MACOSX_BUNDLE ${EXAMPLE}.cxx) TARGET_LINK_LIBRARIES(${EXAMPLE} ${ItkVtkGlue} ${ITK_LIBRARIES} ${VTK_LIBRARIES}) endforeach(SOURCE_FILE) -------------- next part -------------- #include "itkImage.h" #include "itkImageSeriesReader.h" #include "itkImageToVTKImageFilter.h" #include #include #include #include #include #include #include #include #include #include #include #include int main( int argc, char * argv[] ) { if( argc < 2 ) { std::cerr << "Usage: " << std::endl; std::cerr << argv[0] << " inputImageFile" << std::endl; return EXIT_FAILURE; } typedef itk::Image< short, 3 > ImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageToVTKImageFilter ConnectorType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(argv[1]); // convert ITK image to VTK image ConnectorType::Pointer connector = ConnectorType::New(); connector->SetInput( reader->GetOutput() ); try { connector->Update(); } catch( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; return EXIT_FAILURE; } vtkSmartPointer imageData = connector->GetOutput(); // Setting of vtkImageInterpolator vtkSmartPointer imageInterpolator = vtkSmartPointer::New(); imageInterpolator->SetInterpolationModeToLinear(); vtkSmartPointer sliceplane = vtkSmartPointer::New(); sliceplane->SetOrigin(imageData->GetCenter()); sliceplane->SetNormal(1.0,0.0,0.0); // Setting of vtkImageResliceMapper vtkSmartPointer imageResliceMapper = vtkSmartPointer::New(); imageResliceMapper->SetInputData(imageData); imageResliceMapper->SetSlicePlane(sliceplane); imageResliceMapper->SetInterpolator(imageInterpolator); imageResliceMapper->SetSliceFacesCamera(1); // Setting of vtkImageProperty vtkSmartPointer imageProperty = vtkSmartPointer::New(); imageProperty->SetAmbient(1.0); imageProperty->SetBacking(1.0); imageProperty->SetBackingColor(1.0,0.0,0.0); imageProperty->SetOpacity(1.0); imageProperty->SetInterpolationTypeToLinear(); // Setting of vtkImageSlice vtkSmartPointer imageSlice = vtkSmartPointer::New(); imageSlice->SetMapper(imageResliceMapper); imageSlice->SetProperty(imageProperty); double level; double window; double range[2]; imageData->GetScalarRange(range); window = range[1] - range[0]; level = 0.5*(range[0] + range[1]); if( fabs( window ) < 0.001 ) { window = 0.001 * ( window < 0.0 ? -1 : 1 ); } if( fabs( level ) < 0.001 ) { level = 0.001 * ( level < 0.0 ? -1 : 1 ); } imageProperty->SetColorWindow(window); imageProperty->SetColorLevel(level); // Create renderers and add actors vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddViewProp(imageSlice); // Add renderer to renderwindow and render vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); renderWindow->SetSize(600, 600); vtkSmartPointer interactor = vtkSmartPointer::New(); interactor->SetRenderWindow(renderWindow); // Set the interactor style vtkSmartPointer style = vtkSmartPointer::New(); interactor->SetInteractorStyle(style); renderer->SetBackground(.2, .3, .4); renderer->ResetCamera(); renderWindow->Render(); interactor->Start(); return EXIT_SUCCESS; } From chafey at gmail.com Tue Sep 30 17:04:54 2014 From: chafey at gmail.com (Chris Hafey) Date: Tue, 30 Sep 2014 16:04:54 -0500 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: Hi Aashish and vtkusers, Just checking in to see if anyone has been able to reproduce this issue or see anything I am doing wrong. I would love to get this working on Mac OS X - thanks for any assistance! Chris On Sep 25, 2014, at 8:39 AM, Chris Hafey wrote: > The follow code will reproduce the problem - change the line commented out near the top to switch between GPU and RayCast rendering to see it working and not working. Let me know if you need a CMakefile and DICOM files (I assume you have DICOM files and can plug this code into an existing project if needed ) > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > > int main(int argc, char** argv) > > { > > > > //int renderMode =vtkSmartVolumeMapper::RayCastRenderMode; // this works > > int renderMode =vtkSmartVolumeMapper::GPURenderMode; // this generates black image > > > // Read the DICOM Data > > vtkSmartPointer reader = vtkSmartPointer::New(); > > reader->SetDirectoryName("/Users/chafey/DICOM/Volume3"); > > reader->Update(); > > vtkSmartPointer imageData(reader->GetOutput()); > > > // Translate origin to center of volume > > double xSpacing, ySpacing, zSpacing; > > imageData->GetSpacing(xSpacing, ySpacing, zSpacing); > > int* dims = imageData->GetDimensions(); > > double xCenter = dims[0] * xSpacing / 2.0; > > double yCenter = dims[1] * ySpacing / 2.0; > > double zCenter = dims[2] * zSpacing / 2.0; > > imageData->SetOrigin(-xCenter, -yCenter, -zCenter); > > > > // Setup the renderer for offscreen rendering > > vtkSmartPointer renderer = vtkSmartPointer::New(); > > > // Setup the render window > > vtkSmartPointer render_window = vtkSmartPointer::New(); > > render_window->SetOffScreenRendering(1); > > render_window->AddRenderer(renderer); > > render_window->SetSize(512, 512); > > > // Setup the volume mapper > > vtkSmartPointer volume_mapper = vtkSmartPointer::New(); > > volume_mapper->SetRequestedRenderMode(renderMode); > > volume_mapper->SetInputData(imageData); > > > > > // Setup the volume > > vtkSmartPointer volume = vtkSmartPointer::New(); > > volume->SetMapper(volume_mapper); > > renderer->AddViewProp(volume); > > > // Render the image > > render_window->Render(); > > vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); > > windowToImageFilter->SetInput(render_window); > > windowToImageFilter->Update(); > > > // Create a JPEG in memory > > vtkSmartPointer writer = vtkSmartPointer::New(); > > writer->WriteToMemoryOn(); > > writer->SetInputConnection(windowToImageFilter->GetOutputPort()); > > writer->Write(); > > vtkSmartPointer dataPtr = writer->GetResult(); > > dataPtr->Squeeze(); > > > // write the jpeg to disk > > ofstream myFile ("image.jpg", ios::out | ios::binary); > > myFile.write ((const char*)dataPtr->GetPointer(0), dataPtr->GetSize()); > > > return 0; > > } > > > On Thu, Sep 25, 2014 at 7:42 AM, Aashish Chaudhary wrote: > On Thu, Sep 25, 2014 at 8:38 AM, Chris Hafey wrote: > No errors on the console. I will work on a standalone example. Can you please clarify whether or not I should be using mesa / osmesa for GPU rendering on Mac OS X? > > In theory your regular driver should work with the offscreen rendering setting. As per my understanding, that will just not open the window but will create a context in which the rendering is performed. But if the image is black and if it is not if you don't set that flag then it means the context was not created properly. VTK should have given you a error but may be it is fooled by the system itself. > > You can try osmesa, make sure that VTK detects it, and see if that works. > > - Aashish > > Chris > > On Thu, Sep 25, 2014 at 7:37 AM, Aashish Chaudhary wrote: > This is good to know. Do you get any errors on the console? A standalone example will be nice. > > - Aashish > > On Thu, Sep 25, 2014 at 8:32 AM, Chris Hafey wrote: > I am enabling off screen rendering by calling SetOffScreenRendering(1) on the vtkRenderWindow. Should I be using osmesa? I can create a standalone example to reproduce if needed. > > Chris > > On Thu, Sep 25, 2014 at 7:21 AM, Aashish Chaudhary wrote: > No problem. How did you enable the offscreen? Can you post your code somewhere? > > Thanks, > Aashish > > On Thu, Sep 25, 2014 at 8:05 AM, Chris Hafey wrote: > Hi Aashish, > Forgive my ignorance but I don't know much about osmesa or whether I am using it. I am using VTK as built by homebrew and don't see any options related to osmesa. I have not installed osmesa on the machine. No errors or warnings are issued on the console. > > Chris > > On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary wrote: > Hi Chris, > > Are you using osmesa for the offscreen rendering? Are you getting any error on the console? > > Thanks > > > On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey wrote: > VTK 6.1.0 > Mac OS X Mavericks 10.9.5 > Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB > > My program uses VTK to do off screen volume rendering of medical images. I suspect this is a bug in VTK and not my software because: > 1) GPURenderMode works fine on Windows (both in a VM running on same Mac and on two other Windows 7 boxes with an nVidia GPUs) > 2) RayCastRenderMode works fine on Mac OS X > 3) TextureRenderMode works fine on Mac OS X > > I tried searching the mailing list and google and couldn't find anything. The rendering code is about as basic as it can be - it simply sets the color, opacity, clip planes and matrix. Any ideas on what I might be doing wrong or how I can debug? > > Thanks > > Chris Hafey > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > | Aashish Chaudhary > | Technical Leader > | Kitware Inc. > | http://www.kitware.com/company/team/chaudhary.html > > > > > -- > | Aashish Chaudhary > | Technical Leader > | Kitware Inc. > | http://www.kitware.com/company/team/chaudhary.html > > > > > -- > | Aashish Chaudhary > | Technical Leader > | Kitware Inc. > | http://www.kitware.com/company/team/chaudhary.html > > > > > -- > | Aashish Chaudhary > | Technical Leader > | Kitware Inc. > | http://www.kitware.com/company/team/chaudhary.html > -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Tue Sep 30 17:19:59 2014 From: totte at dunescientific.com (Totte Karlsson) Date: Tue, 30 Sep 2014 14:19:59 -0700 Subject: [vtkusers] How to restore a camera view? In-Reply-To: References: <5425D9A9.9040509@dunescientific.com> Message-ID: <542B1E7F.90704@dunescientific.com> On 9/26/2014 3:01 PM, David Gobbi wrote: > The parameters to save and restore are these: > > Position > FocalPoint > ViewUp > ViewAngle > > > If you are using a parallel projection, then these must > be saved as well: > > ParallelProjection > ParallelScale Just wrote something following your suggestion. Works perfect! Thanks! tk