From aumanga at biggjapan.com Mon Aug 1 00:17:16 2011 From: aumanga at biggjapan.com (Ashika Umanga Umagiliya) Date: Mon, 1 Aug 2011 13:17:16 +0900 Subject: [vtkusers] VTK Incident support ? Message-ID: Greetings VTKers, This is regarding the issue I asked before at - http://public.kitware.com/pipermail/vtkusers/2011-July/117584.html It seems this issue is more specific my logic.May be it has something to do with the way I arrange QT widgets with QVTKWidget. I figure out the point where the error occurs but not quite sure how to fix it.(when I comment out few lines it works,but it hide several widgets I needed in my app) Is it possible to request "Incident Support" to this kind of issue ? Thank you, umanga -------------- next part -------------- An HTML attachment was scrubbed... URL: From emreturkoz at gmail.com Mon Aug 1 01:40:49 2011 From: emreturkoz at gmail.com (emreturkoz) Date: Sun, 31 Jul 2011 22:40:49 -0700 (PDT) Subject: [vtkusers] using vtk & itk together - itkvtkglue Message-ID: <1312177249551-4654088.post@n5.nabble.com> I wanted to make the example which combines ITK with VTK called IO/ImageFileReader from wiki examples. I'm using c++, Visual Studio 2010 and all latest versions of ITK & VTK I downloaded itkvtkglue and configured the project using cmake and built it using visual studio 2010. but i can't use it when i try to configure the example given. Even though cmake finds the ItkVtkGlue_DIR by itself, it gives the error that he couldn't include the necessary file. Fails to include(${ItkVtkGlue_USE_FILE}) Should I somehow change the folders CMake looks for my ItkVtkGlue header files? the error and file content are given below. CMake Error at CMakeLists.txt:6 (include): include could not find load file: C:/Users/Emre CMakeLists.txt looks like this: cmake_minimum_required(VERSION 2.6) project(ImageFileReader) find_package(ItkVtkGlue REQUIRED) *include(${ItkVtkGlue_USE_FILE})* add_executable(ImageFileReader ImageFileReader.cxx) target_link_libraries(ImageFileReader ItkVtkGlue ${VTK_LIBRARIES} ${ITK_LIBRARIES}) -- View this message in context: http://vtk.1045678.n5.nabble.com/using-vtk-itk-together-itkvtkglue-tp4654088p4654088.html Sent from the VTK - Users mailing list archive at Nabble.com. From MatthiasBinninger at gmx.de Mon Aug 1 03:30:40 2011 From: MatthiasBinninger at gmx.de (Matthias Binninger) Date: Mon, 01 Aug 2011 09:30:40 +0200 Subject: [vtkusers] Transparent while preserving color Message-ID: <20110801073040.6960@gmx.net> Hallo! For a visualization I need to display several colored 3d spheres, that might overlap or even be included completely in each other. Included spheres should be visible all the time. My solution was to make the spheres transparent. Unfortunately that means, that colors are not preserved, a red sphere in a green sphere in a yellow sphere in a blue sphere ... not much of the original color left. Is there a way to achieve the (physically uncorrect) behaviour of preserving the colors? Thanks, Matthias -------------- next part -------------- An HTML attachment was scrubbed... URL: From agagliardi at ara.co.uk Mon Aug 1 04:22:22 2011 From: agagliardi at ara.co.uk (Adriano Gagliardi) Date: Mon, 1 Aug 2011 09:22:22 +0100 Subject: [vtkusers] Sort unordered set of points clockwise (orcounter-clockwise) In-Reply-To: References: Message-ID: There is a class in ParaView that will do this for you, but unfortunately it is not available in VTK yet. However, it has been flagged up in Mantis. I've done something similar as you want, but I managed to obtain connectivity information first by using extracting feature edges. I then order the points in clockwise fashion by doing a simple loop around each feature edge (or vtkLine), which would then loop around the rest of the edges looking for a common point. This worked for me in the end although for a very large number of points it will get slow. The other option is to come up with a scalar value that gives you the correct ordering of the points and then sort the points based on it (something like value = sqrt(x*x + y*y)*(value for direction). Otherwise, I'd check out vtkPlotEdges in the ParaView distribution and see if you can integrate it into VTK yourself. Cheers, Adriano =================================== Adriano Gagliardi MEng PhD Business Sector Leader Computational Aerodynamics Aircraft Research Association Ltd. Manton Lane Bedford Tel: 01234 32 4644 E-mail: agagliardi at ara.co.uk Url: www.ara.co.uk _____ From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Miguel Sotaquir? Sent: 30 July 2011 04:14 To: vtkusers at vtk.org Subject: [vtkusers] Sort unordered set of points clockwise (orcounter-clockwise) Hi, In 3-D space I have an unordered set of, say, 6 points; something like this: (A)* (C)* (E)* (F)* (B)* (D)* The points form a 3-D contour but they are unordered. For unordered I mean that they are stored in a vtkIdList = [A - B - C - D - E - F]. I just want to reorganize this list starting from an arbitrary location (let's say point A) and traversing the points clockwise or counter-clockwise. Something like this: orderedList = [A - E - B - D - F - C] or orderedList = [A - C - F - D - B - E] I'm trying to implement an algorithm as simple as possible, since the set of points in mention corresponds to a N-ring neighborhood of each vertex on a mesh of ~420000 points, and I have to do this for each point on the mesh. How can I do this in VTK? Thanks, Miguel ********************************************************************** This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ********************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From msotaquira at gmail.com Mon Aug 1 05:34:21 2011 From: msotaquira at gmail.com (=?ISO-8859-1?Q?Miguel_Sotaquir=E1?=) Date: Mon, 1 Aug 2011 11:34:21 +0200 Subject: [vtkusers] Sort unordered set of points clockwise (orcounter-clockwise) In-Reply-To: References: Message-ID: Actually the approach you suggested (using feature edges + loop) is the one I'm using now, and is working without problems. Thanks! Miguel 2011/8/1 Adriano Gagliardi > ** > There is a class in ParaView that will do this for you, but unfortunately > it is not available in VTK yet. However, it has been flagged up in Mantis. > > I've done something similar as you want, but I managed to obtain > connectivity information first by using extracting feature edges. I > then order the points in clockwise fashion by doing a simple loop around > each feature edge (or vtkLine), which would then loop around the rest of the > edges looking for a common point. This worked for me in the end although for > a very large number of points it will get slow. The other option is to come > up with a scalar value that gives you the correct ordering of the points and > then sort the points based on it (something like value = sqrt(x*x + > y*y)*(value for direction). Otherwise, I'd check out vtkPlotEdges in the > ParaView distribution and see if you can integrate it into VTK yourself. > > Cheers, > Adriano > > =================================== > > Adriano Gagliardi MEng PhD > Business Sector Leader > Computational Aerodynamics > Aircraft Research Association Ltd. > Manton Lane > Bedford > > Tel: 01234 32 4644 > E-mail: agagliardi at ara.co.uk > Url: www.ara.co.uk > > > ------------------------------ > *From:* vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] *On > Behalf Of *Miguel Sotaquir? > *Sent:* 30 July 2011 04:14 > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] Sort unordered set of points clockwise > (orcounter-clockwise) > > Hi, > > In 3-D space I have an unordered set of, say, 6 points; something like > this: > > (A)* > (C)* > (E)* > (F)* > (B)* > > (D)* > > The points form a 3-D contour but they are unordered. For unordered I mean > that they are stored in a vtkIdList = [A - B - C - D - E - F]. I just want > to reorganize this list starting from an arbitrary location (let's say point > A) and traversing the points clockwise or counter-clockwise. Something like > this: > > orderedList = [A - E - B - D - F - C] > or > orderedList = [A - C - F - D - B - E] > > I'm trying to implement an algorithm as simple as possible, since the set > of points in mention corresponds to a N-ring neighborhood of each vertex on > a mesh of ~420000 points, and I have to do this for each point on the mesh. > > How can I do this in VTK? > > Thanks, > Miguel > > ********************************************************************** > This email contains information that is private and confidential and is > intended only for the addressee. > If you are not the intended recipient please delete it and notify us > immediately by e-mailing the sender. > Note: All email sent to or from this address may be accessed by someone > other than the recipient, for > system management and security reasons. > Aircraft Research Association Ltd. Registered in England, Registration No > 503668 Registered Office: > Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 > > ********************************************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Aug 1 07:16:59 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 1 Aug 2011 13:16:59 +0200 Subject: [vtkusers] Transparent while preserving color In-Reply-To: <20110801073040.6960@gmx.net> References: <20110801073040.6960@gmx.net> Message-ID: Well, you can try rendering an outline of the sphere (some kind of circle) instead of a sphere. Or you can maybe just show the occluded smaller spheres with no regard to transparency, but with arbitrary sphere positions it hard (maybe even impossible) to come up with a good way to do it. By the way, what problem are you trying to solve with this? HTH On Mon, Aug 1, 2011 at 09:30, Matthias Binninger wrote: > Hallo! > > For a visualization I need to display several colored 3d spheres, that > might overlap or even be included completely in each other. Included spheres > should be visible all the time. My solution was to make the spheres > transparent. > Unfortunately that means, that colors are not preserved, a red sphere in a > green sphere in a yellow sphere in a blue sphere ... not much of the > original color left. > Is there a way to achieve the (physically uncorrect) behaviour of > preserving the colors? > > Thanks, > Matthias > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From comacke at gmail.com Mon Aug 1 10:38:39 2011 From: comacke at gmail.com (com) Date: Mon, 1 Aug 2011 07:38:39 -0700 (PDT) Subject: [vtkusers] trouble setting up VTK for Qt creator In-Reply-To: <201107291026.22197.clinton@elemtech.com> References: <1311716745135-4636528.post@n5.nabble.com> <18509425.118971311788472417.JavaMail.root@waimiri.ufrr.br> <201107271415.27523.clinton@elemtech.com> <201107291026.22197.clinton@elemtech.com> Message-ID: Thanks for the help Clinton - I tried that out and it seemed to work. After running CMake, I went into the VTK-build directory and found VTK.cbp. I clicked on it and it open up the project in CodeBlocks. I'm not sure where to go from here. When I did this in Visual Studio, there was a project in the solution explorer called ALL_BUILD and another called INSTALL both of which I was able to build. I looked for something similar in the CodeBlocks project explorer and wasn't able to find anything. I also tried clicking "build and run" in CodeBlocks and it gave me the following message: You can't "run" a commands-only target... I can go into the project properties and change the build/target type to dynamic library, static library, console application or gui application. Do I need to change to one of these or do I need to do something else altogether? On Fri, Jul 29, 2011 at 11:26 AM, Clinton Stimpson [via VTK] < ml-node+4647590-2050230737-235024 at n5.nabble.com> wrote: > > You need to use mingw32-gcc.exe and mingw32-g++.exe as your C and CXX > compiler. > > Can you just add C:/Program Files (x86)/CodeBlocks/MinGW/bin to your PATH > environment variable and then have cmake-gui figure out which compilers and > > make programs to pick from that directory? > > Clint > > On Friday, July 29, 2011 08:01:45 am com wrote: > > > I deleted the cache in the CMAKE gui and started over again without any > of > > the Qt stuff - I' figured I'd add that in after the initial configure. > This > > is what I had set in the CMAKE gui to start. > > > > CMAKE_CXX_COMPILER C:/Program Files (x86)/CodeBlocks/codeblocks.exe > > CMAKE_C_COMPILER C:/Program Files > (x86)/CodeBlocks/codeblocks.exe > > CMAKE_MAKE_PROGRAM C:/Program Files > > (x86)/CodeBlocks/MinGW/bin/mingw32-make.exe > > CMAKE_SH - not filled in > > CMAKE_USE_RELATIVE_PATHS - unchecked > > > > I get this error message when I press configure. > > > > The C compiler identification is unknown > > > > The CXX compiler identification is unknown > > > > Check for working C compiler: C:/Program Files > > (x86)/CodeBlocks/codeblocks.exe > > > > Check for working C compiler: C:/Program Files > > (x86)/CodeBlocks/codeblocks.exe -- broken > > > > CMake Error at C:/Program Files (x86)/CMake > > 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): > > > > The C compiler "C:/Program Files (x86)/CodeBlocks/codeblocks.exe" is not > > > > able to compile a simple test program. > > > > It fails with the following output: > > > > Change Dir: C:/Program Files (x86)/VTK_build/CMakeFiles/CMakeTmp > > > > Run Build Command:C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe > > > > "cmTryCompileExec/fast" > > > > C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe -f > > > > CMakeFiles\cmTryCompileExec.dir\build.make > > > > CMakeFiles/cmTryCompileExec.dir/build > > > > mingw32-make.exe[1]: Entering directory `C:/Program Files > > > > (x86)/VTK_build/CMakeFiles/CMakeTmp' > > > > "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_report > > > > > "C:\Program Files (x86)\VTK_build\CMakeFiles\CMakeTmp\CMakeFiles" 1 > > > > Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj > > > > C:\PROGRA~2\CODEBL~1\CODEBL~1.EXE -o > > > > CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj -c "C:\Program Files > > > > (x86)\VTK_build\CMakeFiles\CMakeTmp\testCCompiler.c" > > > > mingw32-make.exe[1]: *** > > > > [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj] Error -1 > > > > mingw32-make.exe[1]: Leaving directory `C:/Program Files > > > > (x86)/VTK_build/CMakeFiles/CMakeTmp' > > > > mingw32-make.exe: *** [cmTryCompileExec/fast] Error 2 > > > > CMake will not be able to correctly generate this project. > > > > Call Stack (most recent call first): > > > > CMakeLists.txt:9 (PROJECT) > > > > Not sure what to do here? This is my first time using CMAKE and I haven't > > > had much experience with makefiles in general, so please pardon my lack > of > > knowledge in this area. > > > > Jothy asked if I had built Qt using mingw. Yes, it was built using mingw. > > > > > > > > > On Thu, Jul 28, 2011 at 9:54 AM, John Drescher-2 [via VTK] < > > > > [hidden email] > > wrote: > > > On Thu, Jul 28, 2011 at 10:51 AM, com <[hidden > > > email]> > > > > > > wrote: > > > > Thanks for the advice. I downloaded CodeBlocks and and choose the > > > > > > CodeBlocks > > > > > > > - MinGW Makefiles options in CMake. I checked to see what compiler > > > > CodeBlocks is using, and it says GNU GCC Compiler - not sure if this > is > > > > > > what > > > > > > > I want or if I need something else. Unfortunately I get the following > > > > > > > error > > > > > > > message: > > > > > > > > CMake Error: CMake was unable to find a build program corresponding > to > > > > "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need > to > > > > select a different build tool. > > > > > > Find the directory for the make that mingw uses and set this variable > > > in cmake-gui > > > > > > John > > > _______________________________________________ > > > Powered by www.kitware.com > > > > > > Visit other Kitware open-source projects at > > > http://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://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > > ------------------------------ > > > > > > If you reply to this email, your message will be added to the > discussion > > > > > > below: > > > > > > > http://vtk.1045678.n5.nabble.com/trouble-setting-up-VTK-for-Qt-creator-tp > > > 4636528p4642998.html > > > > > > To unsubscribe from trouble setting up VTK for Qt creator, click > > > here< > http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=un > > > > subscribe_by_code&node=4636528&code=Y29tYWNrZUBnbWFpbC5jb218NDYzNjUyOHw4 > > > ODA1ODg2MjI=>. > > > > -- > > View this message in context: > > > http://vtk.1045678.n5.nabble.com/trouble-setting-up-VTK-for-Qt-creator-tp4 > > 636528p4647157.html Sent from the VTK - Users mailing list archive at > > Nabble.com. > > -- > Clinton Stimpson > Elemental Technologies, Inc > Computational Simulation Software, LLC > www.csimsoft.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://www.vtk.org/mailman/listinfo/vtkusers > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/trouble-setting-up-VTK-for-Qt-creator-tp4636528p4647590.html > To unsubscribe from trouble setting up VTK for Qt creator, click here. > > -- View this message in context: http://vtk.1045678.n5.nabble.com/trouble-setting-up-VTK-for-Qt-creator-tp4636528p4655195.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Mon Aug 1 11:11:32 2011 From: jothybasu at gmail.com (Jothy) Date: Mon, 1 Aug 2011 16:11:32 +0100 Subject: [vtkusers] vtkLinearFilter doesn't work with the output of vtkWindowedSincPolyDataFilter Message-ID: Hi all, I have smoother a mesh with vtkWindowedSincPolyDataFilter and now I would like to do some extrusion with the mesh for some purpose. But it didn't work properly if I use extrude->SetInput(smoother->GetOutput()). I works well with the input to smoothing filter from vtkAppendPolyDataFilter. Should I convert the type of the output from vtkWindowedSincPolyDataFilter to be used with linear extrusion filter? Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Mon Aug 1 11:13:59 2011 From: daviddoria at gmail.com (David Doria) Date: Mon, 1 Aug 2011 11:13:59 -0400 Subject: [vtkusers] vtkLinearFilter doesn't work with the output of vtkWindowedSincPolyDataFilter In-Reply-To: References: Message-ID: On Mon, Aug 1, 2011 at 11:11 AM, Jothy wrote: > Hi all, > > I have smoother a mesh with vtkWindowedSincPolyDataFilter and now I would > like to do some extrusion with the mesh for some purpose. But it didn't work > properly if I use extrude->SetInput(smoother->GetOutput()). I works well > with the input to smoothing filter from vtkAppendPolyDataFilter. > > Should I convert the type of the output from vtkWindowedSincPolyDataFilter > to be used with linear extrusion filter? > > Thanks > > Jothy > What do you mean "it didn't work properly"? Compiler errors? Incorrect results? David -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Mon Aug 1 11:19:35 2011 From: jothybasu at gmail.com (Jothy) Date: Mon, 1 Aug 2011 16:19:35 +0100 Subject: [vtkusers] vtkLinearFilter doesn't work with the output of vtkWindowedSincPolyDataFilter In-Reply-To: References: Message-ID: I mean it give incorrect results. After applying the extrusion filter I use vtkImageAccumulate to get the no. of voxels inside the extrusion (with reverse stencil ON in vtkImageStencil). it gives "0" voxels. But it works correclty with appendPolyDataFilter->GetOutput(). I think the output of vtkWindowedSincPolyDataFilter is a vtkUnstructuredGrid, since its a mesh. Is there any way to convert vtkUnstructuredGrid back to vtkPolyData? Thanks Jothy On Mon, Aug 1, 2011 at 4:13 PM, David Doria wrote: > On Mon, Aug 1, 2011 at 11:11 AM, Jothy wrote: > >> Hi all, >> >> I have smoother a mesh with vtkWindowedSincPolyDataFilter and now I would >> like to do some extrusion with the mesh for some purpose. But it didn't work >> properly if I use extrude->SetInput(smoother->GetOutput()). I works well >> with the input to smoothing filter from vtkAppendPolyDataFilter. >> >> Should I convert the type of the output from vtkWindowedSincPolyDataFilter >> to be used with linear extrusion filter? >> >> Thanks >> >> Jothy >> > > > What do you mean "it didn't work properly"? Compiler errors? Incorrect > results? > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Mon Aug 1 11:23:08 2011 From: daviddoria at gmail.com (David Doria) Date: Mon, 1 Aug 2011 11:23:08 -0400 Subject: [vtkusers] vtkLinearFilter doesn't work with the output of vtkWindowedSincPolyDataFilter In-Reply-To: References: Message-ID: On Mon, Aug 1, 2011 at 11:19 AM, Jothy wrote: > I mean it give incorrect results. After applying the extrusion filter I use > vtkImageAccumulate to get the no. of voxels inside the extrusion (with > reverse stencil ON in vtkImageStencil). it gives "0" voxels. But it works > correclty with appendPolyDataFilter->GetOutput(). I think the output of vtkWindowedSincPolyDataFilter > is a vtkUnstructuredGrid, since its a mesh. > > Is there any way to convert vtkUnstructuredGrid back to vtkPolyData? > > Thanks > > Jothy > The output of vtkWindowedSincPolyDataFilter is a vtkPolyData, since it derives from vtkPolyDataAlgorithm: http://www.vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html For information sake (since I don't think this is the problem here), you can use vtkDataSetSurfaceFilter to convert an UnstructuredGrid to a PolyData: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter David -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Mon Aug 1 11:32:19 2011 From: jothybasu at gmail.com (Jothy) Date: Mon, 1 Aug 2011 16:32:19 +0100 Subject: [vtkusers] vtkLinearFilter doesn't work with the output of vtkWindowedSincPolyDataFilter In-Reply-To: References: Message-ID: Thanks, but I really don't understand why it does not work. Anyway, will this dataSetSurfaceFilter preserve the holes inside the mesh. For instance, if the mesh has a empty volume inside it (lung tumor which is not part of the lung ). I will try this and let you know. Thanks again Jothy On Mon, Aug 1, 2011 at 4:23 PM, David Doria wrote: > On Mon, Aug 1, 2011 at 11:19 AM, Jothy wrote: > >> I mean it give incorrect results. After applying the extrusion filter I >> use vtkImageAccumulate to get the no. of voxels inside the extrusion (with >> reverse stencil ON in vtkImageStencil). it gives "0" voxels. But it works >> correclty with appendPolyDataFilter->GetOutput(). I think the output of vtkWindowedSincPolyDataFilter >> is a vtkUnstructuredGrid, since its a mesh. >> >> Is there any way to convert vtkUnstructuredGrid back to vtkPolyData? >> >> Thanks >> >> Jothy >> > > The output of vtkWindowedSincPolyDataFilter is a vtkPolyData, since it > derives from vtkPolyDataAlgorithm: > http://www.vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html > > For information sake (since I don't think this is the problem here), you > can use vtkDataSetSurfaceFilter to convert an UnstructuredGrid to a > PolyData: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Mon Aug 1 12:41:13 2011 From: jothybasu at gmail.com (Jothy) Date: Mon, 1 Aug 2011 17:41:13 +0100 Subject: [vtkusers] vtkLinearFilter doesn't work with the output of vtkWindowedSincPolyDataFilter In-Reply-To: References: Message-ID: For this to work properly, the contours should have a constant z-spacing. Now it workd well with contours (vtkPolyData) with constant z-apacing. Jothy On Mon, Aug 1, 2011 at 4:32 PM, Jothy wrote: > Thanks, but I really don't understand why it does not work. Anyway, will > this dataSetSurfaceFilter preserve the holes inside the mesh. For instance, > if the mesh has a empty volume inside it (lung tumor which is not part of > the lung ). > > I will try this and let you know. > > Thanks again > > Jothy > > > > > On Mon, Aug 1, 2011 at 4:23 PM, David Doria wrote: > >> On Mon, Aug 1, 2011 at 11:19 AM, Jothy wrote: >> >>> I mean it give incorrect results. After applying the extrusion filter I >>> use vtkImageAccumulate to get the no. of voxels inside the extrusion (with >>> reverse stencil ON in vtkImageStencil). it gives "0" voxels. But it works >>> correclty with appendPolyDataFilter->GetOutput(). I think the output of vtkWindowedSincPolyDataFilter >>> is a vtkUnstructuredGrid, since its a mesh. >>> >>> Is there any way to convert vtkUnstructuredGrid back to vtkPolyData? >>> >>> Thanks >>> >>> Jothy >>> >> >> The output of vtkWindowedSincPolyDataFilter is a vtkPolyData, since it >> derives from vtkPolyDataAlgorithm: >> >> http://www.vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html >> >> For information sake (since I don't think this is the problem here), you >> can use vtkDataSetSurfaceFilter to convert an UnstructuredGrid to a >> PolyData: >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter >> >> David >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emreturkoz at gmail.com Mon Aug 1 16:09:18 2011 From: emreturkoz at gmail.com (emreturkoz) Date: Mon, 1 Aug 2011 13:09:18 -0700 (PDT) Subject: [vtkusers] Create 3D Volume from 2D DICOM Images Message-ID: <1312229358908-4656536.post@n5.nabble.com> I have a series of DICOM images, approximately 150, starting from I10 to around I1500 with 10 increments. I don't know whether the increment between the filenames are important but I write them also for any case. I want to make the 3d model of the organ that these DICOM images represent for my research. I checked the example given by Mark http://devsample.org/index.php?option=com_content&task=view&id=18&Itemid=1 here but I couldn't make it work. I applied the two examples on vtk wiki page, but none of them gave me the 3D model from DICOM images. The examples I tried: IO/ReadDICOM IO/ReadDICOMSeries I appreciate any help. Thank you very much. -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4656536.html Sent from the VTK - Users mailing list archive at Nabble.com. From David.Pont at scionresearch.com Mon Aug 1 16:59:48 2011 From: David.Pont at scionresearch.com (David Pont) Date: Tue, 2 Aug 2011 08:59:48 +1200 Subject: [vtkusers] Transparent while preserving color In-Reply-To: <20110801073040.6960@gmx.net> References: <20110801073040.6960@gmx.net> Message-ID: Hi Matthias, a couple of suggestions: - Use a Wireframe or even Points display mode, increasing line or point size might be useful; - With Points you could also use ?MaskPoints?; - Use vtkShrinkPolyData to shrink the cells Cheers Dave David Pont Scientist - Forest Management Science Scion 49 Sala Street, Private Bag 3020, Rotorua 3046, New Zealand DDI +64 7 343 5663 www.scionresearch.com [cid:image001.png at 01CC50F2.352E5B80] From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Matthias Binninger Sent: Monday, 1 August 2011 7:31 p.m. To: vtkusers at vtk.org Subject: [vtkusers] Transparent while preserving color Hallo! For a visualization I need to display several colored 3d spheres, that might overlap or even be included completely in each other. Included spheres should be visible all the time. My solution was to make the spheres transparent. Unfortunately that means, that colors are not preserved, a red sphere in a green sphere in a yellow sphere in a blue sphere ... not much of the original color left. Is there a way to achieve the (physically uncorrect) behaviour of preserving the colors? Thanks, Matthias ________________________________ This e-mail and any attachments may contain information which is confidential or subject to copyright. If you receive this e-mail in error, please delete it. Scion does not accept responsibility for anything in this e-mail which is not provided in the course of Scion?s usual business or for any computer virus, data corruption, interference or delay arising from this e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 1857 bytes Desc: image001.png URL: From lekshmijyothi at cdactvm.in Mon Aug 1 23:34:07 2011 From: lekshmijyothi at cdactvm.in (Jyothilekshmi) Date: Tue, 2 Aug 2011 09:04:07 +0530 Subject: [vtkusers] (no subject) Message-ID: <003b01cc50c5$13766f50$3a634df0$@in> Hi Anyboy knows about open gl visualization ______________________________________ Scanned and protected by Email scanner -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Tue Aug 2 04:44:30 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 2 Aug 2011 09:44:30 +0100 Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: <1312229358908-4656536.post@n5.nabble.com> References: <1312229358908-4656536.post@n5.nabble.com> Message-ID: I don't understand what you want to do. Unless you segment a volume form the CT images or have a set of contours defining the organ you can't create a 3D model of the organ. Jothy On Mon, Aug 1, 2011 at 9:09 PM, emreturkoz wrote: > I have a series of DICOM images, approximately 150, starting from I10 to > around I1500 with 10 increments. I don't know whether the increment between > the filenames are important but I write them also for any case. > > I want to make the 3d model of the organ that these DICOM images represent > for my research. I checked the example given by Mark > http://devsample.org/index.php?option=com_content&task=view&id=18&Itemid=1 > here but I couldn't make it work. > > I applied the two examples on vtk wiki page, but none of them gave me the > 3D > model from DICOM images. The examples I tried: > IO/ReadDICOM > IO/ReadDICOMSeries > > I appreciate any help. > > Thank you very much. > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4656536.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emreturkoz at gmail.com Tue Aug 2 04:50:58 2011 From: emreturkoz at gmail.com (emreturkoz) Date: Tue, 2 Aug 2011 01:50:58 -0700 (PDT) Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: References: <1312229358908-4656536.post@n5.nabble.com> Message-ID: <1312275058753-4658013.post@n5.nabble.com> Thank you Jothy for your answer. I though the DICOM images and label descriptions are enough to create a 3D model. DICOM images are those of a brain coming out from a CTscan. They are stuffed into a folder with label describtion and sent to me to make a 3d model out of it. What information do I need more exactly? Thanks again, Emre. -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658013.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Tue Aug 2 04:57:45 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 2 Aug 2011 09:57:45 +0100 Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: <1312275058753-4658013.post@n5.nabble.com> References: <1312229358908-4656536.post@n5.nabble.com> <1312275058753-4658013.post@n5.nabble.com> Message-ID: What do you mean by "label descriptions". In what format it is in? Jothy On Tue, Aug 2, 2011 at 9:50 AM, emreturkoz wrote: > Thank you Jothy for your answer. > > I though the DICOM images and label descriptions are enough to create a 3D > model. DICOM images are those of a brain coming out from a CTscan. They are > stuffed into a folder with label describtion and sent to me to make a 3d > model out of it. > > What information do I need more exactly? > > Thanks again, > Emre. > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658013.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emreturkoz at gmail.com Tue Aug 2 05:15:13 2011 From: emreturkoz at gmail.com (emreturkoz) Date: Tue, 2 Aug 2011 02:15:13 -0700 (PDT) Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: References: <1312229358908-4656536.post@n5.nabble.com> <1312275058753-4658013.post@n5.nabble.com> Message-ID: <1312276513232-4658067.post@n5.nabble.com> It has no format (seriously). But when I open it with text editor, I see this: ################################################ # ITK-SnAP Label Description File # File format: # IDX -R- -G- -B- -A-- VIS MSH LABEL # Fields: # IDX: Zero-based index # -R-: Red color component (0..255) # -G-: Green color component (0..255) # -B-: Blue color component (0..255) # -A-: Label transparency (0.00 .. 1.00) # VIS: Label visibility (0 or 1) # IDX: Label mesh visibility (0 or 1) # LABEL: Label description ################################################ 0 0 0 0 0 0 0 "Clear Label" 1 255 0 0 1 1 1 "Label 1" 2 0 255 0 1 1 1 "Label 2" 3 0 0 255 1 1 1 "Label 3" 4 255 255 0 1 1 1 "Label 4" 5 0 255 255 1 1 1 "Label 5" 6 255 0 255 1 1 1 "Label 6" And there is also a *.wrl file (VRML file) included in which the coordinates are written. -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658067.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Tue Aug 2 05:26:42 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 2 Aug 2011 10:26:42 +0100 Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: <1312276513232-4658067.post@n5.nabble.com> References: <1312229358908-4656536.post@n5.nabble.com> <1312275058753-4658013.post@n5.nabble.com> <1312276513232-4658067.post@n5.nabble.com> Message-ID: Then try vtkVRMLImporter. Have a look at this post http://vtk.1045678.n5.nabble.com/Help-on-reading-VRML-file-td1247802.html and http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML Jothy On Tue, Aug 2, 2011 at 10:15 AM, emreturkoz wrote: > It has no format (seriously). But when I open it with text editor, I see > this: > > ################################################ > # ITK-SnAP Label Description File > # File format: > # IDX -R- -G- -B- -A-- VIS MSH LABEL > # Fields: > # IDX: Zero-based index > # -R-: Red color component (0..255) > # -G-: Green color component (0..255) > # -B-: Blue color component (0..255) > # -A-: Label transparency (0.00 .. 1.00) > # VIS: Label visibility (0 or 1) > # IDX: Label mesh visibility (0 or 1) > # LABEL: Label description > ################################################ > 0 0 0 0 0 0 0 "Clear Label" > 1 255 0 0 1 1 1 "Label 1" > 2 0 255 0 1 1 1 "Label 2" > 3 0 0 255 1 1 1 "Label 3" > 4 255 255 0 1 1 1 "Label 4" > 5 0 255 255 1 1 1 "Label 5" > 6 255 0 255 1 1 1 "Label 6" > > > > And there is also a *.wrl file (VRML file) included in which the > coordinates > are written. > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658067.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emreturkoz at gmail.com Tue Aug 2 06:32:57 2011 From: emreturkoz at gmail.com (emreturkoz) Date: Tue, 2 Aug 2011 03:32:57 -0700 (PDT) Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: References: <1312229358908-4656536.post@n5.nabble.com> <1312275058753-4658013.post@n5.nabble.com> <1312276513232-4658067.post@n5.nabble.com> Message-ID: <1312281177190-4658253.post@n5.nabble.com> Thank you. I tried that but another problem came out. I could visualize the bridge in the example with the sample code given, but I couldn't manage to visualize my own *.wrl file. But through paraView I'm also able to visualize my scan. http://vtk.1045678.n5.nabble.com/file/n4658253/scan.png But the code that can generate the http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML bridge , can't visualize that one. Do I have to add anything to the code given? I need to be able to visualize this outside of the paraView. -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658253.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Tue Aug 2 07:45:09 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 2 Aug 2011 12:45:09 +0100 Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: <1312281177190-4658253.post@n5.nabble.com> References: <1312229358908-4656536.post@n5.nabble.com> <1312275058753-4658013.post@n5.nabble.com> <1312276513232-4658067.post@n5.nabble.com> <1312281177190-4658253.post@n5.nabble.com> Message-ID: Can you post your code and the actual error/problem you get when executing that. Jothy On Tue, Aug 2, 2011 at 11:32 AM, emreturkoz wrote: > Thank you. I tried that but another problem came out. > > I could visualize the bridge in the example with the sample code given, but > I couldn't manage to visualize my own *.wrl file. But through paraView I'm > also able to visualize my scan. > > http://vtk.1045678.n5.nabble.com/file/n4658253/scan.png > > But the code that can generate the > http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML bridge , can't visualize > that one. Do I have to add anything to the code given? I need to be able to > visualize this outside of the paraView. > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658253.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emreturkoz at gmail.com Tue Aug 2 08:01:05 2011 From: emreturkoz at gmail.com (emreturkoz) Date: Tue, 2 Aug 2011 05:01:05 -0700 (PDT) Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: References: <1312229358908-4656536.post@n5.nabble.com> <1312275058753-4658013.post@n5.nabble.com> <1312276513232-4658067.post@n5.nabble.com> <1312281177190-4658253.post@n5.nabble.com> Message-ID: <1312286465330-4658425.post@n5.nabble.com> Jothy thank you very much for your help. You made me a great progress. I also noticed something. With the code I give below, I can visualize samples (like fish.wrl), which can be seen so to say in "mesh form". There was an example on this http://people.sc.fsu.edu/~jburkardt/data/wrl_2/wrl_2.html link called red_chair, where a chair to be seen completely. The code below also failed to visualize this example. I get no errors. I only get a blank window as if no actor is loaded. But paraView doesn't fail on these samples. Thank you for your help. int VRMLReader(){ std::string filename = "fish.wrl"; std::cout << "Reading " << filename << std::endl; // VRML Import vtkVRMLImporter *importer=vtkVRMLImporter::New(); importer->SetFileName(filename.c_str()); importer->Read(); importer->Update(); //Convert to vtkDataSet vtkDataSet *pDataset; vtkActorCollection *actors = importer->GetRenderer()->GetActors(); actors->InitTraversal(); pDataset = actors->GetNextActor()->GetMapper()->GetInput(); //Problem happened here //Convert to vtkPolyData vtkPolyData *polyData = vtkPolyData::SafeDownCast(pDataset); polyData->Update(); // Create Normal Vectors to enhance smoothness & illumination vtkPolyDataNormals *normals = vtkPolyDataNormals::New(); normals->SetInput(polyData); normals->SetFeatureAngle(60.0); // Mapper vtkPolyDataMapper *SolidMapper = vtkPolyDataMapper::New(); SolidMapper->SetInput(normals->GetOutput()); SolidMapper->ScalarVisibilityOff(); // Actor vtkActor *SolidActor = vtkActor::New(); SolidActor->SetMapper(SolidMapper); //SolidActor->GetProperty()->SetOpacity(1); // Render vtkRenderer *ren = vtkRenderer::New(); ren->AddActor(SolidActor); ren->SetBackground(0.1,0.3,0.1); // RenderWindow vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren); // RenderWindowInteractor vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); renWin->Start(); renWin->SetSize(800-5,600-5); // interact with data iren->Initialize(); iren->Start(); // delete actors->Delete(); normals->Delete(); SolidMapper->Delete(); SolidActor->Delete(); ren->Delete(); renWin->Delete(); iren->Delete(); return 0; } -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658425.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Tue Aug 2 08:12:56 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 2 Aug 2011 13:12:56 +0100 Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: <1312286465330-4658425.post@n5.nabble.com> References: <1312229358908-4656536.post@n5.nabble.com> <1312275058753-4658013.post@n5.nabble.com> <1312276513232-4658067.post@n5.nabble.com> <1312281177190-4658253.post@n5.nabble.com> <1312286465330-4658425.post@n5.nabble.com> Message-ID: vtkVRMLImporter seems to import only VRML 2.0 files. Check your VRML version. Jothy On Tue, Aug 2, 2011 at 1:01 PM, emreturkoz wrote: > Jothy thank you very much for your help. You made me a great progress. > > I also noticed something. With the code I give below, I can visualize > samples (like fish.wrl), which can be seen so to say in "mesh form". There > was an example on this > http://people.sc.fsu.edu/~jburkardt/data/wrl_2/wrl_2.html link called > red_chair, where a chair to be seen completely. The code below also failed > to visualize this example. > > I get no errors. I only get a blank window as if no actor is loaded. But > paraView doesn't fail on these samples. > > Thank you for your help. > > int VRMLReader(){ > > std::string filename = "fish.wrl"; > std::cout << "Reading " << filename << std::endl; > // VRML Import > vtkVRMLImporter *importer=vtkVRMLImporter::New(); > importer->SetFileName(filename.c_str()); > importer->Read(); > importer->Update(); > > //Convert to vtkDataSet > vtkDataSet *pDataset; > vtkActorCollection *actors = importer->GetRenderer()->GetActors(); > actors->InitTraversal(); > pDataset = actors->GetNextActor()->GetMapper()->GetInput(); //Problem > happened here > > //Convert to vtkPolyData > vtkPolyData *polyData = vtkPolyData::SafeDownCast(pDataset); > polyData->Update(); > > > // Create Normal Vectors to enhance smoothness & illumination > vtkPolyDataNormals *normals = vtkPolyDataNormals::New(); > normals->SetInput(polyData); > normals->SetFeatureAngle(60.0); > > // Mapper > vtkPolyDataMapper *SolidMapper = vtkPolyDataMapper::New(); > SolidMapper->SetInput(normals->GetOutput()); > SolidMapper->ScalarVisibilityOff(); > > // Actor > vtkActor *SolidActor = vtkActor::New(); > SolidActor->SetMapper(SolidMapper); > //SolidActor->GetProperty()->SetOpacity(1); > > // Render > vtkRenderer *ren = vtkRenderer::New(); > ren->AddActor(SolidActor); > ren->SetBackground(0.1,0.3,0.1); > > // RenderWindow > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(ren); > > // RenderWindowInteractor > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > renWin->Start(); > renWin->SetSize(800-5,600-5); > // interact with data > iren->Initialize(); > iren->Start(); > > // delete > > actors->Delete(); > normals->Delete(); > SolidMapper->Delete(); > SolidActor->Delete(); > ren->Delete(); > renWin->Delete(); > iren->Delete(); > > return 0; > > } > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658425.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emreturkoz at gmail.com Tue Aug 2 08:15:52 2011 From: emreturkoz at gmail.com (emreturkoz) Date: Tue, 2 Aug 2011 05:15:52 -0700 (PDT) Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: References: <1312229358908-4656536.post@n5.nabble.com> <1312275058753-4658013.post@n5.nabble.com> <1312276513232-4658067.post@n5.nabble.com> <1312281177190-4658253.post@n5.nabble.com> <1312286465330-4658425.post@n5.nabble.com> Message-ID: <1312287352867-4658469.post@n5.nabble.com> Yeah, but my file is also has the version "#VRML V2.0 utf8". So the problem must be sth else.. -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658469.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Tue Aug 2 08:30:04 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 2 Aug 2011 13:30:04 +0100 Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: <1312287352867-4658469.post@n5.nabble.com> References: <1312229358908-4656536.post@n5.nabble.com> <1312275058753-4658013.post@n5.nabble.com> <1312276513232-4658067.post@n5.nabble.com> <1312281177190-4658253.post@n5.nabble.com> <1312286465330-4658425.post@n5.nabble.com> <1312287352867-4658469.post@n5.nabble.com> Message-ID: You are not calling renderWindow->Render(); in your code Jothy On Tue, Aug 2, 2011 at 1:15 PM, emreturkoz wrote: > Yeah, but my file is also has the version "#VRML V2.0 utf8". So the > problem > must be sth else.. > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658469.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From webmaster at insightsoftwareconsortium.org Tue Aug 2 08:13:28 2011 From: webmaster at insightsoftwareconsortium.org (Insight Journal) Date: Tue, 2 Aug 2011 08:13:28 -0400 Subject: [vtkusers] The Insight Journal-New Submission Message-ID: <201108021213.p72CDSZh014497@insight-journal.org> Hello, A new submission has been added to the Insight Journal. Title: Moore Neighbor Tracing Author(s):Doria D. Abstract: This document presents an implementation of Moore Neighbor Tracing - an algorithm to find an ordered outline of a blob or contour in an image. An excellent tutorial on Moore Neighbor Tracing is provided here: http://www.imageprocessingplace.com/downloads_V3/root_downloads/tutorials/contour_tracing_Abeer_George_Ghuneim/moore.html. The code is available here: https://github.com/daviddoria/MooreTracing Download and Review the paper at: http://www.insight-journal.org/browse/publication/832 Generated by the Insight Journal You are receiving this email because you asked to be informed by the Insight Journal for new submissions. To change your email preference go to http://www.insight-journal.org . From emreturkoz at gmail.com Tue Aug 2 08:34:51 2011 From: emreturkoz at gmail.com (emreturkoz) Date: Tue, 2 Aug 2011 05:34:51 -0700 (PDT) Subject: [vtkusers] Create 3D Volume from 2D DICOM Images In-Reply-To: References: <1312275058753-4658013.post@n5.nabble.com> <1312276513232-4658067.post@n5.nabble.com> <1312281177190-4658253.post@n5.nabble.com> <1312286465330-4658425.post@n5.nabble.com> <1312287352867-4658469.post@n5.nabble.com> Message-ID: <1312288491136-4658518.post@n5.nabble.com> i actually do: vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); so when I sat iren->Start it does the job. But I tried what you say anyway, and it unfortunately didn't work out. it's like paraview is much more advanced and has some abilities that we don't have here to visualize VRML files.. -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-3D-Volume-from-2D-DICOM-Images-tp4656536p4658518.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Tue Aug 2 09:22:20 2011 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 2 Aug 2011 09:22:20 -0400 Subject: [vtkusers] VTK Incident support ? In-Reply-To: References: Message-ID: Yes if you really are stuck I think someone at Kitware could debug that problem for you through incident support if you can minimize the amount of code needed to replicate the problem and send it along with the support request. A couple of suggestions first: * Look for uninitialized variables in your code, those are the source of many works-in-debug-doesn't-work-in-release problems. * Try using dependency walker to see if there is a library problem in the release built version and not the debug built version. On the mechanics on incident support - you can just buy it from our store (see the "buy now" button right off of http://www.kitware.com/products/support.html. Once you've done that you get an email with their invoice number, and instructions on how to create an account on our help desk. Create a ticket there for the incident and reference the invoice number in that ticket. David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 On Mon, Aug 1, 2011 at 12:17 AM, Ashika Umanga Umagiliya wrote: > Greetings VTKers, > This is regarding the issue I asked before at > -?http://public.kitware.com/pipermail/vtkusers/2011-July/117584.html > It seems this issue is more specific my logic.May be it has something to do > with the way I arrange QT widgets with QVTKWidget. > I figure out the point where the error occurs but not quite sure how to fix > it.(when I comment out few lines it works,but it hide several widgets I > needed in my app) > Is it possible to request "Incident Support" to this kind of issue ? > Thank you, > umanga > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > From tibornyers at gmail.com Tue Aug 2 09:37:13 2011 From: tibornyers at gmail.com (Toorop) Date: Tue, 2 Aug 2011 06:37:13 -0700 (PDT) Subject: [vtkusers] cannot find lproj while make install In-Reply-To: <689028.39534.qm@web111704.mail.gq1.yahoo.com> References: <689028.39534.qm@web111704.mail.gq1.yahoo.com> Message-ID: <1312292233887-4658732.post@n5.nabble.com> Hi, exactly the same problem here. OS: Ubuntu 11.04 64bit. Error message at the end of make install: -- Installing: /home/tibornyers/VTKBuild/lib/vtk-5.6/libvtkproj4.so.5.6.1 -- Installing: /home/tibornyers/VTKBuild/lib/vtk-5.6/libvtkproj4.so.5.6 -- Installing: /home/tibornyers/VTKBuild/lib/vtk-5.6/libvtkproj4.so CMake Error at Utilities/vtklibproj4/cmake_install.cmake:74 (FILE): file INSTALL cannot find "/home/username/VTKBuild/bin/lproj". Call Stack (most recent call first): Utilities/cmake_install.cmake:66 (INCLUDE) cmake_install.cmake:173 (INCLUDE) Can someone please fix this? Thx! -- View this message in context: http://vtk.1045678.n5.nabble.com/cannot-find-lproj-while-make-install-tp4473506p4658732.html Sent from the VTK - Users mailing list archive at Nabble.com. From heiland at indiana.edu Tue Aug 2 10:57:26 2011 From: heiland at indiana.edu (Randy Heiland) Date: Tue, 2 Aug 2011 10:57:26 -0400 Subject: [vtkusers] error w/ Python on OSX Lion Message-ID: <7E5D6444-A50B-4642-9245-151CCEA4482A@indiana.edu> Hi gang, Has anyone built 5.6.1, with Python wrappers, on OSX Lion? Here are my cmake options: -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON -DVTK_WRAP_PYTHON=ON -DVTK_USE_INFOVIS=ON -DVTK_USE_GUISUPPORT=ON and I get the following error: Scanning dependencies of target vtkRenderingPython [ 69%] Building CXX object Rendering/CMakeFiles/vtkRenderingPython.dir/vtkRenderingPythonInit.cxx.o Linking CXX shared module ../bin/libvtkRenderingPython.so [ 69%] Built target vtkRenderingPython [ 69%] Building CXX object Rendering/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o /Users/heiland/dev/VTK-5.6.1/Rendering/vtkCocoaTkUtilities.mm: In static member function ?static void* vtkCocoaTkUtilities::GetDrawableView(Tk_Window_*)?: /Users/heiland/dev/VTK-5.6.1/Rendering/vtkCocoaTkUtilities.mm:56: error: ?NSView? was not declared in this scope /Users/heiland/dev/VTK-5.6.1/Rendering/vtkCocoaTkUtilities.mm:56: error: ?result? was not declared in this scope make[2]: *** [Rendering/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o] Error 1 make[1]: *** [Rendering/CMakeFiles/vtkRenderingPythonTkWidgets.dir/all] Error 2 And using the system Python (2.7.1), fwiw. thanks, Randy From heiland at indiana.edu Tue Aug 2 11:21:20 2011 From: heiland at indiana.edu (Randy Heiland) Date: Tue, 2 Aug 2011 11:21:20 -0400 Subject: [vtkusers] error w/ Python on OSX Lion In-Reply-To: <7E5D6444-A50B-4642-9245-151CCEA4482A@indiana.edu> References: <7E5D6444-A50B-4642-9245-151CCEA4482A@indiana.edu> Message-ID: Whatever the problem, it seems to be fixed in git? On Aug 2, 2011, at 10:57 AM, Randy Heiland wrote: > Hi gang, > > Has anyone built 5.6.1, with Python wrappers, on OSX Lion? Here are my cmake options: > -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON -DVTK_WRAP_PYTHON=ON -DVTK_USE_INFOVIS=ON -DVTK_USE_GUISUPPORT=ON > > and I get the following error: > Scanning dependencies of target vtkRenderingPython > [ 69%] Building CXX object Rendering/CMakeFiles/vtkRenderingPython.dir/vtkRenderingPythonInit.cxx.o > Linking CXX shared module ../bin/libvtkRenderingPython.so > [ 69%] Built target vtkRenderingPython > [ 69%] Building CXX object Rendering/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o > /Users/heiland/dev/VTK-5.6.1/Rendering/vtkCocoaTkUtilities.mm: In static member function ?static void* vtkCocoaTkUtilities::GetDrawableView(Tk_Window_*)?: > /Users/heiland/dev/VTK-5.6.1/Rendering/vtkCocoaTkUtilities.mm:56: error: ?NSView? was not declared in this scope > /Users/heiland/dev/VTK-5.6.1/Rendering/vtkCocoaTkUtilities.mm:56: error: ?result? was not declared in this scope > make[2]: *** [Rendering/CMakeFiles/vtkRenderingPythonTkWidgets.dir/vtkCocoaTkUtilities.mm.o] Error 1 > make[1]: *** [Rendering/CMakeFiles/vtkRenderingPythonTkWidgets.dir/all] Error 2 > > And using the system Python (2.7.1), fwiw. > > thanks, Randy From l.paul at uclouvain.be Tue Aug 2 11:35:54 2011 From: l.paul at uclouvain.be (Laurent) Date: Tue, 2 Aug 2011 08:35:54 -0700 (PDT) Subject: [vtkusers] ClipClosedSurface Message-ID: <1312299354837-4659117.post@n5.nabble.com> Dear users, I would like to clip data using ClipClosedSurface and get the generated cells (the cap). I saw in the doxygen that you can Setup a flag using SetScalarModeToLabels that will generate scalar data for that cells (1 for the cut face and 2 for the active plane, 0 for the original cells). That seems perfect for me but this is not implemented in my version (VTK 5.6.1). I tried to download the vtkClipClosedSurface class from Git but there is no ScalarMode in that clas... I've found CellClipScalars vtkDoubleArray that seems to be the interesting data, but it is not used. Does someone knows if this option is really available and how to use it (Name of the scalar Array for a latter use, ...)? Thanks, Laurent. -- View this message in context: http://vtk.1045678.n5.nabble.com/ClipClosedSurface-tp4659117p4659117.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Aug 2 11:55:42 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 2 Aug 2011 09:55:42 -0600 Subject: [vtkusers] ClipClosedSurface In-Reply-To: <1312299354837-4659117.post@n5.nabble.com> References: <1312299354837-4659117.post@n5.nabble.com> Message-ID: Hi Laurent, I am glad to hear that you are interested in this class. I'm not sure what went wrong when you tried to download it from git, but the versions of this class in the git master and release branches both have SetScalarModeToLabels. This class will be part of VTK 5.8. When SetScalarModeToLabels is used, the array is called "Labels" (you cannot change the name). More documentation can be found here: http://www.vtk.org/Wiki/VTK/Closed_Surface_Clipping - David On Tue, Aug 2, 2011 at 9:35 AM, Laurent wrote: > Dear users, > > I would like to clip data using ClipClosedSurface and get the generated > cells (the cap). > I saw in the doxygen that you can Setup a flag using SetScalarModeToLabels > that will generate scalar data for that cells (1 for the cut face and 2 for > the active plane, 0 for the original cells). > That seems perfect for me but this is not implemented in my version (VTK > 5.6.1). > I tried to download the vtkClipClosedSurface class from Git but there is no > ScalarMode in that clas... > I've found CellClipScalars vtkDoubleArray that seems to be the interesting > data, but it is not used. > > Does someone knows if this option is really available and how to use it > (Name of the scalar Array for a latter use, ...)? > > Thanks, > Laurent. From fortmeier at imi.uni-luebeck.de Tue Aug 2 11:04:14 2011 From: fortmeier at imi.uni-luebeck.de (Dirk Fortmeier) Date: Tue, 02 Aug 2011 17:04:14 +0200 Subject: [vtkusers] vtkOpenGLGPUVolumeRayCastMapper Problem on Ubuntu Message-ID: <1312297454.9861.9.camel@grafzahl> Hi everybody, I got some weird problem. When I try to use the vtkOpenGLGPUVolumeRayCastMapper I get the following error: "vtkOpenGLGPUVolumeRayCastMapper (0x28ab6f0): Rendering failed because the following OpenGL extensions are required but not supported: OpenGL 1.3 is required but not supported" VTK compiles and displaying normal gl stuff works fine. Any ideas what is wrong or how to fix this? Hints: - Ubuntu 11.04 (64bit) - nvidia-current (nvidia driver version 270.xx) and nvidia-current-dev are installed - no mesa stuff installed - VTK from the git repository - Nvidia Quadro 4000 Chipset Cheers, Dirk -- Dirk Fortmeier , PhD Student Institute of Medical Informatics Graduate School for Computing in Medicine and Life Sciences University of L?beck Building 64, 2F, Room 4 Ratzeburger Allee 160 23538 L?beck Germany Tel.:+49 (451) 500-5635 Fax.:+49 (451) 500-5610 From anka at bic.mni.mcgill.ca Tue Aug 2 12:33:06 2011 From: anka at bic.mni.mcgill.ca (Anka Kochanowska) Date: Tue, 2 Aug 2011 12:33:06 -0400 Subject: [vtkusers] HistogramXYPlot example Message-ID: Hi! VTK/Examples/Cxx/Images/HistogramXYPlot is in VTKMakeMoreInteresting category because the plot does not take the whole window. It is enough to add after lines: plot->SetXRange( 0, xmax ); plot->SetYRange( 0, ymax ); new lines: plot->GetPositionCoordinate()->SetValue(0.0, 0.0); plot->GetPosition2Coordinate()->SetValue(1.0, 1.0); before line // Visualize the histogram(s) Anka (Attached the whole file) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: HistogramXYPlot.cxx Type: text/x-c++src Size: 4017 bytes Desc: not available URL: From chrisyeshi at gmail.com Tue Aug 2 12:39:18 2011 From: chrisyeshi at gmail.com (chrisyeshi) Date: Tue, 2 Aug 2011 09:39:18 -0700 (PDT) Subject: [vtkusers] To find the local coordinate in vtkActor Message-ID: <1312303158983-4659394.post@n5.nabble.com> Hi, For example, I have a vtkPlaneSource that is (0.0, 0.0) to (1.0, 1.0), a square. Then I have a mapper and vtkActor. I set Scale, Position, Rotation, Orientation, User Matrix, ans User Transform in vtkActor. Now I use vtkPropPicker to pick a point in this vtkPlaneSource, how do I translate the display coordinate point to a point that is relate to the origin of the vtkPlaneSource? Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/To-find-the-local-coordinate-in-vtkActor-tp4659394p4659394.html Sent from the VTK - Users mailing list archive at Nabble.com. From webmaster at insightsoftwareconsortium.org Tue Aug 2 13:04:43 2011 From: webmaster at insightsoftwareconsortium.org (VTK Journal) Date: Tue, 2 Aug 2011 13:04:43 -0400 Subject: [vtkusers] The VTK Journal-New Submission Message-ID: <201108021704.p72H4hEA023076@insight-journal.org> Hello, A new submission has been added to the VTK Journal. Title: Clustering Segmentation for VTK Author(s):Doria D. Abstract: This document presents a VTK implementation of the algorithm described in "A clustering method for efficient segmentation of 3D laser data" by Klasing, Klaas Wollherr, Dirk, and Buss, Martin. The algorithm . The code is available here: https://github.com/daviddoria/ClusteringSegmentation Download and Review the paper at: http://www.midasjournal.org/browse/publication/833 Generated by the VTK Journal You are receiving this email because you asked to be informed by the VTK Journal for new submissions. To change your email preference go to http://www.midasjournal.org . From l.paul at uclouvain.be Tue Aug 2 14:44:57 2011 From: l.paul at uclouvain.be (Laurent Paul) Date: Tue, 02 Aug 2011 20:44:57 +0200 Subject: [vtkusers] ClipClosedSurface In-Reply-To: References: <1312299354837-4659117.post@n5.nabble.com> Message-ID: <4E3845A9.9010506@uclouvain.be> Hi David, I think that this class is a great improvement for VTK as well as the class published in the Insight Journal called "Boolean Operations on Surfaces in VTK Without External Libraries" I don't know what happened when I have downloaded the clss from git, but I have retried and I finally get the class containing the ScalarMode. I"ll try that tomorrow. Thanks, Laurent. Le 2/08/2011 17:55, David Gobbi a ?crit : > Hi Laurent, > > I am glad to hear that you are interested in this class. I'm not sure > what went wrong when you tried to download it from git, but the > versions of this class in the git master and release branches both > have SetScalarModeToLabels. This class will be part of VTK 5.8. > > When SetScalarModeToLabels is used, the array is called "Labels" > (you cannot change the name). More documentation can be found > here: http://www.vtk.org/Wiki/VTK/Closed_Surface_Clipping > > - David > > > On Tue, Aug 2, 2011 at 9:35 AM, Laurent wrote: >> Dear users, >> >> I would like to clip data using ClipClosedSurface and get the generated >> cells (the cap). >> I saw in the doxygen that you can Setup a flag using SetScalarModeToLabels >> that will generate scalar data for that cells (1 for the cut face and 2 for >> the active plane, 0 for the original cells). >> That seems perfect for me but this is not implemented in my version (VTK >> 5.6.1). >> I tried to download the vtkClipClosedSurface class from Git but there is no >> ScalarMode in that clas... >> I've found CellClipScalars vtkDoubleArray that seems to be the interesting >> data, but it is not used. >> >> Does someone knows if this option is really available and how to use it >> (Name of the scalar Array for a latter use, ...)? >> >> Thanks, >> Laurent. From emreturkoz at gmail.com Tue Aug 2 16:20:40 2011 From: emreturkoz at gmail.com (emreturkoz) Date: Tue, 2 Aug 2011 13:20:40 -0700 (PDT) Subject: [vtkusers] DICOM Images --> Visualization & Processing Message-ID: <1312316440510-4660255.post@n5.nabble.com> Hi everybody, First I want to give an advice to those who want to generate 3D volume visualization from 2D DICOM image stacks. I tried marching cubes with a smoothing filter and it seems to work now. How it's done is attached in the code given below. The bottleneck is its speed and memory consumption, but it's better than nothing. The problem is that it's way too slow. I read from the internet that slice cubes work faster than marching cubes but I couldn't find an example and couldn't understand how the pipeline should work. Because if you simply change marchingcubes with slicecubes it doesn't work. It needs volume16reader and etc. And I find it's very hard to implement volume16reader because it need FilePrefix and FilePattern, which are hard to input. I have files starting from I10.dcm to I1560.dcm with 10 increments in between. My first question is: How should I set the image range, file prefix and file pattern for volume16Reader? My second question is this: I want to convert DICOM images to vtp files, so that I can work on them as polydata. I want to mesh them, make the blood flow in them etc. I can do this for every individual file. What I ask is: Is this OK for meshing and for forming the 3D Volume if I convert files individually? How can I merge these vtp files to form a large whole vtp file which represent the whole volume? And what tool should I use to mesh it? I know it's a way bit long question, but I thank you for any help. Best regards, Emre. -- View this message in context: http://vtk.1045678.n5.nabble.com/DICOM-Images-Visualization-Processing-tp4660255p4660255.html Sent from the VTK - Users mailing list archive at Nabble.com. From Clement.Chu at csiro.au Wed Aug 3 02:21:08 2011 From: Clement.Chu at csiro.au (Clement.Chu at csiro.au) Date: Wed, 3 Aug 2011 16:21:08 +1000 Subject: [vtkusers] vtkLookupTable Message-ID: <1C91DEB88B00944ABBB9DD09B60246CCB5E594AC@exvic-mbx01.nexus.csiro.au> Hi, I used vtkLookupTable for colour map. I would like to know whether it is poosible to give the values of r, b, g and a and return table index. Please advise how to do it. Many thanks. Regards, Clement From MatthiasBinninger at gmx.de Wed Aug 3 02:34:26 2011 From: MatthiasBinninger at gmx.de (Matthias Binninger) Date: Wed, 03 Aug 2011 08:34:26 +0200 Subject: [vtkusers] Transparent while preserving color Message-ID: <20110803063426.6920@gmx.net> Thanks for you responses! What I have to display is a 3d path of some measurement points. These have (a bit simplified) to lie inside different spheric thresholds that are displayed together with other properties. The goal was to mimic existing 2d plots (projections) which somehow restricts how it should look like. I do like the idea to use wireframes, I'll see if that can be close enough to what I need. Greetings, Matthias ----- Urspr?ngliche Nachricht ----- Von: David Pont Gesendet: 01.08.11 22:59 Uhr An: Matthias Binninger, vtkusers at vtk.org Betreff: RE: [vtkusers] Transparent while preserving color Hi Matthias, a couple of suggestions: -Use a Wireframe or even Points display mode, increasing line or point size might be useful; -With Points you could also use ?MaskPoints?; -Use vtkShrinkPolyData to shrink the cells Cheers Dave David Pont Scientist - Forest Management Science Scion 49 Sala Street, Private Bag 3020, Rotorua 3046, New Zealand DDI +64 7 343 5663 www.scionresearch.com http://www.scionresearch.com/ From: vtkusers-bounces at vtk.org [mailto: vtkusers-bounces at vtk.org ] *On Behalf Of *Matthias Binninger *Sent:* Monday, 1 August 2011 7:31 p.m. *To:* vtkusers at vtk.org *Subject:* [vtkusers] Transparent while preserving color Hallo! For a visualization I need to display several colored 3d spheres, that might overlap or even be included completely in each other. Included spheres should be visible all the time. My solution was to make the spheres transparent. Unfortunately that means, that colors are not preserved, a red sphere in a green sphere in a yellow sphere in a blue sphere ... not much of the original color left. Is there a way to achieve the (physically uncorrect) behaviour of preserving the colors? Thanks, Matthias ----------------------------------------------------------------- This e-mail and any attachments may contain information which is confidential or subject to copyright. If you receive this e-mail in error, please delete it. Scion does not accept responsibility for anything in this e-mail which is not provided in the course of Scion?s usual business or for any computer virus, data corruption, interference or delay arising from this e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 1857 bytes Desc: image001.png URL: From lekshmijyothi at cdactvm.in Wed Aug 3 05:35:46 2011 From: lekshmijyothi at cdactvm.in (Jyothilekshmi) Date: Wed, 3 Aug 2011 15:05:46 +0530 Subject: [vtkusers] (no subject) Message-ID: <002201cc51c0$c3761c10$4a625430$@in> Have anybody knows the visualization of a number of vertices (triangle vertices) into a 3D volume. ______________________________________ Scanned and protected by Email scanner -------------- next part -------------- An HTML attachment was scrubbed... URL: From al.gry at web.de Wed Aug 3 06:11:26 2011 From: al.gry at web.de (al.gry) Date: Wed, 3 Aug 2011 03:11:26 -0700 (PDT) Subject: [vtkusers] Release button event doesn't Message-ID: <1312366286908-4661878.post@n5.nabble.com> Hi all, i'm implementing qt vtk application. The goal is to adjust window level using mouse ObserverWindowLevel *observeWindowLevel = ObserverWindowLevel::New(m_pQVTKIren); m_pQVTKIren->AddObserver(vtkCommand::RightButtonPressEvent, observeWindowLevel); m_pQVTKIren->AddObserver(vtkCommand::RightButtonReleaseEvent, observeWindowLevel); observeWindowLevel->Delete(); when i'm trying to catch vtkCommand::RightButtonReleaseEvent in my Execute(vtkObject *caller, unsigned long eventId, void *callData) nothing happens. It works perfectly for RightButtonPressEvent but for some reason RightButtonReleaseEvent is not passed to Execute(...) Any ideas? -Al -- View this message in context: http://vtk.1045678.n5.nabble.com/Release-button-event-doesn-t-tp4661878p4661878.html Sent from the VTK - Users mailing list archive at Nabble.com. From vijaeendra at gmail.com Wed Aug 3 06:40:17 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Wed, 3 Aug 2011 16:10:17 +0530 Subject: [vtkusers] Qt and Vtk on Solaris Message-ID: Hi, I was able to install Qt successfully on my opensolaris(solaris-5.11) ... But I m not able to install VTK.. I keep getting a lot of errors(mostly the missing file errors) But I having successfully worked with the QVTKWidget on Linux(ubuntu) platform. Is it possible to install VTK 5.4.2 on solaris(where qt is already installed, which also has all the X11 libraries) and fuse it with the Qt?? If so, please help me. Awaiting the reply. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.paul at uclouvain.be Wed Aug 3 11:18:43 2011 From: l.paul at uclouvain.be (Laurent) Date: Wed, 3 Aug 2011 08:18:43 -0700 (PDT) Subject: [vtkusers] ClipClosedSurface In-Reply-To: <4E3845A9.9010506@uclouvain.be> References: <1312299354837-4659117.post@n5.nabble.com> <4E3845A9.9010506@uclouvain.be> Message-ID: <1312384723917-4662571.post@n5.nabble.com> David, Great job! It works lovely ;-) Laurent. -- View this message in context: http://vtk.1045678.n5.nabble.com/ClipClosedSurface-tp4659117p4662571.html Sent from the VTK - Users mailing list archive at Nabble.com. From clinton at elemtech.com Wed Aug 3 11:34:34 2011 From: clinton at elemtech.com (Clinton Stimpson) Date: Wed, 3 Aug 2011 09:34:34 -0600 Subject: [vtkusers] Release button event doesn't In-Reply-To: <1312366286908-4661878.post@n5.nabble.com> References: <1312366286908-4661878.post@n5.nabble.com> Message-ID: <201108030934.34586.clinton@elemtech.com> On Wednesday, August 03, 2011 04:11:26 am al.gry wrote: > Hi all, > > i'm implementing qt vtk application. The goal is to adjust window level > using mouse > > ObserverWindowLevel *observeWindowLevel = > ObserverWindowLevel::New(m_pQVTKIren); > m_pQVTKIren->AddObserver(vtkCommand::RightButtonPressEvent, > observeWindowLevel); > m_pQVTKIren->AddObserver(vtkCommand::RightButtonReleaseEvent, > observeWindowLevel); > observeWindowLevel->Delete(); > > when i'm trying to catch vtkCommand::RightButtonReleaseEvent in my > Execute(vtkObject *caller, unsigned long eventId, void *callData) nothing > happens. It works perfectly for RightButtonPressEvent but for some reason > RightButtonReleaseEvent is not passed to Execute(...) > > Any ideas? > If I remembert right, this has come up before, and I think the solution was to add the observers to the interactor style instead of the interactor. The behavior comes from an object grabbing focus of events, so the subsequent ones are delivered only to that object until focus is released. That would explain why you can't get the right button release event. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com From dbrayford at gmail.com Wed Aug 3 15:39:07 2011 From: dbrayford at gmail.com (David Brayford) Date: Wed, 3 Aug 2011 13:39:07 -0600 Subject: [vtkusers] run time crash on visual studio 2010 express Message-ID: Hi, I am getting the following error message when the application I am trying to run crashes on start up. I am compiling with VTK 5.6.1. The procedure entry point ?GetVectorAttribute at vtkXMLDataElement@@QAEHPBDHPAH at Z could not be located in the dynamic link library vtkCommon.dll. Any suggestions on what I am missing? Thanks David From drescherjm at gmail.com Wed Aug 3 15:49:25 2011 From: drescherjm at gmail.com (John Drescher) Date: Wed, 3 Aug 2011 15:49:25 -0400 Subject: [vtkusers] run time crash on visual studio 2010 express In-Reply-To: References: Message-ID: > I am getting the following error message when the application I am > trying to run crashes on start up. I am compiling with VTK 5.6.1. > > The procedure entry point > ?GetVectorAttribute at vtkXMLDataElement@@QAEHPBDHPAH at Z could not be > located in the dynamic link library vtkCommon.dll. > > Any suggestions on what I am missing? > Did you build vtk or just download and install the binary? John From dbrayford at gmail.com Wed Aug 3 15:51:15 2011 From: dbrayford at gmail.com (David Brayford) Date: Wed, 3 Aug 2011 13:51:15 -0600 Subject: [vtkusers] run time crash on visual studio 2010 express In-Reply-To: References: Message-ID: I built VTK (debug) using visual studio 2010. David On Wed, Aug 3, 2011 at 1:49 PM, John Drescher wrote: >> I am getting the following error message when the application I am >> trying to run crashes on start up. I am compiling with VTK 5.6.1. >> >> The procedure entry point >> ?GetVectorAttribute at vtkXMLDataElement@@QAEHPBDHPAH at Z could not be >> located in the dynamic link library vtkCommon.dll. >> >> Any suggestions on what I am missing? >> > > Did you build vtk or just download and install the binary? > > John > From drescherjm at gmail.com Wed Aug 3 15:55:44 2011 From: drescherjm at gmail.com (John Drescher) Date: Wed, 3 Aug 2011 15:55:44 -0400 Subject: [vtkusers] run time crash on visual studio 2010 express In-Reply-To: References: Message-ID: On Wed, Aug 3, 2011 at 3:51 PM, David Brayford wrote: > I built VTK (debug) using visual studio 2010. > Did you make sure that no other vtk version was installed in your Program Files? John From drescherjm at gmail.com Wed Aug 3 15:56:37 2011 From: drescherjm at gmail.com (John Drescher) Date: Wed, 3 Aug 2011 15:56:37 -0400 Subject: [vtkusers] run time crash on visual studio 2010 express In-Reply-To: References: Message-ID: On Wed, Aug 3, 2011 at 3:55 PM, John Drescher wrote: > On Wed, Aug 3, 2011 at 3:51 PM, David Brayford wrote: >> I built VTK (debug) using visual studio 2010. >> > > Did you make sure that no other vtk version was installed in your Program Files? > Or path? John From dbrayford at gmail.com Wed Aug 3 17:22:09 2011 From: dbrayford at gmail.com (David Brayford) Date: Wed, 3 Aug 2011 15:22:09 -0600 Subject: [vtkusers] run time crash on visual studio 2010 express In-Reply-To: References: Message-ID: Yes, I had an old version in the PATH. Once I removed it everything worked. Thanks so much for your help. David On Wed, Aug 3, 2011 at 1:56 PM, John Drescher wrote: > On Wed, Aug 3, 2011 at 3:55 PM, John Drescher wrote: >> On Wed, Aug 3, 2011 at 3:51 PM, David Brayford wrote: >>> I built VTK (debug) using visual studio 2010. >>> >> >> Did you make sure that no other vtk version was installed in your Program Files? >> > Or path? > > John > From jdwieber at gmail.com Wed Aug 3 19:18:40 2011 From: jdwieber at gmail.com (Joseph D. Wieber Jr.) Date: Wed, 03 Aug 2011 19:18:40 -0400 Subject: [vtkusers] Volume rendering with png slice images Message-ID: <4E39D750.4030006@gmail.com> Hi all, I'm trying to do some volume rendering using the below code, but nothing is showing in the render window. When I run the code I see the window and the background color that I set, but no data. The code cranks for about 5 seconds before I see the default render window replaced (the default render window is white, and the volume render window is gray-ish). I don't see error messages in the console either. I'm using Qt with QVTKWidget to create the GUI. I'm obviously doing something wrong, but I don't see what it is. Does anyone see what I'm missing? Thanks. Regards, Joseph void MainWindow::on_actionOpenDirectory_triggered() { QString dirname = QFileDialog::getExistingDirectory( this, tr("Select a Directory"), QDir::currentPath() ); if( !dirname.isNull() ) { string pattern( dirname.toStdString () ); pattern += "/%03d.png"; cerr << "using pattern:<" << pattern << ">\n"; vtkSmartPointer< vtkVolume > spVolume = generateVolume ( pattern ); vtkSmartPointer spRenWin = vtkSmartPointer::New(); vtkSmartPointer< vtkRenderer> spRen = vtkSmartPointer< vtkRenderer >::New(); spRen->AddViewProp ( spVolume ); spRenWin->AddRenderer( spRen ); m_pUi->qvtkWidget->SetRenderWindow ( spRenWin ); vtkSmartPointer< vtkRenderWindowInteractor > spIren = m_pUi->qvtkWidget->GetInteractor (); spIren->SetRenderWindow( spRenWin ); spRen->SetBackground( 0.2, 0.3, 0.4 ); spRen->ResetCamera (); //I tried this in place of ResetCamera, but id didn't work either // vtkSmartPointer< vtkCamera > spCamera = spRen->GetActiveCamera(); // double* c = spVolume->GetCenter(); // spCamera->SetFocalPoint( c[ 0 ], c[ 1 ], c[ 2 ] ); // spCamera->SetPosition( c[ 0 ] + 400, c[ 1 ], c[ 2 ] ); // spCamera->SetViewUp( 0, 0, -1 ); spRenWin->Render(); m_pUi->qvtkWidget->setCursor ( Qt::ArrowCursor ); } else { //TODO: do something intelligent here! } } //--------------------------------------------------------------------------------------------------------------------------- vtkSmartPointer< vtkVolume > MainWindow::generateVolume( const std::string& pattern ) { //m_spReader is a vtkSmartPointer< vtkPNGReader > m_spReader->SetFilePattern ( pattern.c_str () ); m_spReader->SetFileNameSliceOffset ( 1 );//images start at 001.png //TODO: derive these from input m_spReader->SetDataExtent( 0, 511, 0, 511, 1, 370 );//images go from 1 to 370 m_spReader->SetDataSpacing( 1.0, 1.0, 1.0 ); // mm m_spReader->SetDataOrigin( 0, 0, 0 ); m_spReader->SetDataScalarTypeToUnsignedChar(); //m_spReader->Update(); vtkSmartPointer< vtkPiecewiseFunction > spOpacityTransferFunction = vtkSmartPointer< vtkPiecewiseFunction >::New(); spOpacityTransferFunction->AddPoint( 0, 0.0 ); spOpacityTransferFunction->AddPoint( 255, 1.0 ); vtkSmartPointer< vtkVolumeProperty > spVolumeProperty = vtkSmartPointer< vtkVolumeProperty >::New(); spVolumeProperty->SetScalarOpacity( 0, spOpacityTransferFunction ); spVolumeProperty->SetScalarOpacity( 1, spOpacityTransferFunction ); spVolumeProperty->SetScalarOpacity( 2, spOpacityTransferFunction ); spVolumeProperty->IndependentComponentsOff(); spVolumeProperty->SetInterpolationTypeToLinear(); //spVolumeProperty->ShadeOn(); //spVolumeProperty->SetAmbient( 0.4 ); //spVolumeProperty->SetDiffuse( 0.6 ); //spVolumeProperty->SetSpecular( 0.2 ); vtkSmartPointer< vtkFixedPointVolumeRayCastMapper > spVolumeMapper = vtkSmartPointer< vtkFixedPointVolumeRayCastMapper >::New(); spVolumeMapper->SetInputConnection( m_spReader->GetOutputPort() ); vtkSmartPointer< vtkVolume > spVolume = vtkSmartPointer< vtkVolume >::New(); spVolume->SetMapper( spVolumeMapper ); spVolume->SetProperty( spVolumeProperty ); return spVolume; } From jdwieber at gmail.com Wed Aug 3 20:59:58 2011 From: jdwieber at gmail.com (Joseph D. Wieber Jr.) Date: Wed, 03 Aug 2011 20:59:58 -0400 Subject: [vtkusers] Volume rendering with png slice images In-Reply-To: <4E39D750.4030006@gmail.com> References: <4E39D750.4030006@gmail.com> Message-ID: <4E39EF0E.8030009@gmail.com> I apologize, I figured it out. It was the single line in generateVolume that reads: spVolumeProperty->IndependentComponentsOff(); When I comment out this line, and uncomment the lines for linear interpolation and shading it looks very nice. However, it's terribly slow. I suspect that this version is software rendered. Is there a similar hardware accelerated method? Thanks On 08/03/2011 07:18 PM, Joseph D. Wieber Jr. wrote: > > Hi all, > > I'm trying to do some volume rendering using the below code, but > nothing is showing in the render window. When I run the code I see > the window and the background color that I set, but no data. The code > cranks for about 5 seconds before I see the default render window > replaced (the default render window is white, and the volume render > window is gray-ish). I don't see error messages in the console either. > > I'm using Qt with QVTKWidget to create the GUI. I'm obviously doing > something wrong, but I don't see what it is. Does anyone see what I'm > missing? Thanks. > > Regards, > > Joseph > > void MainWindow::on_actionOpenDirectory_triggered() > { > QString dirname = QFileDialog::getExistingDirectory( this, > tr("Select a > Directory"), > > QDir::currentPath() ); > if( !dirname.isNull() ) > { > string pattern( dirname.toStdString () ); > pattern += "/%03d.png"; > cerr << "using pattern:<" << pattern << ">\n"; > > vtkSmartPointer< vtkVolume > spVolume = generateVolume ( > pattern ); > > vtkSmartPointer spRenWin = > vtkSmartPointer::New(); > > vtkSmartPointer< vtkRenderer> spRen = > vtkSmartPointer< vtkRenderer >::New(); > spRen->AddViewProp ( spVolume ); > > spRenWin->AddRenderer( spRen ); > m_pUi->qvtkWidget->SetRenderWindow ( spRenWin ); > vtkSmartPointer< vtkRenderWindowInteractor > spIren = > m_pUi->qvtkWidget->GetInteractor (); > spIren->SetRenderWindow( spRenWin ); > spRen->SetBackground( 0.2, 0.3, 0.4 ); > spRen->ResetCamera (); > > //I tried this in place of ResetCamera, but id didn't work either > // vtkSmartPointer< vtkCamera > spCamera = > spRen->GetActiveCamera(); > // double* c = spVolume->GetCenter(); > // spCamera->SetFocalPoint( c[ 0 ], c[ 1 ], c[ 2 ] ); > // spCamera->SetPosition( c[ 0 ] + 400, c[ 1 ], c[ 2 ] ); > // spCamera->SetViewUp( 0, 0, -1 ); > > > spRenWin->Render(); > m_pUi->qvtkWidget->setCursor ( Qt::ArrowCursor ); > } > else > { > //TODO: do something intelligent here! > } > } > > > //--------------------------------------------------------------------------------------------------------------------------- > > vtkSmartPointer< vtkVolume > MainWindow::generateVolume( const > std::string& pattern ) > { > //m_spReader is a vtkSmartPointer< vtkPNGReader > > m_spReader->SetFilePattern ( pattern.c_str () ); > m_spReader->SetFileNameSliceOffset ( 1 );//images start at 001.png > //TODO: derive these from input > m_spReader->SetDataExtent( 0, 511, 0, 511, 1, 370 );//images go > from 1 to 370 > m_spReader->SetDataSpacing( 1.0, 1.0, 1.0 ); // mm > m_spReader->SetDataOrigin( 0, 0, 0 ); > m_spReader->SetDataScalarTypeToUnsignedChar(); > //m_spReader->Update(); > > vtkSmartPointer< vtkPiecewiseFunction > spOpacityTransferFunction = > vtkSmartPointer< vtkPiecewiseFunction >::New(); > spOpacityTransferFunction->AddPoint( 0, 0.0 ); > spOpacityTransferFunction->AddPoint( 255, 1.0 ); > > vtkSmartPointer< vtkVolumeProperty > spVolumeProperty = > vtkSmartPointer< vtkVolumeProperty >::New(); > spVolumeProperty->SetScalarOpacity( 0, spOpacityTransferFunction ); > spVolumeProperty->SetScalarOpacity( 1, spOpacityTransferFunction ); > spVolumeProperty->SetScalarOpacity( 2, spOpacityTransferFunction ); > spVolumeProperty->IndependentComponentsOff(); > spVolumeProperty->SetInterpolationTypeToLinear(); > //spVolumeProperty->ShadeOn(); > //spVolumeProperty->SetAmbient( 0.4 ); > //spVolumeProperty->SetDiffuse( 0.6 ); > //spVolumeProperty->SetSpecular( 0.2 ); > > vtkSmartPointer< vtkFixedPointVolumeRayCastMapper > spVolumeMapper = > vtkSmartPointer< vtkFixedPointVolumeRayCastMapper >::New(); > > spVolumeMapper->SetInputConnection( m_spReader->GetOutputPort() ); > > vtkSmartPointer< vtkVolume > spVolume = > vtkSmartPointer< vtkVolume >::New(); > spVolume->SetMapper( spVolumeMapper ); > spVolume->SetProperty( spVolumeProperty ); > > return spVolume; > } > From jdwieber at gmail.com Wed Aug 3 21:30:45 2011 From: jdwieber at gmail.com (jdwieber) Date: Wed, 3 Aug 2011 18:30:45 -0700 (PDT) Subject: [vtkusers] vtkOpenGLGPUVolumeRayCastMapper Problem on Ubuntu In-Reply-To: <1312297454.9861.9.camel@grafzahl> References: <1312297454.9861.9.camel@grafzahl> Message-ID: <1312421445844-4664819.post@n5.nabble.com> That's odd for the chipset you listed. Are you sure your driver is working properly? AFAIK that card supports up to OpenGL 4.1. Does running glewinfo show GL_VERSION_1_3 as OK? /joseph -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkOpenGLGPUVolumeRayCastMapper-Problem-on-Ubuntu-tp4659229p4664819.html Sent from the VTK - Users mailing list archive at Nabble.com. From al.gry at web.de Thu Aug 4 02:48:37 2011 From: al.gry at web.de (al.gry) Date: Wed, 3 Aug 2011 23:48:37 -0700 (PDT) Subject: [vtkusers] Release button event doesn't In-Reply-To: <201108030934.34586.clinton@elemtech.com> References: <1312366286908-4661878.post@n5.nabble.com> <201108030934.34586.clinton@elemtech.com> Message-ID: <1312440517049-4665365.post@n5.nabble.com> Thanks! It works perfectly. I did following vtkSmartPointer m_ImageStyle = vtkInteractorStyle::SafeDownCast(m_pQVTKIren->GetInteractorStyle()); -- View this message in context: http://vtk.1045678.n5.nabble.com/Release-button-event-doesn-t-tp4661878p4665365.html Sent from the VTK - Users mailing list archive at Nabble.com. From M.Deij at marin.nl Thu Aug 4 02:57:20 2011 From: M.Deij at marin.nl (Deij, Menno) Date: Thu, 4 Aug 2011 06:57:20 +0000 Subject: [vtkusers] Activiz.NET and NUnit: disable shadow copying required In-Reply-To: References: Message-ID: <73B078BEA820DF42BF6A144D69A9B31506397B@MAR160N1.marin.local> Dear all, Not so much a question as a report on solving a problem with Activiz.NET and NUnit that had me puzzled for a couple of days. When running NUnit unit tests, by default a shadow copy of the tested assembly is made to improve performance of NUnit. This option, however, does not play nice with Kitware.mummy.Runtime resulting in a rather cryptic error: System.Exception : error: could not get registered type - mteIndex='0' className=''. To disable NUnit shadow copying on the commandline use the /noshadow switch. In the NUnit GUI this can be done too. Best wishes, Menno Deij dr. ir. Menno A. Deij Software Engineer Maritime Simulation Group E mailto:M.Deij at marin.nl T +31 317 49 35 06 MARIN 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands T +31 317 49 39 11, F , I www.marin.nl From vijaeendra at gmail.com Thu Aug 4 05:13:37 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Thu, 4 Aug 2011 14:43:37 +0530 Subject: [vtkusers] QVTK Error. Message-ID: Hello All, I got the VTK 5.6.1 successfully installed on opensolaris along with the QVTK widget. Also when I tried to run the Qt project which uses QVTKWidget on Linux(UBUNTU) it was successful and i could see the output. When I try to run the same code(with required changes made) I m getting the following error. Undefined first referenced symbol in file vtkAlgorithmOutput*vtkAlgorithm::GetOutputPort(int) mainwindow.o (symbol belongs to implicit dependency /usr/local/lib/vtk-5.6/libvtkFiltering.so.5.6) vtkPNGReader*vtkPNGReader::New() mainwindow.o (symbol belongs to implicit dependency /usr/local/lib/vtk-5.6/libvtkIO.so.5.6) vtkImageViewer*vtkImageViewer::New() mainwindow.o (symbol belongs to implicit dependency /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6) void vtkImageViewer::SetupInteractor(vtkRenderWindowInteractor*) mainwindow.o (symbol belongs to implicit dependency /usr/local/lib/vtk-5.6/libvtkRendering.so.5.6) ld: fatal: symbol referencing errors. No output written to vtk make: *** [vtk] Error 1 Please help me with the changes that i have to make. Awaiting your reply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu Aug 4 05:45:23 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 4 Aug 2011 11:45:23 +0200 Subject: [vtkusers] Volume rendering with png slice images In-Reply-To: <4E39EF0E.8030009@gmail.com> References: <4E39D750.4030006@gmail.com> <4E39EF0E.8030009@gmail.com> Message-ID: Have you tried vtkGPUVolumeRayCastMapper? On Thu, Aug 4, 2011 at 02:59, Joseph D. Wieber Jr. wrote: > I apologize, I figured it out. It was the single line in generateVolume > that reads: spVolumeProperty->**IndependentComponentsOff(); When I comment > out this line, and uncomment the lines for linear interpolation and shading > it looks very nice. However, it's terribly slow. I suspect that this > version is software rendered. Is there a similar hardware accelerated > method? > > Thanks > > > On 08/03/2011 07:18 PM, Joseph D. Wieber Jr. wrote: > >> >> Hi all, >> >> I'm trying to do some volume rendering using the below code, but nothing >> is showing in the render window. When I run the code I see the window and >> the background color that I set, but no data. The code cranks for about 5 >> seconds before I see the default render window replaced (the default render >> window is white, and the volume render window is gray-ish). I don't see >> error messages in the console either. >> >> I'm using Qt with QVTKWidget to create the GUI. I'm obviously doing >> something wrong, but I don't see what it is. Does anyone see what I'm >> missing? Thanks. >> >> Regards, >> >> Joseph >> >> void MainWindow::on_**actionOpenDirectory_triggered(**) >> { >> QString dirname = QFileDialog::**getExistingDirectory( this, >> tr("Select a >> Directory"), >> QDir::currentPath() >> ); >> if( !dirname.isNull() ) >> { >> string pattern( dirname.toStdString () ); >> pattern += "/%03d.png"; >> cerr << "using pattern:<" << pattern << ">\n"; >> >> vtkSmartPointer< vtkVolume > spVolume = generateVolume ( pattern ); >> >> vtkSmartPointer<**vtkRenderWindow> spRenWin = >> vtkSmartPointer<**vtkRenderWindow>::New(); >> >> vtkSmartPointer< vtkRenderer> spRen = >> vtkSmartPointer< vtkRenderer >::New(); >> spRen->AddViewProp ( spVolume ); >> >> spRenWin->AddRenderer( spRen ); >> m_pUi->qvtkWidget->**SetRenderWindow ( spRenWin ); >> vtkSmartPointer< vtkRenderWindowInteractor > spIren = >> m_pUi->qvtkWidget->**GetInteractor (); >> spIren->SetRenderWindow( spRenWin ); >> spRen->SetBackground( 0.2, 0.3, 0.4 ); >> spRen->ResetCamera (); >> >> //I tried this in place of ResetCamera, but id didn't work either >> // vtkSmartPointer< vtkCamera > spCamera = >> spRen->GetActiveCamera(); >> // double* c = spVolume->GetCenter(); >> // spCamera->SetFocalPoint( c[ 0 ], c[ 1 ], c[ 2 ] ); >> // spCamera->SetPosition( c[ 0 ] + 400, c[ 1 ], c[ 2 ] ); >> // spCamera->SetViewUp( 0, 0, -1 ); >> >> >> spRenWin->Render(); >> m_pUi->qvtkWidget->setCursor ( Qt::ArrowCursor ); >> } >> else >> { >> //TODO: do something intelligent here! >> } >> } >> >> >> //----------------------------**------------------------------** >> ------------------------------**------------------------------**----- >> vtkSmartPointer< vtkVolume > MainWindow::generateVolume( const >> std::string& pattern ) >> { >> //m_spReader is a vtkSmartPointer< vtkPNGReader > >> m_spReader->SetFilePattern ( pattern.c_str () ); >> m_spReader->**SetFileNameSliceOffset ( 1 );//images start at 001.png >> //TODO: derive these from input >> m_spReader->SetDataExtent( 0, 511, 0, 511, 1, 370 );//images go from 1 >> to 370 >> m_spReader->SetDataSpacing( 1.0, 1.0, 1.0 ); // mm >> m_spReader->SetDataOrigin( 0, 0, 0 ); >> m_spReader->**SetDataScalarTypeToUnsignedCha**r(); >> //m_spReader->Update(); >> >> vtkSmartPointer< vtkPiecewiseFunction > spOpacityTransferFunction = >> vtkSmartPointer< vtkPiecewiseFunction >::New(); >> spOpacityTransferFunction->**AddPoint( 0, 0.0 ); >> spOpacityTransferFunction->**AddPoint( 255, 1.0 ); >> >> vtkSmartPointer< vtkVolumeProperty > spVolumeProperty = >> vtkSmartPointer< vtkVolumeProperty >::New(); >> spVolumeProperty->**SetScalarOpacity( 0, spOpacityTransferFunction ); >> spVolumeProperty->**SetScalarOpacity( 1, spOpacityTransferFunction ); >> spVolumeProperty->**SetScalarOpacity( 2, spOpacityTransferFunction ); >> spVolumeProperty->**IndependentComponentsOff(); >> spVolumeProperty->**SetInterpolationTypeToLinear()**; >> //spVolumeProperty->ShadeOn(); >> //spVolumeProperty->**SetAmbient( 0.4 ); >> //spVolumeProperty->**SetDiffuse( 0.6 ); >> //spVolumeProperty->**SetSpecular( 0.2 ); >> >> vtkSmartPointer< vtkFixedPointVolumeRayCastMapp**er > spVolumeMapper = >> vtkSmartPointer< vtkFixedPointVolumeRayCastMapp**er >::New(); >> >> spVolumeMapper->**SetInputConnection( m_spReader->GetOutputPort() ); >> >> vtkSmartPointer< vtkVolume > spVolume = >> vtkSmartPointer< vtkVolume >::New(); >> spVolume->SetMapper( spVolumeMapper ); >> spVolume->SetProperty( spVolumeProperty ); >> >> return spVolume; >> } >> >> ______________________________**_________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/**listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdwieber at gmail.com Thu Aug 4 08:56:07 2011 From: jdwieber at gmail.com (Joseph D. Wieber Jr.) Date: Thu, 04 Aug 2011 08:56:07 -0400 Subject: [vtkusers] Volume rendering with png slice images In-Reply-To: References: <4E39D750.4030006@gmail.com> <4E39EF0E.8030009@gmail.com> Message-ID: <4E3A96E7.3090706@gmail.com> Thanks for your reply. Unfortunately, I don't see vtkGPUVolumeRayCastMapper in the version (5.4.2-8ubuntu4) I'm using. I guess it's time for an upgrade. On 08/04/2011 05:45 AM, D?enan Zuki? wrote: > Have you tried vtkGPUVolumeRayCastMapper? > > On Thu, Aug 4, 2011 at 02:59, Joseph D. Wieber Jr. > wrote: > > I apologize, I figured it out. It was the single line in > generateVolume that reads: > spVolumeProperty->IndependentComponentsOff(); When I comment out > this line, and uncomment the lines for linear interpolation and > shading it looks very nice. However, it's terribly slow. I > suspect that this version is software rendered. Is there a > similar hardware accelerated method? > > Thanks > > > On 08/03/2011 07:18 PM, Joseph D. Wieber Jr. wrote: > > > Hi all, > > I'm trying to do some volume rendering using the below code, > but nothing is showing in the render window. When I run the > code I see the window and the background color that I set, but > no data. The code cranks for about 5 seconds before I see the > default render window replaced (the default render window is > white, and the volume render window is gray-ish). I don't see > error messages in the console either. > > I'm using Qt with QVTKWidget to create the GUI. I'm obviously > doing something wrong, but I don't see what it is. Does > anyone see what I'm missing? Thanks. > > Regards, > > Joseph > > void MainWindow::on_actionOpenDirectory_triggered() > { > QString dirname = QFileDialog::getExistingDirectory( this, > > tr("Select a Directory"), > > QDir::currentPath() ); > if( !dirname.isNull() ) > { > string pattern( dirname.toStdString () ); > pattern += "/%03d.png"; > cerr << "using pattern:<" << pattern << ">\n"; > > vtkSmartPointer< vtkVolume > spVolume = generateVolume > ( pattern ); > > vtkSmartPointer spRenWin = > vtkSmartPointer::New(); > > vtkSmartPointer< vtkRenderer> spRen = > vtkSmartPointer< vtkRenderer >::New(); > spRen->AddViewProp ( spVolume ); > > spRenWin->AddRenderer( spRen ); > m_pUi->qvtkWidget->SetRenderWindow ( spRenWin ); > vtkSmartPointer< vtkRenderWindowInteractor > spIren = > m_pUi->qvtkWidget->GetInteractor (); > spIren->SetRenderWindow( spRenWin ); > spRen->SetBackground( 0.2, 0.3, 0.4 ); > spRen->ResetCamera (); > > //I tried this in place of ResetCamera, but id didn't > work either > // vtkSmartPointer< vtkCamera > spCamera = > spRen->GetActiveCamera(); > // double* c = spVolume->GetCenter(); > // spCamera->SetFocalPoint( c[ 0 ], c[ 1 ], c[ 2 > ] ); > // spCamera->SetPosition( c[ 0 ] + 400, c[ 1 ], > c[ 2 ] ); > // spCamera->SetViewUp( 0, 0, -1 ); > > > spRenWin->Render(); > m_pUi->qvtkWidget->setCursor ( Qt::ArrowCursor ); > } > else > { > //TODO: do something intelligent here! > } > } > > > //--------------------------------------------------------------------------------------------------------------------------- > > vtkSmartPointer< vtkVolume > MainWindow::generateVolume( const > std::string& pattern ) > { > //m_spReader is a vtkSmartPointer< vtkPNGReader > > m_spReader->SetFilePattern ( pattern.c_str () ); > m_spReader->SetFileNameSliceOffset ( 1 );//images start at > 001.png > //TODO: derive these from input > m_spReader->SetDataExtent( 0, 511, 0, 511, 1, 370 > );//images go from 1 to 370 > m_spReader->SetDataSpacing( 1.0, 1.0, 1.0 ); // mm > m_spReader->SetDataOrigin( 0, 0, 0 ); > m_spReader->SetDataScalarTypeToUnsignedChar(); > //m_spReader->Update(); > > vtkSmartPointer< vtkPiecewiseFunction > > spOpacityTransferFunction = > vtkSmartPointer< vtkPiecewiseFunction >::New(); > spOpacityTransferFunction->AddPoint( 0, 0.0 ); > spOpacityTransferFunction->AddPoint( 255, 1.0 ); > > vtkSmartPointer< vtkVolumeProperty > spVolumeProperty = > vtkSmartPointer< vtkVolumeProperty >::New(); > spVolumeProperty->SetScalarOpacity( 0, > spOpacityTransferFunction ); > spVolumeProperty->SetScalarOpacity( 1, > spOpacityTransferFunction ); > spVolumeProperty->SetScalarOpacity( 2, > spOpacityTransferFunction ); > spVolumeProperty->IndependentComponentsOff(); > spVolumeProperty->SetInterpolationTypeToLinear(); > //spVolumeProperty->ShadeOn(); > //spVolumeProperty->SetAmbient( 0.4 ); > //spVolumeProperty->SetDiffuse( 0.6 ); > //spVolumeProperty->SetSpecular( 0.2 ); > > vtkSmartPointer< vtkFixedPointVolumeRayCastMapper > > spVolumeMapper = > vtkSmartPointer< vtkFixedPointVolumeRayCastMapper > >::New(); > > spVolumeMapper->SetInputConnection( > m_spReader->GetOutputPort() ); > > vtkSmartPointer< vtkVolume > spVolume = > vtkSmartPointer< vtkVolume >::New(); > spVolume->SetMapper( spVolumeMapper ); > spVolume->SetProperty( spVolumeProperty ); > > return spVolume; > } > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu Aug 4 08:58:10 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 4 Aug 2011 14:58:10 +0200 Subject: [vtkusers] Volume rendering with png slice images In-Reply-To: <4E3A96E7.3090706@gmail.com> References: <4E39D750.4030006@gmail.com> <4E39EF0E.8030009@gmail.com> <4E3A96E7.3090706@gmail.com> Message-ID: True. http://www.vtk.org/Wiki/Improvements_in_VTK_5.6 2011/8/4 Joseph D. Wieber Jr. > ** > Thanks for your reply. Unfortunately, I don't see > vtkGPUVolumeRayCastMapper in the version (5.4.2-8ubuntu4) I'm using. I > guess it's time for an upgrade. > > > On 08/04/2011 05:45 AM, D?enan Zuki? wrote: > > Have you tried vtkGPUVolumeRayCastMapper? > > On Thu, Aug 4, 2011 at 02:59, Joseph D. Wieber Jr. wrote: > >> I apologize, I figured it out. It was the single line in generateVolume >> that reads: spVolumeProperty->IndependentComponentsOff(); When I comment out >> this line, and uncomment the lines for linear interpolation and shading it >> looks very nice. However, it's terribly slow. I suspect that this version >> is software rendered. Is there a similar hardware accelerated method? >> >> Thanks >> >> >> On 08/03/2011 07:18 PM, Joseph D. Wieber Jr. wrote: >> >>> >>> Hi all, >>> >>> I'm trying to do some volume rendering using the below code, but nothing >>> is showing in the render window. When I run the code I see the window and >>> the background color that I set, but no data. The code cranks for about 5 >>> seconds before I see the default render window replaced (the default render >>> window is white, and the volume render window is gray-ish). I don't see >>> error messages in the console either. >>> >>> I'm using Qt with QVTKWidget to create the GUI. I'm obviously doing >>> something wrong, but I don't see what it is. Does anyone see what I'm >>> missing? Thanks. >>> >>> Regards, >>> >>> Joseph >>> >>> void MainWindow::on_actionOpenDirectory_triggered() >>> { >>> QString dirname = QFileDialog::getExistingDirectory( this, >>> tr("Select a >>> Directory"), >>> >>> QDir::currentPath() ); >>> if( !dirname.isNull() ) >>> { >>> string pattern( dirname.toStdString () ); >>> pattern += "/%03d.png"; >>> cerr << "using pattern:<" << pattern << ">\n"; >>> >>> vtkSmartPointer< vtkVolume > spVolume = generateVolume ( pattern >>> ); >>> >>> vtkSmartPointer spRenWin = >>> vtkSmartPointer::New(); >>> >>> vtkSmartPointer< vtkRenderer> spRen = >>> vtkSmartPointer< vtkRenderer >::New(); >>> spRen->AddViewProp ( spVolume ); >>> >>> spRenWin->AddRenderer( spRen ); >>> m_pUi->qvtkWidget->SetRenderWindow ( spRenWin ); >>> vtkSmartPointer< vtkRenderWindowInteractor > spIren = >>> m_pUi->qvtkWidget->GetInteractor (); >>> spIren->SetRenderWindow( spRenWin ); >>> spRen->SetBackground( 0.2, 0.3, 0.4 ); >>> spRen->ResetCamera (); >>> >>> //I tried this in place of ResetCamera, but id didn't work either >>> // vtkSmartPointer< vtkCamera > spCamera = >>> spRen->GetActiveCamera(); >>> // double* c = spVolume->GetCenter(); >>> // spCamera->SetFocalPoint( c[ 0 ], c[ 1 ], c[ 2 ] ); >>> // spCamera->SetPosition( c[ 0 ] + 400, c[ 1 ], c[ 2 ] ); >>> // spCamera->SetViewUp( 0, 0, -1 ); >>> >>> >>> spRenWin->Render(); >>> m_pUi->qvtkWidget->setCursor ( Qt::ArrowCursor ); >>> } >>> else >>> { >>> //TODO: do something intelligent here! >>> } >>> } >>> >>> >>> //--------------------------------------------------------------------------------------------------------------------------- >>> >>> vtkSmartPointer< vtkVolume > MainWindow::generateVolume( const >>> std::string& pattern ) >>> { >>> //m_spReader is a vtkSmartPointer< vtkPNGReader > >>> m_spReader->SetFilePattern ( pattern.c_str () ); >>> m_spReader->SetFileNameSliceOffset ( 1 );//images start at 001.png >>> //TODO: derive these from input >>> m_spReader->SetDataExtent( 0, 511, 0, 511, 1, 370 );//images go from 1 >>> to 370 >>> m_spReader->SetDataSpacing( 1.0, 1.0, 1.0 ); // mm >>> m_spReader->SetDataOrigin( 0, 0, 0 ); >>> m_spReader->SetDataScalarTypeToUnsignedChar(); >>> //m_spReader->Update(); >>> >>> vtkSmartPointer< vtkPiecewiseFunction > spOpacityTransferFunction = >>> vtkSmartPointer< vtkPiecewiseFunction >::New(); >>> spOpacityTransferFunction->AddPoint( 0, 0.0 ); >>> spOpacityTransferFunction->AddPoint( 255, 1.0 ); >>> >>> vtkSmartPointer< vtkVolumeProperty > spVolumeProperty = >>> vtkSmartPointer< vtkVolumeProperty >::New(); >>> spVolumeProperty->SetScalarOpacity( 0, spOpacityTransferFunction ); >>> spVolumeProperty->SetScalarOpacity( 1, spOpacityTransferFunction ); >>> spVolumeProperty->SetScalarOpacity( 2, spOpacityTransferFunction ); >>> spVolumeProperty->IndependentComponentsOff(); >>> spVolumeProperty->SetInterpolationTypeToLinear(); >>> //spVolumeProperty->ShadeOn(); >>> //spVolumeProperty->SetAmbient( 0.4 ); >>> //spVolumeProperty->SetDiffuse( 0.6 ); >>> //spVolumeProperty->SetSpecular( 0.2 ); >>> >>> vtkSmartPointer< vtkFixedPointVolumeRayCastMapper > spVolumeMapper = >>> vtkSmartPointer< vtkFixedPointVolumeRayCastMapper >::New(); >>> >>> spVolumeMapper->SetInputConnection( m_spReader->GetOutputPort() ); >>> >>> vtkSmartPointer< vtkVolume > spVolume = >>> vtkSmartPointer< vtkVolume >::New(); >>> spVolume->SetMapper( spVolumeMapper ); >>> spVolume->SetProperty( spVolumeProperty ); >>> >>> return spVolume; >>> } >>> >>> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://www.vtk.org/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Karl.Rackwitz at medizin.uni-leipzig.de Thu Aug 4 10:05:16 2011 From: Karl.Rackwitz at medizin.uni-leipzig.de (Rackwitz, Karl) Date: Thu, 4 Aug 2011 16:05:16 +0200 Subject: [vtkusers] Fastest way to triangulate ordered Points Message-ID: <097815442B6EF045A6CEC8FD7E07E93F32EA674E94@CLUEX2.medizin.uni-leipzig.de> Hey folks, i would appreciate it if someone could reassure my thoughts. I get points from an Surface-Scanner which are ordered in an nxm Array. Which is the fastest way of triangulating these points? Delaunay2D will take alot of time and i'm positive that a different approach is needed. Which would you suggest? 1. Write an own specialized method depending on the indices? 2. Use SurfaceReconstructionFilter? 3. Use Polygon->Triangulate? I thank the person who shares some Knowledge or hints me in a direction. Cheers, Karl. From daviddoria at gmail.com Thu Aug 4 10:47:17 2011 From: daviddoria at gmail.com (David Doria) Date: Thu, 4 Aug 2011 10:47:17 -0400 Subject: [vtkusers] Fastest way to triangulate ordered Points In-Reply-To: <097815442B6EF045A6CEC8FD7E07E93F32EA674E94@CLUEX2.medizin.uni-leipzig.de> References: <097815442B6EF045A6CEC8FD7E07E93F32EA674E94@CLUEX2.medizin.uni-leipzig.de> Message-ID: On Thu, Aug 4, 2011 at 10:05 AM, Rackwitz, Karl < Karl.Rackwitz at medizin.uni-leipzig.de> wrote: > Hey folks, > > i would appreciate it if someone could reassure my thoughts. > > I get points from an Surface-Scanner which are ordered in an nxm Array. > Which is the fastest way of triangulating these points? > > Delaunay2D will take alot of time and i'm positive that a different > approach is needed. > Which would you suggest? > > 1. Write an own specialized method depending on the indices? > 2. Use SurfaceReconstructionFilter? > 3. Use Polygon->Triangulate? > > I thank the person who shares some Knowledge or hints me in a direction. > Cheers, > > Karl. > Since your points are a grid, you can just insert them into the vtkPoints of a vtkStructuredData: http://www.vtk.org/Wiki/VTK/Examples/Cxx/StructuredGrid/StructuredGrid If your points are not in a grid, you could use something like this: http://pointclouds.org/documentation/tutorials/greedy_projection.php#greedy-triangulation Most level set style methods (Poisson reconstruction, etc : http://www.midasjournal.org/browse/publication/718) will not work well unless your shapes are complete objects (i.e. a scan from a single viewpoint won't work well). Hope that helps, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdwieber at gmail.com Thu Aug 4 11:59:08 2011 From: jdwieber at gmail.com (Joseph D. Wieber Jr.) Date: Thu, 04 Aug 2011 11:59:08 -0400 Subject: [vtkusers] Linker errors after upgrading to vtk 5.6.1 Message-ID: <4E3AC1CC.4080307@gmail.com> Hi all, I upgraded to vtk5.6.1 (using cmake) and tried to rebuild an existing Qt based project, and now I'm getting 717 link errors. I verified my paths in the qmake file, and environment, are correct. In vtk5.4 I only needed to link against -lvtkCommon -lvtkRendering -lvtkVolumeRendering -lQVTK. With 5.6.1 I get a slew of warnings of the form: /usr/bin/ld: warning: libvtksys.so.5.6, needed by /usr/lib/vtk-5.6/libvtkCommon.so, not found (try using -rpath or -rpath-link) followed by 717 undefined reference errors. So, I add the unfound library named in the to the list, but then the link error count goes up. It seems strange that I should be getting all these linker errors. Any idea what could be wrong? I'm using qmake from within the Qt Creator IDE. Below is my .pro file. In the build settings I have the variable LIBRARY_PATH=:/usr/lib/nvidia-current:/usr/lib/vtk-5.6. I also tried adding -L/usr/lib/vtk-5.6 to the LIBS variable, but that didn't help either. Could it be possible that I need to have all 36 libraries listed to link against? Note, in the warning above ld knows the correct path to the vtk shared libs. .pro file: #------------------------------------------------- # # Project created by QtCreator 2011-07-10T16:15:44 # #------------------------------------------------- QT += core gui TARGET = SummerIS2011 TEMPLATE = app SOURCES += main.cc\ MainWindow.cc \ PixelNode.cc \ IntelligentScissors.cc \ CvUtils.cc \ ScreenPicker.cc \ StringUtils.cc \ Convert.cc HEADERS += MainWindow.h \ Defines.h \ CvUtils.h \ PixelNode.h \ IntelligentScissors.h \ Array2d.h \ Vec.h \ ScreenPicker.h \ StringUtils.h \ Convert.h FORMS += MainWindow.ui INCLUDEPATH += /usr/include/vtk-5.6 LIBS += -lvtkCommon \ -lvtkRendering \ -lvtkVolumeRendering \ -lQVTK Regards, /joseph -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdwieber at gmail.com Thu Aug 4 12:01:07 2011 From: jdwieber at gmail.com (Joseph D. Wieber Jr.) Date: Thu, 04 Aug 2011 12:01:07 -0400 Subject: [vtkusers] Volume rendering with png slice images In-Reply-To: References: <4E39D750.4030006@gmail.com> <4E39EF0E.8030009@gmail.com> <4E3A96E7.3090706@gmail.com> Message-ID: <4E3AC243.1030909@gmail.com> That's a lot of new classes. I tried to upgrade but now I get 717 linker errors. I posted a new question regarding this. On 08/04/2011 08:58 AM, D?enan Zuki? wrote: > True. http://www.vtk.org/Wiki/Improvements_in_VTK_5.6 > > 2011/8/4 Joseph D. Wieber Jr. > > > Thanks for your reply. Unfortunately, I don't see > vtkGPUVolumeRayCastMapper in the version (5.4.2-8ubuntu4) I'm > using. I guess it's time for an upgrade. > > > On 08/04/2011 05:45 AM, D?enan Zuki? wrote: >> Have you tried vtkGPUVolumeRayCastMapper? >> >> On Thu, Aug 4, 2011 at 02:59, Joseph D. Wieber Jr. >> > wrote: >> >> I apologize, I figured it out. It was the single line in >> generateVolume that reads: >> spVolumeProperty->IndependentComponentsOff(); When I comment >> out this line, and uncomment the lines for linear >> interpolation and shading it looks very nice. However, it's >> terribly slow. I suspect that this version is software >> rendered. Is there a similar hardware accelerated method? >> >> Thanks >> >> >> On 08/03/2011 07:18 PM, Joseph D. Wieber Jr. wrote: >> >> >> Hi all, >> >> I'm trying to do some volume rendering using the below >> code, but nothing is showing in the render window. When >> I run the code I see the window and the background color >> that I set, but no data. The code cranks for about 5 >> seconds before I see the default render window replaced >> (the default render window is white, and the volume >> render window is gray-ish). I don't see error messages >> in the console either. >> >> I'm using Qt with QVTKWidget to create the GUI. I'm >> obviously doing something wrong, but I don't see what it >> is. Does anyone see what I'm missing? Thanks. >> >> Regards, >> >> Joseph >> >> void MainWindow::on_actionOpenDirectory_triggered() >> { >> QString dirname = QFileDialog::getExistingDirectory( this, >> >> tr("Select a Directory"), >> >> QDir::currentPath() ); >> if( !dirname.isNull() ) >> { >> string pattern( dirname.toStdString () ); >> pattern += "/%03d.png"; >> cerr << "using pattern:<" << pattern << ">\n"; >> >> vtkSmartPointer< vtkVolume > spVolume = >> generateVolume ( pattern ); >> >> vtkSmartPointer spRenWin = >> vtkSmartPointer::New(); >> >> vtkSmartPointer< vtkRenderer> spRen = >> vtkSmartPointer< vtkRenderer >::New(); >> spRen->AddViewProp ( spVolume ); >> >> spRenWin->AddRenderer( spRen ); >> m_pUi->qvtkWidget->SetRenderWindow ( spRenWin ); >> vtkSmartPointer< vtkRenderWindowInteractor > spIren = >> m_pUi->qvtkWidget->GetInteractor (); >> spIren->SetRenderWindow( spRenWin ); >> spRen->SetBackground( 0.2, 0.3, 0.4 ); >> spRen->ResetCamera (); >> >> //I tried this in place of ResetCamera, but id >> didn't work either >> // vtkSmartPointer< vtkCamera > spCamera = >> spRen->GetActiveCamera(); >> // double* c = spVolume->GetCenter(); >> // spCamera->SetFocalPoint( c[ 0 ], c[ 1 ], >> c[ 2 ] ); >> // spCamera->SetPosition( c[ 0 ] + 400, c[ >> 1 ], c[ 2 ] ); >> // spCamera->SetViewUp( 0, 0, -1 ); >> >> >> spRenWin->Render(); >> m_pUi->qvtkWidget->setCursor ( Qt::ArrowCursor ); >> } >> else >> { >> //TODO: do something intelligent here! >> } >> } >> >> >> //--------------------------------------------------------------------------------------------------------------------------- >> >> vtkSmartPointer< vtkVolume > MainWindow::generateVolume( >> const std::string& pattern ) >> { >> //m_spReader is a vtkSmartPointer< vtkPNGReader > >> m_spReader->SetFilePattern ( pattern.c_str () ); >> m_spReader->SetFileNameSliceOffset ( 1 );//images >> start at 001.png >> //TODO: derive these from input >> m_spReader->SetDataExtent( 0, 511, 0, 511, 1, 370 >> );//images go from 1 to 370 >> m_spReader->SetDataSpacing( 1.0, 1.0, 1.0 ); // mm >> m_spReader->SetDataOrigin( 0, 0, 0 ); >> m_spReader->SetDataScalarTypeToUnsignedChar(); >> //m_spReader->Update(); >> >> vtkSmartPointer< vtkPiecewiseFunction > >> spOpacityTransferFunction = >> vtkSmartPointer< vtkPiecewiseFunction >::New(); >> spOpacityTransferFunction->AddPoint( 0, 0.0 ); >> spOpacityTransferFunction->AddPoint( 255, 1.0 ); >> >> vtkSmartPointer< vtkVolumeProperty > spVolumeProperty = >> vtkSmartPointer< vtkVolumeProperty >::New(); >> spVolumeProperty->SetScalarOpacity( 0, >> spOpacityTransferFunction ); >> spVolumeProperty->SetScalarOpacity( 1, >> spOpacityTransferFunction ); >> spVolumeProperty->SetScalarOpacity( 2, >> spOpacityTransferFunction ); >> spVolumeProperty->IndependentComponentsOff(); >> spVolumeProperty->SetInterpolationTypeToLinear(); >> //spVolumeProperty->ShadeOn(); >> //spVolumeProperty->SetAmbient( 0.4 ); >> //spVolumeProperty->SetDiffuse( 0.6 ); >> //spVolumeProperty->SetSpecular( 0.2 ); >> >> vtkSmartPointer< vtkFixedPointVolumeRayCastMapper > >> spVolumeMapper = >> vtkSmartPointer< >> vtkFixedPointVolumeRayCastMapper >::New(); >> >> spVolumeMapper->SetInputConnection( >> m_spReader->GetOutputPort() ); >> >> vtkSmartPointer< vtkVolume > spVolume = >> vtkSmartPointer< vtkVolume >::New(); >> spVolume->SetMapper( spVolumeMapper ); >> spVolume->SetProperty( spVolumeProperty ); >> >> return spVolume; >> } >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://www.vtk.org/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdwieber at gmail.com Thu Aug 4 12:26:08 2011 From: jdwieber at gmail.com (Joseph D. Wieber Jr.) Date: Thu, 04 Aug 2011 12:26:08 -0400 Subject: [vtkusers] Linker errors after upgrading to vtk 5.6.1 In-Reply-To: <4E3AC1CC.4080307@gmail.com> References: <4E3AC1CC.4080307@gmail.com> Message-ID: <4E3AC820.5090706@gmail.com> The only way to get my app to compile is to add all the libs to the LIBS variable thus: LIBS += -lCosmo \ -lMapReduceMPI \ -lmpistubs \ -lQVTK \ -lVPIC \ -lvtkalglib \ -lvtkCharts \ -lvtkCommon \ -lvtkDICOMParser \ -lvtkexoIIc \ -lvtkexpat \ -lvtkFiltering \ -lvtkfreetype \ -lvtkftgl \ -lvtkGenericFiltering \ -lvtkGeovis \ -lvtkGraphics \ -lvtkHybrid \ -lvtkImaging \ -lvtkInfovis \ -lvtkIO \ -lvtkjpeg \ -lvtklibxml2 \ -lvtkmetaio \ -lvtkNetCDF \ -lvtkNetCDF_cxx \ -lvtkParallel \ -lvtkpng \ -lvtkproj4 \ -lvtkQtChart \ -lvtkRendering \ -lvtksqlite \ -lvtksys \ -lvtktiff \ -lvtkverdict \ -lvtkViews \ -lvtkVolumeRendering \ -lvtkWidgets \ -lvtkzlib This seems out of the ordinary since I only use a handful of vtk classes in my app. On 08/04/2011 11:59 AM, Joseph D. Wieber Jr. wrote: > > Hi all, > > I upgraded to vtk5.6.1 (using cmake) and tried to rebuild an existing > Qt based project, and now I'm getting 717 link errors. I verified my > paths in the qmake file, and environment, are correct. In vtk5.4 I > only needed to link against -lvtkCommon -lvtkRendering > -lvtkVolumeRendering -lQVTK. With 5.6.1 I get a slew of warnings of > the form: > > /usr/bin/ld: warning: libvtksys.so.5.6, needed > by /usr/lib/vtk-5.6/libvtkCommon.so, not found (try using -rpath > or -rpath-link) > > followed by 717 undefined reference errors. So, I add the unfound > library named in the to the list, but then the link error count goes > up. It seems strange that I should be getting all these linker > errors. Any idea what could be wrong? I'm using qmake from within > the Qt Creator IDE. Below is my .pro file. In the build settings I > have the variable > LIBRARY_PATH=:/usr/lib/nvidia-current:/usr/lib/vtk-5.6. I also tried > adding -L/usr/lib/vtk-5.6 to the LIBS variable, but that didn't help > either. Could it be possible that I need to have all 36 libraries > listed to link against? Note, in the warning above ld knows the > correct path to the vtk shared libs. > > .pro file: > > #------------------------------------------------- > # > # Project created by QtCreator 2011-07-10T16:15:44 > # > #------------------------------------------------- > > QT += core gui > > TARGET = SummerIS2011 > TEMPLATE = app > > > SOURCES += main.cc\ > MainWindow.cc \ > PixelNode.cc \ > IntelligentScissors.cc \ > CvUtils.cc \ > ScreenPicker.cc \ > StringUtils.cc \ > Convert.cc > > HEADERS += MainWindow.h \ > Defines.h \ > CvUtils.h \ > PixelNode.h \ > IntelligentScissors.h \ > Array2d.h \ > Vec.h \ > ScreenPicker.h \ > StringUtils.h \ > Convert.h > > FORMS += MainWindow.ui > > INCLUDEPATH += /usr/include/vtk-5.6 > > LIBS += -lvtkCommon \ > -lvtkRendering \ > -lvtkVolumeRendering \ > -lQVTK > > > > Regards, > > /joseph -------------- next part -------------- An HTML attachment was scrubbed... URL: From smallping_hit at yahoo.com.cn Thu Aug 4 13:07:54 2011 From: smallping_hit at yahoo.com.cn (smallping) Date: Thu, 4 Aug 2011 10:07:54 -0700 (PDT) Subject: [vtkusers] Problems about 3D construction with tetrahedral mesh from DICOM series Message-ID: <1312477674815-4667065.post@n5.nabble.com> I want to read the DICOM series, and then create tetrahedral mesh for volume modeling. I do like this: 1) Read the 3D image data from a series of DICOM files 2) Use CurvatureFlowImageFilter to smooth the image 3) Run an image segmentation method 4) Use the vtkContour filter to generate the surface mesh 5) Save the surface mesh data to a .vtk file 6) Using TetGen, to generate the tetrahedral mesh from the surface mesh, and save into .vtk file But I have problems at step 6, when I try to use TetGen to generate the tetrahedral mesh from the surface mesh, it failed. Then I use ParaView to visualize my surface mesh, I find maybe there are some problems with the surface mesh. Because in the surface mesh, there are many holes, and a surface circle around the object, I do not know what is this. The surface mesh is shown as the following picture. http://vtk.1045678.n5.nabble.com/file/n4667065/Surface_mesh.jpg Can somebody know how to fix this ? Or give me an example to do this ? I need help from you. Thanks The following is my codes for step 2 to step 6 to generate the surface mesh /*========================================================================= #include "itkCommand.h" #include "itkImage.h" #include "itkVTKImageExport.h" #include "itkVTKImageImport.h" #include "itkConfidenceConnectedImageFilter.h" #include "itkCastImageFilter.h" #include "itkRGBPixel.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "vtkImageImport.h" #include "vtkImageExport.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkActor.h" #include "vtkPolyData.h" #include "vtkPolyDataMapper.h" #include "vtkContourFilter.h" #include "vtkImageData.h" #include "vtkDataSet.h" #include "vtkProperty.h" #include "vtkImagePlaneWidget.h" #include "vtkCellPicker.h" #include "vtkPolyDataWriter.h" #include "itkCurvatureFlowImageFilter.h" #include "vtkSmartPointer.h" #include "vtkSTLWriter.h" template void ConnectPipelines(ITK_Exporter exporter, VTK_Importer* importer) { importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback()); importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback()); importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback()); importer->SetSpacingCallback(exporter->GetSpacingCallback()); importer->SetOriginCallback(exporter->GetOriginCallback()); importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback()); importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback()); importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback()); importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback()); importer->SetDataExtentCallback(exporter->GetDataExtentCallback()); importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback()); importer->SetCallbackUserData(exporter->GetCallbackUserData()); } template void ConnectPipelines(VTK_Exporter* exporter, ITK_Importer importer) { importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback()); importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback()); importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback()); importer->SetSpacingCallback(exporter->GetSpacingCallback()); importer->SetOriginCallback(exporter->GetOriginCallback()); importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback()); importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback()); importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback()); importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback()); importer->SetDataExtentCallback(exporter->GetDataExtentCallback()); importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback()); importer->SetCallbackUserData(exporter->GetCallbackUserData()); } int main(int argc, char * argv [] ) { //DICOM-IMG.vtk is read from DICOM series argv[1]="/home/smallping/Codes/ITK/Test/MeshSurface/DICOM-IMG.vtk"; try { typedef float InputPixelType; typedef unsigned char MaskPixelType; const unsigned int Dimension = 3; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< MaskPixelType, Dimension > MaskImageType ; typedef itk::ImageFileReader< InputImageType > ReaderType ; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); reader->Update(); ////////////////////////////////////////////////////////////// Smooth typedef itk::CurvatureFlowImageFilter< InputImageType, InputImageType > CurvatureFlowImageFilterType; CurvatureFlowImageFilterType::Pointer smoothing = CurvatureFlowImageFilterType::New(); smoothing->SetInput( reader->GetOutput() ); smoothing->SetNumberOfIterations( 10 ); smoothing->SetTimeStep( 0.0625 ); //////////////////////////////////////////////////////////////Segmentation typedef itk::ConfidenceConnectedImageFilter<InputImageType, MaskImageType> ConnectedFilterType; ConnectedFilterType::Pointer filter = ConnectedFilterType::New(); filter->SetInput( smoothing->GetOutput() ); filter->SetNumberOfIterations(2); filter->SetReplaceValue(255); filter->SetMultiplier(2.5); InputImageType::Pointer inputImage = reader->GetOutput(); InputImageType::SizeType size = inputImage->GetBufferedRegion().GetSize(); InputImageType::IndexType start = inputImage->GetBufferedRegion().GetIndex(); InputImageType::IndexType seed; seed[0] = start[0] + size[0] / 2; seed[1] = start[1] + size[1] / 2; seed[2] = start[2] + size[2] / 2; filter->SetSeed( seed ); ////////////////////////////////////////////////////////////// typedef itk::VTKImageExport< InputImageType > ExportFilter1Type; typedef itk::VTKImageExport< MaskImageType > ExportFilter2Type; ExportFilter1Type::Pointer itkExporter1 = ExportFilter1Type::New(); ExportFilter2Type::Pointer itkExporter2 = ExportFilter2Type::New(); itkExporter1->SetInput( reader->GetOutput() ); itkExporter2->SetInput( filter->GetOutput() ); vtkImageImport* vtkImporter1 = vtkImageImport::New(); ConnectPipelines(itkExporter1, vtkImporter1); vtkImageImport* vtkImporter2 = vtkImageImport::New(); ConnectPipelines(itkExporter2, vtkImporter2); vtkImporter1->Update(); //////////////////////////////////////////////////////////////Surface vtkContourFilter * contour = vtkContourFilter::New(); contour->SetInput( vtkImporter2->GetOutput() ); contour->SetValue(0, 128); ////////////////////////////////////////////////////////////// vtkPolyDataWriter * vtkWriter = vtkPolyDataWriter::New(); vtkWriter->SetFileName("/home/smallping/Codes/ITK/Test/MeshSurface/DICOM-SURF.vtk"); //save as vtk vtkWriter->SetInput( contour->GetOutput() ); vtkWriter->Write(); vtkSmartPointer< vtkSTLWriter > stlWriter = vtkSmartPointer< vtkSTLWriter >::New(); //save as stl stlWriter->SetInput( contour->GetOutput() ); stlWriter->SetFileName( "/home/smallping/Codes/ITK/Test/MeshSurface/DICOM-SURF.stl" ); stlWriter->Update(); ////////////////////////////////////////////////////////////// vtkImporter1->Delete(); vtkImporter2->Delete(); contour->Delete(); } catch( itk::ExceptionObject & e ) { std::cerr << "Exception catched !! " << e << std::endl; } return 0; } -- View this message in context: http://vtk.1045678.n5.nabble.com/Problems-about-3D-construction-with-tetrahedral-mesh-from-DICOM-series-tp4667065p4667065.html Sent from the VTK - Users mailing list archive at Nabble.com. From dbrayford at gmail.com Thu Aug 4 16:56:55 2011 From: dbrayford at gmail.com (David Brayford) Date: Thu, 4 Aug 2011 14:56:55 -0600 Subject: [vtkusers] How to translate a scene Message-ID: Hi, I am trying to translate a scene along one axis and would normally translate the camera position rather than apply the translation to the whole scene. However, I don't know the commands to do the equivalent of glTranslate(20, 0, 0); or the equivalent rotation glRotate(theta, 1, 0, 0). I am finding the transformations in VTK difficult to implement, even though I know the required mathematical operations. Thanks David From taijinian at gmail.com Thu Aug 4 18:39:58 2011 From: taijinian at gmail.com (Jenya Burstein) Date: Thu, 4 Aug 2011 15:39:58 -0700 Subject: [vtkusers] Getting offscreen render window displayed on the monitor when exporting an image. Message-ID: Hello All, I have a small pipeline that exports a PNG image ( see code below) . The problem is that a window with a black background comes up on the screen and then goes away. Is it possible to output an image in hardware supported offscreen mode without getting render window show up on the monitor? Any advice is greatly appreciated, Jenya void exportVTKPlotImage(vtkRenderWindow& renderWindow) const { vtkSmartPointer localRenderWindow = v tkSmartPointer::New(); localRenderWindow->OffScreenRenderingOn(); localRenderWindow->SetSize(2048, 1024); vtkSmartPointer renderer = renderWindow.GetRenderers()->GetFirstRenderer(); localRenderWindow->AddRenderer(renderer); vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(localRenderWindow); vtkSmartPointer pngWriter = vtkSmartPointer::New(); pngWriter->SetInputConnection(windowToImageFilter->GetOutputPort()); pngWriter->SetFileName("export.png"); pngWriter->Write(); localRenderWindow->RemoveRenderer(renderer); renderer->SetRenderWindow(&renderWindow); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From yanqiao.zhu at gmail.com Thu Aug 4 19:11:42 2011 From: yanqiao.zhu at gmail.com (yanqiao zhu) Date: Thu, 4 Aug 2011 18:11:42 -0500 Subject: [vtkusers] vtk tiff reader Message-ID: Hi guys, I am using vtkTIFFReader to read tiff image. While when compared to the reading result using MATLAB, I found that they are different. For example, the number of pixels with value 32 in vtk reading result is the sum of the number of pixels with value 32 and 33 in MATLAB reading result. And other pixels values are OK(from that value on, the number of pixels with pixelvalue n in vtk reading result is the number of pixels with pixelvalue n+1 in MATLAB reading result. I am wondering whether you have similar experience? Any suggestions on what may be the cause of this? Thanks. Best, Yanqiao Zhu -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Thu Aug 4 23:45:27 2011 From: daviddoria at gmail.com (David Doria) Date: Thu, 4 Aug 2011 23:45:27 -0400 Subject: [vtkusers] How to translate a scene In-Reply-To: References: Message-ID: On Thu, Aug 4, 2011 at 4:56 PM, David Brayford wrote: > Hi, > > I am trying to translate a scene along one axis and would normally > translate the camera position rather than apply the translation to the > whole scene. However, I don't know the commands to do the equivalent > of glTranslate(20, 0, 0); or the equivalent rotation glRotate(theta, > 1, 0, 0). I am finding the transformations in VTK difficult to > implement, even though I know the required mathematical operations. > > Thanks > David > Please take a look at this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/TransformActor David -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijaeendra at gmail.com Fri Aug 5 02:44:57 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Fri, 5 Aug 2011 12:14:57 +0530 Subject: [vtkusers] QVTK Error. In-Reply-To: References: Message-ID: I had to link the other libraries as well. I got it built. But when I run the application file It says segmentation fault(Core Dumped) . But I don see anything wrong with the pointers or anything that I have used. Also when I include the (LIBS += -L/usr/local/lib/vtk-5.6 -lQVTK -lvtkRendering -lvtkIO -lvtkFiltering) .... in the .pro file I have this problem. Though I am not using any of its classes(QVTKWidget etc..,) But if I comment that line it works fine. Its a run time error and is related to the Shared Libraries. I have also set the LD_LIBRARY_PATH!!! What Might have gone wrong. I am totally stuck, Please Help me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Fri Aug 5 04:36:36 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 5 Aug 2011 09:36:36 +0100 Subject: [vtkusers] QVTK Error. In-Reply-To: References: Message-ID: Have you tried putting the vtk libs/dlls and Qt dlls in the folder where your .exe is? Jothy On Fri, Aug 5, 2011 at 7:44 AM, vijaeendra simha wrote: > I had to link the other libraries as well. I got it built. But when I run > the application file It says segmentation fault(Core Dumped) . But I don see > anything wrong with the pointers or anything that I have used. > Also when I include the (LIBS += -L/usr/local/lib/vtk-5.6 -lQVTK > -lvtkRendering -lvtkIO -lvtkFiltering) .... in the .pro file I have this > problem. Though I am not using any of its classes(QVTKWidget etc..,) But if > I comment that line it works fine. > > Its a run time error and is related to the Shared Libraries. > > I have also set the LD_LIBRARY_PATH!!! > > What Might have gone wrong. > > I am totally stuck, Please Help me. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijaeendra at gmail.com Fri Aug 5 07:14:43 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Fri, 5 Aug 2011 16:44:43 +0530 Subject: [vtkusers] QVTK Error. In-Reply-To: References: Message-ID: I tried that. It still does not work. I reason that I can think of is that I had omited Infovis while building VTk. Might that really affect the run or rendering the View Port?? -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijaeendra at gmail.com Fri Aug 5 12:20:28 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Fri, 5 Aug 2011 21:50:28 +0530 Subject: [vtkusers] VTK support on Solaris. Message-ID: I am trying to build VTK 5.6.1 on solaris. I keep getting a lot of errors. I m trying to Bind Qt and VTk on Solaris. Is it really possible and if some one has successfully installed VTk on solaris, Please Let me know. Thank You. Regards, Vijaeendra Simha -------------- next part -------------- An HTML attachment was scrubbed... URL: From u.iemma at uniroma3.it Fri Aug 5 13:04:16 2011 From: u.iemma at uniroma3.it (uiemma) Date: Fri, 5 Aug 2011 10:04:16 -0700 (PDT) Subject: [vtkusers] Newby question Message-ID: <1312563856850-4670142.post@n5.nabble.com> I'm newby of vtk and not very familiar with computer graphics. Here's my problem. My simulation code produces a large amount of scalar data at a set of point in a 3D domain with voids (a set of virtual microphones surrounding scattering objects). The set of points is a cloud with no particular structure. How can I produce a vtk formatted file to be read with paraview or similar viewers ? My code is writtten in C. Thanks umberto -- View this message in context: http://vtk.1045678.n5.nabble.com/Newby-question-tp4670142p4670142.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Fri Aug 5 13:15:24 2011 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 5 Aug 2011 13:15:24 -0400 Subject: [vtkusers] Newby question In-Reply-To: <1312563856850-4670142.post@n5.nabble.com> References: <1312563856850-4670142.post@n5.nabble.com> Message-ID: Hi umberto, you might want to look at http://www.vtk.org/VTK/img/file-formats.pdf and create an unstructured grid that has only vertex as cell. In fact you can create a single poly-vertex cell that is used to show all you points. Seb On Fri, Aug 5, 2011 at 1:04 PM, uiemma wrote: > I'm newby of vtk and not very familiar with computer graphics. Here's my > problem. > My simulation code produces a large amount of scalar data at a set of point > in a 3D domain with voids > (a set of virtual microphones surrounding scattering objects). The set of > points is a cloud with no particular structure. > > How can I produce a vtk formatted file to be read with paraview or similar > viewers ? > > My code is writtten in C. > > Thanks > umberto > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Newby-question-tp4670142p4670142.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://www.vtk.org/mailman/listinfo/vtkusers > From u.iemma at uniroma3.it Fri Aug 5 13:32:02 2011 From: u.iemma at uniroma3.it (uiemma) Date: Fri, 5 Aug 2011 10:32:02 -0700 (PDT) Subject: [vtkusers] Newby question In-Reply-To: References: <1312563856850-4670142.post@n5.nabble.com> Message-ID: <1312565522212-4670201.post@n5.nabble.com> Thank you Seb. You mean that if I have, let's say, 125000 points scattered within a box domain with one spherical hole in the middle (this is actually the case :-) I can produce ONE SINGLE poly-vertex cell out of all the 125k points? I can't figure how. Maybe I have to re-read the document more carefully. Thank you -- View this message in context: http://vtk.1045678.n5.nabble.com/Newby-question-tp4670142p4670201.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Fri Aug 5 13:53:28 2011 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 5 Aug 2011 13:53:28 -0400 Subject: [vtkusers] Newby question In-Reply-To: <1312565522212-4670201.post@n5.nabble.com> References: <1312563856850-4670142.post@n5.nabble.com> <1312565522212-4670201.post@n5.nabble.com> Message-ID: Yes. Basically to see something you need at least a cell. You can either create one cell for each of your point that will be a vertex, or you can create a single cell (poly-vertex) that list all your points index. Seb PS: Here is what it should looks like: DATASET UNSTRUCTURED_GRID POINTS 125000 float p0x p0y p0z p1x p1y p1z ... CELLS 1 12500 0 1 2 3 4 5 6 7 8 ... 124999 ???CELL_TYPES 1 2 POINT_DATA 125000 SCALARS data-name float 1 LOOKUP_TABLE default v1 v2 v3 v4 ... v125000 On Fri, Aug 5, 2011 at 1:32 PM, uiemma wrote: > Thank you Seb. > You mean that if I have, let's say, 125000 points scattered within a box > domain with one spherical hole in the middle (this is actually the case :-) > I can produce ONE SINGLE poly-vertex cell out of all the 125k points? > I can't figure how. Maybe I have to re-read the document more carefully. > Thank you > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Newby-question-tp4670142p4670201.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://www.vtk.org/mailman/listinfo/vtkusers > From jdwieber at gmail.com Fri Aug 5 14:12:56 2011 From: jdwieber at gmail.com (jdwieber) Date: Fri, 5 Aug 2011 11:12:56 -0700 (PDT) Subject: [vtkusers] QVTK Error. In-Reply-To: References: Message-ID: <1312567976648-4670393.post@n5.nabble.com> I had a similar problem on ubuntu after manually upgrading to 5.6.1. I had to build everything that was available in the cmake config file and then include every shared lib on the libs dir (see below). Then I had to modify the LD_LIBRARY_PATH env. var. in the runtime settings (in Qt. Creator). In my case though, I didn't get a core. First the code failed to link, then when I got all the libraries into the .pro file, it failed to load. Were you able to analyze the core file to see where it cored? Here is my libs. from the .pro file: LIBS += -lCosmo \ -lMapReduceMPI \ -lmpistubs \ -lQVTK \ -lVPIC \ -lvtkalglib \ -lvtkCharts \ -lvtkCommon \ -lvtkDICOMParser \ -lvtkexoIIc \ -lvtkexpat \ -lvtkFiltering \ -lvtkfreetype \ -lvtkftgl \ -lvtkGenericFiltering \ -lvtkGeovis \ -lvtkGraphics \ -lvtkHybrid \ -lvtkImaging \ -lvtkInfovis \ -lvtkIO \ -lvtkjpeg \ -lvtklibxml2 \ -lvtkmetaio \ -lvtkNetCDF \ -lvtkNetCDF_cxx \ -lvtkParallel \ -lvtkpng \ -lvtkproj4 \ -lvtkQtChart \ -lvtkRendering \ -lvtksqlite \ -lvtksys \ -lvtktiff \ -lvtkverdict \ -lvtkViews \ -lvtkVolumeRendering \ -lvtkWidgets \ -lvtkzlib -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTK-Error-tp4665705p4670393.html Sent from the VTK - Users mailing list archive at Nabble.com. From jdwieber at gmail.com Fri Aug 5 14:21:00 2011 From: jdwieber at gmail.com (jdwieber) Date: Fri, 5 Aug 2011 11:21:00 -0700 (PDT) Subject: [vtkusers] QVTK Error. In-Reply-To: <1312567976648-4670393.post@n5.nabble.com> References: <1312567976648-4670393.post@n5.nabble.com> Message-ID: <1312568460359-4670413.post@n5.nabble.com> I forgot one other step. I had to create a symbolic link (you could just copy it too) to libQVTKWidgetPlugin.so in my plugins directory. For me on ubuntu it was: cd /usr/lib/qt4/plugins/designer ln -s /usr/plugins/designer/libQVTKWidgetPlugin.so libQVTKWidgetPlugin.so cheers, /joseph -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTK-Error-tp4665705p4670413.html Sent from the VTK - Users mailing list archive at Nabble.com. From wayne at 4raccoons.com Fri Aug 5 15:45:26 2011 From: wayne at 4raccoons.com (Wayne Christopher) Date: Fri, 05 Aug 2011 12:45:26 -0700 Subject: [vtkusers] rubber band selection question Message-ID: <4E3C4856.10806@4raccoons.com> I am using vtkInteractorStyleRubberBandPick to select objects in a region (I'm getting the bounding planes and doing the selection in my own data structures). I would like to also support picking a single location - if the user releases the mouse without moving more than a pixel or two, I want to get a vector rather than a frustrum. vtkInteractorStyleRubberBandPick explicitly ignores the case where the mouse does not move, though. What's the best way to do this? Do I have to set up extra observers for mouse down and up, or something like that? Thanks for any help, Wayne From u.iemma at uniroma3.it Sat Aug 6 11:26:05 2011 From: u.iemma at uniroma3.it (uiemma) Date: Sat, 6 Aug 2011 08:26:05 -0700 (PDT) Subject: [vtkusers] Newby question In-Reply-To: References: <1312563856850-4670142.post@n5.nabble.com> <1312565522212-4670201.post@n5.nabble.com> Message-ID: <1312644365242-4672765.post@n5.nabble.com> I tried. The file is read without errors in Paraview, but the visualization includes only the points, colored according to the scalar values. If I apply a Delaunay3D filter, the filed is visualized, but without the voids. Mmmmh ... I can't figure out what is wrong. U -- View this message in context: http://vtk.1045678.n5.nabble.com/Newby-question-tp4670142p4672765.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Sat Aug 6 12:07:09 2011 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Sat, 6 Aug 2011 12:07:09 -0400 Subject: [vtkusers] Newby question In-Reply-To: <1312644365242-4672765.post@n5.nabble.com> References: <1312563856850-4670142.post@n5.nabble.com> <1312565522212-4670201.post@n5.nabble.com> <1312644365242-4672765.post@n5.nabble.com> Message-ID: Hi umberto, I thought it was what you were looking for. (a set of points colored by the values) If you want to get more help, I guess you will have to explain what you try to do and what you mean by the voids ? Seb On Sat, Aug 6, 2011 at 11:26 AM, uiemma wrote: > I tried. The file is read without errors in Paraview, but the visualization > includes only > the points, colored according to the scalar values. If I apply a Delaunay3D > filter, the filed is visualized, but without the voids. Mmmmh ... I can't > figure out what is wrong. > > U > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Newby-question-tp4670142p4672765.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://www.vtk.org/mailman/listinfo/vtkusers > From u.iemma at uniroma3.it Sat Aug 6 12:17:56 2011 From: u.iemma at uniroma3.it (uiemma) Date: Sat, 6 Aug 2011 09:17:56 -0700 (PDT) Subject: [vtkusers] Newby question In-Reply-To: References: <1312563856850-4670142.post@n5.nabble.com> <1312565522212-4670201.post@n5.nabble.com> <1312644365242-4672765.post@n5.nabble.com> Message-ID: <1312647476120-4672960.post@n5.nabble.com> Seb, you're right. I'll try to explain better. My code virtually measures the pressure field at a number of points in space. The points are regularly spaced except than in the region where a scattering object is present. So, the "voids" are region of the domain where the virtual microphones are removed. Something like this: ................ ................ .... .... .... .... ................ ................ What I want is to plot, e.g., the contours of the pressure field from the scattered data. Hope it is clearer now. I've seen that vtk offers an exhaustive library of functions to manipulate data and write files, but, as far as I understood, they must be called from C++ and my code is pure C. Tx Umb -- View this message in context: http://vtk.1045678.n5.nabble.com/Newby-question-tp4670142p4672960.html Sent from the VTK - Users mailing list archive at Nabble.com. From neohack87 at yahoo.it Sat Aug 6 13:22:11 2011 From: neohack87 at yahoo.it (tenshi8x) Date: Sat, 6 Aug 2011 10:22:11 -0700 (PDT) Subject: [vtkusers] VTK&OpenCV Message-ID: <1312651331111-4673083.post@n5.nabble.com> ood evening, I surfed the Internet for a long time without finding a solution. I have a 3x3 intrinsic parameter matrix obtained through calibration in OpenCV; matrix values are all in pixel. I need to set a vtkCamera with those intrinsic parameters, but I couldn't find the right way to do it, even after trying with SetUserViewTransform or similar. I'm using OpenGL as graphics library in VTK, and if possible I'd like to change OpenGL camera coordinate system with another one rotated by 180? around y-axis, i.e. camera z-axis must point outward view plane toward the object to visualize. I tried to follow these instructions: http://opencv.willowgarage.com/wiki/Posit and even these: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=211014 but none seem to work. Every help will be appreciated. Have a nice day. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-OpenCV-tp4673083p4673083.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.chen at gmail.com Sat Aug 6 17:15:29 2011 From: elvis.chen at gmail.com (Elvis Chen) Date: Sat, 6 Aug 2011 17:15:29 -0400 Subject: [vtkusers] VTK&OpenCV In-Reply-To: <1312651331111-4673083.post@n5.nabble.com> References: <1312651331111-4673083.post@n5.nabble.com> Message-ID: I posted the exact question a few weeks back but did not get any reply. I would also appreciate an answer to this. Thanks On 2011-08-06 1:22 PM, "tenshi8x" wrote: > > ood evening, I surfed the Internet for a long time without finding a > solution. > I have a 3x3 intrinsic parameter matrix obtained through calibration in > OpenCV; matrix values are all in pixel. > I need to set a vtkCamera with those intrinsic parameters, but I couldn't > find the right way to do it, even after trying with SetUserViewTransform or > similar. > I'm using OpenGL as graphics library in VTK, and if possible I'd like to > change OpenGL camera coordinate system with another one rotated by 180? > around y-axis, i.e. camera z-axis must point outward view plane toward the > object to visualize. > > I tried to follow these instructions: > > http://opencv.willowgarage.com/wiki/Posit > > and even these: > http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=211014 > > but none seem to work. > > Every help will be appreciated. > > Have a nice day. > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/VTK-OpenCV-tp4673083p4673083.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://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From smallping_hit at yahoo.com.cn Sat Aug 6 17:37:24 2011 From: smallping_hit at yahoo.com.cn (smallping) Date: Sat, 6 Aug 2011 14:37:24 -0700 (PDT) Subject: [vtkusers] Find somebody to help us to finish the project and pay money for the work Message-ID: <1312666644256-4673650.post@n5.nabble.com> Hi, We have an urgent project, and we want to find somebody to help us to do some work, and we can pay some money for the work. I think the work is not difficult, if you are familiar with ITK and VTK, and also medical image processing. We read the medical data from DICOM series of CT scan, and then create tetrahedral mesh for volume modeling. After this, we can do some research work on the volume models. And we want to find somebody to do the work like this: 1) Read the 3D image data from DICOM series. 2) Smooth and segment the image. 3) Use the Marching Cubes algorithm to generate the surface mesh. 4) Generate the tetrahedral mesh from the surface mesh, and save into .vtk file I have tried to do some work on this, but I am new to ITK, VTK and medical image processing, so the result of the surface mesh is not good, there are holes and noisy data on the surface mesh, and then I cannot generate the tetrahedral mesh from surface mesh, there are many errors. I have posted the question on the forum, you can find my link. If you are interested in the work, you can contact with me, my email is smallping at fe.up.pt, I am at Porto University. I can give you the DICOM series, it is the CT scan data of the tooth surgery. The following are the some pictures of my work. http://vtk.1045678.n5.nabble.com/file/n4673650/surface_model_of_tooth_before_smooth_and_segmentation.jpg http://vtk.1045678.n5.nabble.com/file/n4673650/surface_model_of_tooth_after_smooth_and_segmentation.jpg -- View this message in context: http://vtk.1045678.n5.nabble.com/Find-somebody-to-help-us-to-finish-the-project-and-pay-money-for-the-work-tp4673650p4673650.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Sat Aug 6 19:18:37 2011 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Sat, 6 Aug 2011 19:18:37 -0400 Subject: [vtkusers] Newby question In-Reply-To: <1312647476120-4672960.post@n5.nabble.com> References: <1312563856850-4670142.post@n5.nabble.com> <1312565522212-4670201.post@n5.nabble.com> <1312644365242-4672765.post@n5.nabble.com> <1312647476120-4672960.post@n5.nabble.com> Message-ID: Hi Umberto, If your points are regularly spaced, why don't you use an ImageData with some Arbitrary known value for the void location and just make a threshold so you can create those holes. Once you've done that, you have the "connectivity" that you were missing for doing the processing that you tried to achieved. Otherwise, you can create your own connectivity if you know the topology. Seb On Sat, Aug 6, 2011 at 12:17 PM, uiemma wrote: > Seb, you're right. I'll try to explain better. > My code virtually measures the pressure field at a number of points in > space. The points are regularly spaced except than in the region where a > scattering object is present. So, the "voids" are region of the domain where > the virtual microphones are removed. > Something like this: > ................ > ................ > .... ? ? ? ?.... > .... ? ? ? ?.... > ................ > ................ > > What I want is to plot, e.g., the contours of the pressure field from the > scattered data. > Hope it is clearer now. > I've seen that vtk offers an exhaustive library of functions to manipulate > data and write files, but, as far as I understood, they must be called from > C++ and my code is pure C. > Tx > Umb > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Newby-question-tp4670142p4672960.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://www.vtk.org/mailman/listinfo/vtkusers > From soheilghafurian at yahoo.com Sun Aug 7 20:54:26 2011 From: soheilghafurian at yahoo.com (soheilghafurian) Date: Sun, 7 Aug 2011 17:54:26 -0700 (PDT) Subject: [vtkusers] How to un-assign and input from an actor? Message-ID: <1312764865811-4676117.post@n5.nabble.com> Hi guys if we want to assign an input to an actor, we use actor->SetInput method. My question is, after this, if we want to deassociate the actor from the input, and assign it to another input, what should we do? I don't think simply using SetInput with another source as the parameter will work. Thanks a lot for your help. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-un-assign-and-input-from-an-actor-tp4676117p4676117.html Sent from the VTK - Users mailing list archive at Nabble.com. From luoyx08 at gmail.com Sun Aug 7 23:36:35 2011 From: luoyx08 at gmail.com (luoyx) Date: Sun, 7 Aug 2011 20:36:35 -0700 (PDT) Subject: [vtkusers] how to export a ply file with color infomation Message-ID: <1312774595240-4676437.post@n5.nabble.com> i have a vtk file and the points' color data and want to export them as a ply file using the plywriter. But the exported file don't contain the color infomation.Thanks for your help! my code is shown below: // initial the color array (cloud is a pointcloud with XYZRGB data) vtkSmartPointer color_array = vtkSmartPointer::New(); color_array->SetName("RGB"); color_array->SetNumberOfComponents(3); color_array->SetNumberOfTuples(cloud->size()); for(vtkIdType j =0; j!= cloud->size(); ++j) for(vtkIdType i = 0; i!=3; ++i) { switch(i) { case 0: color_array->SetValue(j*3+i,cloud->points[j].r); break; case 1: color_array->SetValue(j*3+i,cloud->points[j].g); break; case 2: color_array->SetValue(j*3+i,cloud->points[j].b); break; } } //read data from a vtk file vtkPolyDataReader *reader=vtkPolyDataReader::New(); reader->SetFileName("mesh.vtk"); vtkDataObject *vtkdata; vtkdata=reader->GetOutputDataObject(0); // Convert vtk file to ply(add color info) vtkSmartPointer writer=vtkSmartPointer::New(); writer->SetInput(vtkdata); writer->SetFileTypeToASCII(); writer->SetColorModeToDefault(); writer->SetArrayName("RGB"); writer->SetFileName("mesh.ply"); writer->Write(); -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-export-a-ply-file-with-color-infomation-tp4676437p4676437.html Sent from the VTK - Users mailing list archive at Nabble.com. From vijaeendra at gmail.com Mon Aug 8 01:33:17 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Mon, 8 Aug 2011 11:03:17 +0530 Subject: [vtkusers] QVTK Error. In-Reply-To: <1312568460359-4670413.post@n5.nabble.com> References: <1312567976648-4670393.post@n5.nabble.com> <1312568460359-4670413.post@n5.nabble.com> Message-ID: Thank you. I m working on Opensolaris. When I try to build VTK 5.6.1 using cmake with all the options on, its throwing a lot of errors(those that I could not fix) So I built it making a few options like (vtkInfovis , examples) redundant. So I m afraid , if that has caused the problem. I need to know why I m not able to build it with all the options on :-o Regards, Vijaeendra Simha G A -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijaeendra at gmail.com Mon Aug 8 04:39:21 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Mon, 8 Aug 2011 14:09:21 +0530 Subject: [vtkusers] Error while Buliding VTK on Opensolaris on including Infovis!! Message-ID: While building VTK 5.6.1 .., I get this following error. "/export/home/sol/vtk-builds-2/VTK/Infovis/vtkDelimitedTextReader.cxx", line 80: Error: Could not find std::set::set(vtkUnicodeString::const_iterator, vtkUnicodeString::const_iterator) to initialize RecordDelimiters. "/export/home/sol/vtk-builds-2/VTK/Infovis/vtkDelimitedTextReader.cxx", line 81: Error: Could not find std::set::set(vtkUnicodeString::const_iterator, vtkUnicodeString::const_iterator) to initialize FieldDelimiters. "/export/home/sol/vtk-builds-2/VTK/Infovis/vtkDelimitedTextReader.cxx", line 82: Error: Could not find std::set::set(vtkUnicodeString::const_iterator, vtkUnicodeString::const_iterator) to initialize StringDelimiters. "/export/home/sol/vtk-builds-2/VTK/Infovis/vtkDelimitedTextReader.cxx", line 83: Error: Could not find std::set::set(vtkUnicodeString::const_iterator, vtkUnicodeString::const_iterator) to initialize Whitespace. "/export/home/sol/vtk-builds-2/VTK/Infovis/vtkDelimitedTextReader.cxx", line 84: Error: Could not find std::set::set(vtkUnicodeString::const_iterator, vtkUnicodeString::const_iterator) to initialize EscapeDelimiter. 5 Error(s) detected. gmake[2]: *** [Infovis/CMakeFiles/vtkInfovis.dir/vtkDelimitedTextReader.cxx.o] Error 5 gmake[1]: *** [Infovis/CMakeFiles/vtkInfovis.dir/all] Error 2 gmake: *** [all] Error 2 What more should I include?? Please Help me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Mon Aug 8 06:11:54 2011 From: jothybasu at gmail.com (Jothy) Date: Mon, 8 Aug 2011 11:11:54 +0100 Subject: [vtkusers] Get scalar values of vtkImageData in world coordinates Message-ID: Hi all, Is it possible to get the scalar values in vtkImageData in world coordinates. I mean we could get the values bu vtkImageData->GetScalarComponentAsDouble(x,y,z,0). X,y,z are the voxel indices, if my origin is at the centre of the image, I would like to get the value by (x=0,y=0,z=0,0). Any suggestions? Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From linxweil at irmb.tu-bs.de Mon Aug 8 06:33:09 2011 From: linxweil at irmb.tu-bs.de (Jan Linxweiler) Date: Mon, 8 Aug 2011 12:33:09 +0200 Subject: [vtkusers] vtkES for iOS devs Message-ID: Hi all, in the quarterly Kitware source I'm reading about vtkES to run vtk on iOS devices but I could not find anything else about vtkES on the web. My question is if vtkES is already available or will be available to the public? Best, Jannis From kjafari at rad.hfh.edu Mon Aug 8 07:40:49 2011 From: kjafari at rad.hfh.edu (Jafari, Kourosh) Date: Mon, 8 Aug 2011 07:40:49 -0400 Subject: [vtkusers] [Insight-users] [Gdcm2] Link error for ITK+VTK+GDCM+QT inVisual Studio 2008 In-Reply-To: <6F5DBCB091F9B346BA7EF3A5444D7A0B648A69FA4F@RISMAIL1.rad.hfh.edu> References: <6F5DBCB091F9B346BA7EF3A5444D7A0B648A69FA4F@RISMAIL1.rad.hfh.edu> Message-ID: <6F5DBCB091F9B346BA7EF3A5444D7A0B64920B6B3D@RISMAIL1.rad.hfh.edu> Hello John, Have you had a chance to find a solution for the following old problem? I am still not able to use ITK and GDCM in VS in Windows Vista. I am also not able to use GDCM alone either. I get the similar error messages. But I've been able to use VTK and GDCM which is strange. Thanks, Kourosh ________________________________________ From: insight-users-bounces at itk.org [insight-users-bounces at itk.org] On Behalf Of Jafari, Kourosh [kjafari at rad.hfh.edu] Sent: Monday, June 27, 2011 10:49 AM To: John Drescher Cc: insight-users at itk.org; vtkusers at vtk.org; gdcm-developers Subject: Re: [Insight-users] [Gdcm2] Link error for ITK+VTK+GDCM+QT inVisual Studio 2008 Thanks John. I replaced the CMakeLists.txt in \InsightToolkit-3.20.0\Utilities\MetaIO\ with the one attached but still I get the same error message. I even cleared the cache, turned ITK_USE_SYSTEM_GDCM on and again configured it but I still get the same error message. I got the attached file from Mario Ceresa who had posted the question. He uses ITK 3.20 + gdcm 2.0.16 in Fedora 14 and he has no problem. But I use ITK 3.20 + gdcm 2.0.14 in Windows Vista. You use Windows Vista, don't you? Thanks! Kourosh ________________________________________ From: John Drescher [drescherjm at gmail.com] Sent: Sunday, June 26, 2011 9:10 PM To: Jafari, Kourosh Cc: insight-users at itk.org; vtkusers at vtk.org; gdcm-developers Subject: Re: [Gdcm2] Link error for ITK+VTK+GDCM+QT in Visual Studio 2008 On Sun, Jun 26, 2011 at 9:02 PM, Jafari, Kourosh wrote: > Hello John, > > Do you use ITK and GDCM in Visual Studio? I have faced the following link error and was wondering if you experienced the same problem. > I had the same problem. I believe this will shed some light on the issue. http://www.itk.org/pipermail/insight-users/2010-November/038785.html John From drescherjm at gmail.com Mon Aug 8 07:58:20 2011 From: drescherjm at gmail.com (John Drescher) Date: Mon, 8 Aug 2011 07:58:20 -0400 Subject: [vtkusers] [Insight-users] [Gdcm2] Link error for ITK+VTK+GDCM+QT inVisual Studio 2008 In-Reply-To: <6F5DBCB091F9B346BA7EF3A5444D7A0B64920B6B3D@RISMAIL1.rad.hfh.edu> References: <6F5DBCB091F9B346BA7EF3A5444D7A0B648A69FA4F@RISMAIL1.rad.hfh.edu> <6F5DBCB091F9B346BA7EF3A5444D7A0B64920B6B3D@RISMAIL1.rad.hfh.edu> Message-ID: > Have you had a chance to find a solution for the following old problem? I am still not able to use ITK and GDCM in VS in Windows Vista. I am also not able to use GDCM alone either. I get the similar error messages. But I've been able to use VTK and GDCM which is strange. > I am sorry. I worked on it for a few hours but I did not get around the linking errors (in ITK, and in applications that use VTK or ITK) that this caused by ITK creating a vtkmetaio.lib instead of an ITKMetaIO.lib. I am not even sure why on earth that ITK would want to create a vtkmetaio.lib. John From daviddoria at gmail.com Mon Aug 8 08:49:11 2011 From: daviddoria at gmail.com (David Doria) Date: Mon, 8 Aug 2011 08:49:11 -0400 Subject: [vtkusers] how to export a ply file with color infomation In-Reply-To: <1312774595240-4676437.post@n5.nabble.com> References: <1312774595240-4676437.post@n5.nabble.com> Message-ID: On Sun, Aug 7, 2011 at 11:36 PM, luoyx wrote: > i have a vtk file and the points' color data and want to export them as a > ply > file using the plywriter. > But the exported file don't contain the color infomation.Thanks for your > help! > > my code is shown below: > > > // initial the color array (cloud is a pointcloud with XYZRGB data) > vtkSmartPointer color_array = > vtkSmartPointer::New(); > color_array->SetName("RGB"); > color_array->SetNumberOfComponents(3); > color_array->SetNumberOfTuples(cloud->size()); > > > for(vtkIdType j =0; j!= cloud->size(); ++j) > for(vtkIdType i = 0; i!=3; ++i) > { > switch(i) > { > case 0: > color_array->SetValue(j*3+i,cloud->points[j].r); > break; > > case 1: > color_array->SetValue(j*3+i,cloud->points[j].g); > break; > > case 2: > color_array->SetValue(j*3+i,cloud->points[j].b); > break; > } > } > > //read data from a vtk file > vtkPolyDataReader *reader=vtkPolyDataReader::New(); > reader->SetFileName("mesh.vtk"); > vtkDataObject *vtkdata; > vtkdata=reader->GetOutputDataObject(0); > > > > // Convert vtk file to ply(add color info) > vtkSmartPointer > writer=vtkSmartPointer::New(); > writer->SetInput(vtkdata); > writer->SetFileTypeToASCII(); > writer->SetColorModeToDefault(); > writer->SetArrayName("RGB"); > writer->SetFileName("mesh.ply"); > writer->Write(); > Can you post a compilable example and the output file that is produced? I would hard code something like this : http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints as the input. David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.partyka at kitware.com Mon Aug 8 09:42:33 2011 From: david.partyka at kitware.com (David Partyka) Date: Mon, 8 Aug 2011 09:42:33 -0400 Subject: [vtkusers] VTK support on Solaris. In-Reply-To: References: Message-ID: What version of Solaris? Real Solaris or open Solaris? Have you tried the current development head from git? A year ago or so several patches were submitted to address compile errors on solaris. On Fri, Aug 5, 2011 at 12:20 PM, vijaeendra simha wrote: > I am trying to build VTK 5.6.1 on solaris. I keep getting a lot of errors. > I m trying to Bind Qt and VTk on Solaris. Is it really possible and if some > one has successfully installed VTk on solaris, Please Let me know. > > Thank You. > > Regards, > Vijaeendra Simha > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijaeendra at gmail.com Mon Aug 8 09:48:41 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Mon, 8 Aug 2011 19:18:41 +0530 Subject: [vtkusers] VTK support on Solaris. In-Reply-To: References: Message-ID: Presently on OpenSolaris, but later planning to build on Solaris10. I haven tried on the current development head.. please give me more information if there r any patches... Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.partyka at kitware.com Mon Aug 8 09:53:13 2011 From: david.partyka at kitware.com (David Partyka) Date: Mon, 8 Aug 2011 09:53:13 -0400 Subject: [vtkusers] VTK support on Solaris. In-Reply-To: References: Message-ID: Take a look here and try a build, http://www.vtk.org/Wiki/VTK/Git On Mon, Aug 8, 2011 at 9:48 AM, vijaeendra simha wrote: > Presently on OpenSolaris, but later planning to build on Solaris10. I haven > tried on the current development head.. please give me more information if > there r any patches... > > Thank you. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kjafari at rad.hfh.edu Mon Aug 8 09:51:59 2011 From: kjafari at rad.hfh.edu (Jafari, Kourosh) Date: Mon, 8 Aug 2011 09:51:59 -0400 Subject: [vtkusers] [Insight-users] [Gdcm2] Link error for ITK+VTK+GDCM+QT inVisual Studio 2008 In-Reply-To: References: <6F5DBCB091F9B346BA7EF3A5444D7A0B648A69FA4F@RISMAIL1.rad.hfh.edu> <6F5DBCB091F9B346BA7EF3A5444D7A0B64920B6B3D@RISMAIL1.rad.hfh.edu>, Message-ID: <6F5DBCB091F9B346BA7EF3A5444D7A0B64920B6B3F@RISMAIL1.rad.hfh.edu> Dear all, Is there anybody out there that has used ITK and GDCM in Visual Studio in Windows Vista? I highly appreciate your help. Thanks a lot, Kourosh ________________________________________ From: John Drescher [drescherjm at gmail.com] Sent: Monday, August 08, 2011 7:58 AM To: Jafari, Kourosh Cc: insight-users at itk.org; vtkusers at vtk.org; gdcm-developers Subject: Re: [Insight-users] [Gdcm2] Link error for ITK+VTK+GDCM+QT inVisual Studio 2008 > Have you had a chance to find a solution for the following old problem? I am still not able to use ITK and GDCM in VS in Windows Vista. I am also not able to use GDCM alone either. I get the similar error messages. But I've been able to use VTK and GDCM which is strange. > I am sorry. I worked on it for a few hours but I did not get around the linking errors (in ITK, and in applications that use VTK or ITK) that this caused by ITK creating a vtkmetaio.lib instead of an ITKMetaIO.lib. I am not even sure why on earth that ITK would want to create a vtkmetaio.lib. John From vijaeendra at gmail.com Mon Aug 8 09:56:38 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Mon, 8 Aug 2011 19:26:38 +0530 Subject: [vtkusers] VTK support on Solaris. In-Reply-To: References: Message-ID: Thank you . I ll work on that and get back to you :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From amich.randa at gmail.com Mon Aug 8 10:02:57 2011 From: amich.randa at gmail.com (raimi87) Date: Mon, 8 Aug 2011 07:02:57 -0700 (PDT) Subject: [vtkusers] wrl problem Message-ID: <1312812177142-4677818.post@n5.nabble.com> hi i try to read a wrl version file but i failed how could i fix this problem -- View this message in context: http://vtk.1045678.n5.nabble.com/wrl-problem-tp4677818p4677818.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Mon Aug 8 10:05:31 2011 From: daviddoria at gmail.com (David Doria) Date: Mon, 8 Aug 2011 10:05:31 -0400 Subject: [vtkusers] wrl problem In-Reply-To: <1312812177142-4677818.post@n5.nabble.com> References: <1312812177142-4677818.post@n5.nabble.com> Message-ID: On Mon, Aug 8, 2011 at 10:02 AM, raimi87 wrote: > hi i try to read a wrl version file but i failed ?how could i fix this > problem Did you try this? http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML If that doesn't work, you'll have to send us the file you are trying to read along with a more detailed description of what went wrong. David From amich.randa at gmail.com Mon Aug 8 10:07:08 2011 From: amich.randa at gmail.com (raimi87) Date: Mon, 8 Aug 2011 07:07:08 -0700 (PDT) Subject: [vtkusers] icp prblem compile Message-ID: <1312812428981-4677832.post@n5.nabble.com> hi i try to compile the example of "IterativeClosestPointTransform." but it doesn't work how could i fix it ? vtkSmartPointer icp = vtkSmartPointer::New(); icp->SetSource(source); icp->SetTarget(target); //icp->GetLandmarkTransform()->SetModeToRigidBody(); icp->SetMaximumNumberOfIterations(40); icp->SetMaximumNumberOfLandmarks(source->GetNumberOfPoints()); icp->SetCheckMeanDistance(1); icp->SetMaximumMeanDistance(0.0000001); icp->GetLandmarkTransform()->SetModeToRigidBody(); icp->Modified(); icp->Update(); -- View this message in context: http://vtk.1045678.n5.nabble.com/icp-prblem-compile-tp4677832p4677832.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Mon Aug 8 10:09:42 2011 From: daviddoria at gmail.com (David Doria) Date: Mon, 8 Aug 2011 10:09:42 -0400 Subject: [vtkusers] icp prblem compile In-Reply-To: <1312812428981-4677832.post@n5.nabble.com> References: <1312812428981-4677832.post@n5.nabble.com> Message-ID: On Mon, Aug 8, 2011 at 10:07 AM, raimi87 wrote: > hi i try to compile the example of "IterativeClosestPointTransform." but it > doesn't work how could i fix it ? > vtkSmartPointer icp = > ? ? ?vtkSmartPointer::New(); > ?icp->SetSource(source); > ?icp->SetTarget(target); > ?//icp->GetLandmarkTransform()->SetModeToRigidBody(); > ?icp->SetMaximumNumberOfIterations(40); > ? icp->SetMaximumNumberOfLandmarks(source->GetNumberOfPoints()); > ? ? ? ?icp->SetCheckMeanDistance(1); > ? ? ? ?icp->SetMaximumMeanDistance(0.0000001); > ? ? ? ?icp->GetLandmarkTransform()->SetModeToRigidBody(); > ? ? ? ?icp->Modified(); > ? ? ? ?icp->Update(); What do you mean "doesn't work"? Did you try this? http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filters/IterativeClosestPointsTransform David From amich.randa at gmail.com Mon Aug 8 10:10:39 2011 From: amich.randa at gmail.com (raimi87) Date: Mon, 8 Aug 2011 07:10:39 -0700 (PDT) Subject: [vtkusers] wrl problem In-Reply-To: References: <1312812177142-4677818.post@n5.nabble.com> Message-ID: <1312812639384-4677850.post@n5.nabble.com> actualy i try this code but it doesn't work with my file this is the file that i try to work with http://vtk.1045678.n5.nabble.com/file/n4677850/surf5.wrl surf5.wrl -- View this message in context: http://vtk.1045678.n5.nabble.com/wrl-problem-tp4677818p4677850.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Mon Aug 8 10:12:59 2011 From: daviddoria at gmail.com (David Doria) Date: Mon, 8 Aug 2011 10:12:59 -0400 Subject: [vtkusers] wrl problem In-Reply-To: <1312812639384-4677850.post@n5.nabble.com> References: <1312812177142-4677818.post@n5.nabble.com> <1312812639384-4677850.post@n5.nabble.com> Message-ID: On Mon, Aug 8, 2011 at 10:10 AM, raimi87 wrote: > actualy i try this code but it doesn't work with my file ?this is the file > that i try to work with > http://vtk.1045678.n5.nabble.com/file/n4677850/surf5.wrl surf5.wrl What is the error/behavior? David From amich.randa at gmail.com Mon Aug 8 10:13:01 2011 From: amich.randa at gmail.com (raimi87) Date: Mon, 8 Aug 2011 07:13:01 -0700 (PDT) Subject: [vtkusers] icp prblem compile In-Reply-To: References: <1312812428981-4677832.post@n5.nabble.com> Message-ID: <1312812781416-4677856.post@n5.nabble.com> Yes i try it but i have this result http://vtk.1045678.n5.nabble.com/file/n4677856/imprime_ICP.png -- View this message in context: http://vtk.1045678.n5.nabble.com/icp-prblem-compile-tp4677832p4677856.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Mon Aug 8 10:15:40 2011 From: daviddoria at gmail.com (David Doria) Date: Mon, 8 Aug 2011 10:15:40 -0400 Subject: [vtkusers] icp prblem compile In-Reply-To: <1312812781416-4677856.post@n5.nabble.com> References: <1312812428981-4677832.post@n5.nabble.com> <1312812781416-4677856.post@n5.nabble.com> Message-ID: On Mon, Aug 8, 2011 at 10:13 AM, raimi87 wrote: > Yes ?i try it but i have this result > http://vtk.1045678.n5.nabble.com/file/n4677856/imprime_ICP.png Yep, the point sets are aligned... what were you expecting? David From amich.randa at gmail.com Mon Aug 8 10:17:56 2011 From: amich.randa at gmail.com (raimi87) Date: Mon, 8 Aug 2011 07:17:56 -0700 (PDT) Subject: [vtkusers] wrl problem In-Reply-To: References: <1312812177142-4677818.post@n5.nabble.com> <1312812639384-4677850.post@n5.nabble.com> Message-ID: <1312813076405-4677867.post@n5.nabble.com> i have no problem with build but when i press debug it doesn't work " vrlm.exe stopped working " -- View this message in context: http://vtk.1045678.n5.nabble.com/wrl-problem-tp4677818p4677867.html Sent from the VTK - Users mailing list archive at Nabble.com. From amich.randa at gmail.com Mon Aug 8 10:20:55 2011 From: amich.randa at gmail.com (raimi87) Date: Mon, 8 Aug 2011 07:20:55 -0700 (PDT) Subject: [vtkusers] icp prblem compile In-Reply-To: References: <1312812428981-4677832.post@n5.nabble.com> <1312812781416-4677856.post@n5.nabble.com> Message-ID: <1312813255466-4677880.post@n5.nabble.com> yes the point set are aligned it's the result of nurbs surface -- View this message in context: http://vtk.1045678.n5.nabble.com/icp-prblem-compile-tp4677832p4677880.html Sent from the VTK - Users mailing list archive at Nabble.com. From dbrayford at gmail.com Mon Aug 8 12:11:49 2011 From: dbrayford at gmail.com (David Brayford) Date: Mon, 8 Aug 2011 10:11:49 -0600 Subject: [vtkusers] VTK volume to ITK image conversion crash Message-ID: Hi, I am trying to convert a VTK volume and use it to generate a DRR. However, the following code (see below) crashes when the command VTK_to_ITK_filter->Update(); is executed. Any suggestions on how I go about fixing this problem? typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; InputImageType::ConstPointer imagePtr; vtkImageData * vol = data->GetVolume()->getImageData(); typedef itk::VTKImageToImageFilter VTKToITKConnector; VTKToITKConnector::Pointer VTK_to_ITK_filter = VTKToITKConnector::New(); VTK_to_ITK_filter->SetInput(vol); VTK_to_ITK_filter->Update(); imagePtr = VTK_to_ITK_filter->GetOutput(); Thanks David From bill.lorensen at gmail.com Mon Aug 8 12:18:17 2011 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 8 Aug 2011 12:18:17 -0400 Subject: [vtkusers] wrl problem In-Reply-To: <1312813076405-4677867.post@n5.nabble.com> References: <1312812177142-4677818.post@n5.nabble.com> <1312812639384-4677850.post@n5.nabble.com> <1312813076405-4677867.post@n5.nabble.com> Message-ID: The file is VRML 1.0. VTK only reads VRML 2.0. On Mon, Aug 8, 2011 at 10:17 AM, raimi87 wrote: > i have no problem with build but when i press debug it doesn't work " > vrlm.exe stopped working " > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/wrl-problem-tp4677818p4677867.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amich.randa at gmail.com Mon Aug 8 12:59:56 2011 From: amich.randa at gmail.com (raimi87) Date: Mon, 8 Aug 2011 09:59:56 -0700 (PDT) Subject: [vtkusers] wrl problem In-Reply-To: References: <1312812177142-4677818.post@n5.nabble.com> <1312812639384-4677850.post@n5.nabble.com> <1312813076405-4677867.post@n5.nabble.com> Message-ID: <1312822796560-4678386.post@n5.nabble.com> there is any way to read this file or can i convert wrl version 1 to version2? -- View this message in context: http://vtk.1045678.n5.nabble.com/wrl-problem-tp4677818p4678386.html Sent from the VTK - Users mailing list archive at Nabble.com. From nikhil.shetty at kitware.com Mon Aug 8 13:23:42 2011 From: nikhil.shetty at kitware.com (Nikhil Shetty) Date: Mon, 8 Aug 2011 13:23:42 -0400 Subject: [vtkusers] vtkES for iOS devs In-Reply-To: References: Message-ID: Hi Jan, vtkES is a little premature at this stage and is actively developed inside Kitware. So to answer your question it is not currently public but is intended to be publicaly available in the future. -nix On Mon, Aug 8, 2011 at 6:33 AM, Jan Linxweiler wrote: > Hi all, > > in the quarterly Kitware source I'm reading about vtkES to run vtk on iOS > devices but I could not find anything else about vtkES on the web. > My question is if vtkES is already available or will be available to the > public? > > > Best, > > Jannis > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From beekmaarten at yahoo.com Mon Aug 8 14:16:00 2011 From: beekmaarten at yahoo.com (Maarten Beek) Date: Mon, 8 Aug 2011 11:16:00 -0700 (PDT) Subject: [vtkusers] Find somebody to help us to finish the project and pay money for the work In-Reply-To: <1312666644256-4673650.post@n5.nabble.com> References: <1312666644256-4673650.post@n5.nabble.com> Message-ID: <1312827360.30800.YahooMailNeo@web45710.mail.sp1.yahoo.com> You'll get a "nicer" surface model if you start with a cleaner segmentation (the images look very noisy). It will be easier to create a tetmesh from a nice surface. 1 - Choose a good threshold value. 2 - Fill holes in segmentation (manually or floodfill algorithm or both) 3 - Remove noise outside segmentation (= inverse of point 2). 4 - Marching Cubes on clean segmentation (5 - Smoothing of surface model) I never generated a tetmesh with the use of VTK. Not sure VTK is the way to go, maybe using a FE preprocessor might give better results. Maarten ________________________________ From: smallping To: vtkusers at vtk.org Sent: Saturday, August 6, 2011 5:37:24 PM Subject: [vtkusers] Find somebody to help us to finish the project and pay money for the work Hi, We have an urgent project, and we want to find somebody to help us to do some work, and we can pay some money for the work. I think the work is not difficult, if you are familiar with ITK and VTK, and also medical image processing. We read the medical data from DICOM series of CT scan, and then create tetrahedral mesh for volume modeling. After this, we can do some research work on the volume models. And we want to find somebody to do the work like this: 1) Read the 3D image data from DICOM series. 2) Smooth and segment the image. 3) Use the Marching Cubes algorithm to generate the surface mesh. 4) Generate the tetrahedral mesh from the surface mesh, and save into .vtk file I have tried to do some work on this, but I am new to ITK, VTK and medical image processing, so the result of the surface mesh is not good, there are holes and noisy data on the surface mesh, and then I cannot generate the tetrahedral mesh from surface mesh, there are many errors. I have posted the question on the forum, you can find my link. If you are interested in the work, you can contact with me, my email is smallping at fe.up.pt, I am at Porto University. I can give you the DICOM series, it is the CT scan data of the tooth surgery. The following are the some pictures of my work. http://vtk.1045678.n5.nabble.com/file/n4673650/surface_model_of_tooth_before_smooth_and_segmentation.jpg http://vtk.1045678.n5.nabble.com/file/n4673650/surface_model_of_tooth_after_smooth_and_segmentation.jpg -- View this message in context: http://vtk.1045678.n5.nabble.com/Find-somebody-to-help-us-to-finish-the-project-and-pay-money-for-the-work-tp4673650p4673650.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://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From xpchen5871 at gmail.com Mon Aug 8 16:45:33 2011 From: xpchen5871 at gmail.com (Xiaoping Chen) Date: Mon, 8 Aug 2011 16:45:33 -0400 Subject: [vtkusers] serialize a vtk object to a xml string, not to save it to a file In-Reply-To: References: Message-ID: Could someone help on this issue (use a vtkXMLPolyDataWriter instance to create a serialized vtk xml string)? On Thu, Jul 28, 2011 at 4:07 PM, Xiaoping Chen wrote: > Hello, > > I am creating a client-server application. The server will be > Java-based, running in Linux and the client is C++-based, running in > Windows. > > The server will map our internal data into the VTK objects and > serialized them into the xml strings and then send to the client. > > I am able to do this in C++ but not able to do it in VTK Java wrapper. > ?vtkXMLPolyDataWriter allows me to serialize the vtk object and save > it to a file but NOT allow me to turn it into a xml string. > > Please help. > > Eric > From dave.demarle at kitware.com Mon Aug 8 17:24:48 2011 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 8 Aug 2011 17:24:48 -0400 Subject: [vtkusers] serialize a vtk object to a xml string, not to save it to a file In-Reply-To: References: Message-ID: I don't think the vtk XML readers/writers have a buffer IO feature, but the pure vtk readers/writers do. see vtkDataReader::SetReadFromInputString() in http://www.vtk.org/doc/nightly/html/classvtkDataReader.html David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 On Mon, Aug 8, 2011 at 4:45 PM, Xiaoping Chen wrote: > Could someone help on this issue (use a vtkXMLPolyDataWriter instance > to create a serialized vtk xml string)? > > On Thu, Jul 28, 2011 at 4:07 PM, Xiaoping Chen wrote: >> Hello, >> >> I am creating a client-server application. The server will be >> Java-based, running in Linux and the client is C++-based, running in >> Windows. >> >> The server will map our internal data into the VTK objects and >> serialized them into the xml strings and then send to the client. >> >> I am able to do this in C++ but not able to do it in VTK Java wrapper. >> ?vtkXMLPolyDataWriter allows me to serialize the vtk object and save >> it to a file but NOT allow me to turn it into a xml string. >> >> Please help. >> >> Eric >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers > From xpchen5871 at gmail.com Mon Aug 8 17:52:11 2011 From: xpchen5871 at gmail.com (Xiaoping Chen) Date: Mon, 8 Aug 2011 17:52:11 -0400 Subject: [vtkusers] serialize a vtk object to a xml string, not to save it to a file In-Reply-To: References: Message-ID: Thank you so much, David, but we are currently using the following class to get serialized vtk xml string in C++ vtkXMLPolyDataStreamWriter is derived from vtkXMLPolyDataWriter. /////// c++ header file #ifndef _VTKXMLPOLYDATASTREAMWRITER_H_INCLUDED_ #define _VTKXMLPOLYDATASTREAMWRITER_H_INCLUDED_ #include #include class vtkXMLPolyDataStreamWriter : public vtkXMLPolyDataWriter { public: static vtkXMLPolyDataStreamWriter* New(); virtual void SetUserStream(std::ostream& output_stream); protected: vtkXMLPolyDataStreamWriter(); ~vtkXMLPolyDataStreamWriter(); virtual int WriteInternal(); }; #endif // _VTKXMLPOLYDATASTREAMWRITER_H_INCLUDED_ ///----------------- c++ source file #include "vtkXMLPolyDataStreamWriter.h" #include #include vtkStandardNewMacro(vtkXMLPolyDataStreamWriter); vtkXMLPolyDataStreamWriter::vtkXMLPolyDataStreamWriter() { } vtkXMLPolyDataStreamWriter::~vtkXMLPolyDataStreamWriter() { } void vtkXMLPolyDataStreamWriter::SetUserStream(std::ostream& output_stream) { this->Stream = &output_stream; this->Stream->precision(11); this->DataStream->SetStream(this->Stream); } int vtkXMLPolyDataStreamWriter::WriteInternal() { (*this->Stream).imbue(vtkstd::locale::classic()); return this->WriteData(); } //----------- call as the following //-- serizlize vtk objects to vtkString vtkSmartPointer writer = vtkXMLPolyDataStreamWriter::New(); std::ostringstream oss; writer->SetUserStream(oss); writer->SetInput(polyData); writer->Update(); #ifdef _DEBUG std::cout << "######## serialized points: " <Stream = &output_stream; this->Stream->precision(11); this->DataStream->SetStream(this->Stream); this->WriteData(); Any idea? Thanks again. Eric On Mon, Aug 8, 2011 at 5:24 PM, David E DeMarle wrote: > I don't think the vtk XML readers/writers have a buffer IO feature, > but the pure vtk readers/writers do. see > vtkDataReader::SetReadFromInputString() in > http://www.vtk.org/doc/nightly/html/classvtkDataReader.html > > David E DeMarle > Kitware, Inc. > R&D Engineer > 28 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-371-3971 x109 > > > > On Mon, Aug 8, 2011 at 4:45 PM, Xiaoping Chen wrote: >> Could someone help on this issue (use a vtkXMLPolyDataWriter instance >> to create a serialized vtk xml string)? >> >> On Thu, Jul 28, 2011 at 4:07 PM, Xiaoping Chen wrote: >>> Hello, >>> >>> I am creating a client-server application. The server will be >>> Java-based, running in Linux and the client is C++-based, running in >>> Windows. >>> >>> The server will map our internal data into the VTK objects and >>> serialized them into the xml strings and then send to the client. >>> >>> I am able to do this in C++ but not able to do it in VTK Java wrapper. >>> ?vtkXMLPolyDataWriter allows me to serialize the vtk object and save >>> it to a file but NOT allow me to turn it into a xml string. >>> >>> Please help. >>> >>> Eric >>> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers >> > From linxweil at irmb.tu-bs.de Mon Aug 8 17:59:19 2011 From: linxweil at irmb.tu-bs.de (Jan Linxweiler) Date: Mon, 8 Aug 2011 23:59:19 +0200 Subject: [vtkusers] vtkES for iOS devs In-Reply-To: References: Message-ID: Nix, thank you for your answer. I'm really looking forward to it!! Best, Jan On 08.08.2011, at 19:23, Nikhil Shetty wrote: > Hi Jan, > > vtkES is a little premature at this stage and is actively developed inside Kitware. So to answer your question it is not currently public but is intended to be publicaly available in the future. > > -nix > > > On Mon, Aug 8, 2011 at 6:33 AM, Jan Linxweiler wrote: > Hi all, > > in the quarterly Kitware source I'm reading about vtkES to run vtk on iOS devices but I could not find anything else about vtkES on the web. > My question is if vtkES is already available or will be available to the public? > > > Best, > > Jannis > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Aug 8 18:25:10 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 8 Aug 2011 16:25:10 -0600 Subject: [vtkusers] VTK&OpenCV In-Reply-To: References: <1312651331111-4673083.post@n5.nabble.com> Message-ID: I'm not 100% sure what you are looking for, but I'm guessing that you want to set the camera's view matrix directly. Though I don't know why SetViewTransformMatrix is not working for you, here is the way that I would do it: Any 3x3 camera matrix (if it is an orthogonal matrix) can be created by setting the Position, FocalPoint, and ViewUp of the camera: 1) First, choose the camera position "p" to be whatever you need. 2) Extract the 3rd row of your matrix into a vector (call it vz). Set the camera focal point f to: f = p - d*vz (where d is an arbitrary positive distance) 3) Extract the 2nd row of your matrix into a vector (call it vy). Set the camera ViewUp to vy. After taking the above steps, the 3x3 portion of the view transform matrix will be the same as your original 3x3 matrix. For more details on the computation, look at the cxx code for: vtkPerspectiveTransform::SetupCamera(). - David On Sat, Aug 6, 2011 at 3:15 PM, Elvis Chen wrote: > I posted the exact question a few weeks back but did not get any reply.? I > would also appreciate an answer to this. > > Thanks > > On 2011-08-06 1:22 PM, "tenshi8x" wrote: >> >> ood evening, I surfed the Internet for a long time without finding a >> solution. >> I have a 3x3 intrinsic parameter matrix obtained through calibration in >> OpenCV; matrix values are all in pixel. >> I need to set a vtkCamera with those intrinsic parameters, but I couldn't >> find the right way to do it, even after trying with SetUserViewTransform >> or >> similar. >> I'm using OpenGL as graphics library in VTK, and if possible I'd like to >> change OpenGL camera coordinate system with another one rotated by 180? >> around y-axis, i.e. camera z-axis must point outward view plane toward the >> object to visualize. >> >> I tried to follow these instructions: >> >> http://opencv.willowgarage.com/wiki/Posit >> >> and even these: >> >> http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=211014 >> >> but none seem to work. >> >> Every help will be appreciated. >> >> Have a nice day. >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/VTK-OpenCV-tp4673083p4673083.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://www.vtk.org/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > From doyoungchang at gmail.com Mon Aug 8 18:44:31 2011 From: doyoungchang at gmail.com (louis10th) Date: Mon, 8 Aug 2011 15:44:31 -0700 (PDT) Subject: [vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files Message-ID: <1312843471209-4680076.post@n5.nabble.com> Dear all: I am trying to import stl files -> perform Boolean operations -> calculate volume of final mesh I've tried using the "Boolean Operations on Surfaces in VTK Without External Libraries" http://www.insight-journal.org/browse/publication/797 but have failed. Does this work on arbitrary stl files or do I have to find a different method? Also, after the Boolean, what will be the best way to evaluate the volume? Thanks! Doyoung -------------------------------------------- vtkSTLReader *volumeReader = vtkSTLReader::New(); volumeReader->SetFileName("test.stl"); vtkSTLReader *volumeReader2 = vtkSTLReader::New(); volumeReader2->SetFileName("test2.stl"); vtkSmartPointer boolFilter = vtkSmartPointer::New(); boolFilter->SetOperation( 0 ); boolFilter->SetInputConnection( 0, volumeReader->GetOutputPort() ); boolFilter->SetInputConnection( 1, volumeReader2->GetOutputPort() ); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection( boolFilter->GetOutputPort( 0 ) ); mapper->ScalarVisibilityOff(); vtkActor *actor = vtkActor::New(); actor->SetMapper( mapper ); renderer->AddActor( actor ); actor->Delete(); volumeReader->Delete(); volumeReader2->Delete(); renWin->Render(); renWinInteractor->Start(); -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-Boolean-Operations-on-Surfaces-on-arbitrary-mesh-stl-files-tp4680076p4680076.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Mon Aug 8 18:48:53 2011 From: daviddoria at gmail.com (David Doria) Date: Mon, 8 Aug 2011 18:48:53 -0400 Subject: [vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files In-Reply-To: <1312843471209-4680076.post@n5.nabble.com> References: <1312843471209-4680076.post@n5.nabble.com> Message-ID: On Mon, Aug 8, 2011 at 6:44 PM, louis10th wrote: > Dear all: > I am trying to import stl files ?-> perform Boolean operations -> calculate > volume of final mesh > > I've tried using the "Boolean Operations on Surfaces in VTK Without External > Libraries" > http://www.insight-journal.org/browse/publication/797 > > but have failed. Does this work on arbitrary stl files or do I have to find > a different method? > > Also, after the Boolean, what will be the best way to evaluate the volume? > > Thanks! > > Doyoung Once you use the vtkSTLReader, the problem becomes boolean operations on a vtkPolyData, nothing to do with STL anymore. The first thing I would do is read your file and then immediately write it with vtkXMLPolyData writer and load that file in Paraview and see if it looks reasonable. Also, what do you mean "you have failed"? Are there compiler errors? Run time errors? Incorrect results? etc. David From member at linkedin.com Mon Aug 8 21:10:49 2011 From: member at linkedin.com (Alessandro Martini via LinkedIn) Date: Tue, 9 Aug 2011 01:10:49 +0000 (UTC) Subject: [vtkusers] Invitation to connect on LinkedIn Message-ID: <1704978037.6708079.1312852249665.JavaMail.app@ela4-app0129.prod> LinkedIn ------------ Alessandro Martini requested to add you as a connection on LinkedIn: ------------------------------------------ Joanna, I'd like to add you to my professional network on LinkedIn. - Alessandro Accept invitation from Alessandro Martini http://www.linkedin.com/e/-bcyjky-gr46bz28-17/XDTLKfO4428v7fx0ujOGVFjew7H/blk/I3019430028_2/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYOnPwOc30Pd3ANc3d9bQsSpR16e7FpbPkNd3oMd3kVcPcLrCBxbOYWrSlI/EML_comm_afe/ View invitation from Alessandro Martini http://www.linkedin.com/e/-bcyjky-gr46bz28-17/XDTLKfO4428v7fx0ujOGVFjew7H/blk/I3019430028_2/39ve38Mc3cQej4McQALqnpPbOYWrSlI/svi/ ------------------------------------------ Why might connecting with Alessandro Martini be a good idea? People Alessandro Martini knows can discover your profile: Connecting to Alessandro Martini will attract the attention of LinkedIn users. See who's been viewing your profile: http://www.linkedin.com/e/-bcyjky-gr46bz28-17/wvp/inv18_wvmp/ -- (c) 2011, LinkedIn Corporation -------------- next part -------------- An HTML attachment was scrubbed... URL: From cquammen at cs.unc.edu Mon Aug 8 22:18:26 2011 From: cquammen at cs.unc.edu (Cory Quammen) Date: Mon, 8 Aug 2011 22:18:26 -0400 Subject: [vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files In-Reply-To: <1312843471209-4680076.post@n5.nabble.com> References: <1312843471209-4680076.post@n5.nabble.com> Message-ID: The boolean operations filters only work on triangle meshes. If your STL files do not contain triangle meshes, make sure to put a vtkTriangleFilter between the STL reader and the boolean operations filter. Cory On Mon, Aug 8, 2011 at 6:44 PM, louis10th wrote: > Dear all: > I am trying to import stl files ?-> perform Boolean operations -> calculate > volume of final mesh > > I've tried using the "Boolean Operations on Surfaces in VTK Without External > Libraries" > http://www.insight-journal.org/browse/publication/797 > > but have failed. Does this work on arbitrary stl files or do I have to find > a different method? > > Also, after the Boolean, what will be the best way to evaluate the volume? > > Thanks! > > Doyoung > > > > -------------------------------------------- > > > vtkSTLReader *volumeReader = vtkSTLReader::New(); > ? ? ? ? ? ? ? ?volumeReader->SetFileName("test.stl"); > vtkSTLReader *volumeReader2 = vtkSTLReader::New(); > ? ? ? ? ? ? ? ?volumeReader2->SetFileName("test2.stl"); > > vtkSmartPointer boolFilter = > ? ?vtkSmartPointer::New(); > ?boolFilter->SetOperation( 0 ); > ?boolFilter->SetInputConnection( 0, volumeReader->GetOutputPort() ); > ?boolFilter->SetInputConnection( 1, volumeReader2->GetOutputPort() ); > > ?vtkSmartPointer mapper = > ? ?vtkSmartPointer::New(); > ?mapper->SetInputConnection( boolFilter->GetOutputPort( 0 ) ); > ?mapper->ScalarVisibilityOff(); > > ?vtkActor *actor = vtkActor::New(); > ?actor->SetMapper( mapper ); > ? ? ? ?renderer->AddActor( actor ); > ? ? ? ?actor->Delete(); > > ? ? ? ?volumeReader->Delete(); > ? ? ? ?volumeReader2->Delete(); > ?renWin->Render(); > ?renWinInteractor->Start(); > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Using-Boolean-Operations-on-Surfaces-on-arbitrary-mesh-stl-files-tp4680076p4680076.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://www.vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Research Associate Department of Computer Science The University of North Carolina at Chapel Hill From luoyx08 at gmail.com Mon Aug 8 23:01:30 2011 From: luoyx08 at gmail.com (luoyx) Date: Mon, 8 Aug 2011 20:01:30 -0700 (PDT) Subject: [vtkusers] how to export a ply file with color infomation In-Reply-To: References: <1312774595240-4676437.post@n5.nabble.com> Message-ID: <1312858890639-4680555.post@n5.nabble.com> David: The compilable code is shown below . Input file mesh.vtk and output file mesh.ply is attached,too. i just do not know how to add color information to a plywriter. http://vtk.1045678.n5.nabble.com/file/n4680555/mesh.vtk mesh.vtk http://vtk.1045678.n5.nabble.com/file/n4680555/mesh.ply mesh.ply #include "stdafx.h" #include #include #include #include #include #include #include #include #include #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { //Import the vtk file vtkSmartPointer reader=vtkSmartPointer::New(); reader->SetFileName("mesh.vtk"); vtkSmartPointer vtkdata=vtkSmartPointer::New(); vtkdata=reader->GetOutputDataObject(0); vtkIdType size=36; //SIZE OF POINTS (I also do not known how to extract this number from reader) // Set the color infomation vtkSmartPointer color_array=vtkSmartPointer::New(); color_array->SetName("RGB"); color_array->SetNumberOfComponents(3); color_array->SetNumberOfTuples(size); for(vtkIdType j =0; j!=size; ++j) for(vtkIdType i = 0; i!=3; ++i) { color_array->SetValue(j*3+i,255); } // Convert vtk file to ply(add color info) vtkSmartPointer writer=vtkSmartPointer::New(); writer->SetFileName("mesh.ply"); writer->SetInput(vtkdata); writer->SetFileTypeToASCII(); writer->SetColorModeToDefault(); writer->SetArrayName("RGB"); writer->Write(); return 0; } -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-export-a-ply-file-with-color-infomation-tp4676437p4680555.html Sent from the VTK - Users mailing list archive at Nabble.com. From doyoungchang at gmail.com Tue Aug 9 00:08:30 2011 From: doyoungchang at gmail.com (louis10th) Date: Mon, 8 Aug 2011 21:08:30 -0700 (PDT) Subject: [vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files In-Reply-To: References: <1312843471209-4680076.post@n5.nabble.com> Message-ID: <1312862910642-4680669.post@n5.nabble.com> http://vtk.1045678.n5.nabble.com/file/n4680669/test.zip test.zip Thanks for your prompt reply. I do think that they are proper files but will try the vtkTriangleFilter. I have attached the stl files just in case. Thanks again! -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-Boolean-Operations-on-Surfaces-on-arbitrary-mesh-stl-files-tp4680076p4680669.html Sent from the VTK - Users mailing list archive at Nabble.com. From doyoungchang at gmail.com Tue Aug 9 00:13:21 2011 From: doyoungchang at gmail.com (louis10th) Date: Mon, 8 Aug 2011 21:13:21 -0700 (PDT) Subject: [vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files In-Reply-To: References: <1312843471209-4680076.post@n5.nabble.com> Message-ID: <1312863201880-4680676.post@n5.nabble.com> The program compiles with no error :) But when I execute the exe it crashes. I did try the following and the file looks reasonable. I will also try Paraview. Thanks! -------------------- vtkSTLReader *volumeReader = vtkSTLReader::New(); volumeReader->SetFileName("test.stl"); vtkPolyDataMapper *stlMapper=vtkPolyDataMapper::New(); stlMapper->SetInputConnection (volumeReader->GetOutputPort()); vtkLODActor *stlActor=vtkLODActor::New(); stlActor->SetMapper(stlMapper); renderer->AddActor( stlActor ); volumeReader-> Delete(); stlMapper->Delete(); stlActor->Delete(); renWin->Render(); renWinInteractor->Start(); -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-Boolean-Operations-on-Surfaces-on-arbitrary-mesh-stl-files-tp4680076p4680676.html Sent from the VTK - Users mailing list archive at Nabble.com. From amich.randa at gmail.com Tue Aug 9 03:59:44 2011 From: amich.randa at gmail.com (raimi87) Date: Tue, 9 Aug 2011 00:59:44 -0700 (PDT) Subject: [vtkusers] icp prblem compile In-Reply-To: <1312813255466-4677880.post@n5.nabble.com> References: <1312812428981-4677832.post@n5.nabble.com> <1312812781416-4677856.post@n5.nabble.com> <1312813255466-4677880.post@n5.nabble.com> Message-ID: <1312876784434-4681137.post@n5.nabble.com> hi ! could any one send me a sample of files which work with the ICP !! How can i know if the point are aligned or not ? -- View this message in context: http://vtk.1045678.n5.nabble.com/icp-prblem-compile-tp4677832p4681137.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Tue Aug 9 08:17:27 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 9 Aug 2011 08:17:27 -0400 Subject: [vtkusers] how to export a ply file with color infomation In-Reply-To: <1312858890639-4680555.post@n5.nabble.com> References: <1312774595240-4676437.post@n5.nabble.com> <1312858890639-4680555.post@n5.nabble.com> Message-ID: See some inline comments: > ? ? ? ? vtkSmartPointer > reader=vtkSmartPointer::New(); > ? ? ? ? reader->SetFileName("mesh.vtk"); Just FYI, .vtk is a legacy format. It seems like you have data already in that form so there may be nothing you can do about it now, but the preferred way would be to use .vtp files and vtkXMLPolyDataReader. > ? ? ? ? vtkSmartPointer > vtkdata=vtkSmartPointer::New(); > ? ? ? ? vtkdata=reader->GetOutputDataObject(0); Two things here. 1) I believe you should know the type more specifically, that is vtkPolyData instead of vtkDataObject, unless .vtk files work differently than .vtp files. 2) I also believe you are creating memory with New() and the immediately pointing the pointer somewhere else. You should just use: vtkPolyData* vtkdata = reader->GetOutput(); > ? ? ? ? vtkIdType ?size=36; //SIZE OF POINTS (I also do not known how to extract > this number from reader) vtkIdType ?size = vtkdata->GetNumberOfPoints(); > ? ? ? ? // Set the color ?infomation > ? ? ? ?vtkSmartPointer > color_array=vtkSmartPointer::New(); > ? ? ? ?color_array->SetName("RGB"); > ? ? ? ?color_array->SetNumberOfComponents(3); > ? ? ? ?color_array->SetNumberOfTuples(size); > > ? ? for(vtkIdType j =0; j!=size; ++j) > ? ? ? ? ? for(vtkIdType i = 0; i!=3; ++i) > ? ? ? ? { > ? ? ? ? ? ? ? ? color_array->SetValue(j*3+i,255); > ? ? ? ? } It looks like the color array is setup properly. > ? ? ? ?// Convert vtk file to ply(add color info) > ? ? ? ?vtkSmartPointer writer=vtkSmartPointer::New(); > ? ? ? ?writer->SetFileName("mesh.ply"); > ? ? ? ?writer->SetInput(vtkdata); > ? ? ? ?writer->SetFileTypeToASCII(); > ? ? ? ?writer->SetColorModeToDefault(); > ? ? ? ?writer->SetArrayName("RGB"); > ? ? ? ?writer->Write(); I have never seen it done like this. Typically the colors are added to the vtkPolyData, and the writer takes care of everything with only a SetInput call to pass the vtkPolyData. You can setup the polydata like this: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints David From amich.randa at gmail.com Tue Aug 9 08:51:49 2011 From: amich.randa at gmail.com (raimi87) Date: Tue, 9 Aug 2011 05:51:49 -0700 (PDT) Subject: [vtkusers] ICP and parametric surface Message-ID: <1312894309920-4681918.post@n5.nabble.com> Hi ! how can i disolay the ICP algo with a parametric surface ? -- View this message in context: http://vtk.1045678.n5.nabble.com/ICP-and-parametric-surface-tp4681918p4681918.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Tue Aug 9 08:57:04 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 9 Aug 2011 08:57:04 -0400 Subject: [vtkusers] ICP and parametric surface In-Reply-To: <1312894309920-4681918.post@n5.nabble.com> References: <1312894309920-4681918.post@n5.nabble.com> Message-ID: On Tue, Aug 9, 2011 at 8:51 AM, raimi87 wrote: > Hi ! > how can i disolay the ICP algo with a parametric surface ? As far as I know, you would have to convert the parametric surface into a discrete representation (sample it, obtaining a point cloud) and then apply ICP as normal. David From amich.randa at gmail.com Tue Aug 9 09:02:47 2011 From: amich.randa at gmail.com (raimi87) Date: Tue, 9 Aug 2011 06:02:47 -0700 (PDT) Subject: [vtkusers] ICP and parametric surface In-Reply-To: References: <1312894309920-4681918.post@n5.nabble.com> Message-ID: <1312894967228-4681942.post@n5.nabble.com> actually i have the cloud point how can i use it ? sorry I'm beginner with vtk -- View this message in context: http://vtk.1045678.n5.nabble.com/ICP-and-parametric-surface-tp4681918p4681942.html Sent from the VTK - Users mailing list archive at Nabble.com. From amich.randa at gmail.com Tue Aug 9 09:54:48 2011 From: amich.randa at gmail.com (raimi87) Date: Tue, 9 Aug 2011 06:54:48 -0700 (PDT) Subject: [vtkusers] ICP and parametric surface In-Reply-To: <1312894967228-4681942.post@n5.nabble.com> References: <1312894309920-4681918.post@n5.nabble.com> <1312894967228-4681942.post@n5.nabble.com> Message-ID: <1312898088208-4682104.post@n5.nabble.com> hi make this little code but i have some problem after build suuceed but debug start working and then "nuage.exe" stopped working #include #include "vtkActor.h" #include "vtkCellArray.h" #include "vtkDoubleArray.h" #include "vtkFloatArray.h" #include "vtkIntArray.h" #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkPointSet.h" #include "vtkPolyData.h" #include "vtkPolyDataMapper.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" #include "vtkDelaunay3D.h" #include "vtkDataSetMapper.h" #include "vtkOutlineFilter.h" #include "vtkProperty.h" #include "vtkIterativeClosestPointTransform.h" #include "vtkLandmarkTransform.h" #include "vtkTransformPolyDataFilter.h" #include "vtkMaskPoints.h" using namespace std; int main(int/*argc*/, char ** /*argv*/) { // Read some 3d points. FILE *datei = fopen("bs000_N_N_1mesh1remaillage.obj","r"); vtkDelaunay3D* del_1 = vtkDelaunay3D::New(); vtkPolyData *polydata_1 = vtkPolyData::New(); vtkPoints *points = vtkPoints::New(); vtkDelaunay3D* del_2 = vtkDelaunay3D::New(); vtkPolyData *polydata_2 = vtkPolyData::New(); vtkPoints *points_2 = vtkPoints::New(); int iCounter = 0; while (!feof(datei)) { fprintf(stdout,"reading points: %i\r", iCounter); char a ; float x, y, z; fscanf(datei,"%c %f %f %f \n",&a , &x, &y, &z); if (a == 'v') points->InsertPoint(iCounter++, x, y, z); //cout<<"x= "<<x<<"y= "<<y<<"z= "<<z<<endl; } polydata_1->SetPoints(points); fclose(datei); fprintf(stdout,"\n\n"); int num_of_points_1 = polydata_1->GetPoints()->GetNumberOfPoints(); cout << "in all, num of points in cloud 1 is " << num_of_points_1 << endl; del_1->SetInput((vtkPointSet*)polydata_1); del_1->SetTolerance(0.01); del_1->Update(); del_1->SetAlpha(0); FILE *datei2 = fopen("bs015_N_N_0mesh1.obj","r"); int iCounter2 = 0; while (!feof(datei2)) { fprintf(stdout,"reading points: %i\r", iCounter); char a ; float x, y, z; fscanf(datei,"%c %f %f %f \n",&a , &x, &y, &z); if (a == 'v') points_2->InsertPoint(iCounter2++, x, y, z); //cout<<"x= "<<x<<"y= "<<y<<"z= "<<z<<endl; } polydata_2->SetPoints(points_2); fclose(datei2); fprintf(stdout,"\n\n"); int num_of_points_2 = polydata_1->GetPoints()->GetNumberOfPoints(); cout << "in all, num of points in cloud 1 is " << num_of_points_2 << endl; del_2->SetInput((vtkPointSet*)polydata_2); del_2->SetTolerance(0.01); del_2->Update(); del_2->SetAlpha(0); vtkIterativeClosestPointTransform *_icpt = vtkIterativeClosestPointTransform::New(); _icpt->GetLandmarkTransform()->SetModeToRigidBody(); _icpt->StartByMatchingCentroidsOn(); _icpt->SetMaximumNumberOfIterations(10.); vtkMaskPoints *maskPoints1 = vtkMaskPoints::New(); maskPoints1->SetInput(polydata_1); maskPoints1->SetMaximumNumberOfPoints(402); maskPoints1->GenerateVerticesOn(); _icpt->SetSource((vtkPolyData *)maskPoints1); cout << "Calling icpt" << endl; vtkMaskPoints *maskPoints2 = vtkMaskPoints::New(); maskPoints2->SetInput(polydata_2); maskPoints2->SetMaximumNumberOfPoints(6034); maskPoints2->GenerateVerticesOn(); _icpt->SetSource((vtkPolyData *)maskPoints2); cout << "Calling icpt" << endl; _icpt->SetTarget((vtkPolyData *)maskPoints2); _icpt->SetMeanDistanceModeToAbsoluteValue(); _icpt->Update(); cout << " Mean distance is " << _icpt->GetMeanDistance() << endl; cout << "done icpt" << endl; vtkTransformPolyDataFilter* transformer = vtkTransformPolyDataFilter::New(); transformer->SetTransform(_icpt); transformer->SetInput((vtkPolyData*)maskPoints1); transformer->Update(); //transformer->PrintSelf(std::cout,0); vtkDataSetMapper *surface_mapper_1 = vtkDataSetMapper::New(); surface_mapper_1->SetInput((vtkDataSet*)maskPoints1->GetOutput()); vtkActor* actor_1 = vtkActor::New(); actor_1->SetMapper(surface_mapper_1); actor_1->GetProperty()->SetRepresentationToPoints(); actor_1->GetProperty()->SetColor(1,1,1); vtkRenderer* ren = vtkRenderer::New(); ren->AddActor(actor_1); vtkRenderWindow* renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren); vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); iren->Initialize(); iren->Start(); return 0; } what's wrong with my project -- View this message in context: http://vtk.1045678.n5.nabble.com/ICP-and-parametric-surface-tp4681918p4682104.html Sent from the VTK - Users mailing list archive at Nabble.com. From dbromley at uw.edu Tue Aug 9 14:24:50 2011 From: dbromley at uw.edu (Dennis N Bromley) Date: Tue, 9 Aug 2011 11:24:50 -0700 Subject: [vtkusers] Picking help: how do I map from picked prop3d back to graph node or vertex? Message-ID: Hi All, I hope this is a newbie question. I've searched the archives so I apologize if I missed something. I have a pipeline that renders a graph using spheres for vertices and the tube filter for the edges. I would like to be able to use a rubber band interactor and select a few nodes or edges, map back to the original nodes and edges in my graph, and do something intelligent with those nodes and edges. Pretty normal graph selection scenario, I would expect. I would LOVE it if I'm just being an idiot. :) Also, any comments on my VTK code are very much appreciated. I'm a total VTK newbie. I am currently having these problems. All help is really, really appreciated. 1. My interactor is obviously doing *something* because it draws the rubber band line, but I don't get a selection callback from rubber banding nor does it color the selected nodes (I do get a callback when I press 'p' in the render window, though.) So something is not quite right. 2. Assuming I can get that to work, how do I map back from one of the two actors (vertex actor with sphere source glyph and edges with a tube filter) back to the original nodes and edges? Thanks everyone- -denny- ------------------------------------- --Code - I hope someone finds this useful as well as can find my bug. :) --P.S. This is in C# for the Activiz VTK port, but all of the examples I've seen port perfectly. So if you're not a C# person, feel free to squint your eyes and pretend it's python. :) ------------------------------------- vtkMutableDirectedGraph g; vtkGraphLayout layout; RenderWindowControl mRenWinCtrl; //initial load at the beginning of time. void Form2_Load(object sender, EventArgs e) { layout = vtkGraphLayout.New(); var strategy = vtkForceDirectedLayoutStrategy.New(); strategy.ThreeDimensionalLayoutOn(); layout.SetLayoutStrategy(strategy); RefreshGraph(); layout.SetInput(g); layout.Modified(); layout.Update(); SetupMyPipeline(); } //this function just regenerates a new random graph when a button is pressed. private void mCreateGraphButton_Click(object sender, EventArgs e) { RefreshGraph(); layout.SetInput(g); layout.Modified(); layout.Update(); mRenWinCtrl.RenderWindow.Modified(); mRenWinCtrl.RenderWindow.Render(); } private void RefreshGraph() { /**************************************************************/ g = new vtkMutableDirectedGraph(); List ids = new List(); for (int i = 0; i < 100; i++) { long id = g.AddVertex(); ids.Add(id); } Random rand = new Random(); long edgeCounter = 0; //randomly link up some vertices to make the topology interesting foreach (long id1 in ids) { foreach (long id2 in ids) { if (id1 != id2 && rand.NextDouble() < .01) { g.AddGraphEdge(id1, id2); edgeCounter++; } } } } private void SetupMyPipeline() { /////////////////////////////// //edge handling var edge_geom = vtkGraphToPolyData.New(); edge_geom.SetInputConnection(layout.GetOutputPort()); edge_geom.EdgeGlyphOutputOn(); edge_geom.SetEdgeGlyphPosition(.5); edge_geom.Update(); var tube_filter = vtkTubeFilter.New(); tube_filter.SetInput(edge_geom.GetOutput()); tube_filter.SetRadius(.01); tube_filter.SetNumberOfSides(10); var edge_mapper = vtkPolyDataMapper.New(); edge_mapper.SetInput(tube_filter.GetOutput()); edge_mapper.Update(); var edge_actor = vtkActor.New(); edge_actor.SetMapper(edge_mapper); edge_actor.GetProperty().SetColor(.4, .4, .6); ////////////////////////////////////////////// //////////////////////////////////// //vertex handling var vertex_geom = vtkGraphToPoints.New(); vertex_geom.SetInputConnection(layout.GetOutputPort()); var vertex_sphere = vtkSphereSource.New(); vertex_sphere.SetRadius(.025); var vertex_glyph = vtkGlyph3D.New(); vertex_glyph.SetInputConnection(vertex_geom.GetOutputPort()); vertex_glyph.SetSource(vertex_sphere.GetOutput()); var vertex_mapper = vtkPolyDataMapper.New(); vertex_mapper.SetInputConnection(vertex_glyph.GetOutputPort()); var vertex_actor = vtkActor.New(); vertex_actor.SetMapper(vertex_mapper); vertex_actor.GetProperty().SetColor(0, 0, 1); /////////////////////////////////////////////////// //render it var ren = vtkRenderer.New(); ren.AddActor(edge_actor); ren.AddActor(vertex_actor); ren.ResetCamera(); mRenWinCtrl.RenderWindow.AddRenderer(ren); //picking var picker = vtkAreaPicker.New(); picker.PickEvt += new vtkObject.vtkObjectEventHandler(picker_PickEvt); picker.AddPickList(edge_actor); picker.AddPickList(vertex_actor); mRenWinCtrl.RenderWindow.GetInteractor().SetPicker(picker); //interactor var interactorStyle = vtkInteractorStyleRubberBand3D.New(); interactorStyle.SetPickColor(.5, .1, .9); mRenWinCtrl.RenderWindow.GetInteractor().SetInteractorStyle(interactorStyle); mRenWinCtrl.RenderWindow.GetInteractor().SetRenderWindow(mRenWinCtrl.RenderWindow); mRenWinCtrl.RenderWindow.GetInteractor().Start(); } //this never gets called except when I press 'p' in the render window. //But it never gets called via the rubber banding. void picker_PickEvt(vtkObject sender, vtkObjectEventArgs e) { vtkAreaPicker picker = sender as vtkAreaPicker; vtkProp3DCollection collection = picker.GetProp3Ds(); int num = collection.GetNumberOfItems(); for (int i = 0; i < num; i++) { var prop = collection.GetNextProp3D(); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.kilgus at dkfz-heidelberg.de Wed Aug 10 04:32:48 2011 From: t.kilgus at dkfz-heidelberg.de (Thomas Kilgus) Date: Wed, 10 Aug 2011 10:32:48 +0200 Subject: [vtkusers] lut->SetAlphaRange and lut->SetRange do not work on RGBA images? Message-ID: <4E424230.7020701@dkfz-heidelberg.de> Hi everyone, My problem is that the methods SetAlphaRange and SetRange do not have any effect on RGBA images. SetRange works well on gray scale images. I use the following pipeline to render arbitrary images: Load the image -> Reslice it via vtkImageReslice -> Apply some properties with a lookuptable like Window/Level, opacity, etc. -> render the texture with a vtkPolyDataMapper. Here comes the code (which I think is important for my question): vtkSmartPointer lut = vtkSmartPointer::New(); //built a default lookuptable lut->SetSaturationRange( 0.0, 0.0 ); lut->SetHueRange( 0.0, 0.0 ); lut->SetValueRange( 0.0, 1.0 ); lut->Build(); //map all black values to transparent lut->SetTableValue(0, 0.0, 0.0, 0.0, 0.0); lut->SetRange(someValue, someValue); //someValue between 0 and 255 lut->SetAlphaRange(someOtherValue, someOtherValue); //someOtherValue between 0 and 1 [...] //load the image vtkSmartPointer texture = vtkSmartPointer::New(); texture->SetLookupTable(lut); texture->SetInput(image); vtkSmartPointer plane = vtkSmartPointer::New(); [...] //generate a plane to render the texture on vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConection(plane->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->SetTexture(texture); [...] //pass the actor to the renderer Does anyone have an idea what could be wrong? Again: the lut is working fine for grayscale images, but not for RGBA images... best regards Thomas From jothybasu at gmail.com Wed Aug 10 05:48:19 2011 From: jothybasu at gmail.com (Jothy) Date: Wed, 10 Aug 2011 10:48:19 +0100 Subject: [vtkusers] vtkChartXY example in wiki Message-ID: Hi all, Unless I add view->GetRenderWindow()->SetMultiSamples(0); this example doesn't work.(http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot#Chart.cxx) This this an expected or buggy behaviour. I have added this line in the example. Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.affolter at ntb.ch Wed Aug 10 06:25:07 2011 From: martin.affolter at ntb.ch (Affolter Martin) Date: Wed, 10 Aug 2011 12:25:07 +0200 Subject: [vtkusers] perspective image transformation Message-ID: <2BB5E0591AA3D84EBA34CE6DC1F83D51F55A1F041F@team-server.ntb.ch> Hi vtk-users, I've been reading and experimenting with textures and how to map them on planar surfaces. The goal is to map a certain (sub-)area (e.g. quadrangle) from an image onto a planar polygon (also quadrangle), which I achieved so far by defining the normalized textureCoords for each point in the polygon. The problem I'm facing is that the resulting texture appears distorted. So here my two questions: 1. is there a way to apply a perspective image-transformation (conserving straight lines) before using the image for texturing? This way I imagine the distortion should disappear because the subimage and the polygon would have the same shape and ratio. (analogy in OpenCV: warpImage(...)) 2. is there a class that calculates the perspective transformation matrix (3x3) from corresponding image-points? (analogy in OpenCV: getPerspectiveTransform(...)) Any help or alternative suggestions are welcome. Thanks, Martin PS: I've attached my result. Not sure if it will come through... -------------- next part -------------- A non-text attachment was scrubbed... Name: distorted_texture.jpg Type: image/jpeg Size: 89709 bytes Desc: distorted_texture.jpg URL: From amich.randa at gmail.com Wed Aug 10 07:46:00 2011 From: amich.randa at gmail.com (raimi87) Date: Wed, 10 Aug 2011 04:46:00 -0700 (PDT) Subject: [vtkusers] how to create cmakelist.txt Message-ID: <1312976760470-4685532.post@n5.nabble.com> hi i need to creat cmakelist.txt to my project as source file i have : class.cxx and class.h -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-create-cmakelist-txt-tp4685532p4685532.html Sent from the VTK - Users mailing list archive at Nabble.com. From kmudrovcic at gmail.com Wed Aug 10 08:03:02 2011 From: kmudrovcic at gmail.com (kmudrovcic) Date: Wed, 10 Aug 2011 05:03:02 -0700 (PDT) Subject: [vtkusers] GraphicsCxxTests.exe has stopped working Message-ID: <1312977782681-4685584.post@n5.nabble.com> Hi, I compiled VTK using CMake 2.8.5 for Visual Studio 2010 without shared libs. When i build ALL_BUILD and INSTALL in Release mode in Visual Studio and try to build RUN_TESTS, tests crash on 59. test (Mace) with message: GraphicsCxxTests.exe has stopped working. I don't know what seems to be a problem. Also, lot of examples give unhandled exceptions when over. Is there any tutorial of how to build VTK in Debug mode and use it in MFC application, because most of tutorials i've used didn't help. -- View this message in context: http://vtk.1045678.n5.nabble.com/GraphicsCxxTests-exe-has-stopped-working-tp4685584p4685584.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Wed Aug 10 08:09:29 2011 From: daviddoria at gmail.com (David Doria) Date: Wed, 10 Aug 2011 08:09:29 -0400 Subject: [vtkusers] how to export a ply file with color infomation In-Reply-To: References: <1312774595240-4676437.post@n5.nabble.com> <1312858890639-4680555.post@n5.nabble.com> Message-ID: Please keep the discussion on the mailing list. > //Import the vtk file > vtkSmartPointer > reader=vtkSmartPointer::New(); > reader->SetFileName("mesh.vtk"); > vtkPolyData* vtkdata = reader->GetOutput(); > //vtkdata->GetNumberOfPoints(); > > ? ? ? ? ?//the function vtkdata->GetNumberofPoints() returns 0 instead of > the proper number 36 here You need to call reader->Update() before the GetNumberOfPoints() call. > use the writer to export .ply file,but color info is missing in the result. Sorry, I have not used PLY enough to know what could be wrong wrong. However, I have verified that what we are doing here does not seem to produce colors in the output file. David From daviddoria at gmail.com Wed Aug 10 08:11:34 2011 From: daviddoria at gmail.com (David Doria) Date: Wed, 10 Aug 2011 08:11:34 -0400 Subject: [vtkusers] how to create cmakelist.txt In-Reply-To: <1312976760470-4685532.post@n5.nabble.com> References: <1312976760470-4685532.post@n5.nabble.com> Message-ID: On Wed, Aug 10, 2011 at 7:46 AM, raimi87 wrote: > hi i need to creat cmakelist.txt to my project > as source file i have : class.cxx and class.h Every example on the wiki comes with a CMakeLists.txt file: http://www.vtk.org/Wiki/VTK/Examples/Cxx/SimpleOperations/DistancePointToLine David From david.gobbi at gmail.com Wed Aug 10 08:22:53 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 10 Aug 2011 06:22:53 -0600 Subject: [vtkusers] perspective image transformation In-Reply-To: <2BB5E0591AA3D84EBA34CE6DC1F83D51F55A1F041F@team-server.ntb.ch> References: <2BB5E0591AA3D84EBA34CE6DC1F83D51F55A1F041F@team-server.ntb.ch> Message-ID: Hi Martin, You can reduce the distortion in the texture mapping by subdividing the polygons. The finer the subdivision, the better the result. (For more info see e.g. the Wikipedia page on texture mapping). To warp an image before texture mapping, you can use vtkImageReslice and vtkPerspectiveTransform. VTK always uses 4x4 matrices for transformations, so you would have to insert 0010 as the third row and column in order to create a 4x4 matrix from your 3x3 matrix. There is nothing in VTK (as far as I know) to automatically compute the perspective transformation from the two quadrangles. - David On Wed, Aug 10, 2011 at 4:25 AM, Affolter Martin wrote: > Hi vtk-users, > > I've been reading and experimenting with textures and how to map them on planar surfaces. The goal is to map a certain (sub-)area (e.g. quadrangle) from an image onto a planar polygon (also quadrangle), which I achieved so far by defining the normalized textureCoords for each point in the polygon. The problem I'm facing is that the resulting texture appears distorted. So here my two questions: > > 1. is there a way to apply a perspective image-transformation (conserving straight lines) before using the image for texturing? This way I imagine the distortion should disappear because the subimage and the polygon would have the same shape and ratio. (analogy in OpenCV: warpImage(...)) > > 2. is there a class that calculates the perspective transformation matrix (3x3) from corresponding image-points? (analogy in OpenCV: getPerspectiveTransform(...)) > > Any help or alternative suggestions are welcome. > > Thanks, > Martin > > PS: I've attached my result. Not sure if it will come through... From amich.randa at gmail.com Wed Aug 10 08:25:01 2011 From: amich.randa at gmail.com (raimi87) Date: Wed, 10 Aug 2011 05:25:01 -0700 (PDT) Subject: [vtkusers] how to create cmakelist.txt In-Reply-To: References: <1312976760470-4685532.post@n5.nabble.com> Message-ID: <1312979101804-4685631.post@n5.nabble.com> in my case i create a class.h class.cxx and main.cxx how could i create it's cmakelist i don't use an example from VTK/Example.. -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-create-cmakelist-txt-tp4685532p4685631.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Wed Aug 10 08:53:49 2011 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 10 Aug 2011 08:53:49 -0400 Subject: [vtkusers] vtkChartXY example in wiki In-Reply-To: References: Message-ID: Works for me without the SetMultiSamples(). When you say it does not work, what do you mean? BTW: when you edited the example, you deleted vtkChartXY. I'll fix it. On Wed, Aug 10, 2011 at 5:48 AM, Jothy wrote: > Hi all, > > Unless I add > > view->GetRenderWindow()->SetMultiSamples(0); > > this example doesn't work.(http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot#Chart.cxx) > > This this an expected or buggy behaviour. > > I have added this line in the example. > > Thanks > > Jothy > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Aug 10 08:56:54 2011 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 10 Aug 2011 08:56:54 -0400 Subject: [vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files In-Reply-To: <1312863201880-4680676.post@n5.nabble.com> References: <1312843471209-4680076.post@n5.nabble.com> <1312863201880-4680676.post@n5.nabble.com> Message-ID: You probably need to run vtkCleanPolyData on the output of the reader. I think the STL reader creates triangles that each have their own sets of points. On Tue, Aug 9, 2011 at 12:13 AM, louis10th wrote: > The program compiles with no error :) > But when I execute the exe it crashes. > > I did try the following and the file looks reasonable. > I will also try Paraview. > > Thanks! > > -------------------- > > vtkSTLReader *volumeReader = vtkSTLReader::New(); > volumeReader->SetFileName("test.stl"); > > vtkPolyDataMapper *stlMapper=vtkPolyDataMapper::New(); > stlMapper->SetInputConnection (volumeReader->GetOutputPort()); > > vtkLODActor *stlActor=vtkLODActor::New(); > stlActor->SetMapper(stlMapper); > > renderer->AddActor( stlActor ); > > volumeReader-> Delete(); stlMapper->Delete(); stlActor->Delete(); > > renWin->Render(); > renWinInteractor->Start(); > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Using-Boolean-Operations-on-Surfaces-on-arbitrary-mesh-stl-files-tp4680076p4680676.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmilano at gmail.com Wed Aug 10 09:41:28 2011 From: fmilano at gmail.com (Federico Milano) Date: Wed, 10 Aug 2011 10:41:28 -0300 Subject: [vtkusers] Maximizing a QVTKWidget control Message-ID: Hi. I'm using QVTKWidget to interface Qt and VTK. The problem is that when I maximize the Qt windows, the QVTKWidget does not change its size. I've tried many combinations of size policies, but combinations that work fine for other controls do not work for this one. Do you have any hint or suggestion? Thanks in advance, Federico -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Wed Aug 10 09:45:02 2011 From: drescherjm at gmail.com (John Drescher) Date: Wed, 10 Aug 2011 09:45:02 -0400 Subject: [vtkusers] how to create cmakelist.txt In-Reply-To: <1312979101804-4685631.post@n5.nabble.com> References: <1312976760470-4685532.post@n5.nabble.com> <1312979101804-4685631.post@n5.nabble.com> Message-ID: On Wed, Aug 10, 2011 at 8:25 AM, raimi87 wrote: > in my case i create a class.h class.cxx and main.cxx how could i create it's > cmakelist > i don't use an example from VTK/Example.. I would look at examples and read the available documentation. Also you may want to purchase the CMake book. John From jothybasu at gmail.com Wed Aug 10 09:51:20 2011 From: jothybasu at gmail.com (Jothy) Date: Wed, 10 Aug 2011 14:51:20 +0100 Subject: [vtkusers] Maximizing a QVTKWidget control In-Reply-To: References: Message-ID: Have you tried setting the QVTLWidget in a grid layout? Jothy On Wed, Aug 10, 2011 at 2:41 PM, Federico Milano wrote: > Hi. I'm using QVTKWidget to interface Qt and VTK. The problem is that when > I maximize the Qt windows, the QVTKWidget does not change its size. I've > tried many combinations of size policies, but combinations that work fine > for other controls do not work for this one. Do you have any hint or > suggestion? > > Thanks in advance, > > Federico > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cquammen at cs.unc.edu Wed Aug 10 10:09:40 2011 From: cquammen at cs.unc.edu (Cory Quammen) Date: Wed, 10 Aug 2011 10:09:40 -0400 Subject: [vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files In-Reply-To: References: <1312843471209-4680076.post@n5.nabble.com> <1312863201880-4680676.post@n5.nabble.com> Message-ID: On Wed, Aug 10, 2011 at 8:56 AM, Bill Lorensen wrote: > You probably need to run vtkCleanPolyData on the output of the reader. I > think the STL reader creates triangles that each have their own sets of > points. Yes, the triangles in a surface need to be connected so that the inside/outside tests works. This filter won't work on polygon soup. - Cory > > On Tue, Aug 9, 2011 at 12:13 AM, louis10th wrote: >> >> The program compiles with no error :) >> But when I execute the exe it crashes. >> >> I did try the following and the file looks reasonable. >> I will also try Paraview. >> >> Thanks! >> >> -------------------- >> >> ? ? ? ?vtkSTLReader *volumeReader = vtkSTLReader::New(); >> ? ? ? ? ? ? ? ?volumeReader->SetFileName("test.stl"); >> >> ? ? ? ?vtkPolyDataMapper *stlMapper=vtkPolyDataMapper::New(); >> ? ? ? ?stlMapper->SetInputConnection (volumeReader->GetOutputPort()); >> >> ? ? ? ?vtkLODActor *stlActor=vtkLODActor::New(); >> ? ? ? ?stlActor->SetMapper(stlMapper); >> >> ? ? ? ?renderer->AddActor( stlActor ); >> >> ? ? ? ?volumeReader-> Delete(); stlMapper->Delete(); stlActor->Delete(); >> >> ? ? ? ?renWin->Render(); >> ? ? ? ?renWinInteractor->Start(); >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Using-Boolean-Operations-on-Surfaces-on-arbitrary-mesh-stl-files-tp4680076p4680676.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://www.vtk.org/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Cory Quammen Research Associate Department of Computer Science The University of North Carolina at Chapel Hill From cquammen at cs.unc.edu Wed Aug 10 10:17:51 2011 From: cquammen at cs.unc.edu (Cory Quammen) Date: Wed, 10 Aug 2011 10:17:51 -0400 Subject: [vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files In-Reply-To: References: <1312843471209-4680076.post@n5.nabble.com> <1312863201880-4680676.post@n5.nabble.com> Message-ID: Doyoung, I checked your STL files in ParaView, and it looks like it is a fully connected triangle mesh, so I would expect the boolean filter to work. It appears that one object is a translated version of the other object, so there is no overlap. I think the filter works appropriately in this case. I'll see if I can reproduce your error. Thanks, Cory On Wed, Aug 10, 2011 at 10:09 AM, Cory Quammen wrote: > On Wed, Aug 10, 2011 at 8:56 AM, Bill Lorensen wrote: >> You probably need to run vtkCleanPolyData on the output of the reader. I >> think the STL reader creates triangles that each have their own sets of >> points. > > Yes, the triangles in a surface need to be connected so that the > inside/outside tests works. This filter won't work on polygon soup. > > - Cory > >> >> On Tue, Aug 9, 2011 at 12:13 AM, louis10th wrote: >>> >>> The program compiles with no error :) >>> But when I execute the exe it crashes. >>> >>> I did try the following and the file looks reasonable. >>> I will also try Paraview. >>> >>> Thanks! >>> >>> -------------------- >>> >>> ? ? ? ?vtkSTLReader *volumeReader = vtkSTLReader::New(); >>> ? ? ? ? ? ? ? ?volumeReader->SetFileName("test.stl"); >>> >>> ? ? ? ?vtkPolyDataMapper *stlMapper=vtkPolyDataMapper::New(); >>> ? ? ? ?stlMapper->SetInputConnection (volumeReader->GetOutputPort()); >>> >>> ? ? ? ?vtkLODActor *stlActor=vtkLODActor::New(); >>> ? ? ? ?stlActor->SetMapper(stlMapper); >>> >>> ? ? ? ?renderer->AddActor( stlActor ); >>> >>> ? ? ? ?volumeReader-> Delete(); stlMapper->Delete(); stlActor->Delete(); >>> >>> ? ? ? ?renWin->Render(); >>> ? ? ? ?renWinInteractor->Start(); >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://vtk.1045678.n5.nabble.com/Using-Boolean-Operations-on-Surfaces-on-arbitrary-mesh-stl-files-tp4680076p4680676.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://www.vtk.org/mailman/listinfo/vtkusers >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > > > > -- > Cory Quammen > Research Associate > Department of Computer Science > The University of North Carolina at Chapel Hill > -- Cory Quammen Research Associate Department of Computer Science The University of North Carolina at Chapel Hill From xf10036 at hotmail.com Wed Aug 10 10:40:46 2011 From: xf10036 at hotmail.com (Xiaofeng Z) Date: Wed, 10 Aug 2011 10:40:46 -0400 Subject: [vtkusers] Rendering DRR with ROI Message-ID: Hi vtkusers, I'm trying to render a 2D RT image of DRR (digitally reconstructed radiography) along with some 3D mesh representing structures. DRR image is located at the center facing perpendicular to the camera, and the structures can be either in the front or the back of the image plan. When the structure is behind the image, it is cover by the plan hence not shown. My question is: 1. Is it possible to assign a z-order sort of property to the actors so a structure always show regardless it's actual position from the camera, or better yet2. Is there any way to render a 3D image in sort of transparent way so it appears like a radiography on the screen? Thanks! Xiaofeng -------------- next part -------------- An HTML attachment was scrubbed... URL: From doyoungchang at gmail.com Wed Aug 10 10:51:25 2011 From: doyoungchang at gmail.com (louis10th) Date: Wed, 10 Aug 2011 07:51:25 -0700 (PDT) Subject: [vtkusers] Using "Boolean Operations on Surfaces" on arbitrary mesh (stl) files In-Reply-To: References: <1312843471209-4680076.post@n5.nabble.com> <1312863201880-4680676.post@n5.nabble.com> Message-ID: <1312987885475-4686065.post@n5.nabble.com> Thank you everyone. I have solved the problem with the original stl files. I have modified the example file provided as. Thanks again. Doyoung -------------- vtkSTLReader* test1= vtkSTLReader::New(); test1->SetFileName("test1.stl"); vtkSTLReader* test2= vtkSTLReader::New(); test2->SetFileName("test2.stl"); vtkSmartPointer boolFilter = vtkSmartPointer::New(); boolFilter->SetOperation( operation ); boolFilter->SetInputConnection( 0, test1->GetOutputPort() ); boolFilter->SetInputConnection( 1, test2->GetOutputPort() ); -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-Boolean-Operations-on-Surfaces-on-arbitrary-mesh-stl-files-tp4680076p4686065.html Sent from the VTK - Users mailing list archive at Nabble.com. From fmilano at gmail.com Wed Aug 10 11:09:16 2011 From: fmilano at gmail.com (Federico Milano) Date: Wed, 10 Aug 2011 12:09:16 -0300 Subject: [vtkusers] Maximizing a QVTKWidget control In-Reply-To: References: Message-ID: Jothy, It's still not working. As I'm experimenting on the SimpleView example, I'm attaching my SimpleView.ui file. If you please could see it and check if there's something wrong in my size policy/stretch/layout settings it would really be great. Thanks again for your time! Federico On Wed, Aug 10, 2011 at 10:51 AM, Jothy wrote: > Have you tried setting the QVTLWidget in a grid layout? > > Jothy > > On Wed, Aug 10, 2011 at 2:41 PM, Federico Milano wrote: > >> Hi. I'm using QVTKWidget to interface Qt and VTK. The problem is that when >> I maximize the Qt windows, the QVTKWidget does not change its size. I've >> tried many combinations of size policies, but combinations that work fine >> for other controls do not work for this one. Do you have any hint or >> suggestion? >> >> Thanks in advance, >> >> Federico >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://www.vtk.org/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleView.ui Type: application/x-designer Size: 4925 bytes Desc: not available URL: From jothybasu at gmail.com Wed Aug 10 11:33:21 2011 From: jothybasu at gmail.com (Jothy) Date: Wed, 10 Aug 2011 16:33:21 +0100 Subject: [vtkusers] Maximizing a QVTKWidget control In-Reply-To: References: Message-ID: Here is the working one attached. You need to click the mainWindow/centralWidget and select grid layout. Jothy On Wed, Aug 10, 2011 at 4:09 PM, Federico Milano wrote: > Jothy, > > It's still not working. As I'm experimenting on the SimpleView example, I'm > attaching my SimpleView.ui file. If you please could see it and check if > there's something wrong in my size policy/stretch/layout settings it would > really be great. > > Thanks again for your time! > > Federico > > > On Wed, Aug 10, 2011 at 10:51 AM, Jothy wrote: > >> Have you tried setting the QVTLWidget in a grid layout? >> >> Jothy >> >> On Wed, Aug 10, 2011 at 2:41 PM, Federico Milano wrote: >> >>> Hi. I'm using QVTKWidget to interface Qt and VTK. The problem is that >>> when I maximize the Qt windows, the QVTKWidget does not change its size. >>> I've tried many combinations of size policies, but combinations that work >>> fine for other controls do not work for this one. Do you have any hint or >>> suggestion? >>> >>> Thanks in advance, >>> >>> Federico >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://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://www.vtk.org/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleViewJothy.ui Type: application/x-designer Size: 4592 bytes Desc: not available URL: From soheilghafurian at yahoo.com Wed Aug 10 12:01:03 2011 From: soheilghafurian at yahoo.com (soheilghafurian) Date: Wed, 10 Aug 2011 09:01:03 -0700 (PDT) Subject: [vtkusers] Error: vtkRendering.dll is missing from your computer Message-ID: <1312992063592-4686359.post@n5.nabble.com> Hi I have been using vtk on my laptop for quite a while. Now I'm trying to install it on a pc and I did everything like on my laptop. But, when I run the codes I had written in my laptop, I get this error message: The program can't start because vtkRendering.dll is missing from your computer. Try reinstalling the program to fix this problem. I searched for vtkRendering.dll and I found one in C:VTK/bin/debug Could anyone help me with this problem? I would really appreciate it. Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-vtkRendering-dll-is-missing-from-your-computer-tp4686359p4686359.html Sent from the VTK - Users mailing list archive at Nabble.com. From bob at stlcc.org Wed Aug 10 13:07:33 2011 From: bob at stlcc.org (Bob Palank) Date: Wed, 10 Aug 2011 12:07:33 -0500 Subject: [vtkusers] Run attempt Fails Message-ID: In VC++ 2010 Express, whenever I click the green arrow with Release and Win32 set, Execution Fails. But if I leave VC++ and go directly to the .exe file in the Project's Release folder, then the exe runs fine. Is there a way to execute fro within VC++ ? Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Wed Aug 10 12:13:24 2011 From: drescherjm at gmail.com (John Drescher) Date: Wed, 10 Aug 2011 12:13:24 -0400 Subject: [vtkusers] Error: vtkRendering.dll is missing from your computer In-Reply-To: <1312992063592-4686359.post@n5.nabble.com> References: <1312992063592-4686359.post@n5.nabble.com> Message-ID: On Wed, Aug 10, 2011 at 12:01 PM, soheilghafurian wrote: > Hi > > I have been using vtk on my laptop for quite a while. Now I'm trying to > install it on a pc and I did everything like on my laptop. > But, when I run the codes I had written in my laptop, I get this error > message: > > The program can't start because vtkRendering.dll is missing from your > computer. Try reinstalling the program to fix this problem. > > I searched for vtkRendering.dll and I found one in C:VTK/bin/debug > > Could anyone help me with this problem? I would really appreciate it. > That needs to be in your path. I recommend to not use dlls and instead build vtk statically. John From soheilghafurian at yahoo.com Wed Aug 10 12:44:06 2011 From: soheilghafurian at yahoo.com (soheilghafurian) Date: Wed, 10 Aug 2011 09:44:06 -0700 (PDT) Subject: [vtkusers] Error: vtkRendering.dll is missing from your computer In-Reply-To: References: <1312992063592-4686359.post@n5.nabble.com> Message-ID: <1312994646122-4686514.post@n5.nabble.com> Thanks a lot. But, how should I do it? I built it using cmake. Is there an option I should have changed there? (I don't know what it means to build it statically) -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-vtkRendering-dll-is-missing-from-your-computer-tp4686359p4686514.html Sent from the VTK - Users mailing list archive at Nabble.com. From drescherjm at gmail.com Wed Aug 10 12:46:59 2011 From: drescherjm at gmail.com (John Drescher) Date: Wed, 10 Aug 2011 12:46:59 -0400 Subject: [vtkusers] Error: vtkRendering.dll is missing from your computer In-Reply-To: <1312994646122-4686514.post@n5.nabble.com> References: <1312992063592-4686359.post@n5.nabble.com> <1312994646122-4686514.post@n5.nabble.com> Message-ID: On Wed, Aug 10, 2011 at 12:44 PM, soheilghafurian wrote: > Thanks a lot. But, how should I do it? I built it using cmake. Is there an > option I should have changed there? > > (I don't know what it means to build it statically) > Turn off BUILD_SHARED_LIBS in cmake-gui then rebuild vtk. And then your application. John From soheilghafurian at yahoo.com Wed Aug 10 13:54:29 2011 From: soheilghafurian at yahoo.com (soheilghafurian) Date: Wed, 10 Aug 2011 10:54:29 -0700 (PDT) Subject: [vtkusers] Error: vtkRendering.dll is missing from your computer In-Reply-To: References: <1312992063592-4686359.post@n5.nabble.com> <1312994646122-4686514.post@n5.nabble.com> Message-ID: <1312998869302-4686686.post@n5.nabble.com> Thank you very much John. The problem is solved. You were of amazing help to me. -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-vtkRendering-dll-is-missing-from-your-computer-tp4686359p4686686.html Sent from the VTK - Users mailing list archive at Nabble.com. From Clement.Chu at csiro.au Wed Aug 10 14:03:21 2011 From: Clement.Chu at csiro.au (Clement.Chu at csiro.au) Date: Thu, 11 Aug 2011 04:03:21 +1000 Subject: [vtkusers] vtkColorTransferFunction limit Message-ID: <1C91DEB88B00944ABBB9DD09B60246CCB5E594B8@exvic-mbx01.nexus.csiro.au> Hi, Anyone know how many colours I can add into vtkColorTransferFunction class by calling AddRGBPoint method. I used the code below to generate the colour map: int numCols = 256; vtkColorTransferFunction ct = new vtkColorTransferFunction::New(); vtkPiecewiseFunction pf = new vtkPiecewiseFunction::New(); for (int i=0; i Hi. I'm trying to maintain a good FPS rate when interacting with very large meshes and I was wondering if there's a way to vary the quality of rendering, depending on if you're interacting with the scene (rotating/translating it) or if you're leaving it still. Maybe I can do it manually, having the same mesh in two or more quality versions, using the low quality version when interacting with the scene and using incrementally higher quality versions when rendering the final version; but it would be much easier if it is already built in VTK. Thanks a lot, Federico -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Wed Aug 10 14:29:42 2011 From: daviddoria at gmail.com (David Doria) Date: Wed, 10 Aug 2011 14:29:42 -0400 Subject: [vtkusers] Rendering quality In-Reply-To: References: Message-ID: On Wed, Aug 10, 2011 at 2:26 PM, Federico Milano wrote: > Hi. I'm trying to maintain a good FPS rate when interacting with very large > meshes and I was wondering if there's a way to vary the quality of > rendering, depending on if you're interacting with the scene > (rotating/translating it) or if you're leaving it still. Maybe I can do it > manually, having the same mesh in two or more quality versions, using the > low quality version when interacting with the scene and using incrementally > higher quality versions when rendering the final version; but it would be > much easier if it is already built in VTK. These don't distinguish between types of interaction, but I thought I'd point them out - they could get you going in this direction: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/QuadricLODActor http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LODProp3D David From alexmalvtk at gmail.com Thu Aug 11 00:05:26 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Wed, 10 Aug 2011 21:05:26 -0700 Subject: [vtkusers] Clipping PolyData after vtkPolyDataConnectivityFilter problem Message-ID: I need to do the following manipulation with polydata: - split by connectivity - split by array values ( point and cell arrays ) - do something to each part. Everything seems work, except splitting by array. The problem is that I am trying to achieve it with multiple clipping. But first clipping with vtkClipPolyData does not pass "RegionId" array it gets from the input (vtkPolyDataConnectivityFilter output) Even though it does preserve cell data array which was added to poly data before connectivity filter. Questions is - why point data array is not passed (with clipping ) to the vtkClipPolyData output? How to clip poly data properly limiting lower and upper of scalar without multiple filters? Code below demonstrates a problem by clipping output of vtkPolyDataConnectivityFilter. Before clip->Update(); there is 1 point array and 1 cell array, after clipping there is no point array but there is 1 cell array, Regards, Alex vtkAlgorithmOutput* inputConnection = ..... vtkSmartPointer connectivityFilter = vtkSmartPointer::New(); connectivityFilter->SetInputConnection( inputConnection ); connectivityFilter->SetExtractionModeToAllRegions(); connectivityFilter->ColorRegionsOn (); connectivityFilter->Update(); int regions = connectivityFilter->GetNumberOfExtractedRegions(); if ( regions > 1 ) { vtkIndent indent( 1 ); connectivityFilter->GetOutput()->GetPointData()->SetActiveScalars( "RegionId" ); connectivityFilter->GetOutput()->PrintSelf(std::cout, indent); qDebug() << "connectivityFilter cells = " << connectivityFilter->GetOutput()->GetNumberOfCells() << endl; for ( int i=0; i < regions; i ++ ) { qDebug() << "Before first clipping " << endl; //output = 1 qDebug() << "Number of PointData arrays: " << connectivityFilter->GetOutput()->GetPointData()->GetNumberOfArrays() << endl; //output = 1 qDebug() << "Number of Cell data arrays: " << connectivityFilter->GetOutput()->GetCellData()->GetNumberOfArrays() << endl; // returns 1 vtkSmartPointer clip = vtkSmartPointer::New(); clip->SetInput( connectivityFilter->GetOutput() ); clip->InsideOutOff(); clip->SetValue( (float) i - 0.1 ); clip->Update(); qDebug() << "After first clipping vtkClipPolyData" << endl; //output = 0 // WHY? qDebug() << "Number of PointData arrays: " << clip->GetOutput()->GetPointData()->GetNumberOfArrays() << endl; //output = 1 qDebug() << "Number of Cell data arrays: " << clip->GetOutput()->GetCellData()->GetNumberOfArrays() << endl; qDebug() << "After first clipping connectivityFilter output" << endl; //output = 1 qDebug() << "Number of PointData arrays: " << connectivityFilter->GetOutput()->GetPointData()->GetNumberOfArrays() << endl; //output = 1 qDebug() << "Number of Cell data arrays: " << connectivityFilter->GetOutput()->GetCellData()->GetNumberOfArrays() << endl; vtkSmartPointer clipInsideOut = vtkSmartPointer::New(); clipInsideOut->SetInput(clip->GetOutput() ); clipInsideOut->InsideOutOn(); clipInsideOut->SetValue( (float) i + 0.1 ); clipInsideOut->Update(); clipInsideOut->GetOutput()->PrintSelf(std::cout, indent); .................... } } From mlokida at yahoo.fr Thu Aug 11 04:37:15 2011 From: mlokida at yahoo.fr (lokida) Date: Thu, 11 Aug 2011 01:37:15 -0700 (PDT) Subject: [vtkusers] Click and drag a vertex of a vtkUnstructuredGrid Message-ID: <1313051835399-4688833.post@n5.nabble.com> Hello, I have used the http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex Click and drag a vertex example and it works with vtkPolyData. Now, I would like to use it with a vtkUnstructuredGrid but I haven't found any examples or documentation about this. Is-it possible do click and drag a vertex of an unstructuredGrid. If yes, how Can I do that (example, link,..) ? Than you. -- View this message in context: http://vtk.1045678.n5.nabble.com/Click-and-drag-a-vertex-of-a-vtkUnstructuredGrid-tp4688833p4688833.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Thu Aug 11 08:37:46 2011 From: daviddoria at gmail.com (David Doria) Date: Thu, 11 Aug 2011 08:37:46 -0400 Subject: [vtkusers] Click and drag a vertex of a vtkUnstructuredGrid In-Reply-To: <1313051835399-4688833.post@n5.nabble.com> References: <1313051835399-4688833.post@n5.nabble.com> Message-ID: On Thu, Aug 11, 2011 at 4:37 AM, lokida wrote: > Hello, > > I have used the > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex Click and > drag a vertex ?example and it works with vtkPolyData. > Now, I would like to use it with a vtkUnstructuredGrid but I haven't found > any examples or documentation about this. > > Is-it possible do click and drag a vertex of an unstructuredGrid. If yes, > how Can I do that (example, link,..) ? > > Than you. It should be exactly the same, just using a vtkDataSetMapper instead of a vtkPolyDataMapper, no? David From mlokida at yahoo.fr Thu Aug 11 08:54:32 2011 From: mlokida at yahoo.fr (R M) Date: Thu, 11 Aug 2011 13:54:32 +0100 (BST) Subject: [vtkusers] Re : Click and drag a vertex of a vtkUnstructuredGrid In-Reply-To: References: <1313051835399-4688833.post@n5.nabble.com> Message-ID: <1313067272.57539.YahooMailRC@web132210.mail.ird.yahoo.com> Apparently not. The interaction to select points works with a vtkInteractorStyleTrackballActor class and it seems to only works with vtkPolyData. May be I should convert my unstructured grid into a polydata ? ________________________________ De : David Doria ? : lokida Cc : vtkusers at vtk.org Envoy? le : Jeu 11 ao?t 2011, 14h 37min 46s Objet : Re: [vtkusers] Click and drag a vertex of a vtkUnstructuredGrid On Thu, Aug 11, 2011 at 4:37 AM, lokida wrote: > Hello, > > I have used the > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex Click and > drag a vertex example and it works with vtkPolyData. > Now, I would like to use it with a vtkUnstructuredGrid but I haven't found > any examples or documentation about this. > > Is-it possible do click and drag a vertex of an unstructuredGrid. If yes, > how Can I do that (example, link,..) ? > > Than you. It should be exactly the same, just using a vtkDataSetMapper instead of a vtkPolyDataMapper, no? David -------------- next part -------------- An HTML attachment was scrubbed... URL: From 812075761 at qq.com Thu Aug 11 09:24:07 2011 From: 812075761 at qq.com (steelblue) Date: Thu, 11 Aug 2011 06:24:07 -0700 (PDT) Subject: [vtkusers] there\'s no vtkCommand and vtkBoostBreadthFirstSearch in vtk.jar, why? Message-ID: <1313069047489-4689517.post@n5.nabble.com> waiting for your help .. thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/there-s-no-vtkCommand-and-vtkBoostBreadthFirstSearch-in-vtk-jar-why-tp4689517p4689517.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Thu Aug 11 09:33:30 2011 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 11 Aug 2011 09:33:30 -0400 Subject: [vtkusers] there\'s no vtkCommand and vtkBoostBreadthFirstSearch in vtk.jar, why? In-Reply-To: <1313069047489-4689517.post@n5.nabble.com> References: <1313069047489-4689517.post@n5.nabble.com> Message-ID: vtkCommand are not needed in Java. You can directly attach observer to any method of a java instance which has the right profile. On Thu, Aug 11, 2011 at 9:24 AM, steelblue <812075761 at qq.com> wrote: > waiting for your help .. > thanks. > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/there-s-no-vtkCommand-and-vtkBoostBreadthFirstSearch-in-vtk-jar-why-tp4689517p4689517.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://www.vtk.org/mailman/listinfo/vtkusers > From webmaster at insightsoftwareconsortium.org Thu Aug 11 09:18:12 2011 From: webmaster at insightsoftwareconsortium.org (Insight Journal) Date: Thu, 11 Aug 2011 09:18:12 -0400 Subject: [vtkusers] The Insight Journal-New Submission Message-ID: <201108111318.p7BDICTi023474@insight-journal.org> Hello, A new submission has been added to the Insight Journal. Title: A Gradient Descent Trust Region Optimizer Author(s):Brooks R. Abstract: This document describes a new simple gradient descent optimizer which is a potential replacement or supplement for RegularStepGradientDescentOptimizer. The optimizer requires only the gradient of the parameters and uses a simple linear model internally. However, it follows the theoretical basis of a trust-region algorithm and is able to achieve greater efficiency on certain image registration cases. Download and Review the paper at: http://www.insight-journal.org/browse/publication/834 Generated by the Insight Journal You are receiving this email because you asked to be informed by the Insight Journal for new submissions. To change your email preference go to http://www.insight-journal.org . From 812075761 at qq.com Thu Aug 11 11:20:26 2011 From: 812075761 at qq.com (steelblue) Date: Thu, 11 Aug 2011 08:20:26 -0700 (PDT) Subject: [vtkusers] there\'s no vtkCommand and vtkBoostBreadthFirstSearch in vtk.jar, why? In-Reply-To: References: <1313069047489-4689517.post@n5.nabble.com> Message-ID: <1313076026484-4689859.post@n5.nabble.com> then ,how about the vtkBoostBreadthFirstSearch ? and in my vtk.jar,the vtkTextMapper does not have the method setFontSize,and so on.. my vtk source version is 5.6.1, -- View this message in context: http://vtk.1045678.n5.nabble.com/there-s-no-vtkCommand-and-vtkBoostBreadthFirstSearch-in-vtk-jar-why-tp4689517p4689859.html Sent from the VTK - Users mailing list archive at Nabble.com. From artem.paraview at googlemail.com Thu Aug 11 13:12:52 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Thu, 11 Aug 2011 18:12:52 +0100 Subject: [vtkusers] vtkLookUpTable transparency bug? Message-ID: Hi, I am trying to visualise a 2D scalar field as a 3D 'landscape'. Some of the numbers are just indicators of 'undefined' values, so I do not want to show them at all. I set these 'undefined' numbers to the values which correspond to the first row of vtkLookUpTable and then assign this row 'transparent' alpha=0: lut->SetTableValue(0, 0, 0, 0, 0); However, there are 2 problems: 1) This results in 'background' color, not 'transparent' -- see second picture -- the transparent part actually closes some part of the graphics. 2) On one Unix system I haven't even got transparency -- the 'transparent' part was drawn in black color (as corresponds to the table value). So am I doing something wrong here or is it a bug in vtkLookUpTable? Also, may be there is a smarter way not to show 'undefined' values? Best wishes Artem -------------- next part -------------- A non-text attachment was scrubbed... Name: pic_1.png Type: image/png Size: 42790 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic_2.png Type: image/png Size: 41024 bytes Desc: not available URL: From mlokida at yahoo.fr Thu Aug 11 13:34:48 2011 From: mlokida at yahoo.fr (R M) Date: Thu, 11 Aug 2011 18:34:48 +0100 (BST) Subject: [vtkusers] User Interaction with MultiBlocDataSet with unstructured Grid Message-ID: <1313084088.32452.YahooMailRC@web132210.mail.ird.yahoo.com> Hi, I have a MultiBlockDataSet composed of severals unstructuredGrid (tetra, hexa,...). All The cells share the same points array and I have some blocks 'cells of the data set that share the same points. The idea is to move a point belonging to a cell of block 1 and to acell of block 2. Like this, because points array is share. But, to render the multiblockdataset, I use a vtkCompositeDataGeometryFilter that give me a vtkPolyData. Then I use the http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex example to select and move points. The problem is that the points have been duplicated and are now independant (no more use of the global points array). So, is there a way to preserve the points array information in order to well move points and preserve the topology ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean.larkin at lickenbrocktech.com Thu Aug 11 17:44:49 2011 From: sean.larkin at lickenbrocktech.com (Sean Larkin) Date: Thu, 11 Aug 2011 16:44:49 -0500 Subject: [vtkusers] Place image into render window buffer during rendering Message-ID: <000001cc586f$e5a5e350$b0f1a9f0$@lickenbrocktech.com> Hi all, I would like to be able to render a 3D volume and grab the 2D image that will be displayed when rendering is complete (i.e. for each frame when rotating the volume). I think that I can do this using vtkWindowToImageFilter, although I'm not sure how to get the image at the right step or event (i.e. before it gets displayed on screen in some render window event). Then I'd like to manipulate that data with a lookup table and place the result back into the buffer and then render the image to the display. How do I place the data back into the render window buffer for display? I've tried using the Z buffer, but truthfully I don't really understand what a Z buffer is, and I couldn't get that to work. Can anyone help? Thanks, Sean -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexmalvtk at gmail.com Thu Aug 11 18:57:44 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Thu, 11 Aug 2011 15:57:44 -0700 Subject: [vtkusers] PolyDataExtractNormals example doers not work as expected with cell normals Message-ID: I needed to extract cell normals generated by vtkPolyDataNormals and tried to use code from http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataExtractNormals on two versions of vtk (5.4.2 and 5.6.1) On both cell normals were not working as expected from example. First of all vtkPolyDataNormals generates vtkFloatArray instead of vtkDoubleArray as an example, second name of cell array is "Normals" and not "cellNormals" I suggest to change example from: /////////////////////////////////////////////////////////////////////////////////// // Double cell normals vtkSmartPointer normalData4 = vtkDoubleArray::SafeDownCast(polydata->GetCellData()->GetNormals("cellNormals")); if(normalData4) { std::cout << "There are " << normalData4->GetNumberOfComponents() << " components in NormalData4 (double Cell \"Cell Normals\")" << std::endl; return true; } to: /////////////////////////////////////////////////////////////////////////////////// // Float cell normals vtkSmartPointer normalData4 = vtkDoubleArray::SafeDownCast(polydata->GetCellData()->GetNormals("Normals")); if(normalData4) { std::cout << "There are " << normalData4->GetNumberOfComponents() << " components in NormalData4 (float Cell \"Cell Normals\")" << std::endl; return true; } Regards, Alex From lindeval at dmat.ufrr.br Fri Aug 12 00:48:58 2011 From: lindeval at dmat.ufrr.br (lindeval at dmat.ufrr.br) Date: Fri, 12 Aug 2011 00:48:58 -0400 (GMT-04:00) Subject: [vtkusers] vtk and Qt: linking error!! Message-ID: <4190997.306291313124538569.JavaMail.root@waimiri.ufrr.br> Hello everybody! I have a problem in compiling my software in windows platform, which uses Qt and VTK. I get the following error messages: undefined reference to `_imp___ZN21vtkRendererCollection16GetFirstRendererEv ' undefined reference to `_imp___ZN11vtkRenderer11RemoveActorEP7vtkProp ' undefined reference to `_imp___ZN9vtkMapper14SetLookupTableEP18vtkScalarsToColors' undefined reference to `_imp___ZN11vtkRenderer8AddActorEP7vtkProp ' . . It is a linking problem. Has anyone had this problem? My Project file is as below: TEMPLATE = app TARGET = IncludePath + = "C:\Program Files\VTK\include\vtk-5.6" LIBS + =-L"C:\Program Files\VTK\bin" -L"C:\Program Files\VTK\lib\vtk-5.6" -L"C:\VtkBin-4.6\bin" \ -lvtkDICOMParser lvtkGeovis -lvtkIO lvtksqlite -lvtkzlib -lvtkGraphics -lvtkjpeg \ -lvtksys -lvtkexpat -lvtklibxml -lvtktiff -lvtkFiltering -lvtkHybrid -lvtkmetaio -lvtkverdict -lQVTK -lvtkNetCDF \ -lvtkViews -lvtkalglib -lvtkfreetype -lvtkImaging -lvtkpng -lvtkftgl -lvtkCharts -lvtkproj4 -lvtkVolumeRendering \ -lvtkGenericFiltering -lvtkQtChart -lvtkCommon -lvtkDICOMParser -lQVTKWidgetPlugin # Input Fantomas.h HEADERS + = \ fantwindow.h \ formAmbiente.h \ formegs.h \ formEntrada.h \ formfatia.h \ formorgao.h \ formsalvar.h \ formtumor.h \ progressbar.h \ raddigital.h \ simulaacidente.h \ formmcnpwindow.h FORMS + = formAmbiente.ui \ formegs.ui \ formEntrada.ui \ formfatia.ui \ formorgao.ui \ formraddigital.ui \ formsalvar.ui \ formtumor.ui \ simulaacidente.ui \ formmcnpwindow.ui Fantomas.cxx SOURCES + = \ fantwindow.cxx \ formAmbiente.cxx \ formegs.cxx \ formEntrada.cxx \ formfatia.cxx \ formorgao.cxx \ formsalvar.cxx \ formtumor.cxx \ main.cxx \ progressbar.cpp \ raddigital.cxx \ simulaacidente.cxx \ vapprogressdialog.cxx \ formmcnpwindow.cpp RESOURCES + = \ ResourceFile.qrc From oldrich.svec at gmail.com Fri Aug 12 02:01:29 2011 From: oldrich.svec at gmail.com (Oldrich Svec) Date: Fri, 12 Aug 2011 08:01:29 +0200 Subject: [vtkusers] vtkXMLImageDataWriter: saving large data Message-ID: Hi, I use Activiz .NET and have 4GB of memory. I save my data during the computation in the following way: let vti = new vtkXMLImageDataWriter() vti.SetCompressorTypeToZLib() vti.SetDataModeToAppended() use arr = new vtkDoubleArray() arr.SetNumberOfComponents 1 for z = 0 to data.lengthZ 0 0 - 1 do for y = 0 to data.LengthY - 1 do for x = 0 to data.LengthX - 1 do arr.InsertNextValue data.[x,y,z] vti.GetInput().GetCellData().AddArray arr vti.SetFileName path vti.Write() I get an error "vtkDoubleArray: Unable to allocate 4194303 elements...". Is there any way how to save the XML image data without using the intermediate vtkDoubleArray? Or is there any best practise way how to save large data into file without having to worry about the memory? Thanks in advance. Oldrich From t.kilgus at Dkfz-Heidelberg.de Fri Aug 12 03:42:22 2011 From: t.kilgus at Dkfz-Heidelberg.de (Kilgus, Thomas) Date: Fri, 12 Aug 2011 09:42:22 +0200 Subject: [vtkusers] vtkLookUpTable transparency bug? In-Reply-To: References: Message-ID: <57EE86D11538B44096C712532DBB6C5AD3767ADF3A@DKFZEX01.ad.dkfz-heidelberg.de> Hi Artem, I don't if I get you right, but the pictures look correct. If you set the alpha value of something to 0, you will see the color of the stuff behind it. I guess in your case there is nothing behind it and that's why the background color can be seen? Best regards Thomas -----Urspr?ngliche Nachricht----- Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im Auftrag von Artem Babayan Gesendet: Donnerstag, 11. August 2011 19:13 An: vtkusers at vtk.org Betreff: [vtkusers] vtkLookUpTable transparency bug? Hi, I am trying to visualise a 2D scalar field as a 3D 'landscape'. Some of the numbers are just indicators of 'undefined' values, so I do not want to show them at all. I set these 'undefined' numbers to the values which correspond to the first row of vtkLookUpTable and then assign this row 'transparent' alpha=0: lut->SetTableValue(0, 0, 0, 0, 0); However, there are 2 problems: 1) This results in 'background' color, not 'transparent' -- see second picture -- the transparent part actually closes some part of the graphics. 2) On one Unix system I haven't even got transparency -- the 'transparent' part was drawn in black color (as corresponds to the table value). So am I doing something wrong here or is it a bug in vtkLookUpTable? Also, may be there is a smarter way not to show 'undefined' values? Best wishes Artem From artem.paraview at googlemail.com Fri Aug 12 04:08:59 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Fri, 12 Aug 2011 09:08:59 +0100 Subject: [vtkusers] vtkLookUpTable transparency bug? In-Reply-To: <57EE86D11538B44096C712532DBB6C5AD3767ADF3A@DKFZEX01.ad.dkfz-heidelberg.de> References: <57EE86D11538B44096C712532DBB6C5AD3767ADF3A@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: Hi, Thomas If you look at the second picture, you will see, that some of the 'colorful' graphic is covered by the white (or background color) field -- this white bit is the part of the graphics which correspond to 'undefined' values and have alpha=0. So it is not transparent -- I cannot see remaining graphics through it. To make it more clear (or more confusing) -- with alpha=1 the first picture would look like a colorful 'mountain' in the flat black 'field' extended to the vertical boundaries of the domain. With alpha=0 the black 'field' is of background color, so it is invisible on the first picture, but if I tilt the graphics slightly backwards (as on the second picture) part of the 'field' comes in front of the 'mountain' and you can see, that it is not actually transparent. Best wishes Artem On 12 August 2011 08:42, Kilgus, Thomas wrote: > Hi Artem, > > I don't if I get you right, but the pictures look correct. If you set the alpha value of something to 0, you will see the color of the stuff behind it. I guess in your case there is nothing behind it and that's why the background color can be seen? > > Best regards > Thomas > > -----Urspr?ngliche Nachricht----- > Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im Auftrag von Artem Babayan > Gesendet: Donnerstag, 11. August 2011 19:13 > An: vtkusers at vtk.org > Betreff: [vtkusers] vtkLookUpTable transparency bug? > > Hi, > > I am trying to visualise a 2D scalar field as a 3D 'landscape'. Some of the numbers are just indicators of 'undefined' values, so I do not want to show them at all. > > I set these 'undefined' numbers to the values which correspond to the first row of vtkLookUpTable and then assign this row 'transparent' > alpha=0: > > ? ? lut->SetTableValue(0, 0, 0, 0, 0); > > However, there are 2 problems: > > 1) This results in 'background' color, not 'transparent' -- see second picture -- the transparent part actually closes some part of the graphics. > 2) On one Unix system I haven't even got transparency -- the 'transparent' part was drawn in black color (as corresponds to the table value). > > So am I doing something wrong here or is it a bug in vtkLookUpTable? > > Also, may be there is a smarter way not to show 'undefined' values? > > Best wishes > Artem > From mlokida at yahoo.fr Fri Aug 12 05:14:33 2011 From: mlokida at yahoo.fr (R M) Date: Fri, 12 Aug 2011 10:14:33 +0100 (BST) Subject: [vtkusers] Re : User Interaction with MultiBlocDataSet with unstructured Grid In-Reply-To: <1313084088.32452.YahooMailRC@web132210.mail.ird.yahoo.com> References: <1313084088.32452.YahooMailRC@web132210.mail.ird.yahoo.com> Message-ID: <1313140473.18896.YahooMailRC@web132205.mail.ird.yahoo.com> Hello, I have see that when using vtkCompositeDataGeometryFilter on the multiBlockDataSet of UnstructuredGrid, the return vtkPolyData contains twice the same points array. I mean, When creating my tetra that I set in the 2 unstructtured grid, they share the same points array: points array [ (0,0,0), (1,2,3), (-1,-2,-4) ] And when the CompositeDataGeometryFilter is executed, I get the points of the generated vtkPolyData and I have this: points array:[ (0,0,0), (1,2,3), (-1,-2,-4), (0,0,0), (1,2,3), (-1,-2,-4)] How can I do to only have the original points array in the generated polydata: [ (0,0,0), (1,2,3), (-1,-2,-4) ] ? Like this, I could move a point belonging to two different cells that are in two different blocks. I have tried on the CompositeDataGeometryFilter but no change: info->Set(vtkAlgorithm::PRESERVES_DATASET(), 1); info->Set(vtkAlgorithm::PRESERVES_GEOMETRY(), 1); info->Set(vtkAlgorithm::PRESERVES_BOUNDS(), 1); info->Set(vtkAlgorithm::PRESERVES_TOPOLOGY(), 1); info->Set(vtkAlgorithm::PRESERVES_ATTRIBUTES(), 1); info->Set(vtkAlgorithm::PRESERVES_RANGES(), 1); Any idea would be welcome. Thank you. ________________________________ De : R M ? : vtkusers at vtk.org Envoy? le : Jeu 11 ao?t 2011, 19h 34min 48s Objet : [vtkusers] User Interaction with MultiBlocDataSet with unstructured Grid Hi, I have a MultiBlockDataSet composed of severals unstructuredGrid (tetra, hexa,...). All The cells share the same points array and I have some blocks 'cells of the data set that share the same points. The idea is to move a point belonging to a cell of block 1 and to acell of block 2. Like this, because points array is share. But, to render the multiblockdataset, I use a vtkCompositeDataGeometryFilter that give me a vtkPolyData. Then I use the http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex example to select and move points. The problem is that the points have been duplicated and are now independant (no more use of the global points array). So, is there a way to preserve the points array information in order to well move points and preserve the topology ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Fri Aug 12 06:05:24 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 12 Aug 2011 11:05:24 +0100 Subject: [vtkusers] vtkChart in QVTKWidget Message-ID: Hi all, I am trying to plot a 2D XY line plot using vtkChartXY by following this example http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot. I can render using vtkRenderer and vtkRenderWindow, but I can't get it rendered in a QVTKWidget. How to link these two? I tried using QVTkWidget->GetRenderWindow()->AddRenderer(vtkContextView->GetRenderer()). Any suggestions? Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpayne at hgl-dynamics.com Fri Aug 12 05:56:22 2011 From: jpayne at hgl-dynamics.com (Jon Payne) Date: Fri, 12 Aug 2011 10:56:22 +0100 Subject: [vtkusers] vtkLookUpTable transparency bug? In-Reply-To: References: <57EE86D11538B44096C712532DBB6C5AD3767ADF3A@DKFZEX01.ad.dkfz-heidelberg.de> Message-ID: <4E44F8C6.7050709@hgl-dynamics.com> On 12/08/2011 09:08, Artem Babayan wrote: > Hi, Thomas > > If you look at the second picture, you will see, that some of the > 'colorful' graphic is covered by the white (or background color) field > -- this white bit is the part of the graphics which correspond to > 'undefined' values and have alpha=0. So it is not transparent -- I > cannot see remaining graphics through it. > > To make it more clear (or more confusing) -- with alpha=1 the first > picture would look like a colorful 'mountain' in the flat black > 'field' extended to the vertical boundaries of the domain. With > alpha=0 the black 'field' is of background color, so it is invisible > on the first picture, but if I tilt the graphics slightly backwards > (as on the second picture) part of the 'field' comes in front of the > 'mountain' and you can see, that it is not actually transparent. > > Best wishes > Artem > > > > On 12 August 2011 08:42, Kilgus, Thomas wrote: >> Hi Artem, >> >> I don't if I get you right, but the pictures look correct. If you set the alpha value of something to 0, you will see the color of the stuff behind it. I guess in your case there is nothing behind it and that's why the background color can be seen? >> >> Best regards >> Thomas >> >> -----Urspr?ngliche Nachricht----- >> Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im Auftrag von Artem Babayan >> Gesendet: Donnerstag, 11. August 2011 19:13 >> An: vtkusers at vtk.org >> Betreff: [vtkusers] vtkLookUpTable transparency bug? >> >> Hi, >> >> I am trying to visualise a 2D scalar field as a 3D 'landscape'. Some of the numbers are just indicators of 'undefined' values, so I do not want to show them at all. >> >> I set these 'undefined' numbers to the values which correspond to the first row of vtkLookUpTable and then assign this row 'transparent' >> alpha=0: >> >> lut->SetTableValue(0, 0, 0, 0, 0); >> >> However, there are 2 problems: >> >> 1) This results in 'background' color, not 'transparent' -- see second picture -- the transparent part actually closes some part of the graphics. >> 2) On one Unix system I haven't even got transparency -- the 'transparent' part was drawn in black color (as corresponds to the table value). >> >> So am I doing something wrong here or is it a bug in vtkLookUpTable? >> >> Also, may be there is a smarter way not to show 'undefined' values? >> >> Best wishes >> Artem >> Hi Artem, I can't remember exactly but have you tried setting the alpha of the whole surface to 0.95? The reason is that somehow VTK/OpenGL needs to know to ignore the z-buffer value (I think) so that pixels behind other pixels which are now transparent are still drawn. Cheers, Jon From jothybasu at gmail.com Fri Aug 12 06:39:42 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 12 Aug 2011 11:39:42 +0100 Subject: [vtkusers] vtkChart in QVTKWidget In-Reply-To: References: Message-ID: Now, I have managed to get it rendered in QVTKWidget, but the interaction doesn't work. How should I start the interactor? I tried the commented line in the below code // Add multiple line plots, setting the colors etc vtkSmartPointer chart = vtkSmartPointer::New(); chart->GetAxis(vtkAxis::LEFT)->SetTitle("yyy"); chart->GetAxis(vtkAxis::BOTTOM)->SetTitle("xxx"); this->view->GetScene()->AddItem(chart); vtkPlot *line = chart->AddPlot(vtkChart::LINE); line->SetInput(table, 0, 1); line->SetColor(0, 255, 0, 255); line->SetWidth(1.0); // this->view->GetRenderWindow()->SetMultiSamples(0); this->ui->chartWidget->GetRenderWindow()->AddRenderer(this->view->GetRenderer()); // vtkRenderWindowInteractor *chartItr=vtkRenderWindowInteractor::New(); // this->ui->chartWidget->GetRenderWindow()->SetInteractor(chartItr); // this->ui->chartWidget->GetInteractor()->Initialize(); // this->ui->chartWidget->GetInteractor()->Start(); this->ui->chartWidget->show(); Thanks Jothy On Fri, Aug 12, 2011 at 11:05 AM, Jothy wrote: > Hi all, > > I am trying to plot a 2D XY line plot using vtkChartXY by following this > example http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot. > > I can render using vtkRenderer and vtkRenderWindow, but I can't get it > rendered in a QVTKWidget. How to link these two? > > I tried using > QVTkWidget->GetRenderWindow()->AddRenderer(vtkContextView->GetRenderer()). > > Any suggestions? > > Thanks > > Jothy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From artem.paraview at googlemail.com Fri Aug 12 06:47:19 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Fri, 12 Aug 2011 11:47:19 +0100 Subject: [vtkusers] vtkLookUpTable transparency bug? In-Reply-To: <4E44F8C6.7050709@hgl-dynamics.com> References: <57EE86D11538B44096C712532DBB6C5AD3767ADF3A@DKFZEX01.ad.dkfz-heidelberg.de> <4E44F8C6.7050709@hgl-dynamics.com> Message-ID: Hi, Jon, I did assign alpha 0.5 to the 'invisible' part -- it appears, that transparency works only for some subsets of possible graphics positions -- see attached pictures. Thank you for trying to help, by the way. Best wishes Artem > Hi Artem, > > I can't remember exactly but have you tried setting the alpha of the whole > surface to 0.95? The reason is that somehow VTK/OpenGL needs to know to > ignore the z-buffer value (I think) so that pixels behind other pixels which > are now transparent are still drawn. > > Cheers, > Jon > On 12/08/2011 09:08, Artem Babayan wrote: >> >> Hi, Thomas >> >> If you look at the second picture, you will see, that some of the >> 'colorful' graphic is covered by the white (or background color) field >> -- this white bit is the part of the graphics which correspond to >> 'undefined' values and have alpha=0. So it is not transparent -- I >> cannot see remaining graphics through it. >> >> To make it more clear (or more confusing) -- with alpha=1 ?the first >> picture would look like a colorful 'mountain' in the flat black >> 'field' extended to the vertical boundaries of the domain. With >> alpha=0 the black 'field' is of background color, so it is invisible >> on the first picture, but if I tilt the graphics slightly backwards >> (as on the second picture) part of the 'field' comes in front of the >> 'mountain' and you can see, that it is not actually transparent. >> >> Best wishes >> Artem >> >> >> >> On 12 August 2011 08:42, Kilgus, Thomas >> ?wrote: >>> >>> Hi Artem, >>> >>> I don't if I get you right, but the pictures look correct. If you set the >>> alpha value of something to 0, you will see the color of the stuff behind >>> it. I guess in your case there is nothing behind it and that's why the >>> background color can be seen? >>> >>> Best regards >>> Thomas >>> >>> -----Urspr?ngliche Nachricht----- >>> Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im >>> Auftrag von Artem Babayan >>> Gesendet: Donnerstag, 11. August 2011 19:13 >>> An: vtkusers at vtk.org >>> Betreff: [vtkusers] vtkLookUpTable transparency bug? >>> >>> Hi, >>> >>> I am trying to visualise a 2D scalar field as a 3D 'landscape'. Some of >>> the numbers are just indicators of 'undefined' values, so I do not want to >>> show them at all. >>> >>> I set these 'undefined' numbers to the values which correspond to the >>> first row of vtkLookUpTable and then assign this row 'transparent' >>> alpha=0: >>> >>> ? ? lut->SetTableValue(0, 0, 0, 0, 0); >>> >>> However, there are 2 problems: >>> >>> 1) This results in 'background' color, not 'transparent' -- see second >>> picture -- the transparent part actually closes some part of the graphics. >>> 2) On one Unix system I haven't even got transparency -- the >>> 'transparent' part was drawn in black color (as corresponds to the table >>> value). >>> >>> So am I doing something wrong here or is it a bug in vtkLookUpTable? >>> >>> Also, may be there is a smarter way not to show 'undefined' values? >>> >>> Best wishes >>> Artem -------------- next part -------------- A non-text attachment was scrubbed... Name: pic_3.png Type: image/png Size: 49136 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic_4.png Type: image/png Size: 24342 bytes Desc: not available URL: From jpayne at hgl-dynamics.com Fri Aug 12 07:44:22 2011 From: jpayne at hgl-dynamics.com (Jon Payne) Date: Fri, 12 Aug 2011 12:44:22 +0100 Subject: [vtkusers] vtkLookUpTable transparency bug? In-Reply-To: References: <57EE86D11538B44096C712532DBB6C5AD3767ADF3A@DKFZEX01.ad.dkfz-heidelberg.de> <4E44F8C6.7050709@hgl-dynamics.com> Message-ID: <4E451216.7@hgl-dynamics.com> Hi Artem, But did you try setting the whole surface to be very slightly transparent? Not via the lookup table but calling SetAlpha(0.95) on the actor? Otherwise it will still draw everything, even the transparent coloured bits, as though they were opaque (hiding the pixels behind). Cheers, Jon > Hi, Jon, > > I did assign alpha 0.5 to the 'invisible' part -- it appears, that > transparency works only for some subsets of possible graphics > positions -- see attached pictures. > > Thank you for trying to help, by the way. > > Best wishes > Artem > >> Hi Artem, >> >> I can't remember exactly but have you tried setting the alpha of the whole >> surface to 0.95? The reason is that somehow VTK/OpenGL needs to know to >> ignore the z-buffer value (I think) so that pixels behind other pixels which >> are now transparent are still drawn. >> >> Cheers, >> Jon >> On 12/08/2011 09:08, Artem Babayan wrote: >>> Hi, Thomas >>> >>> If you look at the second picture, you will see, that some of the >>> 'colorful' graphic is covered by the white (or background color) field >>> -- this white bit is the part of the graphics which correspond to >>> 'undefined' values and have alpha=0. So it is not transparent -- I >>> cannot see remaining graphics through it. >>> >>> To make it more clear (or more confusing) -- with alpha=1 the first >>> picture would look like a colorful 'mountain' in the flat black >>> 'field' extended to the vertical boundaries of the domain. With >>> alpha=0 the black 'field' is of background color, so it is invisible >>> on the first picture, but if I tilt the graphics slightly backwards >>> (as on the second picture) part of the 'field' comes in front of the >>> 'mountain' and you can see, that it is not actually transparent. >>> >>> Best wishes >>> Artem >>> >>> >>> >>> On 12 August 2011 08:42, Kilgus, Thomas >>> wrote: >>>> Hi Artem, >>>> >>>> I don't if I get you right, but the pictures look correct. If you set the >>>> alpha value of something to 0, you will see the color of the stuff behind >>>> it. I guess in your case there is nothing behind it and that's why the >>>> background color can be seen? >>>> >>>> Best regards >>>> Thomas >>>> >>>> -----Urspr?ngliche Nachricht----- >>>> Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im >>>> Auftrag von Artem Babayan >>>> Gesendet: Donnerstag, 11. August 2011 19:13 >>>> An: vtkusers at vtk.org >>>> Betreff: [vtkusers] vtkLookUpTable transparency bug? >>>> >>>> Hi, >>>> >>>> I am trying to visualise a 2D scalar field as a 3D 'landscape'. Some of >>>> the numbers are just indicators of 'undefined' values, so I do not want to >>>> show them at all. >>>> >>>> I set these 'undefined' numbers to the values which correspond to the >>>> first row of vtkLookUpTable and then assign this row 'transparent' >>>> alpha=0: >>>> >>>> lut->SetTableValue(0, 0, 0, 0, 0); >>>> >>>> However, there are 2 problems: >>>> >>>> 1) This results in 'background' color, not 'transparent' -- see second >>>> picture -- the transparent part actually closes some part of the graphics. >>>> 2) On one Unix system I haven't even got transparency -- the >>>> 'transparent' part was drawn in black color (as corresponds to the table >>>> value). >>>> >>>> So am I doing something wrong here or is it a bug in vtkLookUpTable? >>>> >>>> Also, may be there is a smarter way not to show 'undefined' values? >>>> >>>> Best wishes >>>> Artem From jothybasu at gmail.com Fri Aug 12 07:48:29 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 12 Aug 2011 12:48:29 +0100 Subject: [vtkusers] vtkChart in QVTKWidget In-Reply-To: References: Message-ID: Works with this this->view->SetInteractor(this->ui->chartWidget->GetInteractor()); this->ui->chartWidget->SetRenderWindow(this->view->GetRenderWindow()); this->view->GetInteractor()->Initialize(); this->view->GetInteractor()->Start(); Jothy On Fri, Aug 12, 2011 at 11:39 AM, Jothy wrote: > Now, I have managed to get it rendered in QVTKWidget, but the interaction > doesn't work. > > How should I start the interactor? I tried the commented line in the below > code > > // Add multiple line plots, setting the colors etc > > vtkSmartPointer chart = > > vtkSmartPointer::New(); > > chart->GetAxis(vtkAxis::LEFT)->SetTitle("yyy"); > > chart->GetAxis(vtkAxis::BOTTOM)->SetTitle("xxx"); > > this->view->GetScene()->AddItem(chart); > > vtkPlot *line = chart->AddPlot(vtkChart::LINE); > > line->SetInput(table, 0, 1); > > line->SetColor(0, 255, 0, 255); > > line->SetWidth(1.0); > > // this->view->GetRenderWindow()->SetMultiSamples(0); > > this->ui->chartWidget->GetRenderWindow()->AddRenderer(this->view->GetRenderer()); > > // vtkRenderWindowInteractor *chartItr=vtkRenderWindowInteractor::New(); > > // this->ui->chartWidget->GetRenderWindow()->SetInteractor(chartItr); > > // this->ui->chartWidget->GetInteractor()->Initialize(); > > // this->ui->chartWidget->GetInteractor()->Start(); > > this->ui->chartWidget->show(); > > > Thanks > > Jothy > > > On Fri, Aug 12, 2011 at 11:05 AM, Jothy wrote: > >> Hi all, >> >> I am trying to plot a 2D XY line plot using vtkChartXY by following this >> example http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot. >> >> I can render using vtkRenderer and vtkRenderWindow, but I can't get it >> rendered in a QVTKWidget. How to link these two? >> >> I tried using >> QVTkWidget->GetRenderWindow()->AddRenderer(vtkContextView->GetRenderer()). >> >> Any suggestions? >> >> Thanks >> >> Jothy >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpayne at hgl-dynamics.com Fri Aug 12 07:54:37 2011 From: jpayne at hgl-dynamics.com (Jon Payne) Date: Fri, 12 Aug 2011 12:54:37 +0100 Subject: [vtkusers] vtkLookUpTable transparency bug? In-Reply-To: <4E451216.7@hgl-dynamics.com> References: <57EE86D11538B44096C712532DBB6C5AD3767ADF3A@DKFZEX01.ad.dkfz-heidelberg.de> <4E44F8C6.7050709@hgl-dynamics.com> <4E451216.7@hgl-dynamics.com> Message-ID: <4E45147D.9090700@hgl-dynamics.com> SetOpacity, I mean. > Hi Artem, > > But did you try setting the whole surface to be very slightly > transparent? Not via the lookup table but calling SetAlpha(0.95) on > the actor? Otherwise it will still draw everything, even the > transparent coloured bits, as though they were opaque (hiding the > pixels behind). > > Cheers, > Jon >> Hi, Jon, >> >> I did assign alpha 0.5 to the 'invisible' part -- it appears, that >> transparency works only for some subsets of possible graphics >> positions -- see attached pictures. >> >> Thank you for trying to help, by the way. >> >> Best wishes >> Artem >> >>> Hi Artem, >>> >>> I can't remember exactly but have you tried setting the alpha of the >>> whole >>> surface to 0.95? The reason is that somehow VTK/OpenGL needs to know to >>> ignore the z-buffer value (I think) so that pixels behind other >>> pixels which >>> are now transparent are still drawn. >>> >>> Cheers, >>> Jon >>> On 12/08/2011 09:08, Artem Babayan wrote: >>>> Hi, Thomas >>>> >>>> If you look at the second picture, you will see, that some of the >>>> 'colorful' graphic is covered by the white (or background color) field >>>> -- this white bit is the part of the graphics which correspond to >>>> 'undefined' values and have alpha=0. So it is not transparent -- I >>>> cannot see remaining graphics through it. >>>> >>>> To make it more clear (or more confusing) -- with alpha=1 the first >>>> picture would look like a colorful 'mountain' in the flat black >>>> 'field' extended to the vertical boundaries of the domain. With >>>> alpha=0 the black 'field' is of background color, so it is invisible >>>> on the first picture, but if I tilt the graphics slightly backwards >>>> (as on the second picture) part of the 'field' comes in front of the >>>> 'mountain' and you can see, that it is not actually transparent. >>>> >>>> Best wishes >>>> Artem >>>> >>>> >>>> >>>> On 12 August 2011 08:42, Kilgus, Thomas >>>> wrote: >>>>> Hi Artem, >>>>> >>>>> I don't if I get you right, but the pictures look correct. If you >>>>> set the >>>>> alpha value of something to 0, you will see the color of the stuff >>>>> behind >>>>> it. I guess in your case there is nothing behind it and that's why >>>>> the >>>>> background color can be seen? >>>>> >>>>> Best regards >>>>> Thomas >>>>> >>>>> -----Urspr?ngliche Nachricht----- >>>>> Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im >>>>> Auftrag von Artem Babayan >>>>> Gesendet: Donnerstag, 11. August 2011 19:13 >>>>> An: vtkusers at vtk.org >>>>> Betreff: [vtkusers] vtkLookUpTable transparency bug? >>>>> >>>>> Hi, >>>>> >>>>> I am trying to visualise a 2D scalar field as a 3D 'landscape'. >>>>> Some of >>>>> the numbers are just indicators of 'undefined' values, so I do not >>>>> want to >>>>> show them at all. >>>>> >>>>> I set these 'undefined' numbers to the values which correspond to the >>>>> first row of vtkLookUpTable and then assign this row 'transparent' >>>>> alpha=0: >>>>> >>>>> lut->SetTableValue(0, 0, 0, 0, 0); >>>>> >>>>> However, there are 2 problems: >>>>> >>>>> 1) This results in 'background' color, not 'transparent' -- see >>>>> second >>>>> picture -- the transparent part actually closes some part of the >>>>> graphics. >>>>> 2) On one Unix system I haven't even got transparency -- the >>>>> 'transparent' part was drawn in black color (as corresponds to the >>>>> table >>>>> value). >>>>> >>>>> So am I doing something wrong here or is it a bug in vtkLookUpTable? >>>>> >>>>> Also, may be there is a smarter way not to show 'undefined' values? >>>>> >>>>> Best wishes >>>>> Artem > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers From artem.paraview at googlemail.com Fri Aug 12 08:03:02 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Fri, 12 Aug 2011 13:03:02 +0100 Subject: [vtkusers] vtkLookUpTable transparency bug? In-Reply-To: References: <57EE86D11538B44096C712532DBB6C5AD3767ADF3A@DKFZEX01.ad.dkfz-heidelberg.de> <4E44F8C6.7050709@hgl-dynamics.com> <4E451216.7@hgl-dynamics.com> <4E45147D.9090700@hgl-dynamics.com> Message-ID: Aha, it is actor->GetProperty()->SetOpacity(...) Yes, thanks a lot -- it did solve the problem. Best wishes Artem On 12 August 2011 12:58, Artem Babayan wrote: > Hi, Jon > > You lost me here -- I think vtkActor does not have SetOpacity or > SetAlpha methods (at least this is what the compiler says). > vtkDataSetMapper does not have these methods as well. > > Best wishes > Artem > > On 12 August 2011 12:54, Jon Payne wrote: >> SetOpacity, I mean. >>> >>> Hi Artem, >>> >>> But did you try setting the whole surface to be very slightly transparent? >>> Not via the lookup table but calling SetAlpha(0.95) on the actor? Otherwise >>> it will still draw everything, even the transparent coloured bits, as though >>> they were opaque (hiding the pixels behind). >>> >>> Cheers, >>> Jon >>>> >>>> Hi, Jon, >>>> >>>> I did assign alpha 0.5 to the 'invisible' part -- it appears, that >>>> transparency works only for some subsets of possible graphics >>>> positions -- see attached pictures. >>>> >>>> Thank you for trying to help, by the way. >>>> >>>> Best wishes >>>> Artem >>>> >>>>> Hi Artem, >>>>> >>>>> I can't remember exactly but have you tried setting the alpha of the >>>>> whole >>>>> surface to 0.95? The reason is that somehow VTK/OpenGL needs to know to >>>>> ignore the z-buffer value (I think) so that pixels behind other pixels >>>>> which >>>>> are now transparent are still drawn. >>>>> >>>>> Cheers, >>>>> Jon >>>>> On 12/08/2011 09:08, Artem Babayan wrote: >>>>>> >>>>>> Hi, Thomas >>>>>> >>>>>> If you look at the second picture, you will see, that some of the >>>>>> 'colorful' graphic is covered by the white (or background color) field >>>>>> -- this white bit is the part of the graphics which correspond to >>>>>> 'undefined' values and have alpha=0. So it is not transparent -- I >>>>>> cannot see remaining graphics through it. >>>>>> >>>>>> To make it more clear (or more confusing) -- with alpha=1 ?the first >>>>>> picture would look like a colorful 'mountain' in the flat black >>>>>> 'field' extended to the vertical boundaries of the domain. With >>>>>> alpha=0 the black 'field' is of background color, so it is invisible >>>>>> on the first picture, but if I tilt the graphics slightly backwards >>>>>> (as on the second picture) part of the 'field' comes in front of the >>>>>> 'mountain' and you can see, that it is not actually transparent. >>>>>> >>>>>> Best wishes >>>>>> Artem >>>>>> >>>>>> >>>>>> >>>>>> On 12 August 2011 08:42, Kilgus, Thomas >>>>>> ?wrote: >>>>>>> >>>>>>> Hi Artem, >>>>>>> >>>>>>> I don't if I get you right, but the pictures look correct. If you set >>>>>>> the >>>>>>> alpha value of something to 0, you will see the color of the stuff >>>>>>> behind >>>>>>> it. I guess in your case there is nothing behind it and that's why the >>>>>>> background color can be seen? >>>>>>> >>>>>>> Best regards >>>>>>> Thomas >>>>>>> >>>>>>> -----Urspr?ngliche Nachricht----- >>>>>>> Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im >>>>>>> Auftrag von Artem Babayan >>>>>>> Gesendet: Donnerstag, 11. August 2011 19:13 >>>>>>> An: vtkusers at vtk.org >>>>>>> Betreff: [vtkusers] vtkLookUpTable transparency bug? >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I am trying to visualise a 2D scalar field as a 3D 'landscape'. Some >>>>>>> of >>>>>>> the numbers are just indicators of 'undefined' values, so I do not >>>>>>> want to >>>>>>> show them at all. >>>>>>> >>>>>>> I set these 'undefined' numbers to the values which correspond to the >>>>>>> first row of vtkLookUpTable and then assign this row 'transparent' >>>>>>> alpha=0: >>>>>>> >>>>>>> ? ? lut->SetTableValue(0, 0, 0, 0, 0); >>>>>>> >>>>>>> However, there are 2 problems: >>>>>>> >>>>>>> 1) This results in 'background' color, not 'transparent' -- see second >>>>>>> picture -- the transparent part actually closes some part of the >>>>>>> graphics. >>>>>>> 2) On one Unix system I haven't even got transparency -- the >>>>>>> 'transparent' part was drawn in black color (as corresponds to the >>>>>>> table >>>>>>> value). >>>>>>> >>>>>>> So am I doing something wrong here or is it a bug in vtkLookUpTable? >>>>>>> >>>>>>> Also, may be there is a smarter way not to show 'undefined' values? >>>>>>> >>>>>>> Best wishes >>>>>>> Artem >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://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://www.vtk.org/mailman/listinfo/vtkusers >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > From jpayne at hgl-dynamics.com Fri Aug 12 08:03:47 2011 From: jpayne at hgl-dynamics.com (Jon Payne) Date: Fri, 12 Aug 2011 13:03:47 +0100 Subject: [vtkusers] vtkLookUpTable transparency bug? In-Reply-To: <4E45147D.9090700@hgl-dynamics.com> References: <57EE86D11538B44096C712532DBB6C5AD3767ADF3A@DKFZEX01.ad.dkfz-heidelberg.de> <4E44F8C6.7050709@hgl-dynamics.com> <4E451216.7@hgl-dynamics.com> <4E45147D.9090700@hgl-dynamics.com> Message-ID: <4E4516A3.5060102@hgl-dynamics.com> Hi Artem, I am remembering further. If you set the opacity on the actor (with your polyDataMapper) to 0.95 then it will work as long as you don't rotate the surface because depth culling will still take place. I remember I got that far. I'm not sure how you disable depth culling. Maybe try depth peeling? http://www.vtk.org/Wiki/VTK/Depth_Peeling Hope you solve it, Cheers, Jon > SetOpacity, I mean. >> Hi Artem, >> >> But did you try setting the whole surface to be very slightly >> transparent? Not via the lookup table but calling SetAlpha(0.95) on >> the actor? Otherwise it will still draw everything, even the >> transparent coloured bits, as though they were opaque (hiding the >> pixels behind). >> >> Cheers, >> Jon >>> Hi, Jon, >>> >>> I did assign alpha 0.5 to the 'invisible' part -- it appears, that >>> transparency works only for some subsets of possible graphics >>> positions -- see attached pictures. >>> >>> Thank you for trying to help, by the way. >>> >>> Best wishes >>> Artem >>> >>>> Hi Artem, >>>> >>>> I can't remember exactly but have you tried setting the alpha of >>>> the whole >>>> surface to 0.95? The reason is that somehow VTK/OpenGL needs to >>>> know to >>>> ignore the z-buffer value (I think) so that pixels behind other >>>> pixels which >>>> are now transparent are still drawn. >>>> >>>> Cheers, >>>> Jon >>>> On 12/08/2011 09:08, Artem Babayan wrote: >>>>> Hi, Thomas >>>>> >>>>> If you look at the second picture, you will see, that some of the >>>>> 'colorful' graphic is covered by the white (or background color) >>>>> field >>>>> -- this white bit is the part of the graphics which correspond to >>>>> 'undefined' values and have alpha=0. So it is not transparent -- I >>>>> cannot see remaining graphics through it. >>>>> >>>>> To make it more clear (or more confusing) -- with alpha=1 the first >>>>> picture would look like a colorful 'mountain' in the flat black >>>>> 'field' extended to the vertical boundaries of the domain. With >>>>> alpha=0 the black 'field' is of background color, so it is invisible >>>>> on the first picture, but if I tilt the graphics slightly backwards >>>>> (as on the second picture) part of the 'field' comes in front of the >>>>> 'mountain' and you can see, that it is not actually transparent. >>>>> >>>>> Best wishes >>>>> Artem >>>>> >>>>> >>>>> >>>>> On 12 August 2011 08:42, Kilgus, Thomas >>>>> wrote: >>>>>> Hi Artem, >>>>>> >>>>>> I don't if I get you right, but the pictures look correct. If you >>>>>> set the >>>>>> alpha value of something to 0, you will see the color of the >>>>>> stuff behind >>>>>> it. I guess in your case there is nothing behind it and that's >>>>>> why the >>>>>> background color can be seen? >>>>>> >>>>>> Best regards >>>>>> Thomas >>>>>> >>>>>> -----Urspr?ngliche Nachricht----- >>>>>> Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im >>>>>> Auftrag von Artem Babayan >>>>>> Gesendet: Donnerstag, 11. August 2011 19:13 >>>>>> An: vtkusers at vtk.org >>>>>> Betreff: [vtkusers] vtkLookUpTable transparency bug? >>>>>> >>>>>> Hi, >>>>>> >>>>>> I am trying to visualise a 2D scalar field as a 3D 'landscape'. >>>>>> Some of >>>>>> the numbers are just indicators of 'undefined' values, so I do >>>>>> not want to >>>>>> show them at all. >>>>>> >>>>>> I set these 'undefined' numbers to the values which correspond to >>>>>> the >>>>>> first row of vtkLookUpTable and then assign this row 'transparent' >>>>>> alpha=0: >>>>>> >>>>>> lut->SetTableValue(0, 0, 0, 0, 0); >>>>>> >>>>>> However, there are 2 problems: >>>>>> >>>>>> 1) This results in 'background' color, not 'transparent' -- see >>>>>> second >>>>>> picture -- the transparent part actually closes some part of the >>>>>> graphics. >>>>>> 2) On one Unix system I haven't even got transparency -- the >>>>>> 'transparent' part was drawn in black color (as corresponds to >>>>>> the table >>>>>> value). >>>>>> >>>>>> So am I doing something wrong here or is it a bug in vtkLookUpTable? >>>>>> >>>>>> Also, may be there is a smarter way not to show 'undefined' values? >>>>>> >>>>>> Best wishes >>>>>> Artem >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://www.vtk.org/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From goodwin.lawlor at ucd.ie Fri Aug 12 08:32:31 2011 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Fri, 12 Aug 2011 16:32:31 +0400 Subject: [vtkusers] serialize a vtk object... Message-ID: <4E451D5F.5010905@ucd.ie> Hi Eric, There a class, vtkStringStream, and a patch to the xml reader/writer in the bug tracker I wrote to do this. As far as I can remember it works just fine (it was back in 2007). hth, Goodwin -- Bioengineering Research Group Dept. Mechanical Engineering University College Dublin, Ireland http://www.bioengineering-research.com From goodwin.lawlor at ucd.ie Fri Aug 12 08:53:44 2011 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Fri, 12 Aug 2011 16:53:44 +0400 Subject: [vtkusers] serialize a vtk object... In-Reply-To: <4E451D5F.5010905@ucd.ie> References: <4E451D5F.5010905@ucd.ie> Message-ID: <4E452258.5080700@ucd.ie> A link would of been helpful.... http://vtk.org/Bug/view.php?id=5265 On 12/08/2011 16:32, Goodwin Lawlor wrote: > Hi Eric, > > There a class, vtkStringStream, and a patch to the xml reader/writer in > the bug tracker I wrote to do this. As far as I can remember it works > just fine (it was back in 2007). > > hth, > > Goodwin > -- Bioengineering Research Group Dept. Mechanical Engineering University College Dublin, Ireland http://www.bioengineering-research.com From drescherjm at gmail.com Fri Aug 12 09:11:25 2011 From: drescherjm at gmail.com (John Drescher) Date: Fri, 12 Aug 2011 09:11:25 -0400 Subject: [vtkusers] vtk and Qt: linking error!! In-Reply-To: <4190997.306291313124538569.JavaMail.root@waimiri.ufrr.br> References: <4190997.306291313124538569.JavaMail.root@waimiri.ufrr.br> Message-ID: On Fri, Aug 12, 2011 at 12:48 AM, wrote: > Hello everybody! I have a problem in compiling my software in windows platform, which uses Qt and VTK. I get the following error messages: > > undefined reference to `_imp___ZN21vtkRendererCollection16GetFirstRendererEv ' > undefined reference to `_imp___ZN11vtkRenderer11RemoveActorEP7vtkProp ' > undefined reference to `_imp___ZN9vtkMapper14SetLookupTableEP18vtkScalarsToColors' > undefined reference to `_imp___ZN11vtkRenderer8AddActorEP7vtkProp ' > ? . > ? . > > It is a linking problem. Has anyone had this problem? > > My Project file is as below: > > > TEMPLATE = app > TARGET = > > IncludePath + = "C:\Program Files\VTK\include\vtk-5.6" > > LIBS + =-L"C:\Program Files\VTK\bin" -L"C:\Program Files\VTK\lib\vtk-5.6" -L"C:\VtkBin-4.6\bin" \ > ? ? ? ?-lvtkDICOMParser lvtkGeovis -lvtkIO lvtksqlite -lvtkzlib -lvtkGraphics -lvtkjpeg \ > ? ? ? ?-lvtksys -lvtkexpat -lvtklibxml -lvtktiff -lvtkFiltering -lvtkHybrid -lvtkmetaio -lvtkverdict -lQVTK -lvtkNetCDF \ > ? ? ? ?-lvtkViews -lvtkalglib -lvtkfreetype -lvtkImaging -lvtkpng -lvtkftgl -lvtkCharts -lvtkproj4 -lvtkVolumeRendering \ > ? ? ? ?-lvtkGenericFiltering -lvtkQtChart -lvtkCommon -lvtkDICOMParser -lQVTKWidgetPlugin > It looks like you are missing vtkRendering John From jothybasu at gmail.com Fri Aug 12 09:37:17 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 12 Aug 2011 14:37:17 +0100 Subject: [vtkusers] Change vtkChartXY grid opacity Message-ID: Hi all, How could I change grid opacity in vtkChartXY? I tried chart->GetAxis(vtkAxis::BOTTOM)->GetGridPen()->SetOpacity(0.6); But no effect. Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Fri Aug 12 10:30:50 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 12 Aug 2011 10:30:50 -0400 Subject: [vtkusers] Re : Click and drag a vertex of a vtkUnstructuredGrid In-Reply-To: <1313067272.57539.YahooMailRC@web132210.mail.ird.yahoo.com> References: <1313051835399-4688833.post@n5.nabble.com> <1313067272.57539.YahooMailRC@web132210.mail.ird.yahoo.com> Message-ID: On Thu, Aug 11, 2011 at 8:54 AM, R M wrote: > Apparently not. The interaction to select points works with a > vtkInteractorStyleTrackballActor class and it seems to only works with > vtkPolyData. > > May be I should convert my unstructured grid into a polydata ? You could use a polydata for the interaction but still update the unstructuredGrid points: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertexUnstructuredGrid Or you could do the unstructuredGrid->PolyData conversion that you mentioned: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter David From mlokida at yahoo.fr Fri Aug 12 10:59:49 2011 From: mlokida at yahoo.fr (R M) Date: Fri, 12 Aug 2011 15:59:49 +0100 (BST) Subject: [vtkusers] Re : Re : Click and drag a vertex of a vtkUnstructuredGrid In-Reply-To: References: <1313051835399-4688833.post@n5.nabble.com> <1313067272.57539.YahooMailRC@web132210.mail.ird.yahoo.com> Message-ID: <1313161189.6347.YahooMailRC@web132217.mail.ird.yahoo.com> Hi, The first example http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertexUnstructuredGridseems to have no difference with the http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex example. So for the moment I use a vtkCompositeDataGeometryFilter and then use vtkCleanPolyData on the output of the vtkCompositeDataGeometryFilter. And it seems to work. But because I have only one vtkPolyData now, I am quite block because I would like to hide some blocks. But, I have only one actor because only one vtkPolyData. I think I will try to loop through all blocks and convert each block in a vtkPolyData et change the points in order to point to the global array points (In order to move vertices that are shared by several blocks). And, I could use an Actor for each polydata and make them visible or not. I don't know yet if it will work. It is just a test. Thank you. ________________________________ De : David Doria ? : R M Cc : vtkusers at vtk.org Envoy? le : Ven 12 ao?t 2011, 16h 30min 50s Objet : Re: [vtkusers] Re : Click and drag a vertex of a vtkUnstructuredGrid On Thu, Aug 11, 2011 at 8:54 AM, R M wrote: > Apparently not. The interaction to select points works with a > vtkInteractorStyleTrackballActor class and it seems to only works with > vtkPolyData. > > May be I should convert my unstructured grid into a polydata ? You could use a polydata for the interaction but still update the unstructuredGrid points: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertexUnstructuredGrid Or you could do the unstructuredGrid->PolyData conversion that you mentioned: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter David -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Fri Aug 12 11:04:39 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 12 Aug 2011 11:04:39 -0400 Subject: [vtkusers] PolyDataExtractNormals example doers not work as expected with cell normals In-Reply-To: References: Message-ID: On Thu, Aug 11, 2011 at 6:57 PM, Alex Malyushytskyy wrote: > I needed to extract cell normals generated by vtkPolyDataNormals > and tried to use code from > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataExtractNormals > on two versions of vtk (5.4.2 and ?5.6.1) > > On both cell normals were not working as expected from example. > > First of all vtkPolyDataNormals generates vtkFloatArray instead of > vtkDoubleArray as an example, > second name of cell array is "Normals" and not "cellNormals" > > I suggest to change example > > from: > ?/////////////////////////////////////////////////////////////////////////////////// > ?// Double cell normals > ?vtkSmartPointer normalData4 = > ? ?vtkDoubleArray::SafeDownCast(polydata->GetCellData()->GetNormals("cellNormals")); > > ?if(normalData4) > ? ?{ > ? ?std::cout << "There are " << normalData4->GetNumberOfComponents() > ? ? ? ? ? ? ?<< " components in NormalData4 (double Cell \"Cell > Normals\")" << std::endl; > ? ?return true; > ? ?} > > > to: > ?/////////////////////////////////////////////////////////////////////////////////// > ?// Float cell normals > > ?vtkSmartPointer normalData4 = > ? ?vtkDoubleArray::SafeDownCast(polydata->GetCellData()->GetNormals("Normals")); > > ?if(normalData4) > ? ?{ > ? ?std::cout << "There are " << normalData4->GetNumberOfComponents() > ? ? ? ? ? ? ?<< " components in NormalData4 (float Cell \"Cell > Normals\")" << std::endl; > ? ?return true; > ? ?} > > > Regards, > ?Alex Alex, I understand your confusion. The multiple ways normals can be stored is indeed very confusing, and this is exactly what this example was made to demonstrate. I have made some changes: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataExtractNormals Basically there are 4 ways the normals could be stored (for both pointData and cellData). You should not assume anything about how someone has stored the normals, and check all of them. In two of the methods, you also don't know for sure the name of the array! Methods (1 and 2 would be preferred): 1) As floats, marked as normals explicitly (GetNormals()) 2) As doubles, marked as normals explicitly (GetNormals()) 3) As floats, as a regular array (here you'd need to know the name - GetArray("name")) 4) As doubles, as a regular array (here you'd need to know the name - GetArray("name")) Does the updated example clear anything up? David From daviddoria at gmail.com Fri Aug 12 11:07:44 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 12 Aug 2011 11:07:44 -0400 Subject: [vtkusers] Re : Re : Click and drag a vertex of a vtkUnstructuredGrid In-Reply-To: <1313161189.6347.YahooMailRC@web132217.mail.ird.yahoo.com> References: <1313051835399-4688833.post@n5.nabble.com> <1313067272.57539.YahooMailRC@web132210.mail.ird.yahoo.com> <1313161189.6347.YahooMailRC@web132217.mail.ird.yahoo.com> Message-ID: On Fri, Aug 12, 2011 at 10:59 AM, R M wrote: > Hi, > > The first example > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertexUnstructuredGrid > seems to have no difference with the > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex example. > > So for the moment I use a vtkCompositeDataGeometryFilter and then use > vtkCleanPolyData on the output of the vtkCompositeDataGeometryFilter. And it > seems to work. > > But because I have only one vtkPolyData now, I am quite block because I > would like to hide some blocks. But, I have only one actor because only one > vtkPolyData. > > I think I will try to loop through all blocks and convert each block in a > vtkPolyData et change the points in order to point to the global array > points (In order to move vertices that are shared by several blocks). And, I > could use an Actor for each polydata and make them visible or not. I don't > know yet if it will work. It is just a test. > > Thank you. Sorry, I uploaded the wrong file: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertexUnstructuredGrid There is not much different, but you'll see the input data is an unstructuredGrid instead of a PolyData. David From lindeval at dmat.ufrr.br Fri Aug 12 11:23:08 2011 From: lindeval at dmat.ufrr.br (lindeval at dmat.ufrr.br) Date: Fri, 12 Aug 2011 11:23:08 -0400 (GMT-04:00) Subject: [vtkusers] vtk and Qt: linking error!! In-Reply-To: Message-ID: <2430971.313481313162588360.JavaMail.root@waimiri.ufrr.br> Missing vtkRendering!!!! Thank you!!! ----- Mensagem original ----- De: "John Drescher" Para: lindeval at dmat.ufrr.br Cc: "vtkusers" Enviadas: Sexta-feira, 12 de Agosto de 2011 10:11:25 (GMT-0300) Auto-Detected Assunto: Re: [vtkusers] vtk and Qt: linking error!! On Fri, Aug 12, 2011 at 12:48 AM, wrote: > Hello everybody! I have a problem in compiling my software in windows platform, which uses Qt and VTK. I get the following error messages: > > undefined reference to `_imp___ZN21vtkRendererCollection16GetFirstRendererEv ' > undefined reference to `_imp___ZN11vtkRenderer11RemoveActorEP7vtkProp ' > undefined reference to `_imp___ZN9vtkMapper14SetLookupTableEP18vtkScalarsToColors' > undefined reference to `_imp___ZN11vtkRenderer8AddActorEP7vtkProp ' > ? . > ? . > > It is a linking problem. Has anyone had this problem? > > My Project file is as below: > > > TEMPLATE = app > TARGET = > > IncludePath + = "C:\Program Files\VTK\include\vtk-5.6" > > LIBS + =-L"C:\Program Files\VTK\bin" -L"C:\Program Files\VTK\lib\vtk-5.6" -L"C:\VtkBin-4.6\bin" \ > ? ? ? ?-lvtkDICOMParser lvtkGeovis -lvtkIO lvtksqlite -lvtkzlib -lvtkGraphics -lvtkjpeg \ > ? ? ? ?-lvtksys -lvtkexpat -lvtklibxml -lvtktiff -lvtkFiltering -lvtkHybrid -lvtkmetaio -lvtkverdict -lQVTK -lvtkNetCDF \ > ? ? ? ?-lvtkViews -lvtkalglib -lvtkfreetype -lvtkImaging -lvtkpng -lvtkftgl -lvtkCharts -lvtkproj4 -lvtkVolumeRendering \ > ? ? ? ?-lvtkGenericFiltering -lvtkQtChart -lvtkCommon -lvtkDICOMParser -lQVTKWidgetPlugin > It looks like you are missing vtkRendering John From emonson at cs.duke.edu Fri Aug 12 12:53:37 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Fri, 12 Aug 2011 12:53:37 -0400 Subject: [vtkusers] Change vtkChartXY grid opacity In-Reply-To: References: Message-ID: <3FCDC765-8786-4127-B107-45E008A95E73@cs.duke.edu> Hey Jothy, That should basically be the right way to do it. If you're feeding the opacity call a float, you should be using ->SetOpacityF(0.6), but that basic method works for me... Are you using VTK dev or 5.6? -Eric ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Eric E Monson Duke Visualization Technology Group On Aug 12, 2011, at 9:37 AM, Jothy wrote: > Hi all, > > How could I change grid opacity in vtkChartXY? > > I tried chart->GetAxis(vtkAxis::BOTTOM)->GetGridPen()->SetOpacity(0.6); > > But no effect. > > Thanks > > Jothy > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.asimov at gmail.com Fri Aug 12 14:47:06 2011 From: dan.asimov at gmail.com (Dan Asimov) Date: Fri, 12 Aug 2011 14:47:06 -0400 Subject: [vtkusers] Cutting non-convex surfaces Message-ID: Hi, I've a non-convex shape that I need to cut through. The user draws two contours parallel X-Y plane, then I generate the surface using vtkVoxelContoursToSurfaceFilter. However, when I cut with a plane parallel to x-y using vtkCutter, the order of the points of the generated result is messed up (pls see the attachments). I tried to run many filters on this result to get the expected one without success. Can anyone help me on how to cut this surface to get the expected result? Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Contour1.png Type: image/png Size: 2508 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Contour2.png Type: image/png Size: 2446 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ContoursToSurface.png Type: image/png Size: 11278 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CuttingResult.png Type: image/png Size: 3671 bytes Desc: not available URL: From alexmalvtk at gmail.com Fri Aug 12 17:18:10 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Fri, 12 Aug 2011 14:18:10 -0700 Subject: [vtkusers] PolyDataExtractNormals example doers not work as expected with cell normals In-Reply-To: References: Message-ID: David, Thanks for fixes and explanation (which I think is worth to add somewhere in the help or at least in the wiki example ). But it is still not clear to me, why filter (vtkPolyDataNormals) help does not describe the output, Wouldn't be useful also to change vtkPolyDataNormals help to say something like: "vtkPolyDataNormals is a filter that computes point and/or cell normals for a polygonal mesh and by default stores them in array of floats or doubles named "Normals" Is there a way to specify array name to direct output for vtkPolyDataNormals (or for filter in general)? Regards, Alex . On Fri, Aug 12, 2011 at 8:04 AM, David Doria wrote: > On Thu, Aug 11, 2011 at 6:57 PM, Alex Malyushytskyy > wrote: >> I needed to extract cell normals generated by vtkPolyDataNormals >> and tried to use code from >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataExtractNormals >> on two versions of vtk (5.4.2 and ?5.6.1) >> >> On both cell normals were not working as expected from example. >> >> First of all vtkPolyDataNormals generates vtkFloatArray instead of >> vtkDoubleArray as an example, >> second name of cell array is "Normals" and not "cellNormals" >> >> I suggest to change example >> >> from: >> ?/////////////////////////////////////////////////////////////////////////////////// >> ?// Double cell normals >> ?vtkSmartPointer normalData4 = >> ? ?vtkDoubleArray::SafeDownCast(polydata->GetCellData()->GetNormals("cellNormals")); >> >> ?if(normalData4) >> ? ?{ >> ? ?std::cout << "There are " << normalData4->GetNumberOfComponents() >> ? ? ? ? ? ? ?<< " components in NormalData4 (double Cell \"Cell >> Normals\")" << std::endl; >> ? ?return true; >> ? ?} >> >> >> to: >> ?/////////////////////////////////////////////////////////////////////////////////// >> ?// Float cell normals >> >> ?vtkSmartPointer normalData4 = >> ? ?vtkDoubleArray::SafeDownCast(polydata->GetCellData()->GetNormals("Normals")); >> >> ?if(normalData4) >> ? ?{ >> ? ?std::cout << "There are " << normalData4->GetNumberOfComponents() >> ? ? ? ? ? ? ?<< " components in NormalData4 (float Cell \"Cell >> Normals\")" << std::endl; >> ? ?return true; >> ? ?} >> >> >> Regards, >> ?Alex > > Alex, > > I understand your confusion. The multiple ways normals can be stored > is indeed very confusing, and this is exactly what this example was > made to demonstrate. I have made some changes: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataExtractNormals > > Basically there are 4 ways the normals could be stored (for both > pointData and cellData). You should not assume anything about how > someone has stored the normals, and check all of them. In two of the > methods, you also don't know for sure the name of the array! > > Methods (1 and 2 would be preferred): > > 1) As floats, marked as normals explicitly (GetNormals()) > 2) As doubles, marked as normals explicitly (GetNormals()) > 3) As floats, as a regular array (here you'd need to know the name - > GetArray("name")) > 4) As doubles, as a regular array (here you'd need to know the name - > GetArray("name")) > > Does the updated example clear anything up? > > David > From alexmalvtk at gmail.com Fri Aug 12 17:35:04 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Fri, 12 Aug 2011 14:35:04 -0700 Subject: [vtkusers] Clipping PolyData after vtkPolyDataConnectivityFilter problem In-Reply-To: References: Message-ID: I just want to add that clipping in my case supposed not to add any new node, so it does not have to remove nodal arrays. From alexmalvtk at gmail.com Fri Aug 12 17:37:06 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Fri, 12 Aug 2011 14:37:06 -0700 Subject: [vtkusers] Clipping PolyData after vtkPolyDataConnectivityFilter problem In-Reply-To: References: Message-ID: I just want to add that clipping in my case supposed not to add any new node, so it does not have to remove nodal arrays. On Wed, Aug 10, 2011 at 9:05 PM, Alex Malyushytskyy wrote: > I need to do the following manipulation with polydata: > - split by connectivity > - split by array values ( point and cell arrays ) > - do something to each part. > > Everything seems work, except splitting by array. > The problem is that I am trying to achieve it > with multiple clipping. > > But first clipping with vtkClipPolyData > does not pass "RegionId" array ?it gets from the input > (vtkPolyDataConnectivityFilter output) > > Even though it does preserve cell data array which was added to poly > data before connectivity filter. > > Questions is - ?why point data array is not passed (with clipping ) to > the vtkClipPolyData output? > How to clip poly data properly limiting lower and upper of scalar > without multiple filters? > > Code below demonstrates a problem by clipping output of > vtkPolyDataConnectivityFilter. > > Before clip->Update(); ?there is 1 point array and 1 cell array, > after clipping ? there is no point array but there is 1 cell array, > > Regards, > ?Alex > > > vtkAlgorithmOutput* inputConnection = ..... > > > vtkSmartPointer connectivityFilter = > vtkSmartPointer::New(); > connectivityFilter->SetInputConnection( inputConnection ?); > connectivityFilter->SetExtractionModeToAllRegions(); > connectivityFilter->ColorRegionsOn (); > connectivityFilter->Update(); > > int regions = connectivityFilter->GetNumberOfExtractedRegions(); > > if ( regions > 1 ) > { > ? ? ? ?vtkIndent indent( 1 ); > ? ? ? ?connectivityFilter->GetOutput()->GetPointData()->SetActiveScalars( > "RegionId" ); > ? ? ? ?connectivityFilter->GetOutput()->PrintSelf(std::cout, indent); > ? ? ? ?qDebug() << "connectivityFilter cells = " << > connectivityFilter->GetOutput()->GetNumberOfCells() ?<< endl; > > ? ? ? ?for ( int i=0; i < regions; i ++ ) > ? ? ? ?{ > ? ? ? ? ? ? ? ?qDebug() << "Before first clipping " << endl; > //output = 1 > ? ? ? ? ? ? ? ?qDebug() << "Number of PointData arrays: " << > connectivityFilter->GetOutput()->GetPointData()->GetNumberOfArrays() > << endl; > //output = 1 > ? ? ? ? ? ? ? ?qDebug() << "Number of Cell data arrays: " << > connectivityFilter->GetOutput()->GetCellData()->GetNumberOfArrays() << > endl; // returns 1 > > > ? ? ? ? ? ? ? ?vtkSmartPointer clip = > vtkSmartPointer::New(); > ? ? ? ? ? ? ? ?clip->SetInput( connectivityFilter->GetOutput() ); > ? ? ? ? ? ? ? ?clip->InsideOutOff(); > ? ? ? ? ? ? ? ?clip->SetValue( (float) i - 0.1 ); > ? ? ? ? ? ? ? ?clip->Update(); > > ? ? ? ? ? ? ? ?qDebug() << "After first clipping vtkClipPolyData" << endl; > //output = 0 // WHY? > ? ? ? ? ? ? ? ?qDebug() << "Number of PointData arrays: " << > clip->GetOutput()->GetPointData()->GetNumberOfArrays() << endl; > //output = 1 > ? ? ? ? ? ? ? ?qDebug() << "Number of Cell data arrays: " << > clip->GetOutput()->GetCellData()->GetNumberOfArrays() << endl; > > ? ? ? ? ? ? ? ?qDebug() << "After first clipping connectivityFilter output" << endl; > //output = 1 > ? ? ? ? ? ? ? ?qDebug() << "Number of PointData arrays: " << > connectivityFilter->GetOutput()->GetPointData()->GetNumberOfArrays() > << endl; > //output = 1 > ? ? ? ? ? ? ? ?qDebug() << "Number of Cell data arrays: " << > connectivityFilter->GetOutput()->GetCellData()->GetNumberOfArrays() << > endl; > > ? ? ? ? ? ? ? ?vtkSmartPointer clipInsideOut = > vtkSmartPointer::New(); > ? ? ? ? ? ? ? ?clipInsideOut->SetInput(clip->GetOutput() ); > ? ? ? ? ? ? ? ?clipInsideOut->InsideOutOn(); > > ? ? ? ? ? ? ? ?clipInsideOut->SetValue( (float) i + 0.1 ); > ? ? ? ? ? ? ? ?clipInsideOut->Update(); > ? ? ? ? ? ? ? ?clipInsideOut->GetOutput()->PrintSelf(std::cout, indent); > > .................... > > ? ? ? ?} > > > > } > From alexmalvtk at gmail.com Fri Aug 12 21:55:53 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Fri, 12 Aug 2011 18:55:53 -0700 Subject: [vtkusers] How to un-assign and input from an actor? In-Reply-To: <1312764865811-4676117.post@n5.nabble.com> References: <1312764865811-4676117.post@n5.nabble.com> Message-ID: I am not sure I understand the problem is the following does not work for you? actor->SetInput( anotherInput); On Sun, Aug 7, 2011 at 5:54 PM, soheilghafurian wrote: > Hi guys > > if we want to assign an input to an actor, we use actor->SetInput method. My > question is, after this, if we want to deassociate the actor from the input, > and assign it to another input, what should we do? > > I don't think simply using SetInput with another source as the parameter > will work. > > > Thanks a lot for your help. > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-un-assign-and-input-from-an-actor-tp4676117p4676117.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://www.vtk.org/mailman/listinfo/vtkusers > From alexmalvtk at gmail.com Fri Aug 12 22:08:00 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Fri, 12 Aug 2011 19:08:00 -0700 Subject: [vtkusers] serialize a vtk object... In-Reply-To: <4E452258.5080700@ucd.ie> References: <4E451D5F.5010905@ucd.ie> <4E452258.5080700@ucd.ie> Message-ID: As far as I understood this change never came through. Developers decided that they had no enough time to do it. Fortunately you can always add this as a different subclass. Thanks Goodwin On Fri, Aug 12, 2011 at 5:53 AM, Goodwin Lawlor wrote: > A link would of been helpful.... > > http://vtk.org/Bug/view.php?id=5265 > > > On 12/08/2011 16:32, Goodwin Lawlor wrote: >> >> Hi Eric, >> >> There a class, vtkStringStream, and a patch to the xml reader/writer in >> the bug tracker I wrote to do this. As far as I can remember it works >> just fine (it was back in 2007). >> >> hth, >> >> Goodwin >> > > > -- > Bioengineering Research Group > Dept. Mechanical Engineering > University College Dublin, Ireland > http://www.bioengineering-research.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://www.vtk.org/mailman/listinfo/vtkusers > From daviddoria at gmail.com Sat Aug 13 10:07:21 2011 From: daviddoria at gmail.com (David Doria) Date: Sat, 13 Aug 2011 10:07:21 -0400 Subject: [vtkusers] PolyDataExtractNormals example doers not work as expected with cell normals In-Reply-To: References: Message-ID: On Fri, Aug 12, 2011 at 5:18 PM, Alex Malyushytskyy wrote: > David, > > Thanks for fixes and explanation (which I think is worth to add > somewhere in the help or at least in the wiki example ). > > But it is still not clear to me, why filter (vtkPolyDataNormals) help > does not describe the output, > > Wouldn't be useful also to change vtkPolyDataNormals help to say something like: > "vtkPolyDataNormals is a filter that computes point and/or cell > normals for a polygonal mesh and by default stores them in array of > floats or doubles ?named "Normals" > > Is there a way to specify array name to direct output for > vtkPolyDataNormals (or for filter in general)? > > Regards, > > Alex What do you think of this new documentation text? http://review.source.kitware.com/#change,2450 > Is there a way to specify array name to direct output for > vtkPolyDataNormals (or for filter in general)? Not in this case, the name "Normals" seems to be hardcoded. David From bob at stlcc.org Sat Aug 13 13:29:42 2011 From: bob at stlcc.org (Bob Palank) Date: Sat, 13 Aug 2011 12:29:42 -0500 Subject: [vtkusers] Run attempt Fails in VC++ Message-ID: In VC++ 2010 Express, whenever I click the green arrow with Release and Win32 set, Execution Fails. But if I leave VC++ and go directly to the generated .exe file in the Project's Release folder, then the exe runs fine. Has anyone executed from within VC++ ? Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Sun Aug 14 10:19:39 2011 From: drescherjm at gmail.com (John Drescher) Date: Sun, 14 Aug 2011 10:19:39 -0400 Subject: [vtkusers] Run attempt Fails in VC++ In-Reply-To: References: Message-ID: On Sat, Aug 13, 2011 at 1:29 PM, Bob Palank wrote: > In VC++ 2010 Express, whenever I click the green arrow with Release and > Win32 set, Execution Fails. > But if I leave VC++ and go directly to the generated .exe file in the > Project's Release folder, then the?exe runs fine. > Has anyone?executed from within VC++ ? Not sure what you were executing since this is the only message I got in my mailbox, however vtk works when compiled in VS2003, VS2005, VS2008 and VS2010 retail versions. I have used all of the these compilers in the last 3 years. Lately I have switched to 64 bit VS 2010 under windows 7. John From al.gry at web.de Mon Aug 15 02:58:01 2011 From: al.gry at web.de (al.gry) Date: Sun, 14 Aug 2011 23:58:01 -0700 (PDT) Subject: [vtkusers] Useless comupations in vtkMath Message-ID: <1313391481151-4700083.post@n5.nabble.com> Hi everyone, I posted this thread last week but it wasn't accepted so Im trying again. I just looked into vtkMath source code provided via VTK.git and I found things like this: inline double vtkMath::Normalize(double x[3]) { double den; if ( ( den = vtkMath::Norm( x ) ) != 0.0 ) { for (int i=0; i < 3; i++) { x[i] /= den; } } return den; } I guess the for-loop can be erased since it's useless... btw, if-instruction doesn't do anything so it's also useless. Regards, Al -- View this message in context: http://vtk.1045678.n5.nabble.com/Useless-comupations-in-vtkMath-tp4700083p4700083.html Sent from the VTK - Users mailing list archive at Nabble.com. From leonid_dulman at yahoo.co.uk Mon Aug 15 03:09:37 2011 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Mon, 15 Aug 2011 08:09:37 +0100 (BST) Subject: [vtkusers] QWidget:Must construct a QApplication before a QPaintDevice Message-ID: <1313392177.23794.YahooMailClassic@web24101.mail.ird.yahoo.com> Hi to All In next Example #include "qmainwindow.h" #include "qapplication.h" #include #include #include #include #include #include #include #include int main( int argc, char **argv ) { QVTKApplication app(argc,argv); QMainWindow *mainWindow = new QMainWindow; mainWindow->setFixedSize(640,360); QVTKWidget *widget = new QVTKWidget; mainWindow->setCentralWidget(widget); vtkTextSource *text = vtkTextSource::New(); text->SetText("Hello World!"); text->BackingOff(); vtkVectorText *vectorText = vtkVectorText::New(); vectorText->SetText("QVTKWidget"); vtkPolyDataMapper *textMapper = vtkPolyDataMapper::New(); textMapper->SetInput(text->GetOutput()); vtkPolyDataMapper *vectorTextMapper = vtkPolyDataMapper::New(); vectorTextMapper->SetInput(vectorText->GetOutput()); vtkActor *textActor = vtkActor::New(); textActor->SetMapper(textMapper); vtkActor *vectorTextActor = vtkActor::New(); vectorTextActor->SetMapper(vectorTextMapper); vtkRenderer *renderer = vtkRenderer::New(); renderer->SetBackground(0.4,0.6,0.8); renderer->AddActor(textActor); renderer->AddActor(vectorTextActor); vtkRenderWindow *renderWindow = vtkRenderWindow::New(); renderWindow->AddRenderer(renderer); renderWindow->SetStereoTypeToDresden(); widget->SetRenderWindow(renderWindow); mainWindow->show(); app.aboutQt(); return app.exec(); } I have got massage "QWidget:Must construct a QApplication before a QPaintDevice" only in Windows 7 SP1, in Windows XP and linux I have no any problems My installation is Qt 4.7.3 VTK 5.9.0 (from git) Thank you. Leonid From dzenanz at gmail.com Mon Aug 15 03:14:45 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 15 Aug 2011 09:14:45 +0200 Subject: [vtkusers] Useless comupations in vtkMath In-Reply-To: <1313391481151-4700083.post@n5.nabble.com> References: <1313391481151-4700083.post@n5.nabble.com> Message-ID: I just took a look at vtk 5.6.1, and the Norm function looks like this: // Description: // Compute the norm of 3-vector. static float Norm(const float x[3]) { return static_cast (sqrt( x[0] * x[0] + x[1] * x[1] + x[2] * x[2] ) );}; That means it returns the magnitude of the vector, and the Normalize method works as it should: 1. calculate magnitude 2. if it is not zero 3. divide all vector components by the magnitude 4. return magnitude Nothing can be erased here, only made more clear, like this: inline double vtkMath::Normalize(double x[3]) { double den = vtkMath::Norm( x ); if ( den != 0.0 ) { for (int i=0; i < 3; i++) { x[i] /= den; } } return den; } On Mon, Aug 15, 2011 at 08:58, al.gry wrote: > Hi everyone, > > I posted this thread last week but it wasn't accepted so Im trying again. > > I just looked into vtkMath source code provided via VTK.git and I found > things like this: > > inline double vtkMath::Normalize(double x[3]) > { > double den; > if ( ( den = vtkMath::Norm( x ) ) != 0.0 ) > { > for (int i=0; i < 3; i++) > { > x[i] /= den; > } > } > return den; > } > > I guess the for-loop can be erased since it's useless... btw, > if-instruction > doesn't do anything so it's also useless. > > Regards, Al > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Useless-comupations-in-vtkMath-tp4700083p4700083.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Aug 15 03:16:55 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 15 Aug 2011 09:16:55 +0200 Subject: [vtkusers] QWidget:Must construct a QApplication before a QPaintDevice In-Reply-To: <1313392177.23794.YahooMailClassic@web24101.mail.ird.yahoo.com> References: <1313392177.23794.YahooMailClassic@web24101.mail.ird.yahoo.com> Message-ID: Does this help: http://dzenanz.wordpress.com/2011/04/05/qwidget-must-construct-a-qapplication-before-a-qpaintdevice/ On Mon, Aug 15, 2011 at 09:09, Leonid Dulman wrote: > Hi to All > In next Example > #include "qmainwindow.h" > #include "qapplication.h" > > #include > #include > > #include > #include > #include > #include > #include > #include > > int main( int argc, char **argv ) > { > QVTKApplication app(argc,argv); > QMainWindow *mainWindow = new QMainWindow; > mainWindow->setFixedSize(640,360); > > QVTKWidget *widget = new QVTKWidget; > mainWindow->setCentralWidget(widget); > > vtkTextSource *text = vtkTextSource::New(); > text->SetText("Hello World!"); > text->BackingOff(); > vtkVectorText *vectorText = vtkVectorText::New(); > vectorText->SetText("QVTKWidget"); > vtkPolyDataMapper *textMapper = vtkPolyDataMapper::New(); > textMapper->SetInput(text->GetOutput()); > vtkPolyDataMapper *vectorTextMapper = vtkPolyDataMapper::New(); > vectorTextMapper->SetInput(vectorText->GetOutput()); > vtkActor *textActor = vtkActor::New(); > textActor->SetMapper(textMapper); > vtkActor *vectorTextActor = vtkActor::New(); > vectorTextActor->SetMapper(vectorTextMapper); > vtkRenderer *renderer = vtkRenderer::New(); > renderer->SetBackground(0.4,0.6,0.8); > renderer->AddActor(textActor); > renderer->AddActor(vectorTextActor); > vtkRenderWindow *renderWindow = vtkRenderWindow::New(); > renderWindow->AddRenderer(renderer); > renderWindow->SetStereoTypeToDresden(); > > widget->SetRenderWindow(renderWindow); > mainWindow->show(); > app.aboutQt(); > return app.exec(); > } > > I have got massage "QWidget:Must construct a QApplication before a > QPaintDevice" only in Windows 7 SP1, in Windows XP and linux I have no any > problems > > My installation is > Qt 4.7.3 > VTK 5.9.0 (from git) > Thank you. Leonid > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tux.dev at gmail.com Mon Aug 15 04:32:11 2011 From: tux.dev at gmail.com (ahmed shaker) Date: Mon, 15 Aug 2011 13:02:11 +0430 Subject: [vtkusers] Qt & Vtk Message-ID: Hi Is Qt fast enough for big data? What can i do with very big data, is vtk have any solution? Thanks __ Ahmed http://svaj.hostei.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From wdx.cn at qq.com Mon Aug 15 04:34:31 2011 From: wdx.cn at qq.com (=?gbk?B?d2R4?=) Date: Mon, 15 Aug 2011 16:34:31 +0800 Subject: [vtkusers] Qt & Vtk Message-ID: More detail , please. Or no one know how to answer. ------------------ Original ------------------ From: "ahmed shaker"; Date: 2011?8?15?(???) ??5:02 To: "vtkusers"; Subject: [vtkusers] Qt & Vtk Hi Is Qt fast enough for big data? What can i do with very big data, is vtk have any solution? Thanks __ Ahmed http://svaj.hostei.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From thihaucsm at gmail.com Mon Aug 15 05:52:02 2011 From: thihaucsm at gmail.com (Thiha Oo) Date: Mon, 15 Aug 2011 17:52:02 +0800 Subject: [vtkusers] vtkImageTracerWidget problem Message-ID: Hi, I am new to vtk and I am trying to draw a freehand path with vtkImageTracerWidget on loaded vtkImageData. I set the View Properties for imagetracer from my vtkImageViewer2's image actor as follow m_imageTracerWidget->SetViewProp( m_imageViewer2->GetImageActor( ) ); The imageTracerWidget can be drawn correctly in front of background image for the first half of total slices of volume. For example, if the total number of slices is 100, the tracerWidget was drawn in front of the slices for slice 0 to 50 but it was drawn behind the slice for slice number 51 to 99. Please kindly provide me how to solve this issue for vtkImageTracerWidget. Thanks and regards, Thiha -------------- next part -------------- An HTML attachment was scrubbed... URL: From fabian-richter at gmx.de Mon Aug 15 06:57:51 2011 From: fabian-richter at gmx.de (Fabian) Date: Mon, 15 Aug 2011 03:57:51 -0700 (PDT) Subject: [vtkusers] multi-objects in VTK; loop-Problem Message-ID: <1313405871804-4700582.post@n5.nabble.com> Hi everyone, I am quite new in VTK so this might be an easy question: I want to write a program, that shows me a specified number of polygons (lets say 1000). For some reasons I need different ojects. So I thought of rendering 500 planes (2 polygons each). So i would like to create a loop that works like this (of course this is pseudocode): - loop (for i < 500) - create a vtk-plane with vtkplanesource with the name plane#i (plane1, plane2, plane3,...plane500) - i++ Unfortunately I cannot manage this problem. Any help is appreciated, THANK YOU, Fabian [Windows 7, MS Visual Studio 2010] -- View this message in context: http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4700582.html Sent from the VTK - Users mailing list archive at Nabble.com. From dzenanz at gmail.com Mon Aug 15 08:32:43 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 15 Aug 2011 14:32:43 +0200 Subject: [vtkusers] multi-objects in VTK; loop-Problem In-Reply-To: <1313405871804-4700582.post@n5.nabble.com> References: <1313405871804-4700582.post@n5.nabble.com> Message-ID: Have you considered using an array of planes? So instead of plane1, plane2 etc you have plane[1], plane[500]? On Mon, Aug 15, 2011 at 12:57, Fabian wrote: > Hi everyone, > > I am quite new in VTK so this might be an easy question: > > I want to write a program, that shows me a specified number of polygons > (lets say 1000). > For some reasons I need different ojects. So I thought of rendering 500 > planes (2 polygons each). > > So i would like to create a loop that works like this (of course this is > pseudocode): > > - loop (for i < 500) > - create a vtk-plane with vtkplanesource with the name plane#i (plane1, > plane2, plane3,...plane500) > - i++ > > Unfortunately I cannot manage this problem. > > Any help is appreciated, THANK YOU, > Fabian > > [Windows 7, MS Visual Studio 2010] > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4700582.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fabian-richter at gmx.de Mon Aug 15 08:47:30 2011 From: fabian-richter at gmx.de (Fabian) Date: Mon, 15 Aug 2011 05:47:30 -0700 (PDT) Subject: [vtkusers] multi-objects in VTK; loop-Problem In-Reply-To: References: <1313405871804-4700582.post@n5.nabble.com> Message-ID: <1313412450710-4700838.post@n5.nabble.com> Hi, yes I tried. But the line vtkPlaneSource *plane[i] = vtkPlaneSource::New(); caused trouble. This is a part of the code: int main() { int plane[500]; int i; for (i = 0; i < 499; ++i) { plane[i]=i+1; vtkPlaneSource *plane[i] = vtkPlaneSource::New(); } system("PAUSE"); //Just a check for me return 0; } -- View this message in context: http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4700838.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Mon Aug 15 08:57:06 2011 From: jothybasu at gmail.com (Jothy) Date: Mon, 15 Aug 2011 13:57:06 +0100 Subject: [vtkusers] multi-objects in VTK; loop-Problem In-Reply-To: <1313412450710-4700838.post@n5.nabble.com> References: <1313405871804-4700582.post@n5.nabble.com> <1313412450710-4700838.post@n5.nabble.com> Message-ID: I feel it would be better to use std::vectorplanes. Then create a plane and add to the vector using push_back. HTH Jothy On Mon, Aug 15, 2011 at 1:47 PM, Fabian wrote: > Hi, > > yes I tried. But the line > > vtkPlaneSource *plane[i] = vtkPlaneSource::New(); > > caused trouble. > > This is a part of the code: > > int main() > { > int plane[500]; > > int i; > for (i = 0; i < 499; ++i) > { > plane[i]=i+1; > vtkPlaneSource *plane[i] = vtkPlaneSource::New(); > } > system("PAUSE"); //Just a check for me > return 0; > } > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4700838.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From al.gry at web.de Mon Aug 15 09:18:24 2011 From: al.gry at web.de (al.gry) Date: Mon, 15 Aug 2011 06:18:24 -0700 (PDT) Subject: [vtkusers] Useless comupations in vtkMath In-Reply-To: References: <1313391481151-4700083.post@n5.nabble.com> Message-ID: <1313414304370-4700978.post@n5.nabble.com> but why do you need to divide? x[i]/=den equals x[i] = x[i]/den, right? so it changes x[i] locally and x isn't used anywhere in further computation. or did I miss some reference? -- View this message in context: http://vtk.1045678.n5.nabble.com/Useless-comupations-in-vtkMath-tp4700083p4700978.html Sent from the VTK - Users mailing list archive at Nabble.com. From fabian-richter at gmx.de Mon Aug 15 09:21:36 2011 From: fabian-richter at gmx.de (Fabian) Date: Mon, 15 Aug 2011 06:21:36 -0700 (PDT) Subject: [vtkusers] multi-objects in VTK; loop-Problem In-Reply-To: References: <1313405871804-4700582.post@n5.nabble.com> <1313412450710-4700838.post@n5.nabble.com> Message-ID: <1313414496000-4700989.post@n5.nabble.com> Thank You for your ideas! But *ashamed* I dont know how to do implement this or how to use push back :(( I searched for some hints on the web but didnt find fast help. -- View this message in context: http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4700989.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Mon Aug 15 09:28:03 2011 From: jothybasu at gmail.com (Jothy) Date: Mon, 15 Aug 2011 14:28:03 +0100 Subject: [vtkusers] multi-objects in VTK; loop-Problem In-Reply-To: <1313414496000-4700989.post@n5.nabble.com> References: <1313405871804-4700582.post@n5.nabble.com> <1313412450710-4700838.post@n5.nabble.com> <1313414496000-4700989.post@n5.nabble.com> Message-ID: It's simple #include std::vectorplaneList; for(i=0;i<10;i++) { vtkPlaneSource *plane=vtkPlaneSource::New(); //Do whatever you want planeList.push_back(plane); } If you want to acess the plane, you could do it by planeList[i]->GetOrigin();//For instance Neither I am a c++ expert, just started a copule of months ago! HTH Jothy On Mon, Aug 15, 2011 at 2:21 PM, Fabian wrote: > Thank You for your ideas! > > But *ashamed* I dont know how to do implement this or how to use push back > :(( > > I searched for some hints on the web but didnt find fast help. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4700989.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From al.gry at web.de Mon Aug 15 09:29:41 2011 From: al.gry at web.de (al.gry) Date: Mon, 15 Aug 2011 06:29:41 -0700 (PDT) Subject: [vtkusers] Useless comupations in vtkMath In-Reply-To: <1313414304370-4700978.post@n5.nabble.com> References: <1313391481151-4700083.post@n5.nabble.com> <1313414304370-4700978.post@n5.nabble.com> Message-ID: <1313414981980-4701019.post@n5.nabble.com> stupid I, sorry... where is my "c++ for dummies"?.. -- View this message in context: http://vtk.1045678.n5.nabble.com/Useless-comupations-in-vtkMath-tp4700083p4701019.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Mon Aug 15 10:12:51 2011 From: jothybasu at gmail.com (Jothy) Date: Mon, 15 Aug 2011 15:12:51 +0100 Subject: [vtkusers] Change vtkChartXY grid opacity In-Reply-To: <3FCDC765-8786-4127-B107-45E008A95E73@cs.duke.edu> References: <3FCDC765-8786-4127-B107-45E008A95E73@cs.duke.edu> Message-ID: Got it, thanks! Jothy On Fri, Aug 12, 2011 at 5:53 PM, Eric E. Monson wrote: > Hey Jothy, > > That should basically be the right way to do it. If you're feeding the > opacity call a float, you should be using ->SetOpacityF(0.6), but that basic > method works for me... > > Are you using VTK dev or 5.6? > > -Eric > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? > Eric E Monson > Duke Visualization Technology Group > > > On Aug 12, 2011, at 9:37 AM, Jothy wrote: > > Hi all, > > How could I change grid opacity in vtkChartXY? > > I tried chart->GetAxis(vtkAxis::BOTTOM)->GetGridPen()->SetOpacity(0.6); > > But no effect. > > Thanks > > Jothy > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Mon Aug 15 10:23:13 2011 From: jothybasu at gmail.com (Jothy) Date: Mon, 15 Aug 2011 15:23:13 +0100 Subject: [vtkusers] Remove all plots from vtkChartXY Message-ID: Hi all, I have rendered few line plots using vtkChartXY. But I want to replot some of the data. I looks like it replots everything including X&Y labels. I tried calling contextView->GetRenderer()->RemoveAllViewProps(); But it doesn't work! My loop is somehting like this vtkSmartPointer chart = vtkSmartPointer::New(); for (int x=0;x<10;x++) { vtkPlot *line = chart->AddPlot(vtkChart::LINE); line->SetInput(table, 0, 1); } contextview->GetInteractor()->Initialize(); contextView->view->GetInteractor()->Start(); Any suggestions? Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexmalvtk at gmail.com Mon Aug 15 15:40:47 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Mon, 15 Aug 2011 12:40:47 -0700 Subject: [vtkusers] PolyDataExtractNormals example doers not work as expected with cell normals In-Reply-To: References: Message-ID: David, I like new text. It does clarify filter behavior. Thanks, Alex On Sat, Aug 13, 2011 at 7:07 AM, David Doria wrote: > On Fri, Aug 12, 2011 at 5:18 PM, Alex Malyushytskyy > wrote: >> David, >> >> Thanks for fixes and explanation (which I think is worth to add >> somewhere in the help or at least in the wiki example ). >> >> But it is still not clear to me, why filter (vtkPolyDataNormals) help >> does not describe the output, >> >> Wouldn't be useful also to change vtkPolyDataNormals help to say something like: >> "vtkPolyDataNormals is a filter that computes point and/or cell >> normals for a polygonal mesh and by default stores them in array of >> floats or doubles ?named "Normals" >> >> Is there a way to specify array name to direct output for >> vtkPolyDataNormals (or for filter in general)? >> >> Regards, >> >> Alex > > What do you think of this new documentation text? > > http://review.source.kitware.com/#change,2450 > >> Is there a way to specify array name to direct output for >> vtkPolyDataNormals (or for filter in general)? > > Not in this case, the name "Normals" seems to be hardcoded. > > David > From dbrayford at gmail.com Mon Aug 15 17:12:12 2011 From: dbrayford at gmail.com (David Brayford) Date: Mon, 15 Aug 2011 15:12:12 -0600 Subject: [vtkusers] dereferences a pointer to vtkImageData Message-ID: Hi, I am trying to dereference a pointer to a vtkImageData object but get the following error message on the line where I am trying to pass a dereferenced pointer to the SetImageData function. // function declaration void SetImageDate(vtkImageData im); myImage->SetImageData( *image ); // where image is a pointer; vtkImageData * image; "error C2248: 'vtkImageData::vtkImageData' : cannot access private member declared in class 'vtkImageData'" Thanks David From daviddoria at gmail.com Mon Aug 15 17:20:56 2011 From: daviddoria at gmail.com (David Doria) Date: Mon, 15 Aug 2011 17:20:56 -0400 Subject: [vtkusers] dereferences a pointer to vtkImageData In-Reply-To: References: Message-ID: On Mon, Aug 15, 2011 at 5:12 PM, David Brayford wrote: > Hi, > > I am trying to dereference a pointer to a vtkImageData object but get > the following error message on the line where I am trying to pass a > dereferenced pointer to the SetImageData function. > > // function declaration > void SetImageDate(vtkImageData im); > > > myImage->SetImageData( *image ); // where image is a pointer; > vtkImageData * image; > > > ?"error C2248: 'vtkImageData::vtkImageData' : cannot access private > member declared in class 'vtkImageData'" > > Thanks > David VTK does not allow you to ever use a non-pointer. That is, this is illegal: void SetImageDate(vtkImageData im); and must be changed to void SetImageDate(vtkImageData* im); (This corresponds to vtkImageData image; being illegal and needing to be replaced by vtkImageData* image = vtkImageData::New() ). David From m.d.greef at gmail.com Tue Aug 16 04:37:20 2011 From: m.d.greef at gmail.com (Martijn de Greef) Date: Tue, 16 Aug 2011 10:37:20 +0200 Subject: [vtkusers] multi-objects in VTK; loop-Problem In-Reply-To: References: <1313405871804-4700582.post@n5.nabble.com> <1313412450710-4700838.post@n5.nabble.com> <1313414496000-4700989.post@n5.nabble.com> Message-ID: Just a small addition (you would probably figure yourself as well): std::vector planeList; should be: std::vector planeList; Martijn 2011/8/15 Jothy > It's simple > > #include > > std::vectorplaneList; > > for(i=0;i<10;i++) > { > > vtkPlaneSource *plane=vtkPlaneSource::New(); > //Do whatever you want > planeList.push_back(plane); > > } > > If you want to acess the plane, you could do it by > > planeList[i]->GetOrigin();//For instance > > Neither I am a c++ expert, just started a copule of months ago! > > HTH > > Jothy > > > > > On Mon, Aug 15, 2011 at 2:21 PM, Fabian wrote: > >> Thank You for your ideas! >> >> But *ashamed* I dont know how to do implement this or how to use push back >> :(( >> >> I searched for some hints on the web but didnt find fast help. >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4700989.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://www.vtk.org/mailman/listinfo/vtkusers >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kingvsk at aol.com Tue Aug 16 05:55:22 2011 From: kingvsk at aol.com (Sathish Kumar) Date: Tue, 16 Aug 2011 15:25:22 +0530 Subject: [vtkusers] Example code for creating lookup table editor Message-ID: <4E4A3E8A.5010106@aol.com> Hi everybody, I am trying to create a look up table editor(for change the Dicom 3D object color and opacity) like osirix. Please guide me with some sample code or suggestions. Thanks, Sathish From emonson at cs.duke.edu Tue Aug 16 07:15:22 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Tue, 16 Aug 2011 07:15:22 -0400 Subject: [vtkusers] Remove all plots from vtkChartXY In-Reply-To: References: Message-ID: If I'm understanding correctly what you're trying to do, you should be able to call chart->ClearPlots(); -Eric ------------------------------------------------------ Eric E Monson Duke Visualization Technology Group On Aug 15, 2011, at 10:23 AM, Jothy wrote: > Hi all, > > I have rendered few line plots using vtkChartXY. But I want to replot some of the data. I looks like it replots everything including X&Y labels. I tried calling > > contextView->GetRenderer()->RemoveAllViewProps(); > > But it doesn't work! > > My loop is somehting like this > > vtkSmartPointer chart = > vtkSmartPointer::New(); > > for (int x=0;x<10;x++) > { > vtkPlot *line = chart->AddPlot(vtkChart::LINE); > line->SetInput(table, 0, 1); > } > > contextview->GetInteractor()->Initialize(); > contextView->view->GetInteractor()->Start(); > > Any suggestions? > > Thanks > > Jothy > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From xanadu.michael at googlemail.com Tue Aug 16 07:30:22 2011 From: xanadu.michael at googlemail.com (Michael Xanadu) Date: Tue, 16 Aug 2011 13:30:22 +0200 Subject: [vtkusers] How to remove tissue for MIP? Message-ID: Hi, I have successfuly implemented a MIP (max intensity projection) in my program. I did it like in VolView - a simple ramp for the preset. Now I want to add some threshold sliders to remove tissue from the MIP. For example I wanna remove tissue of high values (bones) so I can see soft tissue in the MIP which is usually covered by the bones. So I'm looking for a good solution now: 1. I could manipulate the preset ramp but that would not lead to a desired result. 2. I could also manipulate manually the original volume data before the calculation of the MIP and decrease all voxels specified by the theshold. But that would take a lot of memory and would be very slowly. So does anybody know another alternative? Maybe I could use a special VTK filter or something? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Tue Aug 16 07:51:58 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 16 Aug 2011 12:51:58 +0100 Subject: [vtkusers] Remove all plots from vtkChartXY In-Reply-To: References: Message-ID: Thanks very much Eric, it works! is there any way to clear the axis labels, there is no clear in chart->GetAxis(vtkAxis::LEFT) Thanks again Jothy On Tue, Aug 16, 2011 at 12:15 PM, Eric E. Monson wrote: > If I'm understanding correctly what you're trying to do, you should be able > to call > > chart->ClearPlots(); > > -Eric > > ------------------------------------------------------ > Eric E Monson > Duke Visualization Technology Group > > > On Aug 15, 2011, at 10:23 AM, Jothy wrote: > > Hi all, > > I have rendered few line plots using vtkChartXY. But I want to replot some > of the data. I looks like it replots everything including X&Y labels. I > tried calling > > contextView->GetRenderer()->RemoveAllViewProps(); > > But it doesn't work! > > My loop is somehting like this > > vtkSmartPointer chart = > vtkSmartPointer::New(); > > for (int x=0;x<10;x++) > { > vtkPlot *line = chart->AddPlot(vtkChart::LINE); > line->SetInput(table, 0, 1); > } > > contextview->GetInteractor()->Initialize(); > contextView->view->GetInteractor()->Start(); > > Any suggestions? > > Thanks > > Jothy > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Tue Aug 16 08:18:22 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 16 Aug 2011 13:18:22 +0100 Subject: [vtkusers] Reset vtkChartXY to original view Message-ID: Hi all, Is it possible to reset the view in vtkChartXY?. I mean after zooming and panning I want to get back to the original view. Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From emonson at cs.duke.edu Tue Aug 16 09:17:09 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Tue, 16 Aug 2011 09:17:09 -0400 Subject: [vtkusers] Remove all plots from vtkChartXY In-Reply-To: References: Message-ID: <5DB6CD18-D60C-4F22-B0F3-1A030545277B@cs.duke.edu> Well, it depends on the effect you want. When I try chart->ClearPlots() it seems to clear out everything, so there aren't any labels, either. If you have the axes autoscaling, then I don't think there is any way to clear the tick labels since it is always trying to set some sort of range. You can set manual tick positions and labels and just have empty arrays when you make the calls to axis->SetTickPositions() and ->SetTickLabels() and the axes won't have tick labels. (Both of those calls do an axis->SetBehavior(2) behind the scenes.) If you're talking about the label for the axis itself (axis title), then I think you have to just feed it an empty string. -Eric On Aug 16, 2011, at 7:51 AM, Jothy wrote: > Thanks very much Eric, it works! > > is there any way to clear the axis labels, there is no clear in chart->GetAxis(vtkAxis::LEFT) > > Thanks again > > Jothy > > > On Tue, Aug 16, 2011 at 12:15 PM, Eric E. Monson wrote: > If I'm understanding correctly what you're trying to do, you should be able to call > > chart->ClearPlots(); > > -Eric > > ------------------------------------------------------ > Eric E Monson > Duke Visualization Technology Group > > > On Aug 15, 2011, at 10:23 AM, Jothy wrote: > >> Hi all, >> >> I have rendered few line plots using vtkChartXY. But I want to replot some of the data. I looks like it replots everything including X&Y labels. I tried calling >> >> contextView->GetRenderer()->RemoveAllViewProps(); >> >> But it doesn't work! >> >> My loop is somehting like this >> >> vtkSmartPointer chart = >> vtkSmartPointer::New(); >> >> for (int x=0;x<10;x++) >> { >> vtkPlot *line = chart->AddPlot(vtkChart::LINE); >> line->SetInput(table, 0, 1); >> } >> >> contextview->GetInteractor()->Initialize(); >> contextView->view->GetInteractor()->Start(); >> >> Any suggestions? >> >> Thanks >> >> Jothy >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emonson at cs.duke.edu Tue Aug 16 09:28:54 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Tue, 16 Aug 2011 09:28:54 -0400 Subject: [vtkusers] Reset vtkChartXY to original view In-Reply-To: References: Message-ID: <469123A3-22AA-43B2-AF8C-59AE30C0A9A6@cs.duke.edu> There's not a built-in interaction that does this (e.g. double-click), but if you have the axis behaviors set on auto, then you should be able to tie some GUI interaction to a call to chart->RecalculateBounds() and the plots will refill the chart area. Otherwise, if you "original view" isn't an autoscaled one, then you'll just have to save the max/min values and make calls to axis->SetMaximum() and ->SetMinimum() (or SetRange()). At some point I'd like to get the interactions to detect a double-click, but it hasn't been a high-enough priority yet. -Eric On Aug 16, 2011, at 8:18 AM, Jothy wrote: > Hi all, > > Is it possible to reset the view in vtkChartXY?. I mean after zooming and panning I want to get back to the original view. > > Thanks > > Jothy > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers From jothybasu at gmail.com Tue Aug 16 09:32:04 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 16 Aug 2011 14:32:04 +0100 Subject: [vtkusers] Remove all plots from vtkChartXY In-Reply-To: <5DB6CD18-D60C-4F22-B0F3-1A030545277B@cs.duke.edu> References: <5DB6CD18-D60C-4F22-B0F3-1A030545277B@cs.duke.edu> Message-ID: I put the vtkChartXY setting (axis min,max,behaviour,etc..) in the class constructor. Now it works fine. Thanks for your suggestions! Do you know how to to format the labels. (I mean the one which popsup when the mouse hovers over the line). Right now I see e.g.,Plot1: 10.0676,70.009456 I want only two decimal places. Thanks Jothy On Tue, Aug 16, 2011 at 2:17 PM, Eric E. Monson wrote: > Well, it depends on the effect you want. When I try chart->ClearPlots() it > seems to clear out everything, so there aren't any labels, either. If you > have the axes autoscaling, then I don't think there is any way to clear the > tick labels since it is always trying to set some sort of range. You can set > manual tick positions and labels and just have empty arrays when you make > the calls to axis->SetTickPositions() and ->SetTickLabels() and the axes > won't have tick labels. (Both of those calls do an axis->SetBehavior(2) > behind the scenes.) If you're talking about the label for the axis itself > (axis title), then I think you have to just feed it an empty string. > > -Eric > > > On Aug 16, 2011, at 7:51 AM, Jothy wrote: > > Thanks very much Eric, it works! > > is there any way to clear the axis labels, there is no clear in > chart->GetAxis(vtkAxis::LEFT) > > Thanks again > > Jothy > > > On Tue, Aug 16, 2011 at 12:15 PM, Eric E. Monson wrote: > >> If I'm understanding correctly what you're trying to do, you should be >> able to call >> >> chart->ClearPlots(); >> >> -Eric >> >> ------------------------------------------------------ >> Eric E Monson >> Duke Visualization Technology Group >> >> >> On Aug 15, 2011, at 10:23 AM, Jothy wrote: >> >> Hi all, >> >> I have rendered few line plots using vtkChartXY. But I want to replot some >> of the data. I looks like it replots everything including X&Y labels. I >> tried calling >> >> contextView->GetRenderer()->RemoveAllViewProps(); >> >> But it doesn't work! >> >> My loop is somehting like this >> >> vtkSmartPointer chart = >> vtkSmartPointer::New(); >> >> for (int x=0;x<10;x++) >> { >> vtkPlot *line = chart->AddPlot(vtkChart::LINE); >> line->SetInput(table, 0, 1); >> } >> >> contextview->GetInteractor()->Initialize(); >> contextView->view->GetInteractor()->Start(); >> >> Any suggestions? >> >> Thanks >> >> Jothy >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://www.vtk.org/mailman/listinfo/vtkusers >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Tue Aug 16 09:34:22 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 16 Aug 2011 14:34:22 +0100 Subject: [vtkusers] Reset vtkChartXY to original view In-Reply-To: <469123A3-22AA-43B2-AF8C-59AE30C0A9A6@cs.duke.edu> References: <469123A3-22AA-43B2-AF8C-59AE30C0A9A6@cs.duke.edu> Message-ID: I have set axis behaviours to FIXED. So I will try yhe second suggestion. Thanks! Jothy On Tue, Aug 16, 2011 at 2:28 PM, Eric E. Monson wrote: > There's not a built-in interaction that does this (e.g. double-click), but > if you have the axis behaviors set on auto, then you should be able to tie > some GUI interaction to a call to chart->RecalculateBounds() and the plots > will refill the chart area. Otherwise, if you "original view" isn't an > autoscaled one, then you'll just have to save the max/min values and make > calls to axis->SetMaximum() and ->SetMinimum() (or SetRange()). > > At some point I'd like to get the interactions to detect a double-click, > but it hasn't been a high-enough priority yet. > > -Eric > > > On Aug 16, 2011, at 8:18 AM, Jothy wrote: > > > Hi all, > > > > Is it possible to reset the view in vtkChartXY?. I mean after zooming and > panning I want to get back to the original view. > > > > Thanks > > > > Jothy > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Tue Aug 16 09:34:48 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 16 Aug 2011 09:34:48 -0400 Subject: [vtkusers] Example code for creating lookup table editor In-Reply-To: <4E4A3E8A.5010106@aol.com> References: <4E4A3E8A.5010106@aol.com> Message-ID: On Tue, Aug 16, 2011 at 5:55 AM, Sathish Kumar wrote: > Hi everybody, > > I am trying to create a look up table editor(for change the Dicom 3D object > color and opacity) like osirix. Please guide me with some sample code or > suggestions. > > Thanks, > Sathish I am not familiar with Osirix, but have you seen these examples? http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCells http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ColorLookupTable http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/Transparency David From emonson at cs.duke.edu Tue Aug 16 09:47:55 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Tue, 16 Aug 2011 09:47:55 -0400 Subject: [vtkusers] Remove all plots from vtkChartXY In-Reply-To: References: <5DB6CD18-D60C-4F22-B0F3-1A030545277B@cs.duke.edu> Message-ID: <59422781-74AB-4ED9-836E-7465ACD5D24F@cs.duke.edu> Currently there are not any utility methods for setting the format of the tooltip text. Not too long ago, though, we pulled out the method which sets the tooltip text and position, vtkChartXY::SetTooltipInfo(), so it would be easier to create a custom tooltip by making a simple subclass of vtkChartXY which overrides this method. For your case you would just need to change the way the text values are formatted. For one of my applications I changed it to pass an index to a custom subclass of vtkTooltipItem which then displays an image associated with the hovered-over plot point. It's something that would make sense to add at some point so that people don't have to do a custom class just to change the format of the tooltip, but if someone were going to add that functionality some thought would have to be given to whether you also allow people to specify other types of information they want in the tooltip rather than just precision of the existing info... -Eric On Aug 16, 2011, at 9:32 AM, Jothy wrote: > I put the vtkChartXY setting (axis min,max,behaviour,etc..) in the class constructor. Now it works fine. > > Thanks for your suggestions! > > Do you know how to to format the labels. (I mean the one which popsup when the mouse hovers over the line). Right now I see e.g.,Plot1: 10.0676,70.009456 I want only two decimal places. > > Thanks > > Jothy > > On Tue, Aug 16, 2011 at 2:17 PM, Eric E. Monson wrote: > Well, it depends on the effect you want. When I try chart->ClearPlots() it seems to clear out everything, so there aren't any labels, either. If you have the axes autoscaling, then I don't think there is any way to clear the tick labels since it is always trying to set some sort of range. You can set manual tick positions and labels and just have empty arrays when you make the calls to axis->SetTickPositions() and ->SetTickLabels() and the axes won't have tick labels. (Both of those calls do an axis->SetBehavior(2) behind the scenes.) If you're talking about the label for the axis itself (axis title), then I think you have to just feed it an empty string. > > -Eric > > > On Aug 16, 2011, at 7:51 AM, Jothy wrote: > >> Thanks very much Eric, it works! >> >> is there any way to clear the axis labels, there is no clear in chart->GetAxis(vtkAxis::LEFT) >> >> Thanks again >> >> Jothy >> >> >> On Tue, Aug 16, 2011 at 12:15 PM, Eric E. Monson wrote: >> If I'm understanding correctly what you're trying to do, you should be able to call >> >> chart->ClearPlots(); >> >> -Eric >> >> ------------------------------------------------------ >> Eric E Monson >> Duke Visualization Technology Group >> >> >> On Aug 15, 2011, at 10:23 AM, Jothy wrote: >> >>> Hi all, >>> >>> I have rendered few line plots using vtkChartXY. But I want to replot some of the data. I looks like it replots everything including X&Y labels. I tried calling >>> >>> contextView->GetRenderer()->RemoveAllViewProps(); >>> >>> But it doesn't work! >>> >>> My loop is somehting like this >>> >>> vtkSmartPointer chart = >>> vtkSmartPointer::New(); >>> >>> for (int x=0;x<10;x++) >>> { >>> vtkPlot *line = chart->AddPlot(vtkChart::LINE); >>> line->SetInput(table, 0, 1); >>> } >>> >>> contextview->GetInteractor()->Initialize(); >>> contextView->view->GetInteractor()->Start(); >>> >>> Any suggestions? >>> >>> Thanks >>> >>> Jothy >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Tue Aug 16 10:05:25 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 16 Aug 2011 15:05:25 +0100 Subject: [vtkusers] Remove all plots from vtkChartXY In-Reply-To: <59422781-74AB-4ED9-836E-7465ACD5D24F@cs.duke.edu> References: <5DB6CD18-D60C-4F22-B0F3-1A030545277B@cs.duke.edu> <59422781-74AB-4ED9-836E-7465ACD5D24F@cs.duke.edu> Message-ID: Thanks for the info Eric! What does this( http://www.vtk.org/doc/nightly/html/classvtkPlot.html#a919726b9891869528b80bd5555b043a2) do in vtkPlot. It has a method SetToolTipLabelFormat. is it newly added. I ma using vtk 5.6. Jothy On Tue, Aug 16, 2011 at 2:47 PM, Eric E. Monson wrote: > Currently there are not any utility methods for setting the format of the > tooltip text. Not too long ago, though, we pulled out the method which sets > the tooltip text and position, vtkChartXY::SetTooltipInfo(), so it would be > easier to create a custom tooltip by making a simple subclass of vtkChartXY > which overrides this method. For your case you would just need to change the > way the text values are formatted. For one of my applications I changed it > to pass an index to a custom subclass of vtkTooltipItem which then displays > an image associated with the hovered-over plot point. > > It's something that would make sense to add at some point so that people > don't have to do a custom class just to change the format of the tooltip, > but if someone were going to add that functionality some thought would have > to be given to whether you also allow people to specify other types of > information they want in the tooltip rather than just precision of the > existing info... > > -Eric > > > On Aug 16, 2011, at 9:32 AM, Jothy wrote: > > I put the vtkChartXY setting (axis min,max,behaviour,etc..) in the class > constructor. Now it works fine. > > Thanks for your suggestions! > > Do you know how to to format the labels. (I mean the one which popsup when > the mouse hovers over the line). Right now I see e.g.,Plot1: > 10.0676,70.009456 I want only two decimal places. > > Thanks > > Jothy > > On Tue, Aug 16, 2011 at 2:17 PM, Eric E. Monson wrote: > >> Well, it depends on the effect you want. When I try chart->ClearPlots() it >> seems to clear out everything, so there aren't any labels, either. If you >> have the axes autoscaling, then I don't think there is any way to clear the >> tick labels since it is always trying to set some sort of range. You can set >> manual tick positions and labels and just have empty arrays when you make >> the calls to axis->SetTickPositions() and ->SetTickLabels() and the axes >> won't have tick labels. (Both of those calls do an axis->SetBehavior(2) >> behind the scenes.) If you're talking about the label for the axis itself >> (axis title), then I think you have to just feed it an empty string. >> >> -Eric >> >> >> On Aug 16, 2011, at 7:51 AM, Jothy wrote: >> >> Thanks very much Eric, it works! >> >> is there any way to clear the axis labels, there is no clear in >> chart->GetAxis(vtkAxis::LEFT) >> >> Thanks again >> >> Jothy >> >> >> On Tue, Aug 16, 2011 at 12:15 PM, Eric E. Monson wrote: >> >>> If I'm understanding correctly what you're trying to do, you should be >>> able to call >>> >>> chart->ClearPlots(); >>> >>> -Eric >>> >>> ------------------------------------------------------ >>> Eric E Monson >>> Duke Visualization Technology Group >>> >>> >>> On Aug 15, 2011, at 10:23 AM, Jothy wrote: >>> >>> Hi all, >>> >>> I have rendered few line plots using vtkChartXY. But I want to replot >>> some of the data. I looks like it replots everything including X&Y labels. I >>> tried calling >>> >>> contextView->GetRenderer()->RemoveAllViewProps(); >>> >>> But it doesn't work! >>> >>> My loop is somehting like this >>> >>> vtkSmartPointer chart = >>> vtkSmartPointer::New(); >>> >>> for (int x=0;x<10;x++) >>> { >>> vtkPlot *line = chart->AddPlot(vtkChart::LINE); >>> line->SetInput(table, 0, 1); >>> } >>> >>> contextview->GetInteractor()->Initialize(); >>> contextView->view->GetInteractor()->Start(); >>> >>> Any suggestions? >>> >>> Thanks >>> >>> Jothy >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://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://www.vtk.org/mailman/listinfo/vtkusers >>> >>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.asimov at gmail.com Tue Aug 16 10:38:41 2011 From: dan.asimov at gmail.com (Dan Asimov) Date: Tue, 16 Aug 2011 10:38:41 -0400 Subject: [vtkusers] Cutting non-convex surfaces In-Reply-To: References: Message-ID: Any idea anyone? Is there a way to cut non-convex surfaces? Thanks, Dan On Fri, Aug 12, 2011 at 2:47 PM, Dan Asimov wrote: > Hi, > > I've a non-convex shape that I need to cut through. The user draws two > contours parallel X-Y plane, then I generate the surface using > vtkVoxelContoursToSurfaceFilter. However, when I cut with a plane parallel > to x-y using vtkCutter, the order of the points of the generated result is > messed up (pls see the attachments). I tried to run many filters on this > result to get the expected one without success. > > Can anyone help me on how to cut this surface to get the expected result? > > Thanks, > Dan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Tue Aug 16 10:46:59 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 16 Aug 2011 15:46:59 +0100 Subject: [vtkusers] Reset vtkChartXY to original view In-Reply-To: <469123A3-22AA-43B2-AF8C-59AE30C0A9A6@cs.duke.edu> References: <469123A3-22AA-43B2-AF8C-59AE30C0A9A6@cs.duke.edu> Message-ID: Hi Eric, The second idea works, but you need call the RecalculateBounds() first (so it updates the position of the plots) then call SetMinimum and SetMaximum. Of course, I linked these actions to a pushButton in the GUI! Thank you Jothy On Tue, Aug 16, 2011 at 2:28 PM, Eric E. Monson wrote: > There's not a built-in interaction that does this (e.g. double-click), but > if you have the axis behaviors set on auto, then you should be able to tie > some GUI interaction to a call to chart->RecalculateBounds() and the plots > will refill the chart area. Otherwise, if you "original view" isn't an > autoscaled one, then you'll just have to save the max/min values and make > calls to axis->SetMaximum() and ->SetMinimum() (or SetRange()). > > At some point I'd like to get the interactions to detect a double-click, > but it hasn't been a high-enough priority yet. > > -Eric > > > On Aug 16, 2011, at 8:18 AM, Jothy wrote: > > > Hi all, > > > > Is it possible to reset the view in vtkChartXY?. I mean after zooming and > panning I want to get back to the original view. > > > > Thanks > > > > Jothy > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From agagliardi at ara.co.uk Tue Aug 16 11:01:25 2011 From: agagliardi at ara.co.uk (Adriano Gagliardi) Date: Tue, 16 Aug 2011 16:01:25 +0100 Subject: [vtkusers] Filter for removing unused points Message-ID: <50A5A46740E74B179356B64657906B7A@win.ara> Dear All, Is there a filter in VTK that will remove any unused points in vtkPolyData but retain the cell ordering? Thanks, Adriano =================================== Adriano Gagliardi MEng PhD Business Sector Leader Computational Aerodynamics Aircraft Research Association Ltd. Manton Lane Bedford Tel: 01234 32 4644 E-mail: agagliardi at ara.co.uk Url: www.ara.co.uk ********************************************************************** This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ********************************************************************** From daviddoria at gmail.com Tue Aug 16 11:02:19 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 16 Aug 2011 11:02:19 -0400 Subject: [vtkusers] Filter for removing unused points In-Reply-To: <50A5A46740E74B179356B64657906B7A@win.ara> References: <50A5A46740E74B179356B64657906B7A@win.ara> Message-ID: On Tue, Aug 16, 2011 at 11:01 AM, Adriano Gagliardi wrote: > > Dear All, > > Is there a filter in VTK that will remove any unused points in vtkPolyData > but retain the cell ordering? > > Thanks, > > Adriano Have you tried vtkCleanPolyData? http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html David From mlokida at yahoo.fr Tue Aug 16 11:02:32 2011 From: mlokida at yahoo.fr (R M) Date: Tue, 16 Aug 2011 16:02:32 +0100 (BST) Subject: [vtkusers] vtkPolyData and free Selection (Lasso) Selection Message-ID: <1313506952.50014.YahooMailRC@web132212.mail.ird.yahoo.com> Hello, I would like to know if there is a free selection (lasso) tool that can be use to select points or cells of a vtkPolyData ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 16 11:05:43 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Aug 2011 09:05:43 -0600 Subject: [vtkusers] Cutting non-convex surfaces In-Reply-To: References: Message-ID: Hi Dan, The fact that your surface is non-convex is not what is causing the problem. The problem is that vtkCutter generates a whole bunch of independent line segments, but what you want is a single polyline. The filter to join the line segments to create a polyline in vtkStripper. Also note that vtkStripper will _not_ put the points in the correct order. What it does is generate a polyline cell array that contains the correct ordering of the PointIDs. - David On Tue, Aug 16, 2011 at 8:38 AM, Dan Asimov wrote: > > Any idea anyone? Is there a way to cut non-convex surfaces? > > > Thanks, > Dan > > > > On Fri, Aug 12, 2011 at 2:47 PM, Dan Asimov wrote: >> >> Hi, >> >> I've a non-convex shape that I need to cut through. The user draws two >> contours parallel X-Y plane, then I generate the surface using >> vtkVoxelContoursToSurfaceFilter. However, when I cut with a plane parallel >> to x-y using vtkCutter, the order of the points of the generated result is >> messed up (pls see the attachments). I tried to run many filters on this >> result to get the expected one without success. >> >> Can anyone help me on how to cut this surface to get the expected result? >> >> Thanks, >> Dan From luca.tersi at unibo.it Tue Aug 16 11:06:17 2011 From: luca.tersi at unibo.it (Luca Tersi) Date: Tue, 16 Aug 2011 17:06:17 +0200 Subject: [vtkusers] Compilation problems on Win7 64bit and mingw64 Message-ID: Hi, I tryed to compile VTK on Windows 7 64bit, using mingw64, nut I got the following error: [ 18%] Built target vtkverdict [ 18%] Building C object Utilities/vtknetcdf/CMakeFiles/vtkNetCDF.dir/v2i.c.obj c:/Users/lt/Documents/kitware/vtk-5.6.1_src/Utilities/vtknetcdf/v2i.c:76: error: redefinition of typedef 'schar' c:/Users/lt/Documents/kitware/vtk-5.6.1_src/Utilities/vtknetcdf/ncx.h:160: note: previous declaration of 'schar' was here make[2]: *** [Utilities/vtknetcdf/CMakeFiles/vtkNetCDF.dir/v2i.c.obj] Error 1 make[1]: *** [Utilities/vtknetcdf/CMakeFiles/vtkNetCDF.dir/all] Error 2 make: *** [all] Error 2 Am I missing something? What the best way to use gcc and g++ on this platform? Thanks in advance Luca --- *Luca Tersi, Ph.D.* *Department of Electronics, Computer Science, and Systems* *(DEIS)* *Health Sciences and Technologies - Interdepartmental Center for Industrial Research (HST - ICIR) * *Alma Mater Studiorum - University of Bologna* Via Venezia 52, I-47521 Cesena (FC) - Italy ----------------------------------------- *Phone*: (+39) 0547 33 89 53 *Mobile*: (+39) 349 84 92 262 *Fax*: (+39) 0547 17 91 071 *Skype*: lucatersi *E-Mail*: luca.tersi at unibo.it lucatersi at gmail.com ----------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From agagliardi at ara.co.uk Tue Aug 16 11:15:45 2011 From: agagliardi at ara.co.uk (Adriano Gagliardi) Date: Tue, 16 Aug 2011 16:15:45 +0100 Subject: [vtkusers] Filter for removing unused points In-Reply-To: References: <50A5A46740E74B179356B64657906B7A@win.ara> Message-ID: <70957E17A9AC4393BDF637E5EE6E0B76@win.ara> I thought I remembered trying that already and it didn't work. Just tried it again after your prompt and it does. I was clearly remembering a different issue! Thanks for the answer. =================================== Adriano Gagliardi MEng PhD Business Sector Leader Computational Aerodynamics Aircraft Research Association Ltd. Manton Lane Bedford Tel: 01234 32 4644 E-mail: agagliardi at ara.co.uk Url: www.ara.co.uk -----Original Message----- From: David Doria [mailto:daviddoria at gmail.com] Sent: 16 August 2011 16:02 To: agagliardi at ara.co.uk Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Filter for removing unused points On Tue, Aug 16, 2011 at 11:01 AM, Adriano Gagliardi wrote: > > Dear All, > > Is there a filter in VTK that will remove any unused points in > vtkPolyData but retain the cell ordering? > > Thanks, > > Adriano Have you tried vtkCleanPolyData? http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html David ********************************************************************** This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ********************************************************************** From leonid_dulman at yahoo.co.uk Tue Aug 16 11:27:40 2011 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Tue, 16 Aug 2011 16:27:40 +0100 (BST) Subject: [vtkusers] How to build Cone like this ? Message-ID: <1313508460.3428.YahooMailClassic@web24103.mail.ird.yahoo.com> Hi to All How to build Cone like this ? . . . . . . . . . . . . . . . . . . . d1 ------------------ d2 . . . . . . . . . . . . . . . . . . . Thank you. Leonid From daviddoria at gmail.com Tue Aug 16 11:35:49 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 16 Aug 2011 11:35:49 -0400 Subject: [vtkusers] How to build Cone like this ? In-Reply-To: <1313508460.3428.YahooMailClassic@web24103.mail.ird.yahoo.com> References: <1313508460.3428.YahooMailClassic@web24103.mail.ird.yahoo.com> Message-ID: On Tue, Aug 16, 2011 at 11:27 AM, Leonid Dulman wrote: > Hi to All > How to build Cone like this ? > > Is the tip of that chopped off on purpose? If not, http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone David -------------- next part -------------- An HTML attachment was scrubbed... URL: From 812075761 at qq.com Tue Aug 16 11:38:23 2011 From: 812075761 at qq.com (=?gbk?B?yfHPybfFxqg=?=) Date: Tue, 16 Aug 2011 23:38:23 +0800 Subject: [vtkusers] How to build Cone like this ? Message-ID: cut data,....you can find something useful in 'vtk user guide' ------------------ Original ------------------ From: "David Doria"; Date: 2011?8?16?(???) ??11:35 To: "Leonid Dulman"; Cc: "vtkusers"; Subject: Re: [vtkusers] How to build Cone like this ? On Tue, Aug 16, 2011 at 11:27 AM, Leonid Dulman wrote: Hi to All How to build Cone like this ? Is the tip of that chopped off on purpose? If not, http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone David -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Tue Aug 16 11:41:36 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 16 Aug 2011 11:41:36 -0400 Subject: [vtkusers] How to build Cone like this ? In-Reply-To: References: Message-ID: 2011/8/16 ???? <812075761 at qq.com> > cut data,....you can find something useful in 'vtk user guide' > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/CapClip http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/SolidClip David -------------- next part -------------- An HTML attachment was scrubbed... URL: From emonson at cs.duke.edu Tue Aug 16 11:45:19 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Tue, 16 Aug 2011 11:45:19 -0400 Subject: [vtkusers] Remove all plots from vtkChartXY In-Reply-To: References: <5DB6CD18-D60C-4F22-B0F3-1A030545277B@cs.duke.edu> <59422781-74AB-4ED9-836E-7465ACD5D24F@cs.duke.edu> Message-ID: I guess I'd better update my VTK from git once in a while -- I hadn't see that! :) It's interesting that this is part of vtkPlot... I'll have to take a look sometime soon. The Charts have come a _long_ way since VTK 5.6, so hopefully you can update to a newer version soon. Thanks for pointing it out, -Eric On Aug 16, 2011, at 10:05 AM, Jothy wrote: > Thanks for the info Eric! > > What does this(http://www.vtk.org/doc/nightly/html/classvtkPlot.html#a919726b9891869528b80bd5555b043a2) do in vtkPlot. > > It has a method SetToolTipLabelFormat. is it newly added. I ma using vtk 5.6. > > Jothy > > On Tue, Aug 16, 2011 at 2:47 PM, Eric E. Monson wrote: > Currently there are not any utility methods for setting the format of the tooltip text. Not too long ago, though, we pulled out the method which sets the tooltip text and position, vtkChartXY::SetTooltipInfo(), so it would be easier to create a custom tooltip by making a simple subclass of vtkChartXY which overrides this method. For your case you would just need to change the way the text values are formatted. For one of my applications I changed it to pass an index to a custom subclass of vtkTooltipItem which then displays an image associated with the hovered-over plot point. > > It's something that would make sense to add at some point so that people don't have to do a custom class just to change the format of the tooltip, but if someone were going to add that functionality some thought would have to be given to whether you also allow people to specify other types of information they want in the tooltip rather than just precision of the existing info... > > -Eric > > > On Aug 16, 2011, at 9:32 AM, Jothy wrote: > >> I put the vtkChartXY setting (axis min,max,behaviour,etc..) in the class constructor. Now it works fine. >> >> Thanks for your suggestions! >> >> Do you know how to to format the labels. (I mean the one which popsup when the mouse hovers over the line). Right now I see e.g.,Plot1: 10.0676,70.009456 I want only two decimal places. >> >> Thanks >> >> Jothy >> >> On Tue, Aug 16, 2011 at 2:17 PM, Eric E. Monson wrote: >> Well, it depends on the effect you want. When I try chart->ClearPlots() it seems to clear out everything, so there aren't any labels, either. If you have the axes autoscaling, then I don't think there is any way to clear the tick labels since it is always trying to set some sort of range. You can set manual tick positions and labels and just have empty arrays when you make the calls to axis->SetTickPositions() and ->SetTickLabels() and the axes won't have tick labels. (Both of those calls do an axis->SetBehavior(2) behind the scenes.) If you're talking about the label for the axis itself (axis title), then I think you have to just feed it an empty string. >> >> -Eric >> >> >> On Aug 16, 2011, at 7:51 AM, Jothy wrote: >> >>> Thanks very much Eric, it works! >>> >>> is there any way to clear the axis labels, there is no clear in chart->GetAxis(vtkAxis::LEFT) >>> >>> Thanks again >>> >>> Jothy >>> >>> >>> On Tue, Aug 16, 2011 at 12:15 PM, Eric E. Monson wrote: >>> If I'm understanding correctly what you're trying to do, you should be able to call >>> >>> chart->ClearPlots(); >>> >>> -Eric >>> >>> ------------------------------------------------------ >>> Eric E Monson >>> Duke Visualization Technology Group >>> >>> >>> On Aug 15, 2011, at 10:23 AM, Jothy wrote: >>> >>>> Hi all, >>>> >>>> I have rendered few line plots using vtkChartXY. But I want to replot some of the data. I looks like it replots everything including X&Y labels. I tried calling >>>> >>>> contextView->GetRenderer()->RemoveAllViewProps(); >>>> >>>> But it doesn't work! >>>> >>>> My loop is somehting like this >>>> >>>> vtkSmartPointer chart = >>>> vtkSmartPointer::New(); >>>> >>>> for (int x=0;x<10;x++) >>>> { >>>> vtkPlot *line = chart->AddPlot(vtkChart::LINE); >>>> line->SetInput(table, 0, 1); >>>> } >>>> >>>> contextview->GetInteractor()->Initialize(); >>>> contextView->view->GetInteractor()->Start(); >>>> >>>> Any suggestions? >>>> >>>> Thanks >>>> >>>> Jothy >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers >>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.asimov at gmail.com Tue Aug 16 11:45:46 2011 From: dan.asimov at gmail.com (Dan Asimov) Date: Tue, 16 Aug 2011 11:45:46 -0400 Subject: [vtkusers] Cutting non-convex surfaces In-Reply-To: References: Message-ID: Hi David, Thanks for your reply. Actually, I tried vtkStripper, but as you said it just generated a polyline consists of the same line segments in the same wrong order, which is kind of useless here. I don't know but it looks to me that no filter will be able to get the correct ("expected") order of the line segments except the cutter object itself. After cutting, the result is just some scattered lines. What do you think? Am I missing something?? Thanks, Dan On Tue, Aug 16, 2011 at 11:05 AM, David Gobbi wrote: > Hi Dan, > > The fact that your surface is non-convex is not what is causing the > problem. > > The problem is that vtkCutter generates a whole bunch of independent > line segments, but what you want is a single polyline. The filter to join > the line segments to create a polyline in vtkStripper. > > Also note that vtkStripper will _not_ put the points in the correct order. > What it does is generate a polyline cell array that contains the correct > ordering of the PointIDs. > > - David > > > On Tue, Aug 16, 2011 at 8:38 AM, Dan Asimov wrote: > > > > Any idea anyone? Is there a way to cut non-convex surfaces? > > > > > > Thanks, > > Dan > > > > > > > > On Fri, Aug 12, 2011 at 2:47 PM, Dan Asimov > wrote: > >> > >> Hi, > >> > >> I've a non-convex shape that I need to cut through. The user draws two > >> contours parallel X-Y plane, then I generate the surface using > >> vtkVoxelContoursToSurfaceFilter. However, when I cut with a plane > parallel > >> to x-y using vtkCutter, the order of the points of the generated result > is > >> messed up (pls see the attachments). I tried to run many filters on this > >> result to get the expected one without success. > >> > >> Can anyone help me on how to cut this surface to get the expected > result? > >> > >> Thanks, > >> Dan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 16 11:59:03 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Aug 2011 09:59:03 -0600 Subject: [vtkusers] Cutting non-convex surfaces In-Reply-To: References: Message-ID: Hi Dan, The job of vtkStripper is to put the segments in the correct order, so if isn't doing that, then it is getting the wrong input, or you are incorrectly using its output. For the input: are you sure that the input to vtkCutter is a closed surface? It does not matter whether it is convex or not, only if it is closed. So you cannot give it a wireframe as input, for example. For the output: are you going through the vtkPoints that are output from vtkStripper and expecting them to be in order? Because they won't be (as I mentioned in my previous email). If you need the actual points to be in order, you need to use the PointIds in the cell array to re-order them. A VTK polyline is not a list of points, it is a list of pointIds. - David On Tue, Aug 16, 2011 at 9:45 AM, Dan Asimov wrote: > Hi David, > > Thanks for your reply. > > Actually, I tried vtkStripper, but as you said it just generated a polyline > consists of the same line segments in the same wrong order, which is kind of > useless here. > > I don't know but it looks to me that no filter will be able to get the > correct ("expected") order of the line segments except the cutter object > itself. After cutting, the result is just some scattered lines. > > What do you think? Am I missing something?? > > Thanks, > Dan > > > On Tue, Aug 16, 2011 at 11:05 AM, David Gobbi wrote: >> >> Hi Dan, >> >> The fact that your surface is non-convex is not what is causing the >> problem. >> >> The problem is that vtkCutter generates a whole bunch of independent >> line segments, but what you want is a single polyline. ?The filter to join >> the line segments to create a polyline in vtkStripper. >> >> Also note that vtkStripper will _not_ put the points in the correct order. >> What it does is generate a polyline cell array that contains the correct >> ordering of the PointIDs. >> >> ?- David >> >> >> On Tue, Aug 16, 2011 at 8:38 AM, Dan Asimov wrote: >> > >> > Any idea anyone? Is there a way to cut non-convex surfaces? >> > >> > >> > Thanks, >> > Dan >> > >> > >> > >> > On Fri, Aug 12, 2011 at 2:47 PM, Dan Asimov >> > wrote: >> >> >> >> Hi, >> >> >> >> I've a non-convex shape that I need to cut through. The user draws two >> >> contours parallel X-Y plane, then I generate the surface using >> >> vtkVoxelContoursToSurfaceFilter. However, when I cut with a plane >> >> parallel >> >> to x-y using vtkCutter, the order of the points of the generated result >> >> is >> >> messed up (pls see the attachments). I tried to run many filters on >> >> this >> >> result to get the expected one without success. >> >> >> >> Can anyone help me on how to cut this surface to get the expected >> >> result? >> >> >> >> Thanks, >> >> Dan From sergio.aguirre at gmail.com Tue Aug 16 14:33:18 2011 From: sergio.aguirre at gmail.com (Sergio Aguirre) Date: Tue, 16 Aug 2011 11:33:18 -0700 Subject: [vtkusers] windows.h not included Message-ID: Hi everyone. I am modifying some vtk classes to include special rendering tools that also connect to head tracking tools. These tools are designed for win32 platforms - so when I include them in the class I want I get a compile error like the one below. Apparently, it is not finding windows.h declared before my modification. When I reviewed the VTK upgrade documentation I noticed that windows.h is only used in some specific places. BUT it was used everywhere before - with its known problems. However, for my purposes it would be great to get windows.h back everywhere, any suggestions of where I can look into doing this? Thank you, Sergio 1>------ Build started: Project: vtkRendering, Configuration: Debug Win32 ------ 1>Compiling... 1>vtkWin32RenderWindowInteractor.cxx 1>vtkWin32OpenGLRenderWindow.cxx 1>vtkGraphicsFactory.cxx 1>C:/epx/Common/System/DisplayStatus.h(79) : error C2146: syntax error : missing ';' before identifier 'monitorHandle' 1>C:/epx/Common/System/DisplayStatus.h(79) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:/epx/Common/System/DisplayStatus.h(79) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>Build log was saved at "file://c:\engine\VTK-bin\Rendering\vtkRendering.dir\Debug\BuildLog.htm" 1>vtkRendering - 3 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 26 up-to-date, 0 skipped ========== -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.asimov at gmail.com Tue Aug 16 16:05:16 2011 From: dan.asimov at gmail.com (Dan Asimov) Date: Tue, 16 Aug 2011 16:05:16 -0400 Subject: [vtkusers] Cutting non-convex surfaces In-Reply-To: References: Message-ID: Hi David, Thanks a lot. This solves it! I was actually passing the output of the stripper directly to vtkContourWidget which apparently depends on the points order and not on the polyline cell. I ordered the points before passing them and it works now. Thanks, Dan On Tue, Aug 16, 2011 at 11:59 AM, David Gobbi wrote: > Hi Dan, > > The job of vtkStripper is to put the segments in the correct order, so if > isn't doing that, then it is getting the wrong input, or you are > incorrectly > using its output. > > For the input: are you sure that the input to vtkCutter is a closed > surface? > It does not matter whether it is convex or not, only if it is closed. So > you > cannot give it a wireframe as input, for example. > > For the output: are you going through the vtkPoints that are output from > vtkStripper and expecting them to be in order? Because they won't be > (as I mentioned in my previous email). If you need the actual points to > be in order, you need to use the PointIds in the cell array to re-order > them. > A VTK polyline is not a list of points, it is a list of pointIds. > > - David > > > On Tue, Aug 16, 2011 at 9:45 AM, Dan Asimov wrote: > > Hi David, > > > > Thanks for your reply. > > > > Actually, I tried vtkStripper, but as you said it just generated a > polyline > > consists of the same line segments in the same wrong order, which is kind > of > > useless here. > > > > I don't know but it looks to me that no filter will be able to get the > > correct ("expected") order of the line segments except the cutter object > > itself. After cutting, the result is just some scattered lines. > > > > What do you think? Am I missing something?? > > > > Thanks, > > Dan > > > > > > On Tue, Aug 16, 2011 at 11:05 AM, David Gobbi > wrote: > >> > >> Hi Dan, > >> > >> The fact that your surface is non-convex is not what is causing the > >> problem. > >> > >> The problem is that vtkCutter generates a whole bunch of independent > >> line segments, but what you want is a single polyline. The filter to > join > >> the line segments to create a polyline in vtkStripper. > >> > >> Also note that vtkStripper will _not_ put the points in the correct > order. > >> What it does is generate a polyline cell array that contains the correct > >> ordering of the PointIDs. > >> > >> - David > >> > >> > >> On Tue, Aug 16, 2011 at 8:38 AM, Dan Asimov > wrote: > >> > > >> > Any idea anyone? Is there a way to cut non-convex surfaces? > >> > > >> > > >> > Thanks, > >> > Dan > >> > > >> > > >> > > >> > On Fri, Aug 12, 2011 at 2:47 PM, Dan Asimov > >> > wrote: > >> >> > >> >> Hi, > >> >> > >> >> I've a non-convex shape that I need to cut through. The user draws > two > >> >> contours parallel X-Y plane, then I generate the surface using > >> >> vtkVoxelContoursToSurfaceFilter. However, when I cut with a plane > >> >> parallel > >> >> to x-y using vtkCutter, the order of the points of the generated > result > >> >> is > >> >> messed up (pls see the attachments). I tried to run many filters on > >> >> this > >> >> result to get the expected one without success. > >> >> > >> >> Can anyone help me on how to cut this surface to get the expected > >> >> result? > >> >> > >> >> Thanks, > >> >> Dan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fitzeq at gmail.com Tue Aug 16 17:38:10 2011 From: fitzeq at gmail.com (fitze) Date: Tue, 16 Aug 2011 14:38:10 -0700 (PDT) Subject: [vtkusers] Trouble with added features to a VTK Animation: saving frames, "live" vtkPlot, vtkPoints Message-ID: <1313530690589-4705911.post@n5.nabble.com> I am working on a GUI for a bicycle simulation program in C++ using Qt for the GUI and VTK for all the fancy fun stuff. The program plays an animation of a bicycle in motion. I have the animation working with VTK, but I would like some additional features with the video. Feature A - Save the video to image files Feature B - Update a vtk plot, just below the video in another QVTKWidget, of various quantitites that are evolving as the simulation progresses, e.g. X Y position of the bike. Feature C - Draw a polyline "trace" in the animation that traces the path of the bike. These features are not working properly for me right now. I understand that there are various ways to do animations in VTK and perhaps the way I have chosen is not adaptable to do those features above. As I see it, there are three ways to do animations in VTK. (1) Initialize all actors, then just createa simple loop that changes the position/orientation of the actors, and just re-render. (2) Subclass vtkCommand and create a repeating timer on the interactor (http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/Animation). (3) Use vtk animation cue's (http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/AnimationScene). I have pursued (2), as (1) did not work at all for me, and (3) seemed way complicated. Now, I present minimalized code for my implementation of (2), first without the features I would like, then with my attempt to implement those features. I will then explain the way in which the features do not work, with the additional lines labeled as to which Feature they are for. ================================================= Implementation of (2) without additional features ================================================= IN MYQWIDGET.H -------------- class vtkTimerCallback2; // defined below in this file class MyQWidget() : public QWidget { Q_OBJECT; public: MyQWidget(bicycle *bike1, QWidget *parent = 0); private slots: void startSimSlot(void); private: // my own class that holds data about the bike, // has vtk sources, actors, etc. bicycle *bike; QGridLayout MyLayout; QToolButton *startSimButton; QVTKWidget *MyQVTKWidget; vtkSmartPointer MyRenderer; vtkSmartPointer MyRenderWindow; vtkSmartPointer MyCallback; }; class vtkTimerCallback2 : public vtkCommand { public: static vtkTimerCallback *New() { vtkTimerCallback2 *cb = new vtkTimerCallback2; cb->TimerCount = 0; return cb; } virtual void Execute(vtkObject *caller, unsigned long eventId, void *vtkNotUsed(callData)) { if (vtkCommand::TimerEvent == eventId) ++this->TimerCount; } time = (double)TimerCount/bike->fps; bike->UpdateSim(time); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::SafeDownCast(caller); iren->GetRenderWindow()->Render(); } bicycle bike; private: int TimerCount; double time; }; IN MYQWIDGET.CPP ---------------- MyQWidget::MyQWidget(bicycle *bike1, QWidget *parent) : QWidget(parent) { bike = bike1; // qt initialize MyLayout = new QGridLayout(this); MyQVTKWidget = new QVTKWidget(this); startSimButton = new QToolButton; // qt commands setLayout(MyLayout); MyLayout->addWidget(MyQVTKWidget,0,0); // vtk initialize MyRenderer = vtkRenderer::New(); MyRenderWindow = vtkRenderWindow::New(); MyCallback = vtkSmartPointer::New(); // vtk commands MyRenderWindow->AddRenderer(MyRenderer); MyQVTKWidget->SetRenderWindow(MyRenderWindow); MyCallback->bike = bike; MyQVTKWidget->GetInteractor()->AddObservor(vtkCommand::TimerEvent, MyCallback); bike->initSim(MyRenderer); } MyQWidget::startSimSlot(void) { bike->UpdateSim(0); // 0 is the (initial) time in seconds of the animation MyQVTKWidget->GetInteractor()->Initialize(); int timerId = MyQVTKWidget->GetInteractor()->CreateRepeatingTimer(1000/bike->fps); MyQVTKWidget->GetInteractor()->Start(); } IN BICYCLE.H ------------ class bicycle { public: bicycle(); void initSim(vtkSmartPointer ren); void UpdateSim(double time); int fps; // framerate of simulation integrationstep(time); // lets say all the bike physics is contained here // im not gonna show any such definition here private: // lets say the bike's configuration is defined by just x and y coordinates double X; // bike's x position double Y; // bike's y position // vtk vtkSmartPointer renderer; // for simplicity the bike consists of only a sphere vtkSmartPointer sphereSource; vtkSmartPointer sphereTransform; vtkSmartPointer sphereFilter; vtkSmartPointer sphereMapper; vtkSmartPointer sphereActor; } IN BICYCLE.CPP -------------- bicycle::bicycle() { fps = 100; } void bicycle::initSim(vtkSmartPointer ren) { renderer = ren; sphereSource = vtkSphereSource::New(); sphereTransform = vtkTransform::New(); sphereFilter = vtkTransformPolyDataFilter::New(); sphereMapper = vtkPolyDataMapper::New(); sphereActor = vtkActor::New(); sphereSource->Update(); sphereTransform->Translate(.5,.5,0); // orienting the bike, dummy values sphereFilter->SetInputConnection(sphereSource->GetOutputPort()); sphereFilter->SetTransform(sphereTransform); sphereMapper->SetInputConnection(sphereFilter->GetOutputPort()); sphereActor->SetMapper(sphereMapper); } void bicycle::UpdateSim(time) { // update bike's X and Y from differential equation integration integrationstep(time); sphereActor->SetPosition(X,Y); } ============================================== Implementation of (2) WITH additional features ============================================== IN MYQWIDGET.H -------------- class vtkTimerCallback2; // defined below in this file class MyQWidget() : public QWidget { Q_OBJECT; public: MyQWidget(bicycle *bike1, QWidget *parent = 0); private slots: void startSimSlot(void); private: // my own class that holds data about the bike, // has vtk sources, actors, etc. bicycle *bike; QGridLayout MyLayout; QToolButton *startSimButton; QVTKWidget *MyQVTKWidget; vtkSmartPointer MyRenderer; vtkSmartPointer MyRenderWindow; vtkSmartPointer MyCallback; // Feature A vtkSmartPointer VidWriter; vtkSmartPointer VidW2I; // end Feature A // Feature B QVTKWidget *PlotQVTKWidget; vtkSmartPointer PlotView; vtkSmartPointer PlotChart; // end Feature B }; class vtkTimerCallback2 : public vtkCommand { public: static vtkTimerCallback *New() { vtkTimerCallback2 *cb = new vtkTimerCallback2; cb->TimerCount = 0; return cb; } virtual void Execute(vtkObject *caller, unsigned long eventId, void *vtkNotUsed(callData)) { if (vtkCommand::TimerEvent == eventId) ++this->TimerCount; } time = (double)TimerCount/bike->fps; bike->UpdateSim(time); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::SafeDownCast(caller); iren->GetRenderWindow()->Render(); // Feature A VidW2I->SetInput(iren->GetRenderWindow()); VidWriter->SetInput(VidW2I->GetOutput()); VidWrter->SetFileName(QString("bikeimg + QString("%1").arg(TimerCount) + ".ps").toStdString().c_str()); VidWriter->Write(); // end Feature A // Feature B bike->SetSimValues(TimerCount); // puts X and Y into a vtkTable in bike. PlotRenWin->Render(); // attempt 1 to update plot PlotQVTKWidget->GetInteractor()->Initialize(); // attempt 2 PlotQVTKWidget->GetInteractor()->Start(); // attempt 2 PlotChart->Paint(PlotView->GetContext()); // attempt 3 PlotView->GetScene()->Paint(PlotView->GetContext()); // attempt 4 // end Feature B } bicycle bike; vtkSmartPointer VidWriter; // Feature A vtkSmartPointer VidW2I; // Feature A QVTKWidget *PlotQVTKWidget; // Feature B vtkSmartPointer PlotRenWn; // Feature B vtkSmartPointer PlotChart; // Feature B vtkSmartPointer PlotView; // Featur B private: int TimerCount; double time; }; IN MYQWIDGET.CPP ---------------- MyQWidget::MyQWidget(bicycle *bike1, QWidget *parent) : QWidget(parent) { bike = bike1; // qt initialize MyLayout = new QGridLayout(this); MyQVTKWidget = new QVTKWidget(this); startSimButton = new QToolButton; // qt commands setLayout(MyLayout); MyLayout->addWidget(MyQVTKWidget,0,0); // vtk initialize MyRenderer = vtkRenderer::New(); MyRenderWindow = vtkRenderWindow::New(); MyCallback = vtkSmartPointer::New(); // vtk commands MyRenderWindow->AddRenderer(MyRenderer); MyQVTKWidget->SetRenderWindow(MyRenderWindow); MyCallback->bike = bike; MyQVTKWidget->GetInteractor()->AddObservor(vtkCommand::TimerEvent, MyCallback); bike->initSim(MyRenderer); // Feature A VidWriter = vtkSmartPointer::New(); VidW2I = vtkSmartPointer::New(); MyCallback->VidWriter = VidWriter; MyCallback->VidW2I = VidW2I; // end Feature A // Feature B PlotQVTKWidget = new QVTKWidget(this); PlotView = vtkSmartPointer::New(); PlotChart = vtkSmartPointer::New(); PlotQVTKWidget->GetRenderWindow()->Render(); MyLayout->addWidget(PlotQVTKWidget,1,0); PlotView->SetInteractor(PlotQVTKWidget->GetInteractor()); PlotQVTKWidget->SetRenderWindow(PlotView->GetRenderWindow()); PlotView->GetScene()->AddItem(PlotChart); PlotChart->AddPlot(vtkChart::Line); PlotChart->GetPlot(0)->SetInput(bike->SimTable, 0, 1); // X data PlotChart->GetPlot(1)->SetInput(bike->SimTable, 0, 2); // Y data bike->SimTable->Update(); PlotChart->Update(); PlotQVTKWidget->GetInteractor()->Initialize(); PlotQVTKWidget->GetRenderWindow()->Render(); PlotQVTKWidget->GetInteractor()->Start(); MyCallback->PlotQVTKWidget = PlotQVTKWidget; MyCallback->PlotRenWin = PlotQVTKWidget->GetRenderWindow(); // end Feature B } MyQWidget::startSimSlot(void) { bike->UpdateSim(0); // 0 is the time, initial time MyQVTKWidget->GetInteractor()->Initialize(); int timerId = MyQVTKWidget->GetInteractor()->CreateRepeatingTimer(1000/bike->fps); MyQVTKWidget->GetInteractor()->Start(); } IN BICYCLE.H ------------ class bicycle { public: bicycle(); void initSim(vtkSmartPointer ren); void UpdateSim(double time); int fps; // framerate of simulation integrationstep(time); // lets say all the bike physics is contained here // im not gonna show any such definition here // Feature B void SetSimValues(int rowidx); // called in vtkTimerCallback2, stores // new X and Y data for plotting // end Feature B private: // lets say the bike's configuration is defined by just x and y coordinates double t; // current time of the simulation double X; // bike's x position double Y; // bike's y position // vtk vtkSmartPointer renderer; // for simplicity the bike consists of only a sphere vtkSmartPointer sphereSource; vtkSmartPointer sphereTransform; vtkSmartPointer sphereFilter; vtkSmartPointer sphereMapper; vtkSmartPointer sphereActor; // Feature B vtkSmartPointer PlotTable; std::vector< vtkSmartPointer > PlotArrays; // end Feature B // Feature C vtkSmartPointer TracePoints; vtkSmartPointer TraceLine; vtkSmartPointer TraceCell; vtkSmartPointer TraceData; vtkSmartPointer TraceMapper; vtkSmartPointer TraceActor; // end Feature C } IN BICYCLE.CPP -------------- bicycle::bicycle() { fps = 100; // Feature B: initialize vtk objects for vtk plot of X and Y PlotTable = vtkSmartPointer::New(); PlotArrays.resize(2); // X column, Y column PlotArrays[0] = vtkSmartPointer::New(); PlotArrays[0]->SetName("X"); PlotArrays[1] = vtkSmartPointer::New(); PlotArrays[1]->SetName("Y"); PlotTable->AddColumn(PlotArrays[0]); PlotTable->AddColumn(PlotArrays[1]); PlotTable->InsertNextBlankRow(); PlotTable->InsertNextBlankRow(1); // vtk plot needs to start with 2 points to // draw a line // end Feature B } void bicycle::initSim(vtkSmartPointer ren) { renderer = ren; sphereSource = vtkSphereSource::New(); sphereTransform = vtkTransform::New(); sphereFilter = vtkTransformPolyDataFilter::New(); sphereMapper = vtkPolyDataMapper::New(); sphereActor = vtkActor::New(); sphereSource->Update(); sphereTransform->Translate(.5,.5,0); // orienting the bike, dummy values sphereFilter->SetInputConnection(sphereSource->GetOutputPort()); sphereFilter->SetTransform(sphereTransform); sphereMapper->SetInputConnection(sphereFilter->GetOutputPort()); sphereActor->SetMapper(sphereMapper); // Feature C: initialize vtk objects for the bike's polyline trace TracePoints = vtkSmartPointer:New(); TraceLine = vtkSmartPointer::New(); TraceCell = vtkSmartPointer::New(); TraceMapper = vtkSmartPointer::New(); TraceActor = vtkSmartPointer::New(); TraceData = vtkSmartPointer::New(); TracePoints->SetNumberOfPoints(1000); TraceLine->GetPointIds()->SetNumberOfIds(1000); // initializing points to values just to ensure that a polyline shows up in the // render window for (unsigned int i = 0; i < 1000; i++) { TracePoints->SetPoint(i, i, 0, 0); TraceLine->GetPointIds()->SetId(i, i); } TraceCell->InsertNextCell(TraceLine); TraceData->SetPoints(TracePoints); TraceMapper->SetInput(TraceData); TraceActor->SetMapper(TraceMapper); // end Feature C } void bicycle::UpdateSim(time) { // update bike's X and Y from differential equation integration integrationstep(time); sphereActor->SetPosition(X,Y); // Feature C // adds a point to the trace of the current X Y position of the bike. the // frame number of the animation is also the number of rows in the plot table TracePoints->SetPoint(PlotTable->GetNumberOfRows(), X, Y, 0); TraceMapper->Update(); // end Feature C } // Feature B: called at every frame by the vtkTimerCallback2 void bicycle::SetSimValues(int rowidx) { PlotTable->InsertNextBlankRow(); PlotTable->SetValue(rowidx, 0, bike->t); // lets say the bicycle has a t field holding time PlotTable->SetValue(rowidx, 1, bike->X); PlotTable->SetValue(rowidx, 2, bike->Y); PlotTable->Update(); } // end Feature B =================== end of code Note that the first implementation, without the features, works just fine. However, the code above will not work if you were to create the files and try to compile them; as I've left out the integration function (all the physics) and the rest of the Qt code, etc. I now describe the way in which all the features, A B and C, do not work: Feature A - Images are saved with each updated frame, but the image is ALWAYS of the first frame of the animation. The saved images do not update, though the actual animation does update/succeed. Perhaps one thing to do, which is the long term goal anyway, is to move the writing of image files to a separate Slot that is activated by a QToolButton. Are there any good resources/examples for how to do this "behind the scenes", e.g. so that the user does not see the video replay whilst writing image files of the already-played animation? Feature B - The plot of the X Y data is not displaying anything as the animation evolves. I know that the vtkTable is filling up with the X and Y values that evolve during the simulation, but the plot that is hooked up to the table is not updating "live" as the animation evolves. I know that in general the plot works because I tried rearranging the code so that the X Y data was plotted once I stopped the animation (by destroying the timer on the interactor), and this resulted in a successful plot of the X Y data. It won't update "live" though. Is one option to have the animation and plot be part of the same QVTKWidget and RenderWindow, and have two renderers in that one render window? I would say this is not the desired solution because it fixes the placement of the plot. Feature C - The trace that I initialize, a very long straight line, IS drawn. However, this original trace remains the same throughout the animation; it is not updated EVEN THOUGH those initial straight-line values are replaced with actual X, Y data at every frame. I tried to create a function, bicycle::UpdateTrace(), called at every new frame, that filled the entire TracePoints object with all the points again (didn't append just the most recent new point). I'm aware that after 1000 animation frames (I only gave TracePoints 1000 points) I should get a segfault, but lets ignore that for now. I have been told that this mailing list is very good about helping inexperienced people like me, but I haven't posted here before and I'm not sure how much detail you need to understand the code above. If necessary, please ask me to provide some prose about how the code works. I'll gladly do so! I'll try to be responsive and clear. If you would like to help me, I would be extremely grateful if you could address only one of the three issues (do not feel like you need to address all 3 issues/features). Thank you for your time! -- View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-with-added-features-to-a-VTK-Animation-saving-frames-live-vtkPlot-vtkPoints-tp4705911p4705911.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 16 18:06:55 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Aug 2011 16:06:55 -0600 Subject: [vtkusers] Cutting non-convex surfaces In-Reply-To: References: Message-ID: That is worth reporting as a bug, the vtkContourWidget shouldn't require that the pointIds in the contour used for initialization are numbered consecutively. Or at the very least the Initialize method should warn people about that condition. On Tue, Aug 16, 2011 at 2:05 PM, Dan Asimov wrote: > > Hi David, > > Thanks a lot. This solves it! I was actually passing the output of the > stripper directly to vtkContourWidget which apparently depends on the points > order and not on the polyline cell. I ordered the points before passing them > and it works now. > > Thanks, > Dan > > > On Tue, Aug 16, 2011 at 11:59 AM, David Gobbi wrote: >> >> Hi Dan, >> >> The job of vtkStripper is to put the segments in the correct order, so if >> isn't doing that, then it is getting the wrong input, or you are >> incorrectly >> using its output. >> >> For the input: are you sure that the input to vtkCutter is a closed >> surface? >> It does not matter whether it is convex or not, only if it is closed. ?So >> you >> cannot give it a wireframe as input, for example. >> >> For the output: are you going through the vtkPoints that are output from >> vtkStripper and expecting them to be in order? ?Because they won't be >> (as I mentioned in my previous email). ?If you need the actual points to >> be in order, you need to use the PointIds in the cell array to re-order >> them. >> A VTK polyline is not a list of points, it is a list of pointIds. >> >> ?- David >> >> >> On Tue, Aug 16, 2011 at 9:45 AM, Dan Asimov wrote: >> > Hi David, >> > >> > Thanks for your reply. >> > >> > Actually, I tried vtkStripper, but as you said it just generated a >> > polyline >> > consists of the same line segments in the same wrong order, which is >> > kind of >> > useless here. >> > >> > I don't know but it looks to me that no filter will be able to get the >> > correct ("expected") order of the line segments except the cutter object >> > itself. After cutting, the result is just some scattered lines. >> > >> > What do you think? Am I missing something?? >> > >> > Thanks, >> > Dan >> > >> > >> > On Tue, Aug 16, 2011 at 11:05 AM, David Gobbi >> > wrote: >> >> >> >> Hi Dan, >> >> >> >> The fact that your surface is non-convex is not what is causing the >> >> problem. >> >> >> >> The problem is that vtkCutter generates a whole bunch of independent >> >> line segments, but what you want is a single polyline. ?The filter to >> >> join >> >> the line segments to create a polyline in vtkStripper. >> >> >> >> Also note that vtkStripper will _not_ put the points in the correct >> >> order. >> >> What it does is generate a polyline cell array that contains the >> >> correct >> >> ordering of the PointIDs. >> >> >> >> ?- David >> >> >> >> >> >> On Tue, Aug 16, 2011 at 8:38 AM, Dan Asimov >> >> wrote: >> >> > >> >> > Any idea anyone? Is there a way to cut non-convex surfaces? >> >> > >> >> > >> >> > Thanks, >> >> > Dan >> >> > >> >> > >> >> > >> >> > On Fri, Aug 12, 2011 at 2:47 PM, Dan Asimov >> >> > wrote: >> >> >> >> >> >> Hi, >> >> >> >> >> >> I've a non-convex shape that I need to cut through. The user draws >> >> >> two >> >> >> contours parallel X-Y plane, then I generate the surface using >> >> >> vtkVoxelContoursToSurfaceFilter. However, when I cut with a plane >> >> >> parallel >> >> >> to x-y using vtkCutter, the order of the points of the generated >> >> >> result >> >> >> is >> >> >> messed up (pls see the attachments). I tried to run many filters on >> >> >> this >> >> >> result to get the expected one without success. >> >> >> >> >> >> Can anyone help me on how to cut this surface to get the expected >> >> >> result? >> >> >> >> >> >> Thanks, >> >> >> Dan From alexmalvtk at gmail.com Tue Aug 16 22:51:17 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Tue, 16 Aug 2011 19:51:17 -0700 Subject: [vtkusers] vtkOBBTree problem (vtkMath::Jacobi: Error extracting eigenfunctions) Message-ID: vtkOBBTree is using vtkMath (vtkJacobiN function) when building locator, which fails on very simple polydata read from the following stl file. There is some Qt classes usage in the code below (mostly string handling), but I hope this will not hide the problem. Any idea why and what is wrong? Regards, Alex // stl data file: solid ascii facet normal 0. 0. 1. outer loop vertex 0.00094e+006 1. 340.981 vertex 0.00099e+006 1. 340.981 vertex 0.00091e+006 1. 340.981 endloop endfacet facet normal 0. 0. 1. outer loop vertex 0.00094e+006 1. 330.981 vertex 0.00099e+006 1. 330.981 vertex 0.00091e+006 1. 330.981 endloop endfacet endsolid // to reproduce read polydata, then build vtkOBBTree // Basically this is polydata QString fileName =...;// set file name vtkPolyData* poly = stlModifier::createPolyDataFromStlFile( fileName ); vtkSmartPointer tree = vtkSmartPointer::New(); tree->SetDataSet( poly ); tree->BuildLocator(); // function which reads polydata // I don't think it is needed to reproduce the brlem, but just in case vtkPolyData* stlModifier::createPolyDataFromStlFile( const QString& fileName ) { vtkPolyData* poly = NULL; Q_ASSERT( !fileName.isEmpty() ); if( ! fileName.isEmpty() ) { QByteArray byteArray = QFile::encodeName ( fileName ); vtkSmartPointer sr = vtkSmartPointer::New(); sr->SetFileName( byteArray.data() ); vtkSmartPointer filter = vtkSmartPointer::New(); filter->SetInputConnection( sr->GetOutputPort( ) ); filter->Update(); vtkSmartPointer cleanFilter = vtkSmartPointer::New(); cleanFilter->SetInputConnection( filter->GetOutputPort( ) ); cleanFilter->PointMergingOn (); vtkSmartPointer triangleFilter = vtkSmartPointer::New(); triangleFilter->SetInputConnection( cleanFilter->GetOutputPort( ) ); triangleFilter->PassLinesOff (); triangleFilter->PassVertsOff (); triangleFilter->Update(); // make poly forget about the way it was created and release all the vtkObjects poly = triangleFilter->GetOutput(); poly->Register(NULL); poly->SetSource(NULL); #ifdef DEBUG_POLY_DATA_MEMORY_LEAKS poly->DebugOn(); #endif } return poly; } Reading the following stl file to the From yxp233 at postech.ac.kr Tue Aug 16 23:30:06 2011 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Wed, 17 Aug 2011 12:30:06 +0900 Subject: [vtkusers] How to generate a point in 3D and change its location through dragging Message-ID: <000001cc5c8d$f5a028c0$e0e07a40$@ac.kr> Dear Users, I would like to generate a 3D point and then change its location through mouse clicking and dragging. Does anybody have any good idea? Thank you. Best, Xiaopeng -------------- next part -------------- An HTML attachment was scrubbed... URL: From z_lezhnin at mail2000.ru Wed Aug 17 00:57:53 2011 From: z_lezhnin at mail2000.ru (ZLv) Date: Tue, 16 Aug 2011 21:57:53 -0700 (PDT) Subject: [vtkusers] Is there any way to get data from user in VTK? Message-ID: <1313557073846-4706833.post@n5.nabble.com> Hello, I'm trying to get a float number from user, try to use vtkContinuousValueWidget, but found that it is broken (can't create an object of this class). Is there any way to get information from user? -- View this message in context: http://vtk.1045678.n5.nabble.com/Is-there-any-way-to-get-data-from-user-in-VTK-tp4706833p4706833.html Sent from the VTK - Users mailing list archive at Nabble.com. From h0ppel at web.de Wed Aug 17 02:42:30 2011 From: h0ppel at web.de (h0ppel) Date: Tue, 16 Aug 2011 23:42:30 -0700 (PDT) Subject: [vtkusers] displaying 3D Matrix Message-ID: <1313563350532-4707038.post@n5.nabble.com> Hi, I want to display a 3d Matrix given in a jagged array... This is my code until now: int i, j, k; int[][][] Matrix; var rand = new Random(100); var x = 100; var y = 200; var z = 35; var size = x * y * z * sizeof(int); Matrix = new int[x][][]; for ( i = 0; i < x; i++) { Matrix[i] = new int[y][]; for ( j = 0; j < y; j++) { Matrix[i][j] = new int[z]; for ( k = 0; k < z; k++) { Matrix[i][j][k] = rand.Next(); } } } vtkImageData image = new vtkImageData(); image.SetDimensions(100, 200, 35); image.SetSpacing(1, 1, 1); image.SetOrigin(0, 0, 0); image.SetNumberOfScalarComponents(1); image.SetScalarTypeToFloat(); image.AllocateScalars(); unsafe { int* ptr = (int*)(image.GetScalarPointer()); for (i = 0; i < 100; i++) { for (j = 0; j < 200; ++j) { for (k = 0; k < 35; ++k) { *ptr++ = Matrix[i][j][k]; } } } } vtkContourFilter Cfilter = new vtkContourFilter(); Cfilter.SetInput(image); Cfilter.Update(); vtkPolyDataMapper mapper = new vtkPolyDataMapper(); mapper.SetInput(Cfilter.GetOutput()); vtkActor actor = new vtkActor(); actor.SetMapper(mapper); vtkRenderer render = new vtkRenderer(); render.AddActor(actor); vtkRenderWindow renwin = new vtkRenderWindow(); renwin.AddRenderer(render); renwin.Render(); //Create vtkImageViewer, shows the correct image at program start vtkImageViewer2 viewer = new vtkImageViewer2(); viewer.SetColorLevel(0.0); viewer.SetColorWindow(100); viewer.SetInput(image); viewer.Render(); the viewer shows me a pointcloud, but how can I see the hole matrix in the renderwinder? thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/displaying-3D-Matrix-tp4707038p4707038.html Sent from the VTK - Users mailing list archive at Nabble.com. From fabian-richter at gmx.de Wed Aug 17 03:08:28 2011 From: fabian-richter at gmx.de (Fabian) Date: Wed, 17 Aug 2011 00:08:28 -0700 (PDT) Subject: [vtkusers] multi-objects in VTK; loop-Problem In-Reply-To: References: <1313405871804-4700582.post@n5.nabble.com> <1313412450710-4700838.post@n5.nabble.com> <1313414496000-4700989.post@n5.nabble.com> Message-ID: <1313564908958-4707098.post@n5.nabble.com> THANKS!!! This helped me very much! And it would have taken me hours to add the *! This was very useful! -- View this message in context: http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4707098.html Sent from the VTK - Users mailing list archive at Nabble.com. From quantum.leaf at gmail.com Wed Aug 17 06:10:26 2011 From: quantum.leaf at gmail.com (Liam Kurmos) Date: Wed, 17 Aug 2011 11:10:26 +0100 Subject: [vtkusers] visualizing polydata scalars from vtkCurvatures with vtklookuptable. Message-ID: i'm putting some volume data through a vtkContourFilter -> vtkCurvatures and want to visualize the resulting scalars. when i use vtklookup table to do this i find i get very coarse output in terms of the number of colour values. After i increase the number of colours above ~8 i dont notice any difference in the output image. see the attached image. Apart from the odd green/yellow triangle almost all are the same strong red/blue. generally red where there is negative curvature and blue on positive but no inbetween colours. I looked into the scalar data directly: eg. 54.825778917 51.318575186 26.893618816 -8.411519227 -14.567928412 5.0874189973 -16.836947761 -5.6020612956 33.866948784 22.691176615 -9.880104764 -13.407796842 4.4107221019 -16.761352603 0.40591292822 -3.4205102951 26.114937141 43.899964017 -15.987917922 2.2293773588 -0.50755389311 -0.031377071296 -0.82506254505 -0.26515309413 -0.21935404476 1.6687913041 -16.931996948 22.683419601 -1.4113088354 4.2161090128 78881.237047 132722.71915 149811.8483 -236.58958393 1184.2147238 -546.34147028 .... I wonder if the large range in the curvatures is what is causing the problem RangeMin="-1234133.1132" RangeMax="30386706633" when very few values are close to the maximum. but i dont know what i can do to fix this, i have setRange to the full extent or a subset but it has no effect. Does this suggest something im doing is making my setRange() ignored? if I query the range after build it is still as set. my lookup table looks like: vtkLookupTable* lut=vtkLookupTable::New(); lut->SetHueRange(0,0.6); //Red to Blue lut->SetAlphaRange(1,1); lut->SetValueRange(1,1.0); lut->SetSaturationRange(1.0,1.0); lut->SetNumberOfTableValues(1024000); // lut->SetRange(-1000,1000);//altering range appear not to effect output lut->Build(); can anyone suggest where i am going wrong? Liam -------------- next part -------------- A non-text attachment was scrubbed... Name: PosNegCurveRegions.png Type: image/png Size: 19203 bytes Desc: not available URL: From jothybasu at gmail.com Wed Aug 17 06:28:57 2011 From: jothybasu at gmail.com (Jothy) Date: Wed, 17 Aug 2011 11:28:57 +0100 Subject: [vtkusers] vtkChartXY picker tolerance Message-ID: Hi all, Is it possible to change the tolerance of the picker in vtkChartXY. It doesn't pick (toolTiplabels) after a certain zoom level. Can I set my own picker? Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From h0ppel at web.de Wed Aug 17 07:26:59 2011 From: h0ppel at web.de (h0ppel) Date: Wed, 17 Aug 2011 04:26:59 -0700 (PDT) Subject: [vtkusers] texture only on 1 side Message-ID: <1313580419480-4707772.post@n5.nabble.com> hi, I create an image from pixel data like this: and it works.. but now I have 2 questions: 1) I want the image only on one side of the plane not on both. The other side should be black 2) How can I work with this texturedata? how can I put this into vtkImageLuminance for example? thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/texture-only-on-1-side-tp4707772p4707772.html Sent from the VTK - Users mailing list archive at Nabble.com. From h0ppel at web.de Wed Aug 17 07:32:59 2011 From: h0ppel at web.de (h0ppel) Date: Wed, 17 Aug 2011 04:32:59 -0700 (PDT) Subject: [vtkusers] displaying 3D Matrix In-Reply-To: <1313563350532-4707038.post@n5.nabble.com> References: <1313563350532-4707038.post@n5.nabble.com> Message-ID: <1313580779069-4707787.post@n5.nabble.com> no ideas? -- View this message in context: http://vtk.1045678.n5.nabble.com/displaying-3D-Matrix-tp4707038p4707787.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Wed Aug 17 09:07:38 2011 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 17 Aug 2011 09:07:38 -0400 Subject: [vtkusers] texture only on 1 side In-Reply-To: <1313580419480-4707772.post@n5.nabble.com> References: <1313580419480-4707772.post@n5.nabble.com> Message-ID: On Wed, Aug 17, 2011 at 7:26 AM, h0ppel wrote: > hi, > > I create an image from pixel data like this: > > > > and it works.. but now I have 2 questions: > > 1) I want the image only on one side of the plane not on both. The other > side should be black The easiest way would be to draw two quads. Or you can have two pass rendering (enabling / disabling front and back face alternatively) > 2) How can I work with this texturedata? how can I put this into > vtkImageLuminance for example? Didn't understand this questions. Can you elaborate more? > > thanks > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/texture-only-on-1-side-tp4707772p4707772.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://www.vtk.org/mailman/listinfo/vtkusers > -- | Aashish Chaudhary | R&D Engineer | Kitware Inc. | www.kitware.com From daviddoria at gmail.com Wed Aug 17 09:54:40 2011 From: daviddoria at gmail.com (David Doria) Date: Wed, 17 Aug 2011 09:54:40 -0400 Subject: [vtkusers] How to generate a point in 3D and change its location through dragging In-Reply-To: <000001cc5c8d$f5a028c0$e0e07a40$@ac.kr> References: <000001cc5c8d$f5a028c0$e0e07a40$@ac.kr> Message-ID: On Tue, Aug 16, 2011 at 11:30 PM, Xiaopeng Yang wrote: > Dear Users, > > I would like to generate a 3D point and then change its location through > mouse clicking and dragging. Does anybody have any good idea? Check out this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex David From daviddoria at gmail.com Wed Aug 17 10:13:09 2011 From: daviddoria at gmail.com (David Doria) Date: Wed, 17 Aug 2011 10:13:09 -0400 Subject: [vtkusers] Is there any way to get data from user in VTK? In-Reply-To: <1313557073846-4706833.post@n5.nabble.com> References: <1313557073846-4706833.post@n5.nabble.com> Message-ID: On Wed, Aug 17, 2011 at 12:57 AM, ZLv wrote: > Hello, I'm trying to get a float number from user, try to use > vtkContinuousValueWidget, but found that it is broken (can't create an > object of this class). Is there any way to get information from user? Whenever I need inputs like this, I go ahead and make a Qt GUI inside which I use a QVTKWidget for the VTK interaction. It is a pretty significant learning curve if you don't already know Qt, but the result is a very polished looking application. David From h0ppel at web.de Wed Aug 17 10:17:14 2011 From: h0ppel at web.de (h0ppel) Date: Wed, 17 Aug 2011 07:17:14 -0700 (PDT) Subject: [vtkusers] texture only on 1 side In-Reply-To: <1313580419480-4707772.post@n5.nabble.com> References: <1313580419480-4707772.post@n5.nabble.com> Message-ID: <1313590634013-4708396.post@n5.nabble.com> thanks so far, after I created the picture, I want to do more operations with this picture like this: the luminance filter needs an imagadata as input, but I dont have Imagedata that I can use correctly. I only have my plane, my texture and my imagedata from the array. but putting only the imagedata in the luminance filter will not work, first I need zu interpret the pixelvalue like I do in the viewer without this I can see anythink from my picture in the viewer... But I dont know what to do with my imagedata, that I can put it into the luminance filter and the correct picture like the texture -- View this message in context: http://vtk.1045678.n5.nabble.com/texture-only-on-1-side-tp4707772p4708396.html Sent from the VTK - Users mailing list archive at Nabble.com. From flymolo at gmail.com Wed Aug 17 12:28:11 2011 From: flymolo at gmail.com (jonathan grimm) Date: Wed, 17 Aug 2011 12:28:11 -0400 Subject: [vtkusers] How to generate a point in 3D and change its location through dragging In-Reply-To: <000001cc5c8d$f5a028c0$e0e07a40$@ac.kr> References: <000001cc5c8d$f5a028c0$e0e07a40$@ac.kr> Message-ID: If you only want one, vtkHandleWidget one way to do it. On Tue, Aug 16, 2011 at 11:30 PM, Xiaopeng Yang wrote: > Dear Users,**** > > ** ** > > I would like to generate a 3D point and then change its location through > mouse clicking and dragging. Does anybody have any good idea?**** > > ** ** > > Thank you.**** > > ** ** > > Best,**** > > Xiaopeng**** > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -- Sometimes it's hard to tell the dancer from the dance - Corwin in CoC -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbrayford at gmail.com Wed Aug 17 15:54:39 2011 From: dbrayford at gmail.com (David Brayford) Date: Wed, 17 Aug 2011 13:54:39 -0600 Subject: [vtkusers] vtkTexture SetInput crash Message-ID: Hi, I get the following error Unhandled exception at 0x01f8004f (vtkFiltering.dll) in RegTest.exe: 0xC0000005: Access violation reading location 0xbf2eafd9." When the function imageTexture->SetInput( m_DataRepository->GetVtkDRR() ); is called The other message I get is "Unhandled exception at 0x00000000 in RegTest.exe: 0xC0000005: Access violation." which indicates I have a null pointer. However the vtkImageData object is valid. Code snippet below. vtkSmartPointer imageTexture=vtkTexture::New(); vtkSmartPointer imageTexture=vtkTexture::New(); //SetInput( * vtkImageData ) imageTexture->SetInput( m_DataRepository->GetVtkDRR() ); imageTexture->InterpolateOn(); imageTexture->InterpolateOn(); From alexmalvtk at gmail.com Wed Aug 17 16:09:57 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Wed, 17 Aug 2011 13:09:57 -0700 Subject: [vtkusers] vtkOBBTree problem (vtkMath::Jacobi: Error extracting eigenfunctions) In-Reply-To: References: Message-ID: It looks like valid input I used was cut (by precision) by vtk stl writer and stl file I mentioned above has 2 degenerated triangles. Alex On Tue, Aug 16, 2011 at 7:51 PM, Alex Malyushytskyy wrote: > vtkOBBTree is using vtkMath (vtkJacobiN function) when building locator, > which fails on very simple polydata read from the following stl file. > There is some Qt classes usage in the code below (mostly string handling), > but I hope this will not hide the problem. > > Any idea why and what is wrong? > > Regards, > ? ? Alex > > > // stl data file: > > solid ascii > ?facet normal 0. 0. 1. > ? ?outer loop > ? ? ?vertex 0.00094e+006 1. 340.981 > ? ? ?vertex 0.00099e+006 1. 340.981 > ? ? ?vertex 0.00091e+006 1. 340.981 > > ? ?endloop > ?endfacet > ?facet normal 0. 0. 1. > ? ?outer loop > ? ? ?vertex 0.00094e+006 1. 330.981 > ? ? ?vertex 0.00099e+006 1. 330.981 > ? ? ?vertex 0.00091e+006 1. 330.981 > ? ?endloop > ?endfacet > endsolid > > > // to reproduce read polydata, then build vtkOBBTree > // Basically this is polydata > QString fileName =...;// set file name > > vtkPolyData* poly = stlModifier::createPolyDataFromStlFile( fileName ); > > vtkSmartPointer tree = vtkSmartPointer::New(); > tree->SetDataSet( poly ); > tree->BuildLocator(); > > // function which reads polydata > // I don't think it is needed to reproduce the brlem, but just in case > > vtkPolyData* stlModifier::createPolyDataFromStlFile( const QString& fileName ) > { > ? ? ? ?vtkPolyData* poly = NULL; > ? ? ? ?Q_ASSERT( !fileName.isEmpty() ); > > ? ? ? ?if( ! fileName.isEmpty() ) > ? ? ? ?{ > ? ? ? ? ? ? ? ?QByteArray byteArray = QFile::encodeName ( fileName ); > > ? ? ? ? ? ? ? ?vtkSmartPointer sr = vtkSmartPointer::New(); > ? ? ? ? ? ? ? ?sr->SetFileName( byteArray.data() ); > > ? ? ? ?vtkSmartPointer filter = > vtkSmartPointer::New(); > ? ? ? ? ? ? ? ?filter->SetInputConnection( sr->GetOutputPort( ) ); > ? ? ? ? ? ? ? ?filter->Update(); > > ? ? ? ?vtkSmartPointer cleanFilter = > vtkSmartPointer::New(); > ? ? ? ? ? ? ? ?cleanFilter->SetInputConnection( filter->GetOutputPort( ) ); > ? ? ? ? ? ? ? ?cleanFilter->PointMergingOn (); > > ? ? ? ?vtkSmartPointer triangleFilter = > vtkSmartPointer::New(); > ? ? ? ? ? ? ? ?triangleFilter->SetInputConnection( cleanFilter->GetOutputPort( ) ); > ? ? ? ? ? ? ? ?triangleFilter->PassLinesOff (); > ? ? ? ? ? ? ? ?triangleFilter->PassVertsOff (); > ? ? ? ? ? ? ? ?triangleFilter->Update(); > > ? ? ? ? ? ? ? ?// make poly forget about the way it was created and release all the > vtkObjects > ? ? ? ? ? ? ? ?poly = triangleFilter->GetOutput(); > ? ? ? ? ? ? ? ?poly->Register(NULL); > ? ? ? ? ? ? ? ?poly->SetSource(NULL); > > #ifdef DEBUG_POLY_DATA_MEMORY_LEAKS > ? ? ? ? ? ? ? ?poly->DebugOn(); > #endif > ? ? ? ?} > > ? ? ? ?return poly; > } > > > Reading the following stl file to the > From alexmalvtk at gmail.com Wed Aug 17 19:23:59 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Wed, 17 Aug 2011 16:23:59 -0700 Subject: [vtkusers] vtkOBBTree::IntersectWithLine (version which returns all cell ids) question/problem Message-ID: I need to get all cell ids in arbitraty poly data which are intersected by line segment. At the first glance example I found in VTK wiki which used int vtkOBBTree IntersectWithLine(const double a0[3], const double a1[3], vtkPoints *points, vtkIdList *cellIds); should solve the problem. Especially because of the comment "tkOBBTree returns ALL intersections with a line and the dataset". Unfortunately this function does not work for arbitrary data (at least in vtk 5.6.1 ). Example is polydata which consists of 2 disconnected triangles ( from debug output): Number of cells =2 cellId =0 pnt0 id = 0 x,y,z = { 18944,2166,340.981 } pnt1 id = 1 x,y,z = { 18985.1,2242,340.981 } pnt2 id = 2 x,y,z = { 18912.4,2188,340.981 } center x,y,z = { 18947.2,2198.67,340.981 } cellId =1 pnt0 id = 3 x,y,z = { 18944,2166,330.981 } pnt1 id = 4 x,y,z = { 18985.1,2242,330.981 } pnt2 id = 5 x,y,z = { 18912.4,2188,330.981 } center x,y,z = { 18947.2,2198.67,330.981 } (line intersecting centers of triangles:) line begin x,y,z = { 18947.2,2198.67,329.981 } line end x,y,z = { 18947.2,2198.67,341.981 } vtkOBBTree IntersectWithLine wil return only single id: intersecting 1 cells. where cellIdList(0) cell_id = 1 Second triangle will not pass "sense" check at line 840 vtkOBBTree:. // only use point if it moves us forward, // or it moves us backward by less than tol if (distance > lastDistance - ptol && sense != lastSense) I am not sure if it is a bug or comes from "closed surface" assumption, but I am sure this prevents me from getting intersections I need. As a quick fix I am thinking to subclass vtkOBBTree and create a function which will not be using such check, but I guess it would makes more sense either to add parameter to vtkOBBTree original function which would allow to skip such check , or add class member which will control such behavior. Anybody could comment on this? Regards, Alex From yxp233 at postech.ac.kr Wed Aug 17 19:59:37 2011 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Thu, 18 Aug 2011 08:59:37 +0900 Subject: [vtkusers] How to generate a point in 3D and change its location through dragging In-Reply-To: <1313598494496968.018797.ptmail03@ptmail03> References: <000001cc5c8d$f5a028c0$e0e07a40$@ac.kr> <1313598494496968.018797.ptmail03@ptmail03> Message-ID: <004401cc5d39$b8917040$29b450c0$@ac.kr> Hi, Thank you for your help. But actually I need many points, not just one. Thanks, Xiaopeng From: jonathan grimm [mailto:flymolo at gmail.com] Sent: Thursday, August 18, 2011 1:28 AM To: Xiaopeng Yang Cc: vtk Subject: Re: [vtkusers] How to generate a point in 3D and change its location through dragging If you only want one, vtkHandleWidget one way to do it. On Tue, Aug 16, 2011 at 11:30 PM, Xiaopeng Yang wrote: Dear Users, I would like to generate a 3D point and then change its location through mouse clicking and dragging. Does anybody have any good idea? Thank you. Best, Xiaopeng _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers -- Sometimes it's hard to tell the dancer from the dance - Corwin in CoC -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxp233 at postech.ac.kr Wed Aug 17 20:28:08 2011 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Thu, 18 Aug 2011 09:28:08 +0900 Subject: [vtkusers] How to generate a point in 3D and change its location through dragging In-Reply-To: <1313589283638384.018791.ptmail03@ptmail03> References: <000001cc5c8d$f5a028c0$e0e07a40$@ac.kr> <1313589283638384.018791.ptmail03@ptmail03> Message-ID: <004f01cc5d3d$b46507d0$1d2f1770$@ac.kr> Hi David, Thanks very much. It works very well. But I need interaction for rotating, zooming in and out the 3D image. Can you tell me how to modify this example code? Thank you! Xiaopeng -----Original Message----- From: David Doria [mailto:daviddoria at gmail.com] Sent: Wednesday, August 17, 2011 10:55 PM To: Xiaopeng Yang Cc: vtk Subject: Re: [vtkusers] How to generate a point in 3D and change its location through dragging On Tue, Aug 16, 2011 at 11:30 PM, Xiaopeng Yang wrote: > Dear Users, > > I would like to generate a 3D point and then change its location through > mouse clicking and dragging. Does anybody have any good idea? Check out this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex David From alexmalvtk at gmail.com Wed Aug 17 21:05:35 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Wed, 17 Aug 2011 18:05:35 -0700 Subject: [vtkusers] vtkColorTransferFunction limit In-Reply-To: <1C91DEB88B00944ABBB9DD09B60246CCB5E594B8@exvic-mbx01.nexus.csiro.au> References: <1C91DEB88B00944ABBB9DD09B60246CCB5E594B8@exvic-mbx01.nexus.csiro.au> Message-ID: >From the algorithm limitation point of view - as far as I understand there is no limitiation. (it is limited by int. Check the limits.h, but I believe it is 2147483647 (Microsoft Windows) ) >From the code you are using point of view it is not that simple. Even though vtk provides real value RGB definition, to understand your problem it is easier to think about rgb in other form, where RGB is a value defined by 3 integer values - each in a range from [0, 255] ( for example check http://www.w3.org/TR/SVG/types.html#ColorKeywords ) So variation by parameters separately ( red, green or blue ) in your function with increase number of colors . Something like this:. int numCols = 256; vtkColorTransferFunction ct = new vtkColorTransferFunction::New(); vtkPiecewiseFunction pf = new vtkPiecewiseFunction::New(); int i =0; for (int r=0; r ct.AddRGBPoint(i, i/(numCols -1), i/(numCols -1), i/(numCols -1)); > pf.AddPoint(i, i/(numCols -1)); is equivalent > ct.AddRGBPoint(i, 0, 0, 0 ); > pf.AddPoint(i, 0)); for any i except 255, which means you really added only 2 colors. Try to replace it with ct.AddRGBPoint(i, double(i)/(numCols -1), double(i)/(numCols -1), double(i)/(numCols -1)); pf.AddPoint(i, double(i)/(numCols -1)); regards, Alex On Wed, Aug 10, 2011 at 11:03 AM, wrote: > Hi, > > ? Anyone know how many colours I can add into vtkColorTransferFunction class by calling AddRGBPoint method. ?I used the code below to generate the colour map: > > int numCols = 256; > vtkColorTransferFunction ct = new vtkColorTransferFunction::New(); > vtkPiecewiseFunction pf = new vtkPiecewiseFunction::New(); > for (int i=0; i ?ct.AddRGBPoint(i, i/(numCols -1), i/(numCols -1), i/(numCols -1)); > ?pf.AddPoint(i, i/(numCols -1)); > } > > I would like to know whether it is possible to change the variable numCols to high number such 4096 or 65536. ?Thanks. > > > Regards, > Clement > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers > From alexmalvtk at gmail.com Wed Aug 17 21:51:07 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Wed, 17 Aug 2011 18:51:07 -0700 Subject: [vtkusers] vtkXMLImageDataWriter: saving large data In-Reply-To: References: Message-ID: Correct if my assumptions are wrong, but since you are using .NET - you use Windows. Since it is unable to allocate 4194303 elements ( < INT_MAX = 2147483647 ) I don't think it is limitation by index size even on 32 bit windows. So your application either does not: - fit in your total memory available ram+ virtual memory (in this case exit other applications or increase virtual memory ) - or mostly likely you are running 32 bit windows and you are limited by 2GB limitation (4GB total for process, half for executable code, half for process data) If last is the case nothing you can do to increase available memory. About writing without duplication. I am not sure about C#, but in C++ I don't think duplication is required/happens if you already have vtkImageData vtkImageData* data = .... writer->SetInputConnection(data->GetProducerPort()); or writer->SetInput( data ); should work afaik. It is not clear where you get x,y,z , but if it comes from vtkImageData have you tried something like( I am no C# person, so syntax should be checked): let data = new vtkImageData() ..... let vti = new vtkXMLImageDataWriter() vti.SetCompressorTypeToZLib() vti.SetDataModeToAppended() vti.SetInput() data vti.SetFileName path vti.Write() Hope this helps, Alex On Thu, Aug 11, 2011 at 11:01 PM, Oldrich Svec wrote: > Hi, > > I use Activiz .NET and have 4GB of memory. I save my data during the > computation in the following way: > > let vti = new vtkXMLImageDataWriter() > vti.SetCompressorTypeToZLib() > vti.SetDataModeToAppended() > use arr = new vtkDoubleArray() > arr.SetNumberOfComponents 1 > for z = 0 to data.lengthZ 0 0 - 1 do > ?for y = 0 to data.LengthY - 1 do > ? ?for x = 0 to data.LengthX - 1 do > ? ? ? ? ?arr.InsertNextValue data.[x,y,z] > vti.GetInput().GetCellData().AddArray arr > vti.SetFileName path > vti.Write() > > I get an error "vtkDoubleArray: Unable to allocate 4194303 > elements...". Is there any way how to save the XML image data without > using the intermediate vtkDoubleArray? Or is there any best practise > way how to save large data into file without having to worry about the > memory? > > Thanks in advance. > Oldrich > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers > From fabian-richter at gmx.de Thu Aug 18 03:19:23 2011 From: fabian-richter at gmx.de (Fabian) Date: Thu, 18 Aug 2011 00:19:23 -0700 (PDT) Subject: [vtkusers] vtk-theory: some questions about "behind the curtains" Message-ID: <1313651963970-4711146.post@n5.nabble.com> Hello all, thanks to Your help I managed to get my code running. But it brings some new questions which I need advice with: 1. Each plane consits 2 polygons, right? Then 1000 planes make 2000 polygons; a number which my hardware should deal with easily; but frame rate is poor with (just) 2000 polygons. Can it be, that I chose the wrong strategy: I create a vector with 1000 planes then 1000 datamapper then 1000 actors...all in one loop. Thus maybe I should say, I created 1000 piplines. Is there a better way? I hoped to measure my hardware-redndering-power with some million polygons! 2. Is it possible to parallize the rendering process? I got 4 cores but only one is used for rendering. 3. I am not sure about texuring. When I take a BMP, lets say 4 Mb; is the internal texture volume 4 Mb as well (beacause its Bitmap?!). I couldnt find a way to get the texture data volume (exept reading the filsize of the picture on the HDD; but I am not sure if its the same! Thank You very much for Your help; every advice is welcome! Greetings, Fabian -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-theory-some-questions-about-behind-the-curtains-tp4711146p4711146.html Sent from the VTK - Users mailing list archive at Nabble.com. From 812075761 at qq.com Thu Aug 18 03:23:01 2011 From: 812075761 at qq.com (steelblue) Date: Thu, 18 Aug 2011 00:23:01 -0700 (PDT) Subject: [vtkusers] a question about compile vtk source on linux, Message-ID: <1313652181650-4711153.post@n5.nabble.com> hi everyone: when i compile vtk on linux,the gcc report something wrong: [ 40%] Building CXX object Rendering/CMakeFiles/vtkRendering.dir/vtkOpenGLExtensionManager.o /root/Desktop/VTK/Rendering/vtkOpenGLExtensionManager.cxx: In member function ?virtual void (* vtkOpenGLExtensionManager::GetProcAddress(const char*))()?: /root/Desktop/VTK/Rendering/vtkOpenGLExtensionManager.cxx:273: ????glXGetProcAddressARB? ?????????? make[2]: *** [Rendering/CMakeFiles/vtkRendering.dir/vtkOpenGLExtensionManager.o] ?? 1 make[1]: *** [Rendering/CMakeFiles/vtkRendering.dir/all] ?? 2 make: *** [all] ?? 2 the gcc versin is 4.1.2, vtk version is 4.4.2 how to deal with this problem? waiting for your help ,thank! -- View this message in context: http://vtk.1045678.n5.nabble.com/a-question-about-compile-vtk-source-on-linux-tp4711153p4711153.html Sent from the VTK - Users mailing list archive at Nabble.com. From dzenanz at gmail.com Thu Aug 18 03:49:28 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 18 Aug 2011 09:49:28 +0200 Subject: [vtkusers] a question about compile vtk source on linux, In-Reply-To: <1313652181650-4711153.post@n5.nabble.com> References: <1313652181650-4711153.post@n5.nabble.com> Message-ID: GetProcAddress is a Windows function. Make sure you delete the CMake's cache before configuring it for Linux (you cannot use the same build directory for Windows and Linux). Also make sure that there are no such defines as WIN32, MSC_VER etc On Thu, Aug 18, 2011 at 09:23, steelblue <812075761 at qq.com> wrote: > hi everyone: > when i compile vtk on linux,the gcc report something wrong: > > [ 40%] Building CXX object > Rendering/CMakeFiles/vtkRendering.dir/vtkOpenGLExtensionManager.o > /root/Desktop/VTK/Rendering/vtkOpenGLExtensionManager.cxx: In member > function ?virtual void (* vtkOpenGLExtensionManager::GetProcAddress(const > char*))()?: > /root/Desktop/VTK/Rendering/vtkOpenGLExtensionManager.cxx:273: > ????glXGetProcAddressARB? ?????????? > make[2]: *** > [Rendering/CMakeFiles/vtkRendering.dir/vtkOpenGLExtensionManager.o] ?? 1 > make[1]: *** [Rendering/CMakeFiles/vtkRendering.dir/all] ?? 2 > make: *** [all] ?? 2 > > the gcc versin is 4.1.2, > vtk version is 4.4.2 > > how to deal with this problem? > waiting for your help ,thank! > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/a-question-about-compile-vtk-source-on-linux-tp4711153p4711153.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oldrich.svec at gmail.com Thu Aug 18 04:02:18 2011 From: oldrich.svec at gmail.com (Oldrich Svec) Date: Thu, 18 Aug 2011 10:02:18 +0200 Subject: [vtkusers] vtkXMLImageDataWriter: saving large data In-Reply-To: References: Message-ID: Hi, thank you for your answer. You are correct that I run my simulation in x86 and you are right that switching to x64 would help. There is however a bug in F# which prevents to load x64 C# dll. So I have to stay with x86 for now but I have contacted Microsoft to do something about it :). The data comes from .NET 3D array, not from vtkImageData. So I hoped that I could send the data one by one from .NET directly to the file without any intermediate C++ array. It is just strange to me that .NET 3D arrays fit into memory and when I try to copy them to vtkDoubleArray (i.e. c++), I get an error. Lets hope, that Microsoft will answer soon and I will switch to x64 to avoid these problems. Thanks for your help Oldrich On Thu, Aug 18, 2011 at 3:51 AM, Alex Malyushytskyy wrote: > Correct if my assumptions are wrong, > but since you are using .NET - you use Windows. > > Since it is unable to allocate 4194303 elements ( < INT_MAX = 2147483647 ) > I don't think it is ?limitation by index size even on 32 bit windows. > > So your application either does not: > - ?fit in your total memory available ram+ virtual memory (in this > case exit other applications or increase virtual memory ) > - or mostly likely you are running 32 bit windows and you are limited > by ?2GB limitation (4GB total for process, half for executable code, > half for process data) > > If last is the case nothing you can do to increase available memory. > > About writing without duplication. > I am not sure about C#, but in C++ I don't think duplication is > required/happens if you already have vtkImageData > > vtkImageData* data = .... > > writer->SetInputConnection(data->GetProducerPort()); > or > writer->SetInput( data ); > > should work afaik. > > It is not clear where you get x,y,z , but if it comes from vtkImageData > > have you tried something like( I am no C# person, so syntax should be checked): > > let data ?= new vtkImageData() > ..... > let vti = new vtkXMLImageDataWriter() > vti.SetCompressorTypeToZLib() > vti.SetDataModeToAppended() > vti.SetInput() data > vti.SetFileName path > vti.Write() > > > Hope this helps, > ?Alex > > > > On Thu, Aug 11, 2011 at 11:01 PM, Oldrich Svec wrote: >> Hi, >> >> I use Activiz .NET and have 4GB of memory. I save my data during the >> computation in the following way: >> >> let vti = new vtkXMLImageDataWriter() >> vti.SetCompressorTypeToZLib() >> vti.SetDataModeToAppended() >> use arr = new vtkDoubleArray() >> arr.SetNumberOfComponents 1 >> for z = 0 to data.lengthZ 0 0 - 1 do >> ?for y = 0 to data.LengthY - 1 do >> ? ?for x = 0 to data.LengthX - 1 do >> ? ? ? ? ?arr.InsertNextValue data.[x,y,z] >> vti.GetInput().GetCellData().AddArray arr >> vti.SetFileName path >> vti.Write() >> >> I get an error "vtkDoubleArray: Unable to allocate 4194303 >> elements...". Is there any way how to save the XML image data without >> using the intermediate vtkDoubleArray? Or is there any best practise >> way how to save large data into file without having to worry about the >> memory? >> >> Thanks in advance. >> Oldrich >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers >> > From quantum.leaf at gmail.com Thu Aug 18 06:04:13 2011 From: quantum.leaf at gmail.com (Liam Kurmos) Date: Thu, 18 Aug 2011 11:04:13 +0100 Subject: [vtkusers] visualizing polydata scalars from vtkCurvatures with vtklookuptable. In-Reply-To: References: Message-ID: essentially i am pursuing this because i found the example at http://graphics.ucsd.edu/~iman/Curvature/ which seems to suffer from the same problem. would it be more sensible to use a vtkColorTransferFunction for mapping polydata scalars to color? Liam On Wed, Aug 17, 2011 at 11:10 AM, Liam Kurmos wrote: > i'm putting some volume data through a vtkContourFilter -> > vtkCurvatures and want to visualize the resulting scalars. > > when i use vtklookup table to do this i find i get very coarse output > in terms of the number of colour values. After i increase the number > of colours above ~8 i dont notice any difference in the output image. > see the attached image. Apart from the odd green/yellow triangle > almost all are the same strong red/blue. generally red where there is > negative curvature and blue on positive but no inbetween colours. > > I looked into the scalar data directly: > > ? ? ? ? format="ascii" RangeMin="-1234133.1132" RangeMax="30386706633"> > > eg. 54.825778917 51.318575186 26.893618816 -8.411519227 -14.567928412 > 5.0874189973 > ? ? ? ? ?-16.836947761 -5.6020612956 33.866948784 22.691176615 > -9.880104764 -13.407796842 > ? ? ? ? ?4.4107221019 -16.761352603 0.40591292822 -3.4205102951 > 26.114937141 43.899964017 > ? ? ? ? ?-15.987917922 2.2293773588 -0.50755389311 -0.031377071296 > -0.82506254505 -0.26515309413 > ? ? ? ? ?-0.21935404476 1.6687913041 -16.931996948 22.683419601 > -1.4113088354 4.2161090128 > 78881.237047 132722.71915 149811.8483 -236.58958393 1184.2147238 > -546.34147028 .... > > ? ? ? ? > > I wonder if the large range in the curvatures is what is causing the > problem RangeMin="-1234133.1132" RangeMax="30386706633" when very few > values are close to the maximum. > but i dont know what i can do to fix this, i have setRange to the full > extent or a subset but it has no effect. Does this suggest something > im doing is making my setRange() ignored? if I query the range after > build it is still as set. > > my lookup table looks like: > > ?vtkLookupTable* lut=vtkLookupTable::New(); > ? ? ? ?lut->SetHueRange(0,0.6); ? ? ? ? ? ? ? ?//Red to Blue > ? ? ? ?lut->SetAlphaRange(1,1); > ? ? ? ?lut->SetValueRange(1,1.0); > ? ? ? ?lut->SetSaturationRange(1.0,1.0); > ? ? ? ?lut->SetNumberOfTableValues(1024000); // > ? ? ? ?lut->SetRange(-1000,1000);//altering range appear not to effect output > ? ? ? ?lut->Build(); > > can anyone suggest where i am going wrong? > > Liam > From cquammen at cs.unc.edu Thu Aug 18 07:51:36 2011 From: cquammen at cs.unc.edu (Cory Quammen) Date: Thu, 18 Aug 2011 07:51:36 -0400 Subject: [vtkusers] vtk-theory: some questions about "behind the curtains" In-Reply-To: <1313651963970-4711146.post@n5.nabble.com> References: <1313651963970-4711146.post@n5.nabble.com> Message-ID: On Thu, Aug 18, 2011 at 3:19 AM, Fabian wrote: > Hello all, > > thanks to Your help I managed to get my code running. But it brings some new > questions which I need advice with: > > 1. Each plane consits 2 polygons, right? Then 1000 planes make 2000 > polygons; a number which my hardware should deal with easily; but frame rate > is poor with (just) 2000 polygons. Can it be, that I chose the wrong > strategy: I create a vector with 1000 planes then 1000 datamapper then 1000 > actors...all in one loop. Thus maybe I should say, I created 1000 piplines. > Is there a better way? I hoped to measure my hardware-redndering-power with > some million polygons! VTK is slow when you have many actors, as you have discovered. I'm not familiar with what you are trying to do, but if it involves rendering a number of rectangles, perhaps of different sizes and at different orientations, you could use a vtkGlyph3D filter instead. See http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/OrientedGlyphs > 2. Is it possible to parallize the rendering process? I got 4 cores but only > one is used for rendering. All the rasterization is performed on your GPU, so only 1 core is really needed to manage the GPU. > 3. I am not sure about texuring. When I take a BMP, lets say 4 Mb; is the > internal texture volume 4 Mb as well (beacause its Bitmap?!). I couldnt find > a way to get the texture data volume (exept reading the filsize of the > picture on the HDD; but I am not sure if its the same! That seems like a reasonable assumption. I don't know a general way of checking GPU memory usage. Perhaps your GPU driver has some utilities to show you how much memory a texture uses? Cory > Thank You very much for Your help; every advice is welcome! > > Greetings, > Fabian > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtk-theory-some-questions-about-behind-the-curtains-tp4711146p4711146.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://www.vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Research Associate Department of Computer Science The University of North Carolina at Chapel Hill From daviddoria at gmail.com Thu Aug 18 08:34:35 2011 From: daviddoria at gmail.com (David Doria) Date: Thu, 18 Aug 2011 08:34:35 -0400 Subject: [vtkusers] vtk-theory: some questions about "behind the curtains" In-Reply-To: References: <1313651963970-4711146.post@n5.nabble.com> Message-ID: On Thu, Aug 18, 2011 at 7:51 AM, Cory Quammen wrote: > On Thu, Aug 18, 2011 at 3:19 AM, Fabian wrote: >> Hello all, >> >> thanks to Your help I managed to get my code running. But it brings some new >> questions which I need advice with: >> >> 1. Each plane consits 2 polygons, right? Then 1000 planes make 2000 >> polygons; a number which my hardware should deal with easily; but frame rate >> is poor with (just) 2000 polygons. Can it be, that I chose the wrong >> strategy: I create a vector with 1000 planes then 1000 datamapper then 1000 >> actors...all in one loop. Thus maybe I should say, I created 1000 piplines. >> Is there a better way? I hoped to measure my hardware-redndering-power with >> some million polygons! If none of the actors are moving with respect to each other, you should use the vtkAppendPolyDataFilter to combine all of the data and then a single mapper and actor: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filters/CombinePolydata David From fabian-richter at gmx.de Thu Aug 18 09:58:11 2011 From: fabian-richter at gmx.de (Fabian) Date: Thu, 18 Aug 2011 06:58:11 -0700 (PDT) Subject: [vtkusers] vtk-theory: some questions about "behind the curtains" In-Reply-To: References: <1313651963970-4711146.post@n5.nabble.com> Message-ID: <1313675891989-4712193.post@n5.nabble.com> Hi, First of all thank You for your help and ideas. I am Newby and have just a little idea of vtk's possibilities. 1. What I want to do is to write a little program, that gives me control about most important model parameters. For example I want to set the exact number of polygons, the exact texture volume, the number of lights, etc... Then I measure rendertime. With this measurement I would like to analyze the whole rendering process and to identify which parameter has which influence on rendertime. Of course: the more polygons the longer is rendertime but I want to know it exactly. Maybe its some kind of benchmark. I chose many planes, because I have a lot control about the number of polygons. Does this number change when using the AppendDataFilter? I could imaging that easy shapes like polygons are merged? I tried to use different techniques like TriangleStrips or vtkPolygon, but firstly I didnt mange to run it properly and secondly I didnt like it ;-) due to little control. 2. I am not sure about the CPU vs. GPU thing. The CPU usage rate for this sinle core is 100% and that looked to me, as if further computing power would be used if available?! Thank YOU, Fabian -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-theory-some-questions-about-behind-the-curtains-tp4711146p4712193.html Sent from the VTK - Users mailing list archive at Nabble.com. From awiles at ndigital.com Thu Aug 18 10:31:41 2011 From: awiles at ndigital.com (Andrew Wiles) Date: Thu, 18 Aug 2011 10:31:41 -0400 Subject: [vtkusers] Documentation Server Message-ID: <4E4CEA0D.4F7A.003F.1@ndigital.com> Hello, Is the nightly documentation for VTK down? Both of my browsers revert to the public.kitware.com site. Cheers. Andrew --------------------------------------------------------------- 1981-2011: Celebrating 30 Years of Innovation Follow us on Twitter: @NDIMedResearch Andrew D. Wiles, PhD, PEng Research Scientist, Medical Division NDI 103 Randall Drive Waterloo, ON, Canada, N2V 1C5 Telephone: +1 (519) 884-5142 ext. 314 Toll Free: +1 (877) 634-6340 Global: ++ (800) 634-634-00 Facsimile: +1 (519) 884-5184 Website: www.ndigital.com -------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/bmp Size: 36150 bytes Desc: not available URL: From dbrayford at gmail.com Thu Aug 18 11:01:36 2011 From: dbrayford at gmail.com (David Brayford) Date: Thu, 18 Aug 2011 09:01:36 -0600 Subject: [vtkusers] crash on setinput Message-ID: I am getting the following crash "Unhandled exception at 0x00000000 in RegTest.exe: 0xC0000005: Access violation." when the SetInput function is executed. However, the vtkImageData is not null (see code below). I don't know how to overcome this error and any advice would be greatly appreciated. if( !m_DataRepository->GetVtkDRR() ) { return; } vtkSmartPointer imageTexture=vtkTexture::New(); imageTexture->SetInput( m_DataRepository->GetVtkDRR() ); David From i.reicht at Dkfz-Heidelberg.de Thu Aug 18 12:36:49 2011 From: i.reicht at Dkfz-Heidelberg.de (Reicht, Ignaz) Date: Thu, 18 Aug 2011 18:36:49 +0200 Subject: [vtkusers] Smoothing Points, polylines and additional arrays in polydata Message-ID: Dear Userlist, I have a set of vtkPoints and vtkPolyLines stored in vtkPolyData. Then, for each point I set an individual value using a vtkUnsignedCharArray and add it to my polydata. In the next step I want to smooth my polylines and the according values provided in the vtkPolyData object. So far I was using vtkParametricFunctionSource (in combination with vtkKochanekSpline and vtkParametricSpline) for smoothing the polylines. Then the values in my vtkUnsignedCharArray also need to be interpolated explicitely. I tried vtkSmoothPolyDataFilter, but this filter does not cause any effect on my vtkPoints - i guess it is not for that purpose -. Is there a more easy way to smooth and interpolate points and according values in a vtkPolyData object? or have I crossed the border and shall start writing my own vtkFilter? thanks for any advise Iggy From alexmalvtk at gmail.com Thu Aug 18 15:19:53 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Thu, 18 Aug 2011 12:19:53 -0700 Subject: [vtkusers] vtkXMLImageDataWriter: saving large data In-Reply-To: References: Message-ID: vtkDoubleArraycan be "attached" to raw C style arrays array. You can do it if you already have an array with appropriate structure. (You will have to figure out how to do it in C#) check details in documentation: void vtkDoubleArray::SetArray ( double * array, vtkIdType size, int save ) Alex On Thu, Aug 18, 2011 at 1:02 AM, Oldrich Svec wrote: > Hi, > > thank you for your answer. You are correct that I run my simulation in > x86 and you are right that switching to x64 would help. There is > however a bug in F# which prevents to load x64 C# dll. So I have to > stay with x86 for now but I have contacted Microsoft to do something > about it :). The data comes from .NET 3D array, not from vtkImageData. > So I hoped that I could send the data one by one from .NET directly to > the file without any intermediate C++ array. It is just strange to me > that .NET 3D arrays fit into memory and when I try to copy them to > vtkDoubleArray (i.e. c++), I get an error. > > Lets hope, that Microsoft will answer soon and I will switch to x64 to > avoid these problems. > > Thanks for your help > Oldrich > > > On Thu, Aug 18, 2011 at 3:51 AM, Alex Malyushytskyy > wrote: >> Correct if my assumptions are wrong, >> but since you are using .NET - you use Windows. >> >> Since it is unable to allocate 4194303 elements ( < INT_MAX = 2147483647 ) >> I don't think it is ?limitation by index size even on 32 bit windows. >> >> So your application either does not: >> - ?fit in your total memory available ram+ virtual memory (in this >> case exit other applications or increase virtual memory ) >> - or mostly likely you are running 32 bit windows and you are limited >> by ?2GB limitation (4GB total for process, half for executable code, >> half for process data) >> >> If last is the case nothing you can do to increase available memory. >> >> About writing without duplication. >> I am not sure about C#, but in C++ I don't think duplication is >> required/happens if you already have vtkImageData >> >> vtkImageData* data = .... >> >> writer->SetInputConnection(data->GetProducerPort()); >> or >> writer->SetInput( data ); >> >> should work afaik. >> >> It is not clear where you get x,y,z , but if it comes from vtkImageData >> >> have you tried something like( I am no C# person, so syntax should be checked): >> >> let data ?= new vtkImageData() >> ..... >> let vti = new vtkXMLImageDataWriter() >> vti.SetCompressorTypeToZLib() >> vti.SetDataModeToAppended() >> vti.SetInput() data >> vti.SetFileName path >> vti.Write() >> >> >> Hope this helps, >> ?Alex >> >> >> >> On Thu, Aug 11, 2011 at 11:01 PM, Oldrich Svec wrote: >>> Hi, >>> >>> I use Activiz .NET and have 4GB of memory. I save my data during the >>> computation in the following way: >>> >>> let vti = new vtkXMLImageDataWriter() >>> vti.SetCompressorTypeToZLib() >>> vti.SetDataModeToAppended() >>> use arr = new vtkDoubleArray() >>> arr.SetNumberOfComponents 1 >>> for z = 0 to data.lengthZ 0 0 - 1 do >>> ?for y = 0 to data.LengthY - 1 do >>> ? ?for x = 0 to data.LengthX - 1 do >>> ? ? ? ? ?arr.InsertNextValue data.[x,y,z] >>> vti.GetInput().GetCellData().AddArray arr >>> vti.SetFileName path >>> vti.Write() >>> >>> I get an error "vtkDoubleArray: Unable to allocate 4194303 >>> elements...". Is there any way how to save the XML image data without >>> using the intermediate vtkDoubleArray? Or is there any best practise >>> way how to save large data into file without having to worry about the >>> memory? >>> >>> Thanks in advance. >>> Oldrich >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers >>> >> > From alexmalvtk at gmail.com Thu Aug 18 15:22:25 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Thu, 18 Aug 2011 12:22:25 -0700 Subject: [vtkusers] crash on setinput In-Reply-To: References: Message-ID: I am not sure it is related to crash, But you should replace >> vtkSmartPointer imageTexture=vtkTexture::New(); with >> vtkSmartPointer imageTexture=vtkSmartPointerNew(); anyway, Regards, Alex On Thu, Aug 18, 2011 at 8:01 AM, David Brayford wrote: > I am getting the following crash "Unhandled exception at 0x00000000 in > RegTest.exe: 0xC0000005: Access violation." when the SetInput function > is executed. However, the vtkImageData is not null (see code below). I > don't know how to overcome this error and any advice would be greatly > appreciated. > > ? ? ? ?if( !m_DataRepository->GetVtkDRR() ) > ? ? ? ?{ > ? ? ? ? ? ? ? ?return; > ? ? ? ?} > > ? ? ? ?vtkSmartPointer imageTexture=vtkTexture::New(); > ? ? ? ?imageTexture->SetInput( m_DataRepository->GetVtkDRR() ); > > 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://www.vtk.org/mailman/listinfo/vtkusers > From alexmalvtk at gmail.com Thu Aug 18 15:25:12 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Thu, 18 Aug 2011 12:25:12 -0700 Subject: [vtkusers] Documentation Server In-Reply-To: <4E4CEA0D.4F7A.003F.1@ndigital.com> References: <4E4CEA0D.4F7A.003F.1@ndigital.com> Message-ID: nightly seems inaccesable, stil could use http://www.vtk.org/doc/release/ Alex On Thu, Aug 18, 2011 at 7:31 AM, Andrew Wiles wrote: > Hello, > > Is the nightly documentation for VTK down? Both of my browsers revert to > the public.kitware.com site. > > Cheers. > Andrew > > > > --------------------------------------------------------------- > 1981-2011: Celebrating 30 Years of Innovation > Follow us on Twitter: @NDIMedResearch > Andrew D. Wiles, PhD, PEng > Research Scientist, Medical Division > NDI > 103 Randall Drive > Waterloo, ON, Canada, N2V 1C5 > Telephone: +1 (519) 884-5142 ext. 314 > Toll Free: +1 (877) 634-6340 > Global: ++ (800) 634-634-00 > Facsimile: +1 (519) 884-5184 > Website: www.ndigital.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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbrayford at gmail.com Thu Aug 18 15:38:50 2011 From: dbrayford at gmail.com (David Brayford) Date: Thu, 18 Aug 2011 13:38:50 -0600 Subject: [vtkusers] crash on setinput In-Reply-To: References: Message-ID: Alex, I've replace the call with vtkSmartPointer imageTexture = vtkSmartPointer::New(); and still get the same crash. David On Thu, Aug 18, 2011 at 1:22 PM, Alex Malyushytskyy wrote: > I am not sure it is related to crash, > But you should replace > >>> vtkSmartPointer imageTexture=vtkTexture::New(); > > with > >>> ?vtkSmartPointer imageTexture=vtkSmartPointerNew(); > > anyway, > > Regards, > > Alex > > > On Thu, Aug 18, 2011 at 8:01 AM, David Brayford wrote: >> I am getting the following crash "Unhandled exception at 0x00000000 in >> RegTest.exe: 0xC0000005: Access violation." when the SetInput function >> is executed. However, the vtkImageData is not null (see code below). I >> don't know how to overcome this error and any advice would be greatly >> appreciated. >> >> ? ? ? ?if( !m_DataRepository->GetVtkDRR() ) >> ? ? ? ?{ >> ? ? ? ? ? ? ? ?return; >> ? ? ? ?} >> >> ? ? ? ?vtkSmartPointer imageTexture=vtkTexture::New(); >> ? ? ? ?imageTexture->SetInput( m_DataRepository->GetVtkDRR() ); >> >> 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://www.vtk.org/mailman/listinfo/vtkusers >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From xf10036 at hotmail.com Thu Aug 18 16:25:58 2011 From: xf10036 at hotmail.com (Xiaofeng Z) Date: Thu, 18 Aug 2011 16:25:58 -0400 Subject: [vtkusers] SetUserMatrix ineffective on vtkAnnotatedCubeActor Message-ID: Hi vtkusers, I'm trying to use SetUserMatrix() to change the orientation of a vtkAnnotatedCubeActor, but the function seemed to be ineffective. Why? My renderering pipeline as the following: vtkAnnotatedCubeActor* actor = vtkAnnotatedCubeActor::New(); vtkMatrix4x4* matrix = vtkMatrix4x4::New(); static double elem[16] = { 0, 0,-1, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1 }; matrix->DeepCopy(elem); actor->SetUserMatrix(matrix); matrix->Delete(); vtkRenderer *ren = vtkRenderer::New(); ren->SetViewport(0.0, 0.0, 1.0, 1.0); ren->SetBackground(0.1, 0.2, 0.3); ren->AddActor(prop); prop->Delete(); vtkRenderWindow* win = vtkRenderWindow::New(); win->LineSmoothingOn(); win->PolygonSmoothingOn(); win->SetSize(300,300); win->AddRenderer(ren); ren->Delete(); interactor = vtkRenderWindowInteractor::New(); interactor->SetRenderWindow(win); win->Delete(); win->Render(); Thanks for any insight! Xiaofeng From dbrayford at gmail.com Thu Aug 18 17:35:16 2011 From: dbrayford at gmail.com (David Brayford) Date: Thu, 18 Aug 2011 15:35:16 -0600 Subject: [vtkusers] How to use the arrow keys Message-ID: I am trying unsuccessfully to find the command to use the arrow keys. char keycode=iren->GetKeyCode(); switch (keycode) { case 'ARROW_UP': { break; } case 'ARROW_DOWN': { break; } } Thanks David From i.reicht at Dkfz-Heidelberg.de Thu Aug 18 17:39:04 2011 From: i.reicht at Dkfz-Heidelberg.de (Reicht, Ignaz) Date: Thu, 18 Aug 2011 23:39:04 +0200 Subject: [vtkusers] How to use the arrow keys In-Reply-To: References: Message-ID: <59C9690A-721F-4BDF-8384-D509DBE2710D@dkfz-heidelberg.de> Hi David, use iren->GetKeySym() have a look at this http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/KeypressEvents iggy ------------------------------------------------- Spelling Errors added by Apple OSX intelligent word completion On Aug 18, 2011, at 11:35 PM, David Brayford wrote: I am trying unsuccessfully to find the command to use the arrow keys. char keycode=iren->GetKeyCode(); switch (keycode) { case 'ARROW_UP': { break; } case 'ARROW_DOWN': { break; } } Thanks 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://www.vtk.org/mailman/listinfo/vtkusers From s.fowler at tecplot.com Thu Aug 18 17:20:01 2011 From: s.fowler at tecplot.com (Scott Fowler) Date: Thu, 18 Aug 2011 14:20:01 -0700 Subject: [vtkusers] vtkPlotPoints problem Message-ID: <6DF989906D8EFE46900494BB7A64C6033E881D4340@tps004> I've found a problem with vtkPlotPoints (it doesn't update the cache when the LookupTable changes). I have a fix sitting in my repository and I'd like to push it to gerrit. I've gone through the steps here: http://www.vtk.org/Wiki/VTK/Git but get stuck on ./Utilities/SetupForDevelopment.sh. It fails when testing push access. I've filled out the form at https://www.kitware.com/Admin/SendPassword.cgi. How long should expect to wait for a password? Is there some other process I should be aware of? Thanks! Scott Scott Fowler Software Development Engineer Phone: 425.460.8265 Email: s.fowler at tecplot.com Tecplot Inc. | Master the View 3535 Factoria Blvd. SE, Ste. 550 Bellevue, WA USA 98006 Fax: 425.653.9200 Web: www.tecplot.com ________________________________ This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are NOT the intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying this e-mail is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xf10036 at hotmail.com Thu Aug 18 19:32:59 2011 From: xf10036 at hotmail.com (Xiaofeng Z) Date: Thu, 18 Aug 2011 19:32:59 -0400 Subject: [vtkusers] SetUserMatrix ineffective on vtkAnnotatedCubeActor In-Reply-To: References: Message-ID: So are the Rotate_() methods! They don't seemed to have any effect in the apparance of the rendered cube. Is this by design or I'm missing something. Xiaofeng ---------------------------------------- > From: xf10036 at hotmail.com > To: vtkusers at vtk.org > Date: Thu, 18 Aug 2011 16:25:58 -0400 > Subject: [vtkusers] SetUserMatrix ineffective on vtkAnnotatedCubeActor > > > Hi vtkusers, > > > I'm trying to use SetUserMatrix() to change the orientation of a vtkAnnotatedCubeActor, but the function seemed to be ineffective. Why? > > My renderering pipeline as the following: > > > vtkAnnotatedCubeActor* actor = vtkAnnotatedCubeActor::New(); > vtkMatrix4x4* matrix = vtkMatrix4x4::New(); > static double elem[16] = { > 0, 0,-1, 0, > -1, 0, 0, 0, > 0, 1, 0, 0, > 0, 0, 0, 1 }; > matrix->DeepCopy(elem); > actor->SetUserMatrix(matrix); > matrix->Delete(); > vtkRenderer *ren = vtkRenderer::New(); > ren->SetViewport(0.0, 0.0, 1.0, 1.0); > ren->SetBackground(0.1, 0.2, 0.3); > ren->AddActor(prop); > prop->Delete(); > > vtkRenderWindow* win = vtkRenderWindow::New(); > win->LineSmoothingOn(); > win->PolygonSmoothingOn(); > win->SetSize(300,300); > win->AddRenderer(ren); > ren->Delete(); > > interactor = vtkRenderWindowInteractor::New(); > interactor->SetRenderWindow(win); > win->Delete(); > > win->Render(); > > Thanks for any insight! > > > Xiaofeng > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers From dbrayford at gmail.com Thu Aug 18 21:24:46 2011 From: dbrayford at gmail.com (David Brayford) Date: Thu, 18 Aug 2011 19:24:46 -0600 Subject: [vtkusers] how to convert insight image data to vtk image data Message-ID: Hi, I've written a function to convert a vtk to itk image data, but know need a method of converting the itk image data back to a vtk image data. However, I don't know how to convert from itk to vtk. thanks David From thihaucsm at gmail.com Thu Aug 18 21:34:27 2011 From: thihaucsm at gmail.com (Thiha Oo) Date: Fri, 19 Aug 2011 09:34:27 +0800 Subject: [vtkusers] vtkImageTracerWidget problem Message-ID: Hi, I am getting some problem with vtkImageTracerWidget. I can show any slice from vtkImage volume and draw a freehand line with vtkImageTracerWidget over background image in viewer Window. The image is on XY plane. For some slices, the vtkImageTracerWidget draws in front of the background image and it is visible. I checked the Z values of the points on tracer path and they had the same value as my current viewing slice's Z value. However for some slices, the image tracer was drawn but it was behind the background image and could not be seen. I checked the position values of the points on tracer path and they were different from current viewing slice's Z values. e.g., Current slice's Z value = 93 and the tracer's Z values = 92.99999 and therefore it was behind the slice image. How can I place the imageTracerWidget in front of the viewing slice all the time? Here is a piece of codes that I used to initialize my ImageTracerWidget. interactor = m_viewer2D->getRenderWindowInteractor(); m_imageTracer->GetLineProperty()->SetLineWidth(3); m_imageTracer->SetInteractor(interactor); m_imageTracer->AutoCloseOn(); m_imageTracer->SetCaptureRadius(10); m_imageTracer->SetViewProp( m_viewer2D->getImageActor() ); m_imageTracer->On(); thanks and regards, Thiha -------------- next part -------------- An HTML attachment was scrubbed... URL: From thihaucsm at gmail.com Thu Aug 18 21:42:49 2011 From: thihaucsm at gmail.com (Thiha Oo) Date: Fri, 19 Aug 2011 09:42:49 +0800 Subject: [vtkusers] how to convert insight image data to vtk image data In-Reply-To: References: Message-ID: Hi, I used the following method to convert from IT to VTK. It may not be the perfect codes but it works for me typedef itk::OrientedImage< unsigned char, 3 > SegVolumeImageType; typedef itk::ImageToVTKImageFilter ITKImageToVTKImageFilterType; vtkSmartPointer segmentedVTKImage = vtkSmartPointer::New(); //segmentedITKImage is a type of SegVolumeImageType ITKImageToVTKImageFilterType::Pointer converter = ITKImageToVTKImageFilterType::New(); converter->SetInput(segmentedITKImage); segmentedVTKImage = converter->GetOutput(); Thiha On Fri, Aug 19, 2011 at 9:24 AM, David Brayford wrote: > Hi, > > I've written a function to convert a vtk to itk image data, but know > need a method of converting the itk image data back to a vtk image > data. However, I don't know how to convert from itk to vtk. > > thanks > 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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexmalvtk at gmail.com Thu Aug 18 22:10:20 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Thu, 18 Aug 2011 19:10:20 -0700 Subject: [vtkusers] "Visualization Toolkit generated SLA File" what is it? Message-ID: vtkSTLWriter ads "Visualization Toolkit generated SLA File" at the begining of binary and STL file (vtkSTLWriter.cxx, line 80 Also there is a macro vtkDebugMacro("Writing ASCII sla file"); in void vtkSTLWriter::WriteAsciiSTL(vtkPoints *pts, vtkCellArray *polys) I assume it was supposed to be STL Could anybody of the developers make the change to these 2 lines? Regards, Alex From vijaeendra at gmail.com Fri Aug 19 02:49:01 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Fri, 19 Aug 2011 12:19:01 +0530 Subject: [vtkusers] VTK Building Error On Solaris x86 Message-ID: Hi, i m getting the following error while building VTK on Solaris Platform. error _IMAGINARY_I undeclared Its a bug. I have also gone through the bug fixes. But could not make much of it... Please help me if anybody has gone through the same problem!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria56 at yahoo.fr Fri Aug 19 04:50:06 2011 From: daviddoria56 at yahoo.fr (Doria David) Date: Fri, 19 Aug 2011 09:50:06 +0100 (BST) Subject: [vtkusers] QVTKWidget avoid transparent background when rendering Message-ID: <1313743806.2459.YahooMailNeo@web132108.mail.ird.yahoo.com> Some strange behaviors occurs especially on QVTKWidget: when I show a QVTKWidget with a 3D volume, for example, the widget are shown?transparent, showing the contents of the windows that are behind, for example a WordPad window until it is completely rendered. How can I avoid this strange behaviors ? (Ideally a black background instead of showing the contents of the windows that are behind) Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From taron2000 at gmx.de Fri Aug 19 05:37:41 2011 From: taron2000 at gmx.de (Taron) Date: Fri, 19 Aug 2011 02:37:41 -0700 (PDT) Subject: [vtkusers] vtkSliderRepresentation2D bug? Message-ID: <1313746661276-4715056.post@n5.nabble.com> Hi everybody, I found a strange behaviour of vtkSliderRepresentation2D. I added it to a vtkSliderWidget and it worked so far. Then i did the following: SliderRepresentation2D->GetPoint1Coordinate()->SetCoordinateSystemToDisplay(); SliderRepresentation2D->GetPoint2Coordinate()->SetCoordinateSystemToDisplay(); SliderRepresentation2D->GetPoint1Coordinate()->SetValue(50,50); SliderRepresentation2D->GetPoint2Coordinate()->SetValue(100,50); This represents a horizontal slider of length 50 pixel, starting at coordinate (50,50); If I resize the window, evreything works as expected, the slider does not move and does not change size, but if i make a vertical slider like this, SliderRepresentation2D->GetPoint1Coordinate()->SetCoordinateSystemToDisplay(); SliderRepresentation2D->GetPoint2Coordinate()->SetCoordinateSystemToDisplay(); SliderRepresentation2D->GetPoint1Coordinate()->SetValue(50,50); SliderRepresentation2D->GetPoint2Coordinate()->SetValue(50,100); the behaviour changes. Now if I resize the window the slider changes the vertical position (y-coordinate) and the lenght. Its somehow related to the display width/height ratio, because the coordinates are right if the ratio is one. I guess this is a bug, or is this behavior intended. Has anyone a fix for this or a workaround? Thanks Klaus -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSliderRepresentation2D-bug-tp4715056p4715056.html Sent from the VTK - Users mailing list archive at Nabble.com. From taron2000 at gmx.de Fri Aug 19 05:41:15 2011 From: taron2000 at gmx.de (Taron) Date: Fri, 19 Aug 2011 02:41:15 -0700 (PDT) Subject: [vtkusers] vtkSliderRepresentation2D bug? In-Reply-To: <1313746661276-4715056.post@n5.nabble.com> References: <1313746661276-4715056.post@n5.nabble.com> Message-ID: <1313746875642-4715068.post@n5.nabble.com> Ah i forgot to mention: I use vtk 5.6.1 -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkSliderRepresentation2D-bug-tp4715056p4715068.html Sent from the VTK - Users mailing list archive at Nabble.com. From quantum.leaf at gmail.com Fri Aug 19 08:19:06 2011 From: quantum.leaf at gmail.com (Liam Kurmos) Date: Fri, 19 Aug 2011 13:19:06 +0100 Subject: [vtkusers] nightly docs web problem Message-ID: The nightly docs have been redirecting to http://public.kitware.com/ since yesterday. Liam From jothybasu at gmail.com Fri Aug 19 08:37:26 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 19 Aug 2011 13:37:26 +0100 Subject: [vtkusers] QVTKWidget avoid transparent background when rendering In-Reply-To: <1313743806.2459.YahooMailNeo@web132108.mail.ird.yahoo.com> References: <1313743806.2459.YahooMailNeo@web132108.mail.ird.yahoo.com> Message-ID: I too have the same problem, not able to solve yet! Jothy On Fri, Aug 19, 2011 at 9:50 AM, Doria David wrote: > Some strange behaviors occurs especially on QVTKWidget: when I show a > QVTKWidget with a 3D volume, for example, the widget are shown transparent, > showing the contents of the windows that are behind, for example a WordPad > window until it is completely rendered. > How can I avoid this strange behaviors ? (Ideally a black background > instead of showing the contents of the windows that are behind) > Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.partyka at kitware.com Fri Aug 19 08:46:01 2011 From: david.partyka at kitware.com (David Partyka) Date: Fri, 19 Aug 2011 08:46:01 -0400 Subject: [vtkusers] VTK Building Error On Solaris x86 In-Reply-To: References: Message-ID: Can you give us more context by sending the entire error message and possibly several lines before and after so we can see where in the build this is happening. Thanks! On Fri, Aug 19, 2011 at 2:49 AM, vijaeendra simha wrote: > Hi, > > i m getting the following error while building VTK on Solaris Platform. > > error _IMAGINARY_I undeclared > > Its a bug. I have also gone through the bug fixes. But could not make much > of it... > > Please help me if anybody has gone through the same problem!! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From h0ppel at web.de Fri Aug 19 09:34:15 2011 From: h0ppel at web.de (h0ppel) Date: Fri, 19 Aug 2011 06:34:15 -0700 (PDT) Subject: [vtkusers] texture only on 1 side In-Reply-To: References: <1313580419480-4707772.post@n5.nabble.com> Message-ID: <1313760855115-4715592.post@n5.nabble.com> I found a better way to get the image: now I can put the image into other filters... but the image does still have 2 sides and I want only the backside of the image? but still dont know how to do? t -- View this message in context: http://vtk.1045678.n5.nabble.com/texture-only-on-1-side-tp4707772p4715592.html Sent from the VTK - Users mailing list archive at Nabble.com. From quantum.leaf at gmail.com Fri Aug 19 09:39:28 2011 From: quantum.leaf at gmail.com (Liam Kurmos) Date: Fri, 19 Aug 2011 14:39:28 +0100 Subject: [vtkusers] coloring a sphere by elevation Message-ID: I'm creating an example to colour the surface of a sphere using a lookup table, where the scalar value is just the value of one of the vertex coords. The code below essentially works but only shows 2 colors. 2Qs: -why dont i see a range of colors from the lookup table? -i thought i should be able to get the coordinates of a vertex from the vtkPointData but i couldnt do this or find an example and had to use vtkPolyData->getPoint(i). Is it straight forward to get down to the points for pointdata? any thoughts appreciated, Liam void Analyser4D::testFunc() { cout << " test code" << endl; vtkSmartPointer sphereSource = vtkSmartPointer::New(); float radius = 100000; sphereSource->SetCenter(0,0,0); sphereSource->SetRadius(radius); sphereSource->SetPhiResolution(20); sphereSource->SetThetaResolution(20); sphereSource->Update(); vtkPolyData* polyd=sphereSource->GetOutput(); vtkPointData* pointd=polyd->GetPointData(); vtkSmartPointer scalars= vtkSmartPointer::New(); cout<<"point comps "<GetNumberOfComponents()<<" tups "<GetNumberOfTuples()<<" arrays "<GetNumberOfArrays()<SetNumberOfValues(pointd->GetNumberOfTuples()); scalars->SetName("scalars"); for (int i=0;iGetNumberOfTuples();i++){ //vtkDataArray* dataa=pointd->GetArray(0); vtkFloatArray* dataa=vtkFloatArray::SafeDownCast(pointd->GetArray(0)); double* point=polyd->GetPoint(i); scalars->SetValue(i,point[0]); } pointd->SetScalars(scalars); vtkLookupTable* lut=vtkLookupTable::New(); lut->SetHueRange(0,0.6); //Red to Blue lut->SetAlphaRange(1,1); lut->SetValueRange(1,1.0); lut->SetSaturationRange(1.0,1.0); lut->SetNumberOfTableValues(256*256*256); lut->SetRange(-100000,100000);//altering range appear not to effect output lut->Build(); // vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(sphereSource->GetOutputPort()); mapper->SetLookupTable(lut); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetAmbient(1); //SetShading(0); actor->GetProperty()->SetDiffuse(0); //SetShading(0); actor->GetProperty()->SetSpecular(0); //SetShading(0); actor->GetProperty()->SetInterpolationToFlat(); //actor->GetProperty()->SetOpacity(0.5); actor->GetProperty()->SetColor(1, 0, 0); // vtkSmartPointer renderer; vtkSmartPointer renderWindow; renderer = vtkSmartPointer::New(); renderWindow = vtkSmartPointer::New(); renderer->SetBackground(0, 0, 0); renderWindow->AddRenderer(renderer); renderWindow->SetSize(300, 300); renderer->SetBackground(0, 0, 0); renderer->AddActor(actor); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderWindow->Render(); renderWindowInteractor->Start(); } From daviddoria at gmail.com Fri Aug 19 09:48:31 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 19 Aug 2011 09:48:31 -0400 Subject: [vtkusers] coloring a sphere by elevation In-Reply-To: References: Message-ID: On Fri, Aug 19, 2011 at 9:39 AM, Liam Kurmos wrote: > I'm creating an example to colour the surface of a sphere using a > lookup table, where the scalar value is just the value of one of the > vertex coords. > The code below essentially works but only shows 2 colors. > > 2Qs: > > -why dont i see a range of colors from the lookup table? > > -i thought i should be able to get the coordinates of a vertex from > the vtkPointData but i couldnt do this or find an example and had to > use vtkPolyData->getPoint(i). Is it straight forward to get down to > the points for pointdata? > > > any thoughts appreciated, > > > Liam > Did you see this example? http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height David -------------- next part -------------- An HTML attachment was scrubbed... URL: From dennis.merkert at itwm.fraunhofer.de Fri Aug 19 10:09:48 2011 From: dennis.merkert at itwm.fraunhofer.de (Dennis Merkert) Date: Fri, 19 Aug 2011 16:09:48 +0200 Subject: [vtkusers] Problem getting the correct number of cell arrays Message-ID: <4E4E6EAC.4040103@itwm.fraunhofer.de> Hi, i have the following problem: I've got a vtk file of structured points (the file is attached). When I try to determine the number of cell arrays, I get the wrong number. There should be 6 arrays ("Materials", "vonMisesStrain", "Stress", "vonMisesStress", "Displacement", "DisplacementMagnitude") but I get only the arrays "Materials", "Stress" and "Displacement". Paraview displays the correct number of cell data. The code I use is the following (in C++): vtkStructuredPoints *dataSet; //Here I have previously loaded the structured points array int numberOfResultsForCellData = dataSet->GetCellData()->GetNumberOfArrays(); //returns 3 int numberOfResultsForPointData = dataSet->GetPointData()->GetNumberOfArrays(); //returns 0 I'm using vtk in version 5.6.1 and gcc in version 4.3.2. I hope you can help me. Best regards, Dennis -------------- next part -------------- A non-text attachment was scrubbed... Name: loadcase_xx.vtk Type: application/octet-stream Size: 1642 bytes Desc: not available URL: From quantum.leaf at gmail.com Fri Aug 19 10:46:33 2011 From: quantum.leaf at gmail.com (Liam Kurmos) Date: Fri, 19 Aug 2011 15:46:33 +0100 Subject: [vtkusers] coloring a sphere by elevation In-Reply-To: References: Message-ID: > > Did you see this example? > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height > no missed that somehow. Cheers! i note this example does not use mapper->setLookuptable() but rather gets 'colors' from the LUT and does outputPolyData->GetPointData()->SetScalars(colors); mapper->SetInputConnection(outputPolyData->GetProducerPort()); it looks like my lookup table was working but other that the sethuerange() (which worked) it was having no effect on the output when i did mapper->setLookuptable() . In fact i could remove my lut and the mapper->setlookuptable() and get the same output with red to blue hue range. all working now, thanks for the help. Liam On Fri, Aug 19, 2011 at 2:48 PM, David Doria wrote: > On Fri, Aug 19, 2011 at 9:39 AM, Liam Kurmos wrote: >> >> I'm creating an example to colour the surface of a sphere using a >> lookup table, where the scalar value is just the value of one of the >> vertex coords. >> The code below essentially works but only shows 2 colors. >> >> 2Qs: >> >> -why dont i see a range of colors from the lookup table? >> >> -i thought i should be able to get the coordinates of a vertex from >> the vtkPointData but i couldnt do this or find an example and had to >> use vtkPolyData->getPoint(i). Is it straight forward to get down to >> the points for pointdata? >> >> >> any thoughts appreciated, >> >> >> Liam > > Did you see this example? > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height > > David From marcus.hanwell at kitware.com Fri Aug 19 11:22:26 2011 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Fri, 19 Aug 2011 11:22:26 -0400 Subject: [vtkusers] vtkPlotPoints problem In-Reply-To: <6DF989906D8EFE46900494BB7A64C6033E881D4340@tps004> References: <6DF989906D8EFE46900494BB7A64C6033E881D4340@tps004> Message-ID: On Thu, Aug 18, 2011 at 5:20 PM, Scott Fowler wrote: > I've found a problem with vtkPlotPoints (it doesn't update the cache when > the LookupTable changes).? I have a fix sitting in my repository and I'd > like to push it to gerrit.? I've gone through the steps here: > http://www.vtk.org/Wiki/VTK/Git but get stuck on > ./Utilities/SetupForDevelopment.sh.? It fails when testing push access. > I've filled out the form at https://www.kitware.com/Admin/SendPassword.cgi. > How long should expect to wait for a password? > > Is there some other process I should be aware of? > Hi Scott, You don't need push access (this is referring to the stage, not Gerrit). You will need to setup your username, upload your public key etc in the web interface. Anyone can upload patches to Gerrit, and I would be happy to review your proposed change. Marcus -- Marcus D. Hanwell, Ph.D. R&D Engineer, Kitware Inc. (518) 881-4937 From artem.paraview at googlemail.com Fri Aug 19 11:30:29 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Fri, 19 Aug 2011 16:30:29 +0100 Subject: [vtkusers] Incorrect coloring landscape by elevation ? Message-ID: Hello, I and drawing the 3D 'landscape' graph using the data defined on 2D structured grid and I would like to color the resulting graphics according to elevation. The pipeline looks like this: vtkImageData->vtkImageDataGeometryFilter->vtkWarpScalar->vtkDataSetMapper The mapper has a color lookup table. The result (picture attached) does not shows the color based on elevation, that is points with the same z-coordinates have different colors. Why? It looks like points in TRIANGLES which form the surface were colored correctly, by within each triangle the color is just interpolated. Is it a correct behaviour or am I doing something wrong? Best wishes Artem -------------- next part -------------- A non-text attachment was scrubbed... Name: colors.png Type: image/png Size: 144196 bytes Desc: not available URL: From daviddoria at gmail.com Fri Aug 19 11:34:09 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 19 Aug 2011 11:34:09 -0400 Subject: [vtkusers] Incorrect coloring landscape by elevation ? In-Reply-To: References: Message-ID: On Fri, Aug 19, 2011 at 11:30 AM, Artem Babayan wrote: > Hello, > > I and drawing the 3D 'landscape' graph using the data defined on 2D > structured grid and I would like to color the resulting graphics > according to elevation. The pipeline looks like this: > > vtkImageData->vtkImageDataGeometryFilter->vtkWarpScalar->vtkDataSetMapper > > The mapper has a color lookup table. The result (picture attached) > does not shows the color based on elevation, that is points with the > same z-coordinates have different colors. Why? It looks like points in > TRIANGLES which form the surface were colored correctly, by within > each triangle the color is just interpolated. Is it a correct > behaviour or am I doing something wrong? > > Best wishes > Artem Are you trying to color the triangles? or the points? If you color the points, the colors inside the triangles will indeed be interpolated. Have you seen these examples? http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/ElevationFilter http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height David From quantum.leaf at gmail.com Fri Aug 19 11:39:00 2011 From: quantum.leaf at gmail.com (Liam Kurmos) Date: Fri, 19 Aug 2011 16:39:00 +0100 Subject: [vtkusers] coloring a sphere by elevation In-Reply-To: References: Message-ID: Hi David, coloring of the sphere using the lookuptable is working. Im now trying to turn the output of vtkcurvatures into colour using a similar approach. i set up an unsigned int array of colors in the same way. My setting the LUT range very large all the colors being set are middle hue green as expected however the rendered output is ignoring these colors as though i had not set them and everything ends up either red or blue. i output my polydatamapper as an ascii file. if i filter out the data it starts: ?xml version="1.0"?> the colors dataarray shows green, although there seems to be trouble with the min max range. 24 255 0 24 255 0 24 255 0 24 255 0 24 255 0 24 255 0 24 255 0 24 255 0... can you suggest why im not seeing a green polydata? vtkCurvatures *curv = vtkCurvatures::New(); curv->SetInputConnection(oc->volume4D->contourer->GetOutputPort()); curv->SetCurvatureTypeToGaussian(); // curv->SetCurvatureTypeToGaussian(); //curv->SetCurvatureTypeToMinimum(); //curvaturesFilter->SetCurvatureTypeToMaximum(); vtkLookupTable* lut = vtkLookupTable::New(); lut->SetHueRange(0, 0.6); //Red to Blue lut->SetAlphaRange(1, 1); lut->SetValueRange(1, 1.0); lut->SetSaturationRange(1.0, 1.0); lut->SetNumberOfTableValues(256 * 256 * 256); lut->SetRange(-10000000000000, 10000000000000); //altering range appear not to effect output lut->Build(); vtkSmartPointer colors = vtkSmartPointer::New(); colors->SetNumberOfComponents(3); colors->SetName("Colors"); vtkSmartPointer polyd = curv->GetOutput(); vtkSmartPointer pointd = polyd->GetPointData(); polyd->Update(); for (int i = 0; i < polyd->GetNumberOfPoints(); i++) { double val= vtkDoubleArray::SafeDownCast(polyd->GetPointData()->GetScalars())->GetValue(i); double dcolor[3]; lut->GetColor(val, dcolor); unsigned char color[3]; for (unsigned int j = 0; j < 3; j++) { color[j] = static_cast (255.0 * dcolor[j]); } colors->InsertNextTupleValue(color); } pointd->SetScalars(colors); pointd->Update(); vtkPolyDataMapper* polyMap2 = vtkPolyDataMapper::New(); polyMap2->SetInputConnection(polyd->GetProducerPort()); polyMap2->GetInput()->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("test.vtp"); writer->SetInput(polyMap2->GetInput()); // Optional - set the mode. The default is binary. //writer->SetDataModeToBinary(); writer->SetDataModeToAscii(); writer->Write(); best regards, Liam On Fri, Aug 19, 2011 at 3:46 PM, Liam Kurmos wrote: >> >> Did you see this example? >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height >> > > no missed that somehow. Cheers! > > i note this example does not use mapper->setLookuptable() but rather > gets 'colors' from the LUT > and does > > ?outputPolyData->GetPointData()->SetScalars(colors); > ?mapper->SetInputConnection(outputPolyData->GetProducerPort()); > > it looks like my lookup table was working but other that the > sethuerange() (which worked) it was having no effect on the output > when i did mapper->setLookuptable() . In fact i could remove my lut > and the mapper->setlookuptable() and get the same output with red to > blue hue range. > > all working now, thanks for the help. > > Liam > > > On Fri, Aug 19, 2011 at 2:48 PM, David Doria wrote: >> On Fri, Aug 19, 2011 at 9:39 AM, Liam Kurmos wrote: >>> >>> I'm creating an example to colour the surface of a sphere using a >>> lookup table, where the scalar value is just the value of one of the >>> vertex coords. >>> The code below essentially works but only shows 2 colors. >>> >>> 2Qs: >>> >>> -why dont i see a range of colors from the lookup table? >>> >>> -i thought i should be able to get the coordinates of a vertex from >>> the vtkPointData but i couldnt do this or find an example and had to >>> use vtkPolyData->getPoint(i). Is it straight forward to get down to >>> the points for pointdata? >>> >>> >>> any thoughts appreciated, >>> >>> >>> Liam >> >> Did you see this example? >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height >> >> David > From artem.paraview at googlemail.com Fri Aug 19 11:48:47 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Fri, 19 Aug 2011 16:48:47 +0100 Subject: [vtkusers] Incorrect coloring landscape by elevation ? In-Reply-To: References: Message-ID: Hi David, Yes, I have seen these examples. I need to color surface, which in this context means to color triangles -- that is that color of each triangle's point (not only vertices, but inside triangle as well) would correspond to its z-coordinate mapped through the lookup table. Otherwise the result does not look like elevation-based colors. Examples you mention show how to assign color to each point of the grid isn't it? But this is already done correctly, at least I think so. Best wishes Artem On 19 August 2011 16:34, David Doria wrote: > On Fri, Aug 19, 2011 at 11:30 AM, Artem Babayan > wrote: >> Hello, >> >> I and drawing the 3D 'landscape' graph using the data defined on 2D >> structured grid and I would like to color the resulting graphics >> according to elevation. The pipeline looks like this: >> >> vtkImageData->vtkImageDataGeometryFilter->vtkWarpScalar->vtkDataSetMapper >> >> The mapper has a color lookup table. The result (picture attached) >> does not shows the color based on elevation, that is points with the >> same z-coordinates have different colors. Why? It looks like points in >> TRIANGLES which form the surface were colored correctly, by within >> each triangle the color is just interpolated. Is it a correct >> behaviour or am I doing something wrong? >> >> Best wishes >> Artem > > Are you trying to color the triangles? or the points? If you color the > points, the colors inside the triangles will indeed be interpolated. > > Have you seen these examples? > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/ElevationFilter > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height > > David > From jothybasu at gmail.com Fri Aug 19 11:54:53 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 19 Aug 2011 16:54:53 +0100 Subject: [vtkusers] vtkImageData to 3D CArray Message-ID: Hi all, I am trying to create a 3D C array form vtkImageData. I tried vtkImageExport, but I seems like only exporting it as a 1D array. Is there any other filter or how to convert it to a 3D array? I am new to c++ and I don't find any matrix manipulation function as in MATLAb or Python in c std lib. Thank you Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From clinton at elemtech.com Fri Aug 19 12:00:42 2011 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 19 Aug 2011 10:00:42 -0600 Subject: [vtkusers] QVTKWidget avoid transparent background when rendering In-Reply-To: <1313743806.2459.YahooMailNeo@web132108.mail.ird.yahoo.com> References: <1313743806.2459.YahooMailNeo@web132108.mail.ird.yahoo.com> Message-ID: <201108191000.43022.clinton@elemtech.com> On Friday, August 19, 2011 02:50:06 am Doria David wrote: > Some strange behaviors occurs especially on QVTKWidget: when I show a > QVTKWidget with a 3D volume, for example, the widget are > shown transparent, showing the contents of the windows that are behind, > for example a WordPad window until it is completely rendered. How can I > avoid this strange behaviors ? (Ideally a black background instead of > showing the contents of the windows that are behind) Thank you. Can you do QVTKWidget::show(), a Render() to clear the background, then add the volume and render afterwards? The background is disabled for QVTKWidget to avoid a flickering issue. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com From jothybasu at gmail.com Fri Aug 19 12:10:54 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 19 Aug 2011 17:10:54 +0100 Subject: [vtkusers] QVTKWidget avoid transparent background when rendering In-Reply-To: <201108191000.43022.clinton@elemtech.com> References: <1313743806.2459.YahooMailNeo@web132108.mail.ird.yahoo.com> <201108191000.43022.clinton@elemtech.com> Message-ID: Thanks it works! You need to add the renderer first before calling show(). Jothy On Fri, Aug 19, 2011 at 5:00 PM, Clinton Stimpson wrote: > On Friday, August 19, 2011 02:50:06 am Doria David wrote: > > Some strange behaviors occurs especially on QVTKWidget: when I show a > > QVTKWidget with a 3D volume, for example, the widget are > > shown transparent, showing the contents of the windows that are behind, > > for example a WordPad window until it is completely rendered. How can I > > avoid this strange behaviors ? (Ideally a black background instead of > > showing the contents of the windows that are behind) Thank you. > > Can you do QVTKWidget::show(), a Render() to clear the background, then add > the volume and render afterwards? The background is disabled for > QVTKWidget > to avoid a flickering issue. > > -- > Clinton Stimpson > Elemental Technologies, Inc > Computational Simulation Software, LLC > www.csimsoft.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Aug 19 12:15:14 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 19 Aug 2011 10:15:14 -0600 Subject: [vtkusers] vtkImageData to 3D CArray In-Reply-To: References: Message-ID: Hi Jothy, You probably don't want to create a 3D C array. In C, all dimensions of a C array except for the first dimension must be constant. So if you have variables N and M and you try doing this: short myarray[N][M]; then you will get a compile error. Multidimensional C arrays are pretty much useless for image processing, people generally use a 1D array and strides/increments. Do a search for "array strides" on google. - David On Fri, Aug 19, 2011 at 9:54 AM, Jothy wrote: > Hi all, > > I am trying to create a 3D C array form vtkImageData. I tried > vtkImageExport, but I seems like only exporting it as a 1D array. Is there > any other filter or how to convert it to a 3D array? I am new to c++ and I > don't find any matrix manipulation function as in MATLAb or Python in c std > lib. > > Thank you > > Jothy From jothybasu at gmail.com Fri Aug 19 12:23:01 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 19 Aug 2011 17:23:01 +0100 Subject: [vtkusers] vtkImageData to 3D CArray In-Reply-To: References: Message-ID: Thanks for your reply. I don't need to do any image processing with that C array. I need to get the scalar values at [x,y,z] for a huge list of points from the vtkImageData (they are randomly located). First I tried with GetScalarComponentAsDouble(x,y,z,0). But it's too slow (for my purpose, 20-30 secs). After some Google search, I came to know that acessing array with [] will be much faster that GetscalarComponent. I even looked at vtkImageIterator, it only has methods span, begin,end. Most importantly I need to copy those scalar values for later uses, so mere scalar pointers won't help. That's why I am trying to do it with a c array. Jothy On Fri, Aug 19, 2011 at 5:15 PM, David Gobbi wrote: > Hi Jothy, > > You probably don't want to create a 3D C array. In C, all dimensions > of a C array except for the first dimension must be constant. So if > you have variables N and M and you try doing this: > > short myarray[N][M]; > > then you will get a compile error. Multidimensional C arrays are > pretty much useless for image processing, people generally use a > 1D array and strides/increments. Do a search for "array strides" on > google. > > - David > > On Fri, Aug 19, 2011 at 9:54 AM, Jothy wrote: > > Hi all, > > > > I am trying to create a 3D C array form vtkImageData. I tried > > vtkImageExport, but I seems like only exporting it as a 1D array. Is > there > > any other filter or how to convert it to a 3D array? I am new to c++ and > I > > don't find any matrix manipulation function as in MATLAb or Python in c > std > > lib. > > > > Thank you > > > > Jothy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Aug 19 12:29:50 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 19 Aug 2011 10:29:50 -0600 Subject: [vtkusers] vtkImageData to 3D CArray In-Reply-To: References: Message-ID: Hi Jothy, I'm not telling you to not use a C array. What I'm telling you is that you should use a 1D C array with strides for each dimension. Do not use a 3D C array. Read up on strides and learn how to use them. You'll thank me later. - David On Fri, Aug 19, 2011 at 10:23 AM, Jothy wrote: > Thanks for your reply. > > I don't need to do any image processing with that C array. I need to get the > scalar values at [x,y,z] for a huge list of points from the vtkImageData > (they are randomly located). First I tried with > GetScalarComponentAsDouble(x,y,z,0). > > But it's too slow (for my purpose, 20-30 secs). After some Google search, I > came to know that acessing array with [] will be much faster that > GetscalarComponent. > > I even looked at vtkImageIterator, it only has methods span, begin,end. Most > importantly I need to copy those scalar values for later uses, so mere > scalar pointers won't help. That's why I am trying to do it with a c array. > > Jothy > > On Fri, Aug 19, 2011 at 5:15 PM, David Gobbi wrote: >> >> Hi Jothy, >> >> You probably don't want to create a 3D C array. ?In C, all dimensions >> of a C array except for the first dimension must be constant. ?So if >> you have variables N and M and you try doing this: >> >> short myarray[N][M]; >> >> then you will get a compile error. ?Multidimensional C arrays are >> pretty much useless for image processing, people generally use a >> 1D array and strides/increments. ?Do a search for "array strides" on >> google. >> >> ?- David >> >> On Fri, Aug 19, 2011 at 9:54 AM, Jothy wrote: >> > Hi all, >> > >> > I am trying to create a 3D C array form vtkImageData. I tried >> > vtkImageExport, but I seems like only exporting it as a 1D array. Is >> > there >> > any other filter or how to convert it to a 3D array? I am new to c++ and >> > I >> > don't find any matrix manipulation function as in MATLAb or Python in c >> > std >> > lib. >> > >> > Thank you >> > >> > Jothy From zack.galbreath at kitware.com Fri Aug 19 12:23:39 2011 From: zack.galbreath at kitware.com (Zack Galbreath) Date: Fri, 19 Aug 2011 12:23:39 -0400 Subject: [vtkusers] Documentation Server In-Reply-To: <4E4CEA0D.4F7A.003F.1@ndigital.com> References: <4E4CEA0D.4F7A.003F.1@ndigital.com> Message-ID: <4E4E8E0B.6030909@kitware.com> On Thu8/1811 Thu Aug 18 10:31 AM, Andrew Wiles wrote: > Hello, > Is the nightly documentation for VTK down? Both of my browsers revert > to the public.kitware.com site. Thanks for letting us know. I just put a copy of VTK's documentation back online at http://www.vtk.org/doc/nightly/html. Something went wrong with our automated nightly documentation process, so it won't be updating regularly until we get it fixed. -Zack -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Fri Aug 19 12:35:09 2011 From: jothybasu at gmail.com (Jothy) Date: Fri, 19 Aug 2011 17:35:09 +0100 Subject: [vtkusers] vtkImageData to 3D CArray In-Reply-To: References: Message-ID: Thanks for your suggestion! Will let you know how far I succeed. I have something to read this weekend. Jothy On Fri, Aug 19, 2011 at 5:29 PM, David Gobbi wrote: > Hi Jothy, > > I'm not telling you to not use a C array. What I'm telling you is > that you should use a 1D C array with strides for each dimension. > Do not use a 3D C array. Read up on strides and learn how to use > them. You'll thank me later. > > - David > > > On Fri, Aug 19, 2011 at 10:23 AM, Jothy wrote: > > Thanks for your reply. > > > > I don't need to do any image processing with that C array. I need to get > the > > scalar values at [x,y,z] for a huge list of points from the vtkImageData > > (they are randomly located). First I tried with > > GetScalarComponentAsDouble(x,y,z,0). > > > > But it's too slow (for my purpose, 20-30 secs). After some Google search, > I > > came to know that acessing array with [] will be much faster that > > GetscalarComponent. > > > > I even looked at vtkImageIterator, it only has methods span, begin,end. > Most > > importantly I need to copy those scalar values for later uses, so mere > > scalar pointers won't help. That's why I am trying to do it with a c > array. > > > > Jothy > > > > On Fri, Aug 19, 2011 at 5:15 PM, David Gobbi > wrote: > >> > >> Hi Jothy, > >> > >> You probably don't want to create a 3D C array. In C, all dimensions > >> of a C array except for the first dimension must be constant. So if > >> you have variables N and M and you try doing this: > >> > >> short myarray[N][M]; > >> > >> then you will get a compile error. Multidimensional C arrays are > >> pretty much useless for image processing, people generally use a > >> 1D array and strides/increments. Do a search for "array strides" on > >> google. > >> > >> - David > >> > >> On Fri, Aug 19, 2011 at 9:54 AM, Jothy wrote: > >> > Hi all, > >> > > >> > I am trying to create a 3D C array form vtkImageData. I tried > >> > vtkImageExport, but I seems like only exporting it as a 1D array. Is > >> > there > >> > any other filter or how to convert it to a 3D array? I am new to c++ > and > >> > I > >> > don't find any matrix manipulation function as in MATLAb or Python in > c > >> > std > >> > lib. > >> > > >> > Thank you > >> > > >> > Jothy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.fowler at tecplot.com Fri Aug 19 13:36:14 2011 From: s.fowler at tecplot.com (Scott Fowler) Date: Fri, 19 Aug 2011 10:36:14 -0700 Subject: [vtkusers] vtkPlotPoints problem In-Reply-To: <6DF989906D8EFE46900494BB7A64C6033E881D4340@tps004> References: <6DF989906D8EFE46900494BB7A64C6033E881D4340@tps004> Message-ID: <6DF989906D8EFE46900494BB7A64C6033E881D4344@tps004> I've got it figured out. I should have answered 'no' when SetupForDevelopment.sh asked to test push access. When answering 'yes' at this phase, the script failed to setup the 'gerrit-push' alias, which got me confused. I've managed to submit my change to Gerrit w/o requiring push access. http://review.source.kitware.com/#change,2521 From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Scott Fowler Sent: Thursday, August 18, 2011 2:20 PM To: vtkusers at vtk.org Subject: [vtkusers] vtkPlotPoints problem I've found a problem with vtkPlotPoints (it doesn't update the cache when the LookupTable changes). I have a fix sitting in my repository and I'd like to push it to gerrit. I've gone through the steps here: http://www.vtk.org/Wiki/VTK/Git but get stuck on ./Utilities/SetupForDevelopment.sh. It fails when testing push access. I've filled out the form at https://www.kitware.com/Admin/SendPassword.cgi. How long should expect to wait for a password? Is there some other process I should be aware of? Thanks! Scott Scott Fowler Software Development Engineer Phone: 425.460.8265 Email: s.fowler at tecplot.com Tecplot Inc. | Master the View 3535 Factoria Blvd. SE, Ste. 550 Bellevue, WA USA 98006 Fax: 425.653.9200 Web: www.tecplot.com ________________________________ This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are NOT the intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying this e-mail is strictly prohibited. ________________________________ This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are NOT the intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying this e-mail is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Fri Aug 19 13:51:51 2011 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Fri, 19 Aug 2011 13:51:51 -0400 Subject: [vtkusers] vtkPlotPoints problem In-Reply-To: <6DF989906D8EFE46900494BB7A64C6033E881D4344@tps004> References: <6DF989906D8EFE46900494BB7A64C6033E881D4340@tps004> <6DF989906D8EFE46900494BB7A64C6033E881D4344@tps004> Message-ID: On Fri, Aug 19, 2011 at 1:36 PM, Scott Fowler wrote: > I've got it figured out.? I should have answered 'no' when > SetupForDevelopment.sh asked to test push access.? When answering 'yes' at > this phase, the script failed to setup the 'gerrit-push' alias, which got me > confused. > I will take a look at the setup script - I will improve the wording. I will try to take a look at the change shortly. Marcus From jeff.baumes at kitware.com Fri Aug 19 16:11:27 2011 From: jeff.baumes at kitware.com (Jeff Baumes) Date: Fri, 19 Aug 2011 16:11:27 -0400 Subject: [vtkusers] New Java features Message-ID: We are pleased to announce a few new features for Java wrapping in VTK. These are available in VTK's source repository now and will be included in the VTK 5.8 release. These changes include better and more stable threading support, as well as a new utility class for loading libraries. Mathieu Malaterre has also included new support for UTF-8 encoding in file name. For more details on threading along with some example code using the new features, visit http://www.vtk.org/Wiki/VTK/Java_Wrapping Thanks to Sebastien Jourdain for performing much of the design and implementation. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbrayford at gmail.com Fri Aug 19 17:52:05 2011 From: dbrayford at gmail.com (David Brayford) Date: Fri, 19 Aug 2011 15:52:05 -0600 Subject: [vtkusers] image manipulation in vtk Message-ID: Hi, How do I crop a 2D image in vtk and also how do I set the black pixels to colourless? David From daviddoria at gmail.com Fri Aug 19 18:00:18 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 19 Aug 2011 18:00:18 -0400 Subject: [vtkusers] image manipulation in vtk In-Reply-To: References: Message-ID: On Fri, Aug 19, 2011 at 5:52 PM, David Brayford wrote: > Hi, > > How do I crop a 2D image in vtk and also how do I set the black pixels > to colourless? > > David Cropping: http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ExtractVOI Transparency: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/Transparency David From alexmalvtk at gmail.com Fri Aug 19 19:24:21 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Fri, 19 Aug 2011 16:24:21 -0700 Subject: [vtkusers] vtkOBBTree::IntersectWithLine (version which returns all cell ids) question/problem In-Reply-To: References: Message-ID: As for me this is a bug. There is no any reason to expect polydata be a connected region . Functions is supposed to be able to return all the intersected cells unless output is controlled by option set. If it was designed for such behavior cause somebody needed it, it seems logical to add a member variable which would allow either to return all cells or just "entry and exit points". Instead of maintaining subclass I would prefer to create a patch if anybody could comment on this, Regards, Alex On Wed, Aug 17, 2011 at 4:23 PM, Alex Malyushytskyy wrote: > I need to get all ?cell ids in arbitraty poly data which are > intersected by line segment. > > At the first glance example I found in VTK wiki which used > ?int vtkOBBTree IntersectWithLine(const double a0[3], const double a1[3], > ? ? ? ? ? ? ? ? ? ? ? ?vtkPoints *points, vtkIdList *cellIds); > should solve the problem. > Especially because of the comment "tkOBBTree returns ALL intersections > with a line and the dataset". > > Unfortunately this function does not work for arbitrary data (at least > in vtk 5.6.1 ). > > Example is polydata which consists of 2 disconnected triangles ( from > debug output): > > Number of cells =2 > cellId =0 > pnt0 id = 0 x,y,z = { 18944,2166,340.981 } > pnt1 id = 1 x,y,z = { 18985.1,2242,340.981 } > pnt2 id = 2 x,y,z = { 18912.4,2188,340.981 } > center x,y,z = { 18947.2,2198.67,340.981 } > cellId =1 > pnt0 id = 3 x,y,z = { 18944,2166,330.981 } > pnt1 id = 4 x,y,z = { 18985.1,2242,330.981 } > pnt2 id = 5 x,y,z = { 18912.4,2188,330.981 } > center x,y,z = { 18947.2,2198.67,330.981 } > > (line intersecting centers of triangles:) > > line begin x,y,z = { 18947.2,2198.67,329.981 } > line end x,y,z = { 18947.2,2198.67,341.981 } > > > vtkOBBTree IntersectWithLine wil return only single id: > > intersecting 1 ?cells. > ? where cellIdList(0) cell_id = 1 > > Second triangle will not pass "sense" check at line 840 vtkOBBTree:. > ? ? ?// only use point if it moves us forward, > ? ? ?// or it moves us backward by less than tol > ? ? ?if (distance > lastDistance - ptol ?&& ?sense != lastSense) > > > I am not sure if it is a bug or comes from "closed surface" assumption, > but I am sure this prevents me from getting intersections I need. > > As a quick fix I am thinking to subclass vtkOBBTree and create a > function which will not be using such check, > but I guess it would makes more sense either to add parameter to ?vtkOBBTree > original function which would allow to skip such check , or add class > member which will control such behavior. > > Anybody could comment on this? > > Regards, > Alex > From 812075761 at qq.com Sat Aug 20 00:27:56 2011 From: 812075761 at qq.com (steelblue) Date: Fri, 19 Aug 2011 21:27:56 -0700 (PDT) Subject: [vtkusers] what's wrong about this? vtk java.lang.UnsatisfiedLinkError Message-ID: <1313814476962-4717686.post@n5.nabble.com> the wrongs: Exception in thread "main" java.lang.UnsatisfiedLinkError: vtk.vtkObjectBase.VTKDeleteReference(J)V at vtk.vtkObjectBase.VTKDeleteReference(Native Method) at vtk.vtkPolyDataAlgorithm.GetOutput(vtkPolyDataAlgorithm.java:38) at xs.vtk.HelloVTK.(HelloVTK.java:16) at xs.vtk.HelloVTK.main(HelloVTK.java:27) the code: package xs.vtk; // This example creates a polygonal model of a cone, and then renders it to // the screen. It will rotate the cone 360 degrees and then exit. The basic // setup of source -> mapper -> actor -> renderer -> renderwindow is // typical of most VTK programs. // // We import the vtk wrapped classes first. import vtk.*; // Then we define our class. public class Cone { // In the static contructor we load in the native code. // The libraries must be in your path to work. static { System.loadLibrary("vtkCommonJava"); System.loadLibrary("vtkFilteringJava"); System.loadLibrary("vtkIOJava"); System.loadLibrary("vtkImagingJava"); System.loadLibrary("vtkGraphicsJava"); System.loadLibrary("vtkRenderingJava"); } // now the main program public static void main (String []args) { // // Next we create an instance of vtkConeSource and set some of its // properties. The instance of vtkConeSource "cone" is part of a // visualization pipeline (it is a source process object); it produces data // (output type is vtkPolyData) which other filters may process. // vtkConeSource cone = new vtkConeSource(); cone.SetHeight( 3.0 ); cone.SetRadius( 1.0 ); cone.SetResolution( 10 ); // // In this example we terminate the pipeline with a mapper process object. // (Intermediate filters such as vtkShrinkPolyData could be inserted in // between the source and the mapper.) We create an instance of // vtkPolyDataMapper to map the polygonal data into graphics primitives. We // connect the output of the cone souece to the input of this mapper. // vtkPolyDataMapper coneMapper = new vtkPolyDataMapper(); coneMapper.SetInputConnection( cone.GetOutputPort() ); // // Create an actor to represent the cone. The actor orchestrates rendering // of the mapper's graphics primitives. An actor also refers to properties // via a vtkProperty instance, and includes an internal transformation // matrix. We set this actor's mapper to be coneMapper which we created // above. // vtkActor coneActor = new vtkActor(); coneActor.SetMapper( coneMapper ); // // Create the Renderer and assign actors to it. A renderer is like a // viewport. It is part or all of a window on the screen and it is // responsible for drawing the actors it has. We also set the background // color here // vtkRenderer ren1 = new vtkRenderer(); ren1.AddActor( coneActor ); ren1.SetBackground( 0.1, 0.2, 0.4 ); // // Finally we create the render window which will show up on the screen // We put our renderer into the render window using AddRenderer. We also // set the size to be 300 pixels by 300 // vtkRenderWindow renWin = new vtkRenderWindow(); renWin.AddRenderer( ren1 ); renWin.SetSize( 300, 300 ); // // now we loop over 360 degreeees and render the cone each time // int i; for (i = 0; i < 360; ++i) { // render the image renWin.Render(); // rotate the active camera by one degree ren1.GetActiveCamera().Azimuth( 1 ); } } } can anyone tell me how to solve this problem? waiting,,. thanks,. -- View this message in context: http://vtk.1045678.n5.nabble.com/what-s-wrong-about-this-vtk-java-lang-UnsatisfiedLinkError-tp4717686p4717686.html Sent from the VTK - Users mailing list archive at Nabble.com. From pmav99 at gmail.com Sat Aug 20 06:38:21 2011 From: pmav99 at gmail.com (Panagiotis Mavrogiorgos) Date: Sat, 20 Aug 2011 13:38:21 +0300 Subject: [vtkusers] Move - Resize Legend Message-ID: Hi everyone, I am using the vtkLegendBoxActor class. I would like to be able to move/resize the legend on screen, using some functionality like vtkScalarBarWidget. Is something like that possible? thank you Panos -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuweitianye at yahoo.com.cn Sat Aug 20 09:34:47 2011 From: wuweitianye at yahoo.com.cn (seaer) Date: Sat, 20 Aug 2011 06:34:47 -0700 (PDT) Subject: [vtkusers] Picker Message-ID: <1313847287721-4718448.post@n5.nabble.com> Hello everyone I am trying to do the following things. when I click the Interactor Window, I need get (x,y,z) of a vertex which is closet cliked-place in a cell which has lots of vertexs. so I used vtkCellPicker to pick the cell ,how can i do next step? int *Pos = this->GetInteractor()->GetEventPosition(); vtkRenderer *ren = iren->FindPokedRenderer(Pos[0],Pos[1]); vtkCellPicker *picker = vtkCellPicker::SafeDownCast((iren->GetPicker())); picker->SetTolerance(0.0001); picker->Pick(Pos[0],Pos[1],0.0,ren); double *worldPostion = picker->GetPickPosition(); int cellId = picker->GetCellId(); thanks a lot !!!! -- View this message in context: http://vtk.1045678.n5.nabble.com/Picker-tp4718448p4718448.html Sent from the VTK - Users mailing list archive at Nabble.com. From bigvision82 at yahoo.com Sat Aug 20 09:41:33 2011 From: bigvision82 at yahoo.com (kwayeke) Date: Sat, 20 Aug 2011 06:41:33 -0700 (PDT) Subject: [vtkusers] VTK volume data in Matlab figure window Message-ID: <1313847693199-4718459.post@n5.nabble.com> I have created a mex file that renders a set of 2D CT data set to into a 3D volume. The volume is currently been display in a separate window . Is it possible to display this volume in matlab figure window? -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-volume-data-in-Matlab-figure-window-tp4718459p4718459.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sat Aug 20 09:50:01 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 20 Aug 2011 07:50:01 -0600 Subject: [vtkusers] Picker In-Reply-To: <1313847287721-4718448.post@n5.nabble.com> References: <1313847287721-4718448.post@n5.nabble.com> Message-ID: What version of VTK are you using? In VTK 5.6, you can do this: vtkIdType pointId = picker->GetPointId(); The returned pointId will be in the cell returned by GetCellId(). - David On Sat, Aug 20, 2011 at 7:34 AM, seaer wrote: > Hello everyone > I am trying to do the following things. when I click the Interactor > Window, I need get (x,y,z) of a vertex which is closet cliked-place in a > cell which has lots of vertexs. so I used vtkCellPicker to pick the cell > ,how can i do next step? > > int *Pos = this->GetInteractor()->GetEventPosition(); > vtkRenderer *ren = iren->FindPokedRenderer(Pos[0],Pos[1]); > > vtkCellPicker *picker = > vtkCellPicker::SafeDownCast((iren->GetPicker())); > picker->SetTolerance(0.0001); > picker->Pick(Pos[0],Pos[1],0.0,ren); > > double *worldPostion = picker->GetPickPosition(); > int cellId = picker->GetCellId(); > > thanks a lot !!!! From bob at stlcc.org Sat Aug 20 15:08:08 2011 From: bob at stlcc.org (Bob Palank) Date: Sat, 20 Aug 2011 14:08:08 -0500 Subject: [vtkusers] Executing examples within VC++ 2010 Express Message-ID: <006901cc5f6c$7fe088f0$7fa19ad0$@org> Does anyone use the green right pointing triangle to execute vtk applications? Sounds like a dumb question, but it doesn't work for me. I double click on the .exe file to execute. Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Sat Aug 20 19:18:18 2011 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Sat, 20 Aug 2011 19:18:18 -0400 Subject: [vtkusers] what's wrong about this? vtk java.lang.UnsatisfiedLinkError In-Reply-To: <1313814476962-4717686.post@n5.nabble.com> References: <1313814476962-4717686.post@n5.nabble.com> Message-ID: Hi, Did you set your PATH/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH depending on your OS ? You can get more information here. http://www.vtk.org/Wiki/VTK/Java_Wrapping Seb On Sat, Aug 20, 2011 at 12:27 AM, steelblue <812075761 at qq.com> wrote: > the wrongs: > Exception in thread "main" java.lang.UnsatisfiedLinkError: > vtk.vtkObjectBase.VTKDeleteReference(J)V > ? ? ? ?at vtk.vtkObjectBase.VTKDeleteReference(Native Method) > ? ? ? ?at vtk.vtkPolyDataAlgorithm.GetOutput(vtkPolyDataAlgorithm.java:38) > ? ? ? ?at xs.vtk.HelloVTK.(HelloVTK.java:16) > ? ? ? ?at xs.vtk.HelloVTK.main(HelloVTK.java:27) > > the code: > package xs.vtk; > > // This example creates a polygonal model of a cone, and then renders it to > > // the screen. It will rotate the cone 360 degrees and then exit. The basic > > // setup of source -> mapper -> actor -> renderer -> renderwindow is > > // typical of most VTK programs. > > // > > > > // We import the vtk wrapped classes first. > > import vtk.*; > > > > // Then we define our class. > > public class Cone { > > > > ?// In the static contructor we load in the native code. > > ?// The libraries must be in your path to work. > > ?static { > > ? ?System.loadLibrary("vtkCommonJava"); > > ? ?System.loadLibrary("vtkFilteringJava"); > > ? ?System.loadLibrary("vtkIOJava"); > > ? ?System.loadLibrary("vtkImagingJava"); > > ? ?System.loadLibrary("vtkGraphicsJava"); > > ? ?System.loadLibrary("vtkRenderingJava"); > > ?} > > > > ?// now the main program > > ?public static void main (String []args) { > > ? ?// > > ? ?// Next we create an instance of vtkConeSource and set some of its > > ? ?// properties. The instance of vtkConeSource "cone" is part of a > > ? ?// visualization pipeline (it is a source process object); it produces > data > > ? ?// (output type is vtkPolyData) which other filters may process. > > ? ?// > > ? ?vtkConeSource cone = new vtkConeSource(); > > ? ?cone.SetHeight( 3.0 ); > > ? ?cone.SetRadius( 1.0 ); > > ? ?cone.SetResolution( 10 ); > > > > ? ?// > > ? ?// In this example we terminate the pipeline with a mapper process > object. > > ? ?// (Intermediate filters such as vtkShrinkPolyData could be inserted in > > ? ?// between the source and the mapper.) ?We create an instance of > > ? ?// vtkPolyDataMapper to map the polygonal data into graphics primitives. > We > > ? ?// connect the output of the cone souece to the input of this mapper. > > ? ?// > > ? ?vtkPolyDataMapper coneMapper = new vtkPolyDataMapper(); > > ? ?coneMapper.SetInputConnection( cone.GetOutputPort() ); > > > > ? ?// > > ? ?// Create an actor to represent the cone. The actor orchestrates > rendering > > ? ?// of the mapper's graphics primitives. An actor also refers to > properties > > ? ?// via a vtkProperty instance, and includes an internal transformation > > ? ?// matrix. We set this actor's mapper to be coneMapper which we created > > ? ?// above. > > ? ?// > > ? ?vtkActor coneActor = new vtkActor(); > > ? ?coneActor.SetMapper( coneMapper ); > > > > ? ?// > > ? ?// Create the Renderer and assign actors to it. A renderer is like a > > ? ?// viewport. It is part or all of a window on the screen and it is > > ? ?// responsible for drawing the actors it has. ?We also set the > background > > ? ?// color here > > ? ?// > > ? ?vtkRenderer ren1 = new vtkRenderer(); > > ? ?ren1.AddActor( coneActor ); > > ? ?ren1.SetBackground( 0.1, 0.2, 0.4 ); > > > > ? ?// > > ? ?// Finally we create the render window which will show up on the screen > > ? ?// We put our renderer into the render window using AddRenderer. We also > > ? ?// set the size to be 300 pixels by 300 > > ? ?// > > ? ?vtkRenderWindow renWin = new vtkRenderWindow(); > > ? ?renWin.AddRenderer( ren1 ); > > ? ?renWin.SetSize( 300, 300 ); > > > > ? ?// > > ? ?// now we loop over 360 degreeees and render the cone each time > > ? ?// > > ? ?int i; > > ? ?for (i = 0; i < 360; ++i) > > ? ? ?{ > > ? ? ?// render the image > > ? ? ?renWin.Render(); > > ? ? ?// rotate the active camera by one degree > > ? ? ?ren1.GetActiveCamera().Azimuth( 1 ); > > ? ? ?} > > > > ? ?} > > } > > > > can anyone tell me how to solve this problem? waiting,,. > thanks,. > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/what-s-wrong-about-this-vtk-java-lang-UnsatisfiedLinkError-tp4717686p4717686.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://www.vtk.org/mailman/listinfo/vtkusers > From pmav99 at gmail.com Sun Aug 21 10:21:38 2011 From: pmav99 at gmail.com (Panagiotis Mavrogiorgos) Date: Sun, 21 Aug 2011 17:21:38 +0300 Subject: [vtkusers] vtkTextWidget and backface culling Message-ID: Hi, I am using a vtkTextWidget to annotate a vtk image. The image renders ok, but if I turn backface culling on, the text is not displayed. Is this the expected behavior or is this considered a bug? Any ideas about how I can get the annotations displayed with backface culling? An example demonstrating the problem can be found here. Simply adding the following line after the text_widget.On() should do it. actor.GetProperty().BackfaceCullingOn() with regards, Panos -------------- next part -------------- An HTML attachment was scrubbed... URL: From amich.randa at gmail.com Sun Aug 21 20:16:10 2011 From: amich.randa at gmail.com (raimi87) Date: Sun, 21 Aug 2011 17:16:10 -0700 (PDT) Subject: [vtkusers] QVTKWidgetPlugin.lib and QVTKWidgetPlugin.dll doesn't exist Message-ID: <1313972170519-4721630.post@n5.nabble.com> hi i try to install Qt to work with vtk but QVTKWidgetPlugin.lib QVTKWidgetPlugin.lib doesn't exist how can i work with Qt? -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidgetPlugin-lib-and-QVTKWidgetPlugin-dll-doesn-t-exist-tp4721630p4721630.html Sent from the VTK - Users mailing list archive at Nabble.com. From wuweitianye at yahoo.com.cn Sun Aug 21 20:26:58 2011 From: wuweitianye at yahoo.com.cn (seaer) Date: Sun, 21 Aug 2011 17:26:58 -0700 (PDT) Subject: [vtkusers] Picker In-Reply-To: References: <1313847287721-4718448.post@n5.nabble.com> Message-ID: <1313972818972-4721639.post@n5.nabble.com> hello David I used VTK 5.4, it don't have VtkCellPicker::GetPointId, what should i do it ? using vtkGetSubId is helfull ? thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Picker-tp4718448p4721639.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sun Aug 21 20:45:23 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 21 Aug 2011 18:45:23 -0600 Subject: [vtkusers] Picker In-Reply-To: <1313972818972-4721639.post@n5.nabble.com> References: <1313847287721-4718448.post@n5.nabble.com> <1313972818972-4721639.post@n5.nabble.com> Message-ID: No, GetSubId is for something else. It returns a sub-cell Id, which is totally different thing from a point Id. With VTK5.4, you are going to find that it is difficult to do what you want to do. If you want to see how difficult, you can download the source code for VTK 5.6 and look at the code for vtkCellPicker.cxx. Search for "this->PointId" in vtkCellPicker::IntersectActorWithLine() and work your way backwards to see how the PointId is computed. - David On Sun, Aug 21, 2011 at 6:26 PM, seaer wrote: > hello David > I used VTK 5.4, it don't have VtkCellPicker::GetPointId, what should i > do it ? using vtkGetSubId is helfull ? > thanks! From drescherjm at gmail.com Sun Aug 21 20:52:21 2011 From: drescherjm at gmail.com (John Drescher) Date: Sun, 21 Aug 2011 20:52:21 -0400 Subject: [vtkusers] QVTKWidgetPlugin.lib and QVTKWidgetPlugin.dll doesn't exist In-Reply-To: <1313972170519-4721630.post@n5.nabble.com> References: <1313972170519-4721630.post@n5.nabble.com> Message-ID: On Sun, Aug 21, 2011 at 8:16 PM, raimi87 wrote: > hi i try to install Qt to work with vtk but QVTKWidgetPlugin.lib > QVTKWidgetPlugin.lib ?doesn't exist how can i work with Qt? > You need to build Qt, then build VTK with whatever compiler that you plan to build your applications with. When you configure VTK with cmake-gui enable Qt support. John From thihaucsm at gmail.com Sun Aug 21 21:23:00 2011 From: thihaucsm at gmail.com (Thiha Oo) Date: Mon, 22 Aug 2011 09:23:00 +0800 Subject: [vtkusers] how to place vtkImageTracerWidget Message-ID: Hello, Please kindly help me with vtkImageTracerWidget. How can I position the vtkImageTracerWidget so that its projection position is always in front of background image or current showing slice of volume data? Sometimes, it draws in front of background image and sometimes it is behind the current viewing image slice. Thanks, Thiha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jxdw_zlf at yahoo.com.cn Sun Aug 21 23:46:13 2011 From: jxdw_zlf at yahoo.com.cn (zlf) Date: Sun, 21 Aug 2011 20:46:13 -0700 (PDT) Subject: [vtkusers] Fullscreen vtkImageActor or vtkImagePlaneWidget Message-ID: <1313984773399-4722046.post@n5.nabble.com> Hi all, How to make vtkImageActor or vtkImagePlaneWidget fullscreen? I want to use it as a normal picturebox. Thanks superZZ -- View this message in context: http://vtk.1045678.n5.nabble.com/Fullscreen-vtkImageActor-or-vtkImagePlaneWidget-tp4722046p4722046.html Sent from the VTK - Users mailing list archive at Nabble.com. From kingvsk at aol.com Mon Aug 22 01:42:20 2011 From: kingvsk at aol.com (Sathish Kumar) Date: Mon, 22 Aug 2011 11:12:20 +0530 Subject: [vtkusers] DICOM Image In-Reply-To: <16773478.3008.1313881468301.JavaMail.nabble@sam.nabble.com> References: <16773478.3008.1313881468301.JavaMail.nabble@sam.nabble.com> Message-ID: <4E51EC3C.1020904@aol.com> Hi Fanny, I am not a .Net Programmer. I am Java guy. So some other person have to guide you. *Note:* Please add "vtkusers at vtk.org" in your mails then only it will reach all vtk users. Regards, Sathish On Sunday 21 August 2011 04:34 AM, Claire.Fanny1995 at gmail.com wrote: > Hi kingvsk iam Claire and iam working on several Medical projects in Software > house well now a days i am working on PACS and it is going very well i used > mdcm Opensource project for DICOM integration using C#. > Well now iam trying to load DICOM files using *ActiViz.NET 5.6.1 OpenSource > Edition *by utilizing vtkDICOMImageReader in C#, literally i am not C++ > developer so if anyone on this forum did in C# OR even VB please let me know > > > Regards > > Claire Fanny > Software Developer -------------- next part -------------- An HTML attachment was scrubbed... URL: From thihaucsm at gmail.com Mon Aug 22 03:36:56 2011 From: thihaucsm at gmail.com (Thiha Oo) Date: Mon, 22 Aug 2011 15:36:56 +0800 Subject: [vtkusers] how to place vtkImageTracerWidget In-Reply-To: References: Message-ID: Hello, Please kindly help me with vtkImageTracerWidget. How can I position the vtkImageTracerWidget so that its projection position is always in front of background image. (current seeing slice of volume image) Sometimes, it was drawn in front of background image and sometimes it was drawn behind the current viewing image slice. Thanks, Thiha -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.tucc at gmail.com Mon Aug 22 04:33:54 2011 From: the.tucc at gmail.com (Joel Tucci) Date: Mon, 22 Aug 2011 17:33:54 +0900 Subject: [vtkusers] Generating my own TCL wrappers Message-ID: I want to extend a VTK class(vtkMoleculeReaderBase) and then wrap that extension in TCL using the same mechanisms used to wrap the other VTK classes. How would I go about doing this? I would prefer to keep this totally separate from the rest of the build if at all possible. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuweitianye at yahoo.com.cn Mon Aug 22 05:20:30 2011 From: wuweitianye at yahoo.com.cn (seaer) Date: Mon, 22 Aug 2011 02:20:30 -0700 (PDT) Subject: [vtkusers] Picker In-Reply-To: References: <1313847287721-4718448.post@n5.nabble.com> <1313972818972-4721639.post@n5.nabble.com> Message-ID: <1314004830245-4722704.post@n5.nabble.com> thanks very much -- View this message in context: http://vtk.1045678.n5.nabble.com/Picker-tp4718448p4722704.html Sent from the VTK - Users mailing list archive at Nabble.com. From kingvsk at aol.com Mon Aug 22 06:25:13 2011 From: kingvsk at aol.com (Sathish Kumar) Date: Mon, 22 Aug 2011 15:55:13 +0530 Subject: [vtkusers] DICOM Image In-Reply-To: References: <16773478.3008.1313881468301.JavaMail.nabble@sam.nabble.com> <4E51EC3C.1020904@aol.com> <4E52238A.4050302@aol.com> Message-ID: <4E522E89.3070407@aol.com> *Note: Please add "vtkusers at vtk.org" in your mails then only it will reach all vtk users.* Hi Fanny, I hope that you already build VTK. Check out the following link for examples. http://www.vtk.org/Wiki/VTK/Examples/Cxx Mainly check the Read DICOM file - this is for read and display a single dicom file. Check out the "examples/medical" Directory in your VTK build path. (or) http://vtk.org/gitweb?p=VTK.git;a=tree;f=Examples/Medical/Cxx - medical4.cxx (3d volume rendering) For constructing the 3D surface rendering you have to use the vtkmarchingcube. Hope it helps. Regards, Sathish On Monday 22 August 2011 03:25 PM, Claire Frances wrote: > > Hi Sathish > well i want 2 things first i want to read 3d DICOM > studies which is listed here http://pubimage.hcuge.ch:8080/. > and the second thing i want to render plane > images into 3d. > Regards > Claire Fanny > Software Developer > > On Mon, Aug 22, 2011 at 2:38 PM, Sathish Kumar > wrote: > > Hi Fanny, > > Not much... If you clearly send your requirement then i will help you. > > Regards, > Sathish > > > On Monday 22 August 2011 02:49 PM, Claire Frances wrote: >> >> Hi Sathish >> do you experience of working in c++. >> Regards >> Claire >> Software Developer >> >> On Mon, Aug 22, 2011 at 10:42 AM, Sathish Kumar > > wrote: >> >> Hi Fanny, >> >> I am not a .Net Programmer. I am Java guy. So some other >> person have to guide you. >> >> *Note:* >> Please add "vtkusers at vtk.org" in >> your mails then only it will reach all vtk users. >> >> Regards, >> Sathish >> >> On Sunday 21 August 2011 04:34 AM, Claire.Fanny1995 at gmail.com >> wrote: >>> Hi kingvsk iam Claire and iam working on several Medical projects in Software >>> house well now a days i am working on PACS and it is going very well i used >>> mdcm Opensource project for DICOM integration using C#. >>> Well now iam trying to load DICOM files using *ActiViz.NET 5.6.1 OpenSource >>> Edition *by utilizing vtkDICOMImageReader in C#, literally i am not C++ >>> developer so if anyone on this forum did in C# OR even VB please let me know >>> >>> >>> Regards >>> >>> Claire Fanny >>> Software Developer >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From raysubho510 at gmail.com Mon Aug 22 08:25:39 2011 From: raysubho510 at gmail.com (Subhodeep Ray) Date: Mon, 22 Aug 2011 17:55:39 +0530 Subject: [vtkusers] HELP !! Message-ID: Currently I'm working on generating movie files using the relevant vtk classes, namely, vtkFFMpegWriter and vtkMPEG2Writer. I'm particularly facing problems when trying to build the codecs of these libraries on windows. The codecs provided on the vtk website are generally helpful in case of linux, but in case of windows, both are not at all helpful. There are no proper codecs provided for windows on the website. They have provided with already built exe files (for FFMpeg) which cannot be run, without properly linking with vtk. Moreover after building MPEG2Encode, when I try to generate a movie file, a window pops up showing some codec error, although the simulation keeps on running in the background. I need urgent help regarding these issues, and please do let me know, if my query is not completely clear. Any kind of help would be extremely appreciated. Regards, -- Subhodeep Ray Research Engineer (Software Development) Fluidyn Software & Consultancy (P) Ltd. Bangalore. Mobile: +91-9590669291 e-mail: raysubho510 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijaeendra at gmail.com Mon Aug 22 09:10:29 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Mon, 22 Aug 2011 18:40:29 +0530 Subject: [vtkusers] VTK Building Error On Solaris x86 In-Reply-To: References: Message-ID: That was a different error, I fixed it by changing the compiler. But I get the following error now... "/export/home/vtk/VTK/Utilities/vtknetcdf/utf8proc.h", line 70: invalid type combination cc: acomp failed for /export/home/vtk/VTK/Utilities/vtknetcdf/attr.c gmake[2]: *** [Utilities/vtknetcdf/CMakeFiles/vtkNetCDF.dir/attr.c.o] Error 2 gmake[1]: *** [Utilities/vtknetcdf/CMakeFiles/vtkNetCDF.dir/all] Error 2 gmake: *** [all] Error 2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Aug 22 10:08:12 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 22 Aug 2011 16:08:12 +0200 Subject: [vtkusers] gl_vendor on Linux missing crash the app Message-ID: I was testing my program under Linux (Fedora 14), and it crashes in vtkOpenGLGPUVolumeRayCastMapper.cxx on line 2080. The reason is that call to glGetString(GL_VENDOR) on previous line returns NULL, which in turn crashes strstr(). I am using nVidia proprietary driver (installed some months ago, probably not the latest version). Is this a known problem? From dzenanz at gmail.com Mon Aug 22 10:42:39 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 22 Aug 2011 16:42:39 +0200 Subject: [vtkusers] Nearest vs linear interpolation Message-ID: Hi guys, even with linear interpolation transitions between slices can be observed (when looking almost parallel to the slices): http://i274.photobucket.com/albums/jj262/dzenanz/Nearest.png http://i274.photobucket.com/albums/jj262/dzenanz/Linear.png With nearest neighbor something like above is to be expected, but not really with linear interpolation. What is the catch? Regards, D?enan -------------- next part -------------- An HTML attachment was scrubbed... URL: From oldrich.svec at gmail.com Mon Aug 22 12:58:01 2011 From: oldrich.svec at gmail.com (Oldrich Svec) Date: Mon, 22 Aug 2011 18:58:01 +0200 Subject: [vtkusers] itk for c# Message-ID: Hi, I use Activiz .NET x64 for some visualization and I would like to use ITK as well. What is the best way to use ITK in .NET (c#) - preferably ready made x64 dlls? There should be coming ITK 4 which should contain C#, is that right? And when could we expect it to come? Thank you for you answers, Oldrich From emonson at cs.duke.edu Mon Aug 22 13:51:52 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Mon, 22 Aug 2011 13:51:52 -0400 Subject: [vtkusers] Generating my own TCL wrappers In-Reply-To: References: Message-ID: <68C7BCD4-C1AE-468F-80CA-9E3E787DF7D2@cs.duke.edu> Hello Joel, I don't use TCL wrapping, so someone else may have to help you with any details there, but I wanted to see if you know about the vtkMy examples in the VTK source? If you look in VTK/Examples/Build/vtkMy there is an example of how to set up your directories for custom classes you want built against VTK, along with the wrapping. I use this type of setup for all of my custom classes and subclasses along with Python wrapping and it works great. See if you can follow the instructions in the README and then write back to the list with specific problems if you have trouble setting it up. Talk to you later, -Eric ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Eric E Monson Duke Visualization Technology Group On Aug 22, 2011, at 4:33 AM, Joel Tucci wrote: > I want to extend a VTK class(vtkMoleculeReaderBase) and then wrap that extension in TCL using the same mechanisms used to wrap the other VTK classes. How would I go about doing this? I would prefer to keep this totally separate from the rest of the build if at all possible. _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From kacper.pluta at gmail.com Mon Aug 22 14:07:13 2011 From: kacper.pluta at gmail.com (Kacper Pluta) Date: Mon, 22 Aug 2011 20:07:13 +0200 Subject: [vtkusers] Beginner and his problems with rotation. Message-ID: At the beginning I would like to welcome you all! Some time ago, precisely some days ago I started to learn VTK and I encountered a problem with rotation. I wanna write a recursive function to generate a tree in 3D. I generated a part of a tree, so you could see what I mean. Below is a pseudocode. So you can see from my point of view, and you may be able to correct it. I have a big problem with the setup of new children at a right angle at the end of their root, after the restoration of the root angle, and angle of the family to which it belongs. NODE GenTree(NODE root, int bifurcation) { if(bifurcation > 0 && root != NULL) { Restart the angle of Parent root famili if exist; //(root is part of the family, e.g. the left child of his Parent) Restart the root angle; //Now root agnel is set to 90 degrees //make new bifurcation Create the children; Set children position to lower ends of root; Set children origin to center of root; rotate the children on Z axis; restore root angle; restore Parent of root famili angle; //Make root famili root->Famili = vtkAssembly::New(); root->Famili->AddPart(root->Left->BranchActor); root->Famili->AddPart(root->Right->BranchActor); Set Famili origin?? rootate the root famili? //Now the family is at the end of the root. root->Left->Left = GenTree(root->Left,--bifurcation); //root->Left->Right = GenTree(root->Right,--bifurcation); } } /**********************/ OS: OpenSUSE 11.4 x86_64 VTK VERSION: 5.6.1 cmake: 2.8.3 Language: C++ /**********************/ -- "If you build your empire on money, it'll fall like a house of cards, if you build it on love, you've built Taj Mahal!" - Mark Hartmaier -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zrzut ekranu10.png Type: image/png Size: 25509 bytes Desc: not available URL: From luca.gherardi at unibg.it Mon Aug 22 15:42:06 2011 From: luca.gherardi at unibg.it (Luca Gherardi) Date: Mon, 22 Aug 2011 21:42:06 +0200 Subject: [vtkusers] Build fails on osx Lion: "symbol(s) not found for architecture x86_64" Message-ID: Hi all, I'm trying to build the source on Osx Lion, without cocoa and carbon supports, with X. I set the path for GL and GLU include and lib respectively to /usr/X11/include and /usr/X11/lib I checked with file /usr/X11/lib/libGLU and the result was libGLU.dylib: Mach-O universal binary with 2 architectures libGLU.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 libGLU.dylib (for architecture i386): Mach-O dynamically linked shared library i386 the same for file libglut.dylib libglut.dylib: Mach-O universal binary with 2 architectures libglut.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 libglut.dylib (for architecture i386): Mach-O dynamically linked shared library i386 I also tried to set the architecture to i386 and x86_64 but it alway returns me the following errors. How can I fix it? Thanks, Luca > Linking CXX executable ../../../bin/GraphicsCxxTests > Undefined symbols for architecture x86_64: > "_glDepthMask", referenced from: > vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) in libvtkRendering.a(vtkOpenGLActor.cxx.o) > vtkOpenGLImageActor::InternalRender(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLPainterDeviceAdapter::MakeVertexEmphasis(bool) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > vtkOpenGLRenderWindow::SetRGBACharPixelData(int, int, int, int, unsigned char*, int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glGetIntegerv", referenced from: > vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) in libvtkRendering.a(vtkOpenGLActor.cxx.o) > vtkOpenGLImageActor::TextureSizeOK(int*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLProperty::ReleaseGraphicsResources(vtkWindow*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLProperty::BackfaceRender(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLProperty::PostRender(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLPainterDeviceAdapter::Stencil(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > ... > "_glMatrixMode", referenced from: > vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) in libvtkRendering.a(vtkOpenGLActor.cxx.o) > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLImageActor::InternalRender(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLClipPlanesPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLClipPlanesPainter.cxx.o) > vtkOpenGLCoincidentTopologyResolutionPainter::RenderShiftZBuffer(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLCoincidentTopologyResolutionPainter.cxx.o) > vtkOpenGLRenderer::DevicePickRender() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::DeviceRender() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > ... > "_glPushMatrix", referenced from: > vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) in libvtkRendering.a(vtkOpenGLActor.cxx.o) > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLImageActor::InternalRender(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLLight::Render(vtkRenderer*, int) in libvtkRendering.a(vtkOpenGLLight.cxx.o) > vtkOpenGLClipPlanesPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLClipPlanesPainter.cxx.o) > vtkOpenGLCoincidentTopologyResolutionPainter::RenderShiftZBuffer(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLCoincidentTopologyResolutionPainter.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > ... > "_glMultMatrixd", referenced from: > vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) in libvtkRendering.a(vtkOpenGLActor.cxx.o) > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLImageActor::InternalRender(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLLight::Render(vtkRenderer*, int) in libvtkRendering.a(vtkOpenGLLight.cxx.o) > vtkOpenGLClipPlanesPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLClipPlanesPainter.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > "_glPopMatrix", referenced from: > vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) in libvtkRendering.a(vtkOpenGLActor.cxx.o) > vtkOpenGLImageActor::InternalRender(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLLight::Render(vtkRenderer*, int) in libvtkRendering.a(vtkOpenGLLight.cxx.o) > vtkOpenGLClipPlanesPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLClipPlanesPainter.cxx.o) > vtkOpenGLCoincidentTopologyResolutionPainter::RenderShiftZBuffer(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLCoincidentTopologyResolutionPainter.cxx.o) > vtkOpenGLRenderer::DevicePickRender() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::DeviceRender() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > ... > "_glDrawBuffer", referenced from: > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLRenderWindow::SetRGBACharPixelData(int, int, int, int, unsigned char*, int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetRGBAPixelData(int, int, int, int, float*, int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetPixelData(int, int, int, int, unsigned char*, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glReadBuffer", referenced from: > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLRenderWindow::GetRGBACharPixelData(int, int, int, int, int, unsigned char*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::GetRGBAPixelData(int, int, int, int, int, float*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::GetPixelData(int, int, int, int, int, unsigned char*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glViewport", referenced from: > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLCamera::UpdateViewport(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLRenderWindow::SetZbufferData(int, int, int, int, float*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetRGBACharPixelData(int, int, int, int, unsigned char*, int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetRGBAPixelData(int, int, int, int, float*, int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetPixelData(int, int, int, int, unsigned char*, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glEnable", referenced from: > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLCamera::UpdateViewport(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLPainterDeviceAdapter::Stencil(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPainterDeviceAdapter::MakeBlending(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPainterDeviceAdapter::MakeMultisampling(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > ... > "_glScissor", referenced from: > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLCamera::UpdateViewport(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > "_glLoadIdentity", referenced from: > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > vtkOpenGLFreeTypeTextMapper::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > vtkOpenGLImageMapper::RenderData(vtkViewport*, vtkImageData*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > ... > "_glLoadMatrixd", referenced from: > vtkOpenGLCamera::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > "_glMultMatrixf", referenced from: > vtkgluPickMatrix(double, double, double, double, int*, int*)in libvtkRendering.a(vtkOpenGLCamera.cxx.o) > vtkgluPickMatrix(double, double, double, double, int*, int*)in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > vtkgluPickMatrix(double, double, double, double, int*, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > vtkgluPickMatrix(double, double, double, double, int*, int*)in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glClipPlane", referenced from: > vtkOpenGLClipPlanesPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLClipPlanesPainter.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glTranslated", referenced from: > vtkOpenGLCoincidentTopologyResolutionPainter::RenderShiftZBuffer(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLCoincidentTopologyResolutionPainter.cxx.o) > "_glDeleteLists", referenced from: > vtkOpenGLDisplayListPainter::vtkInternals::ReleaseAllLists(vtkWindow*) in libvtkRendering.a(vtkOpenGLDisplayListPainter.cxx.o) > "_glGenLists", referenced from: > vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLDisplayListPainter.cxx.o) > "_glNewList", referenced from: > vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLDisplayListPainter.cxx.o) > "_glEndList", referenced from: > vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLDisplayListPainter.cxx.o) > "_glCallList", referenced from: > vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLDisplayListPainter.cxx.o) > "_glTexImage2D", referenced from: > vtkOpenGLImageActor::TextureSizeOK(int*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > vtkOpenGLRenderWindow::CreateHardwareOffScreenWindow(int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glGetTexLevelParameteriv", referenced from: > vtkOpenGLImageActor::TextureSizeOK(int*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glBindTexture", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > vtkOpenGLRenderWindow::CreateHardwareOffScreenWindow(int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glGenTextures", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > vtkOpenGLRenderWindow::CreateHardwareOffScreenWindow(int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glTexParameterf", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > "_glPixelStorei", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, double*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, float*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, unsigned long long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, long long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, unsigned long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > ... > "_glTexSubImage2D", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > "_glAlphaFunc", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > vtkOpenGLRenderWindow::OpenGLInit() in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glPolygonOffset", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLCoincidentTopologyResolutionPainter::RenderPolygonOffset(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLCoincidentTopologyResolutionPainter.cxx.o) > vtkOpenGLRepresentationPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLRepresentationPainter.cxx.o) > "_glColor4f", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > "_glBegin", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLPainterDeviceAdapter::BeginPrimitive(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glTexCoord2dv", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glVertex3dv", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glEnd", referenced from: > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLPainterDeviceAdapter::EndPrimitive() in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glPushAttrib", referenced from: > vtkOpenGLImageActor::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLScalarsToColorsPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLScalarsToColorsPainter.cxx.o) > vtkOpenGLRepresentationPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLRepresentationPainter.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > FTGLPixmapFont::RenderOpenGL(char const*, FTGLRenderContext const*)in libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o) > ... > "_glPopAttrib", referenced from: > vtkOpenGLImageActor::Render(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLScalarsToColorsPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLScalarsToColorsPainter.cxx.o) > vtkOpenGLRepresentationPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLRepresentationPainter.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLTexture::PostRender(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > FTGLPixmapFont::RenderOpenGL(char const*, FTGLRenderContext const*)in libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o) > ... > "_glRasterPos3f", referenced from: > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, double*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, float*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, unsigned long long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, long long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, unsigned long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, int*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > ... > "_glPixelZoom", referenced from: > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, double*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, float*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, unsigned long long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, long long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, unsigned long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, int*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > ... > "_glDrawPixels", referenced from: > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, double*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, float*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, unsigned long long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, long long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, unsigned long*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > void vtkOpenGLImageMapperRenderDouble(vtkOpenGLImageMapper*, vtkImageData*, int*, double, double, int*, int*, int, int*)in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > ... > "_glLightfv", referenced from: > vtkOpenGLLight::Render(vtkRenderer*, int) in libvtkRendering.a(vtkOpenGLLight.cxx.o) > "_glLightf", referenced from: > vtkOpenGLLight::Render(vtkRenderer*, int) in libvtkRendering.a(vtkOpenGLLight.cxx.o) > "_glLighti", referenced from: > vtkOpenGLLight::Render(vtkRenderer*, int) in libvtkRendering.a(vtkOpenGLLight.cxx.o) > "_glStencilFunc", referenced from: > vtkOpenGLPainterDeviceAdapter::TestStencil(long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPainterDeviceAdapter::WriteStencil(long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glStencilOp", referenced from: > vtkOpenGLPainterDeviceAdapter::TestStencil(long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPainterDeviceAdapter::WriteStencil(long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glClearStencil", referenced from: > vtkOpenGLPainterDeviceAdapter::WriteStencil(long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColorMask", referenced from: > vtkOpenGLPainterDeviceAdapter::MakeVertexEmphasisWithStencilCheck(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glGetFloatv", referenced from: > vtkOpenGLPainterDeviceAdapter::MakeVertexEmphasis(bool) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > FTPixmapGlyph::GetCurrentColorOpenGL(float*, FTGLRenderContext const*)in libvtkftgl.a(FTPixmapGlyphRenderOpenGL.cpp.o) > "_glDepthRange", referenced from: > vtkOpenGLPainterDeviceAdapter::MakeVertexEmphasis(bool) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glIsEnabled", referenced from: > vtkOpenGLPainterDeviceAdapter::QueryBlending() in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPainterDeviceAdapter::QueryMultisampling() in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPainterDeviceAdapter::QueryLighting() in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLFreeTypeTextMapper::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > "_glDrawElements", referenced from: > vtkOpenGLPainterDeviceAdapter::DrawElements(int, long long, int, void*)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glDrawArrays", referenced from: > vtkOpenGLPainterDeviceAdapter::DrawArrays(int, long long, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glDisableClientState", referenced from: > vtkOpenGLPainterDeviceAdapter::DisableAttributeArray(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glEnableClientState", referenced from: > vtkOpenGLPainterDeviceAdapter::EnableAttributeArray(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertexPointer", referenced from: > vtkOpenGLPainterDeviceAdapter::SetAttributePointer(int, int, int, int, void const*)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glNormalPointer", referenced from: > vtkOpenGLPainterDeviceAdapter::SetAttributePointer(int, int, int, int, void const*)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColorPointer", referenced from: > vtkOpenGLPainterDeviceAdapter::SetAttributePointer(int, int, int, int, void const*)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoordPointer", referenced from: > vtkOpenGLPainterDeviceAdapter::SetAttributePointer(int, int, int, int, void const*)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex2sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex3sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex4sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex2iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex3iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex4iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex2fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex3fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex4fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex2dv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex4dv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glNormal3bv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glNormal3sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glNormal3iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glNormal3fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glNormal3dv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor3bv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor4bv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor3ubv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor4ubv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glColor3sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor4sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor3usv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor4usv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor3iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor4iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor3uiv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor4uiv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor3fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor4fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glColor3dv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord1sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord2sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord3sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord4sv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord1iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord2iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord3iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord4iv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord1fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord2fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord3fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord4fv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord1dv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord3dv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glTexCoord4dv", referenced from: > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > "_glVertex3d", referenced from: > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glMaterialfv", referenced from: > vtkOpenGLProperty::BackfaceRender(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLScalarsToColorsPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLScalarsToColorsPainter.cxx.o) > vtkCompositePainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkCompositePainter.cxx.o) > "_glPolygonMode", referenced from: > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLRepresentationPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLRepresentationPainter.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glCullFace", referenced from: > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > "_glShadeModel", referenced from: > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glColor4dv", referenced from: > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLPainterDeviceAdapter::SendAttribute(int, int, int, void const*, long long)in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLRepresentationPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLRepresentationPainter.cxx.o) > "_glPointSize", referenced from: > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLPainterDeviceAdapter::MakeVertexEmphasis(bool) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glLineWidth", referenced from: > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glLineStipple", referenced from: > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glGetBooleanv", referenced from: > vtkOpenGLRenderWindow::CreateHardwareOffScreenWindow(int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glRasterPos2f", referenced from: > vtkOpenGLRenderWindow::SetZbufferData(int, int, int, int, float*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glReadPixels", referenced from: > vtkOpenGLRenderWindow::GetZbufferData(int, int, int, int, float*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::GetRGBACharPixelData(int, int, int, int, int, unsigned char*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::GetRGBAPixelData(int, int, int, int, int, float*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::GetPixelData(int, int, int, int, int, unsigned char*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glSelectBuffer", referenced from: > vtkOpenGLRenderer::StartPick(unsigned int)in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glRenderMode", referenced from: > vtkOpenGLRenderer::StartPick(unsigned int)in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::DonePick() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glInitNames", referenced from: > vtkOpenGLRenderer::StartPick(unsigned int)in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glPushName", referenced from: > vtkOpenGLRenderer::StartPick(unsigned int)in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glLoadName", referenced from: > vtkOpenGLRenderer::UpdatePickId() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glTexParameteri", referenced from: > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderWindow::CreateHardwareOffScreenWindow(int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glCopyTexSubImage2D", referenced from: > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glDepthFunc", referenced from: > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLFreeTypeTextMapper::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > vtkOpenGLRenderWindow::OpenGLInit() in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glOrtho", referenced from: > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLFreeTypeTextMapper::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > vtkOpenGLImageMapper::RenderData(vtkViewport*, vtkImageData*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > vtkOpenGLPolyDataMapper2D::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLPolyDataMapper2D.cxx.o) > "_glClearColor", referenced from: > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glClear", referenced from: > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glTexEnvi", referenced from: > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glTexCoord2f", referenced from: > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glVertex2f", referenced from: > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glClearDepth", referenced from: > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glTexEnvf", referenced from: > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > vtkOpenGLRenderWindow::OpenGLInit() in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glColor4d", referenced from: > vtkOpenGLRenderer::Clear() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glLightModelfv", referenced from: > vtkOpenGLRenderer::ClearLights() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > "_glLightModeli", referenced from: > vtkOpenGLRenderer::ClearLights() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderWindow::OpenGLInit() in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glColorMaterial", referenced from: > vtkOpenGLScalarsToColorsPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLScalarsToColorsPainter.cxx.o) > "_glBlendFunc", referenced from: > vtkOpenGLScalarsToColorsPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)in libvtkRendering.a(vtkOpenGLScalarsToColorsPainter.cxx.o) > vtkOpenGLTexture::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > vtkOpenGLRenderWindow::OpenGLInit() in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > FTGLPixmapFont::RenderOpenGL(char const*, FTGLRenderContext const*)in libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o) > FTGLPixmapFont::RenderOpenGL(wchar_t const*, FTGLRenderContext const*)in libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o) > "_glGetError", referenced from: > printOglError(char*, int)in libvtkRendering.a(vtkGLSLShaderProgram.cxx.o) > vtkOpenGLRenderWindow::CheckGraphicError() in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetZbufferData(int, int, int, int, float*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::GetZbufferData(int, int, int, int, float*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetRGBACharPixelData(int, int, int, int, unsigned char*, int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetRGBAPixelData(int, int, int, int, float*, int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetPixelData(int, int, int, int, unsigned char*, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > ... > "_glRectf", referenced from: > vtkOpenGLFreeTypeTextMapper::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > vtkOpenGLImageMapper::RenderData(vtkViewport*, vtkImageData*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLImageMapper.cxx.o) > "_glColor4ub", referenced from: > vtkOpenGLFreeTypeTextMapper::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > "_glRasterPos2i", referenced from: > vtkOpenGLFreeTypeTextMapper::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > "_glBitmap", referenced from: > vtkOpenGLFreeTypeTextMapper::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > FTPixmapGlyph::RenderOpenGL(FT_Vector_ const&, FTGLRenderContext const*)in libvtkftgl.a(FTPixmapGlyphRenderOpenGL.cpp.o) > "_glXIsDirect", referenced from: > vtkXOpenGLRenderWindow::IsDirect() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXGetConfig", referenced from: > vtkXOpenGLRenderWindow::SupportsOpenGL() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXQueryServerString", referenced from: > vtkXOpenGLRenderWindow::ReportCapabilities() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXGetClientString", referenced from: > vtkXOpenGLRenderWindow::ReportCapabilities() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXQueryExtensionsString", referenced from: > vtkXOpenGLRenderWindow::ReportCapabilities() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glGetString", referenced from: > vtkXOpenGLRenderWindow::ReportCapabilities() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderWindow::CreateHardwareOffScreenWindow(int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLExtensionManager::ReadOpenGLExtensions() in libvtkRendering.a(vtkOpenGLExtensionManager.cxx.o) > vtkOpenGLExtensionManager::ExtensionSupported(char const*)in libvtkRendering.a(vtkOpenGLExtensionManager.cxx.o) > "_glXGetCurrentContext", referenced from: > vtkXOpenGLRenderWindow::IsCurrent() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkXOpenGLRenderWindow::MakeCurrent() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXMakeCurrent", referenced from: > vtkXOpenGLRenderWindow::MakeCurrent() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXDestroyContext", referenced from: > vtkXOpenGLRenderWindow::DestroyOffScreenWindow() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkXOpenGLRenderWindow::DestroyWindow() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXDestroyGLXPixmap", referenced from: > vtkXOpenGLRenderWindow::DestroyOffScreenWindow() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXQueryVersion", referenced from: > vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXCreateContext", referenced from: > vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkXOpenGLRenderWindow::CreateAWindow() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glXCreateGLXPixmap", referenced from: > vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glDisable", referenced from: > vtkXOpenGLRenderWindow::DestroyWindow() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkOpenGLImageActor::Load(vtkRenderer*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLImageActor::ReleaseGraphicsResources(vtkWindow*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLProperty::PostRender(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) in libvtkRendering.a(vtkOpenGLProperty.cxx.o) > vtkOpenGLPainterDeviceAdapter::Stencil(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > vtkOpenGLPainterDeviceAdapter::MakeBlending(int) in libvtkRendering.a(vtkOpenGLPainterDeviceAdapter.cxx.o) > ... > "_glIsTexture", referenced from: > vtkXOpenGLRenderWindow::DestroyWindow() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkOpenGLImageActor::ReleaseGraphicsResources(vtkWindow*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLTexture::ReleaseGraphicsResources(vtkWindow*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > "_glDeleteTextures", referenced from: > vtkXOpenGLRenderWindow::DestroyWindow() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkOpenGLImageActor::ReleaseGraphicsResources(vtkWindow*) in libvtkRendering.a(vtkOpenGLImageActor.cxx.o) > vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLRenderer::RenderPeel(int) in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLTexture::ReleaseGraphicsResources(vtkWindow*) in libvtkRendering.a(vtkOpenGLTexture.cxx.o) > vtkOpenGLRenderWindow::DestroyHardwareOffScreenWindow() in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::CreateHardwareOffScreenWindow(int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > ... > "_glFinish", referenced from: > vtkXOpenGLRenderWindow::DestroyWindow() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::WaitForCompletion() in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > "_glXQueryExtension", referenced from: > vtkXOpenGLRenderWindow::CreateAWindow() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkOpenGLExtensionManager::ReadOpenGLExtensions() in libvtkRendering.a(vtkOpenGLExtensionManager.cxx.o) > "_glXSwapBuffers", referenced from: > vtkXOpenGLRenderWindow::Frame() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glFlush", referenced from: > vtkXOpenGLRenderWindow::Frame() in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderer::DonePick() in libvtkRendering.a(vtkOpenGLRenderer.cxx.o) > vtkOpenGLFreeTypeTextMapper::RenderOverlay(vtkViewport*, vtkActor2D*) in libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.cxx.o) > vtkOpenGLRenderWindow::SetZbufferData(int, int, int, int, float*)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetRGBACharPixelData(int, int, int, int, unsigned char*, int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetRGBAPixelData(int, int, int, int, float*, int, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > vtkOpenGLRenderWindow::SetPixelData(int, int, int, int, unsigned char*, int)in libvtkRendering.a(vtkOpenGLRenderWindow.cxx.o) > ... > "_glXChooseVisual", referenced from: > vtkXOpenGLRenderWindowTryForVisual(_XDisplay*, int, int, int, int, int)in libvtkRendering.a(vtkXOpenGLRenderWindow.cxx.o) > "_glPushClientAttrib", referenced from: > FTGLPixmapFont::RenderOpenGL(char const*, FTGLRenderContext const*)in libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o) > FTGLPixmapFont::RenderOpenGL(wchar_t const*, FTGLRenderContext const*)in libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o) > "_glPopClientAttrib", referenced from: > FTGLPixmapFont::RenderOpenGL(char const*, FTGLRenderContext const*)in libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o) > FTGLPixmapFont::RenderOpenGL(wchar_t const*, FTGLRenderContext const*)in libvtkftgl.a(FTGLPixmapFontRenderOpenGL.cpp.o) > ld: symbol(s) not found for architecture x86_64 ------------------------------------------------------------------------------ Luca Gherardi PhD Student at University of Bergamo Dept. of Information Technology and Mathematics V.le Marconi, 5 - 24044 Dalmine, Italy Tel +39 333 8396279 Home: http://www.lucagherardi.it From josephawad3 at gmail.com Mon Aug 22 16:41:16 2011 From: josephawad3 at gmail.com (Joseph Awad) Date: Mon, 22 Aug 2011 16:41:16 -0400 Subject: [vtkusers] InteractorStyleSubclass vtkPlaneWidget CallBack Message-ID: <4E52BEEC.4090405@gmail.com> Hi All, This is my first post in here. I am working on developing a manual mesh (vtkpolydata) editing tool. I implemented an interactor Style Subclass of vtkInteractorStyleTrackballCamera like the following example: http://www.itk.org/Wiki/VTK/Examples/Cxx/Interaction/MouseEvents This subclass handles mouse events as long as they are outside the volume. However, vtkPlaneWidget takes over any mouse events inside the volume. Is there a way to give the subclass a higher priority than the vtkPlaneWidge? or Is there a better way for manual mesh editing tool? Thank you, Joseph From faco1976 at gmail.com Tue Aug 23 04:17:41 2011 From: faco1976 at gmail.com (Giancarlo Facoetti) Date: Tue, 23 Aug 2011 09:17:41 +0100 Subject: [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) Message-ID: <4E536225.1030204@gmail.com> Hi everybody, I'm using an open source library for NURBS management, called NURBS++. I'm able to do everything: creation of the surface, control points moving, surface points moving, visualiation of the surface with OpenGL (gluNurbsSurface...) I'm developing a VTK based application, and now I need to visualize the NURBS++ surfaces into VTK pipeline, therefore without using gluNurbsSurface but the VTK rendering I found in the VTK documentation the class vtkExplicitCell.h that tells about NURBS surfaces, but I didn't understand how to use it. (http://davis.lbl.gov/Manuals/VTK-4.5/classvtkExplicitCell.html) Do you have some suggestion please? thank you! Giancarlo From gahr at gahr.ch Mon Aug 22 10:33:24 2011 From: gahr at gahr.ch (Pietro Cerutti) Date: Mon, 22 Aug 2011 16:33:24 +0200 Subject: [vtkusers] Cutting a polydata using a concave set of planes Message-ID: <20110822143324.GK15958@gahrfit.gahr.ch> Hi, I'm trying to figure out how to cut a polydata using a set of concave planes. Say, I have a cube, and I want to clip away the upper quarter, which is defined by a pyramid whose tip is in the center of the cube and the base is the upper face. Let's have this cube centered at (0, 0, 0). I have two planes: 1) at (0, 0, 0), normal (1, -1, 0) --> cut away the upper left half 2) at (0, 0, 0), normal (-1, -1, 9) --> cut away the upper right half I have tried to use vtkImplicitBoolean to combine these two planes, but - Intersection results in the whole cube (nothing is cut away) - Union results in nothing (the whole cube is cut away) I attach to this email a tarball of this sample project, including two screenshots of the results clipping with plane 1) and plane 2). The tarball is also available at this address: http://people.freebsd.org/~gahr/vtk_concave.tar.bz2 Thanks for any insight! -- Pietro Cerutti gahr at gahr.ch PGP Public Key: http://gahr.ch/pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_concave.tar.bz2 Type: application/octet-stream Size: 16799 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available URL: From Claire.Fanny1995 at gmail.com Tue Aug 23 03:53:18 2011 From: Claire.Fanny1995 at gmail.com (Claire.Fanny) Date: Tue, 23 Aug 2011 00:53:18 -0700 (PDT) Subject: [vtkusers] Volume Rendering Message-ID: <1314085998226-4725863.post@n5.nabble.com> Hi I am Claire ,I am Software developer and now a days I am working on DICOM viewer well after a lot of searching i got this VTK which is awesome and with C# Integration is quite amazing. 1) My first task is to display DICOM image data on window and by searching and with the help of some VTI users i got some success now i can display DICOM image on window but there is only few DICOM studies which i can read and most of the other studies transpire some problem, i have attached the output window you all can see the problem. 2) My second task is to render 2d images into 3d. 3) And last task is to display the 3d DICOM Image, sample images available on http://pubimage.hcuge.ch:8080/ although by help of other member i got the code and it works fine only with KNEE DICOM study but if I use any other study so the same problem occur which you all a see on attachment. Please help me out. Regards Claire Fanny Software Developer -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-tp4725863p4725863.html Sent from the VTK - Users mailing list archive at Nabble.com. From faco1976 at gmail.com Tue Aug 23 03:55:08 2011 From: faco1976 at gmail.com (Giancarlo Facoetti) Date: Tue, 23 Aug 2011 08:55:08 +0100 Subject: [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) Message-ID: Hi everybody, I'm using an open source library for NURBS management, called NURBS++. I'm able to do everything: creation of the surface, control points moving, surface points moving, visualiation of the surface with OpenGL (gluNurbsSurface...) I'm developing a VTK based application, and now I need to visualize the NURBS++ surfaces into VTK pipeline, therefore without using gluNurbsSurface but the VTK rendering I found in the VTK documentation the class vtkExplicitCell.h that tells about NURBS surfaces, but I didn't understand how to use it. ( http://davis.lbl.gov/Manuals/**VTK-4.5/classvtkExplicitCell.**html ) Do you have some suggestion please? thank you! Giancarlo -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Tue Aug 23 04:03:57 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 23 Aug 2011 10:03:57 +0200 Subject: [vtkusers] Volume Rendering In-Reply-To: <1314085998226-4725863.post@n5.nabble.com> References: <1314085998226-4725863.post@n5.nabble.com> Message-ID: Are you using VTK's DICOM reader? It seems to be quite limited: http://www.vtk.org/doc/nightly/html/classvtkDICOMImageReader.html You should use ITK's DICOM reading capabilities, and then use itk::ImageToVTKImage filter to convert it to VTK's format ready for visualization. If you want to preserve physical coordinate, you may use this example: http://www.itk.org/Wiki/ITK/Examples/IO/itkVtkImageConvertDICOM For standard way of reading DICOM images take a look at this example: http://itk.org/gitweb?p=ITK.git;a=blob;f=Examples/IO/DicomSeriesReadImageWrite2.cxx;h=2f70be77202d2417c25e918102c5f96d643a14ca;hb=master On Tue, Aug 23, 2011 at 09:53, Claire.Fanny wrote: > Hi I am Claire ,I am Software developer and now a days I am working on > DICOM > viewer well after a lot of searching i got this VTK which is awesome and > with C# Integration is quite amazing. > > 1) My first task is to display DICOM image data on window and by searching > and with the help of some VTI users i got some success now i can display > DICOM image on window but there is only few DICOM studies which i can read > and most of the other studies transpire some problem, i have attached the > output window you all can see the problem. > > 2) My second task is to render 2d images into 3d. > > 3) And last task is to display the 3d DICOM Image, sample images available > on http://pubimage.hcuge.ch:8080/ although by help of other member i got > the > code and it works fine only with KNEE DICOM study but if I use any other > study so the same problem occur which you all a see on attachment. > > Please help me out. > > Regards > Claire Fanny > Software Developer > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Volume-Rendering-tp4725863p4725863.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lloyd at itis.ethz.ch Tue Aug 23 05:11:01 2011 From: lloyd at itis.ethz.ch (Bryn Lloyd) Date: Tue, 23 Aug 2011 11:11:01 +0200 Subject: [vtkusers] vtkSortDataArray is in two VTK Kits, Is this intentional? Message-ID: <016e01cc6174$93d5e170$bb81a450$@ethz.ch> Hi I recently found that vtkSortDataArray.h/.cxx is in Graphics and Common. Is this intentional and/or necessary? It is not causing any problems for me, but it seems a bit strange. Cheers Bryn -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijaeendra at gmail.com Tue Aug 23 05:17:13 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Tue, 23 Aug 2011 14:47:13 +0530 Subject: [vtkusers] VTK Building Error On Solaris x86 In-Reply-To: References: Message-ID: I m also getting the following error when I try to compile the 5.4.2 [ 82%] Building CXX object Hybrid/CMakeFiles/vtkHybrid.dir/vtkVRMLImporter.o "/export/home/vtk-downloads/VTK/Hybrid/vtkVRMLImporter.cxx", line 1110: Error: Too many arguments in call to "alloca()". "/export/home/vtk-downloads/VTK/Hybrid/vtkVRMLImporter.cxx", line 1112: Error: Too many arguments in call to "alloca()". 2 Error(s) detected. gmake[2]: *** [Hybrid/CMakeFiles/vtkHybrid.dir/vtkVRMLImporter.o] Error 2 gmake[1]: *** [Hybrid/CMakeFiles/vtkHybrid.dir/all] Error 2 gmake: *** [all] Error 2 Please help me Regards, Vijaeendra Simha G A -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.malaterre at gmail.com Tue Aug 23 05:26:35 2011 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Tue, 23 Aug 2011 11:26:35 +0200 Subject: [vtkusers] Volume Rendering In-Reply-To: <1314085998226-4725863.post@n5.nabble.com> References: <1314085998226-4725863.post@n5.nabble.com> Message-ID: Bonjour Claire, On Tue, Aug 23, 2011 at 9:53 AM, Claire.Fanny wrote: > 3) And last task is to display the 3d DICOM Image, sample images available > on http://pubimage.hcuge.ch:8080/ although by help of other member i got the > code and it works fine only with KNEE DICOM study but if I use any other > study so the same problem occur which you all a see on attachment. Quoting the page: "(All these DICOM files are encoded in JPEG2000 transfer syntax)" There is only one open-source C++ DICOM implementation which provides JPEG2000 support: GDCM. See FAQ: http://www.vtk.org/Wiki/VTK/FAQ#GDCM 2cts -- Mathieu From lloyd at itis.ethz.ch Tue Aug 23 05:46:51 2011 From: lloyd at itis.ethz.ch (Bryn Lloyd) Date: Tue, 23 Aug 2011 11:46:51 +0200 Subject: [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) In-Reply-To: References: Message-ID: <018501cc6179$95464810$bfd2d830$@ethz.ch> Hi Giancarlo It looks like the class vtkExplicitCell is abstract and there seems to be no child classes VTK. I haven't used it (subclassed), so cannot help there. Maybe the NURBS++ library can also output triangles or quads (it manages to generate them for OpenGL rendering, so they exist somewhere). Then you could fill a vtkPolyData with these triangles/polygons and render as usual with VTK. Good luck Bryn From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Giancarlo Facoetti Sent: Tuesday, August 23, 2011 9:55 AM To: vtkusers at vtk.org Subject: [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) Hi everybody, I'm using an open source library for NURBS management, called NURBS++. I'm able to do everything: creation of the surface, control points moving, surface points moving, visualiation of the surface with OpenGL (gluNurbsSurface...) I'm developing a VTK based application, and now I need to visualize the NURBS++ surfaces into VTK pipeline, therefore without using gluNurbsSurface but the VTK rendering I found in the VTK documentation the class vtkExplicitCell.h that tells about NURBS surfaces, but I didn't understand how to use it. ( http://davis.lbl.gov/Manuals/VTK-4.5/classvtkExplicitCell.html) Do you have some suggestion please? thank you! Giancarlo -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijaeendra at gmail.com Tue Aug 23 05:55:27 2011 From: vijaeendra at gmail.com (vijaeendra simha) Date: Tue, 23 Aug 2011 15:25:27 +0530 Subject: [vtkusers] VTK Building Error On Solaris x86 In-Reply-To: References: Message-ID: I m running solaris 10 (free version) on virtual box hosted by window xp. What is going wrong and how can i fix it?? -------------- next part -------------- An HTML attachment was scrubbed... URL: From e0425375 at gmail.com Tue Aug 23 06:26:52 2011 From: e0425375 at gmail.com (Florian Bruckner) Date: Tue, 23 Aug 2011 12:26:52 +0200 Subject: [vtkusers] simple vtk application Message-ID: <1314095212.1946.23.camel@florian-desktop> hi, i'm new to vtk and i have a few design questions. I want to write a simple visualization tool for our data. It should support multiple input files and different filters for each input file. Each filter then needs a mapper and an actor, if I understand that correctly. All those things should be put into an new class asdf_input. Finally there is an renderer window where the data should be displayed. So I would add the proper actors from the asdf_input object and add them to multiple renderers. Then these multiple renderers are added to the renderer window. All these things are put into another class asdf_output. So this is the first plan. But after looking over the vtk class reference i found vtkView, vtkDataRepresentation, ... and i was wondering whether there is already something very similar available. So my question is whether there is already some top-level class available, which allows to simplify the handling of multiple input/filters/renderers. greetings Florian From emonson at cs.duke.edu Tue Aug 23 08:50:56 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Tue, 23 Aug 2011 08:50:56 -0400 Subject: [vtkusers] PyQt SIP wrapping test fails Message-ID: Hey all, Is anyone able to successfully run TestQVTKWidget.py with the current development VTK version? I don't think any dashboards cover it and I get: ERROR: testQVTKWidget (__main__.TestQVTKWidget) ---------------------------------------------------------------------- Traceback (most recent call last): File "TestQVTKWidget.py", line 22, in testQVTKWidget w2.SetRenderWindow(win2) TypeError: QVTKWidget.SetRenderWindow(): argument 1 has unexpected type 'vtkobject' I hadn't updated VTK since May, and decided to do so yesterday. Some of the new ContextInteractorStyle Charts stuff broke the way I set up charts with PyQt4 (using QVTKRenderWindowInteractor), and I couldn't fix it, so I thought I'd check how hard it would be to switch over to the QVTKWidget, but I can't get the test or my other examples to run... My (Py)Qt stuff may be out of date, so I could update if anyone thought that would help: OS X 10.6.8, system Python 2.6.1, Qt 4.7.0 (from source, cocoa, x86_64), PyQt 4.8.1, sip 4.11.2. Thanks, -Eric ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Eric E Monson Duke Visualization Technology Group From ilindsay at insigniamedical.co.uk Tue Aug 23 09:43:48 2011 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 23 Aug 2011 06:43:48 -0700 (PDT) Subject: [vtkusers] new VTK releases? In-Reply-To: <1304550230286-4371378.post@n5.nabble.com> References: <8A81DA38DDDBDB478407E550F3C68C8503489B@exch-mbx2.ad.renci.org> <20110411221300.1766687030@mail.rogue-research.com> <1304404708427-4366502.post@n5.nabble.com> <1304550230286-4371378.post@n5.nabble.com> Message-ID: <1314107028986-4726833.post@n5.nabble.com> Hi David, Is VTK 5.8 released now? I can't seem to find a link to it from the downloads page at vtk.org, I only see 5.6.1 - I assume that there is no 5.7. If not, do you have any idea of the release date you are aiming for? I see from git that the release branch is being actively worked on, would this still be the 5.8 candidate? I am interested in looking at the vtkSmartVolumeMapper, but am a bit reluctant to use an unreleased build. Thanks, Ian Lindsay -- View this message in context: http://vtk.1045678.n5.nabble.com/new-VTK-releases-tp3414159p4726833.html Sent from the VTK - Users mailing list archive at Nabble.com. From dean.inglis at camris.ca Tue Aug 23 10:00:01 2011 From: dean.inglis at camris.ca (Dean Inglis) Date: Tue, 23 Aug 2011 10:00:01 -0400 Subject: [vtkusers] how to place vtkImageTracerWidget Message-ID: <956BD416215040B7A4D3A052299AC666@Hyoid> Hi Thiha, try doing m_imageTracer->SetProjectionPosition(93.0); Dean Hello, Please kindly help me with vtkImageTracerWidget. How can I position the vtkImageTracerWidget so that its projection position is always in front of background image. (current seeing slice of volume image) Sometimes, it was drawn in front of background image and sometimes it was drawn behind the current viewing image slice. Thanks, Thiha Hi, I am getting some problem with vtkImageTracerWidget. I can show any slice from vtkImage volume and draw a freehand line with vtkImageTracerWidget over background image in viewer Window. The image is on XY plane. For some slices, the vtkImageTracerWidget draws in front of the background image and it is visible. I checked the Z values of the points on tracer path and they had the same value as my current viewing slice's Z value. However for some slices, the image tracer was drawn but it was behind the background image and could not be seen. I checked the position values of the points on tracer path and they were different from current viewing slice's Z values. e.g., Current slice's Z value = 93 and the tracer's Z values = 92.99999 and therefore it was behind the slice image. How can I place the imageTracerWidget in front of the viewing slice all the time? Here is a piece of codes that I used to initialize my ImageTracerWidget. interactor = m_viewer2D->getRenderWindowInteractor(); m_imageTracer->GetLineProperty()->SetLineWidth(3); m_imageTracer->SetInteractor(interactor); m_imageTracer->AutoCloseOn(); m_imageTracer->SetCaptureRadius(10); m_imageTracer->SetViewProp( m_viewer2D->getImageActor() ); m_imageTracer->On(); thanks and regards, Thiha From faco1976 at gmail.com Tue Aug 23 12:11:45 2011 From: faco1976 at gmail.com (Giancarlo Facoetti) Date: Tue, 23 Aug 2011 17:11:45 +0100 Subject: [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) In-Reply-To: <018501cc6179$95464810$bfd2d830$@ethz.ch> References: <018501cc6179$95464810$bfd2d830$@ethz.ch> Message-ID: <4E53D141.8060007@gmail.com> Hi Bryn, thank you for your message. NURBS++ has a function that provide the triangulated surface, but it's very slow, it recomputes the triangles mesh everytime I call it. I have to investigate in a deeper way if NURBS++ provides direct access to the rendered triangles/quads (I fear that it uses the gluNurbsSurface functions, without create them explicitely) thank you! Giancarlo > Hi Giancarlo > > It looks like the class vtkExplicitCell is abstract and there seems to > be no child classes VTK. I haven?t used it (subclassed), so cannot > help there. > > Maybe the NURBS++ library can also output triangles or quads (it > manages to generate them for OpenGL rendering, so they exist somewhere). > > Then you could fill a vtkPolyData with these triangles/polygons and > render as usual with VTK. > > Good luck > > Bryn > > *From:* vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] *On > Behalf Of *Giancarlo Facoetti > *Sent:* Tuesday, August 23, 2011 9:55 AM > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) > > Hi everybody, > > I'm using an open source library for NURBS management, called NURBS++. > I'm able to do everything: creation of the surface, control points > moving, surface points moving, visualiation of the surface with OpenGL > (gluNurbsSurface...) > I'm developing a VTK based application, and now I need to visualize > the NURBS++ surfaces into VTK pipeline, therefore without using > gluNurbsSurface but the VTK rendering > I found in the VTK documentation the class vtkExplicitCell.h that > tells about NURBS surfaces, but I didn't understand how to use it. > (http://davis.lbl.gov/Manuals/VTK-4.5/classvtkExplicitCell.html) > Do you have some suggestion please? > thank you! > > Giancarlo > From agagliardi at ara.co.uk Tue Aug 23 11:36:01 2011 From: agagliardi at ara.co.uk (Adriano Gagliardi) Date: Tue, 23 Aug 2011 16:36:01 +0100 Subject: [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) In-Reply-To: <4E53D141.8060007@gmail.com> References: <018501cc6179$95464810$bfd2d830$@ethz.ch> <4E53D141.8060007@gmail.com> Message-ID: Is it possible to use a vtkImplicitFunction to generate a NURBS-type surface? This is something I looked into briefly in the past, but priorities changed. =================================== Adriano Gagliardi MEng PhD Business Sector Leader Computational Aerodynamics Aircraft Research Association Ltd. Manton Lane Bedford Tel: 01234 32 4644 E-mail: agagliardi at ara.co.uk Url: www.ara.co.uk -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Giancarlo Facoetti Sent: 23 August 2011 17:12 To: vtkusers at vtk.org Subject: Re: [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) Hi Bryn, thank you for your message. NURBS++ has a function that provide the triangulated surface, but it's very slow, it recomputes the triangles mesh everytime I call it. I have to investigate in a deeper way if NURBS++ provides direct access to the rendered triangles/quads (I fear that it uses the gluNurbsSurface functions, without create them explicitely) thank you! Giancarlo > Hi Giancarlo > > It looks like the class vtkExplicitCell is abstract and there seems to > be no child classes VTK. I haven't used it (subclassed), so cannot > help there. > > Maybe the NURBS++ library can also output triangles or quads (it > manages to generate them for OpenGL rendering, so they exist somewhere). > > Then you could fill a vtkPolyData with these triangles/polygons and > render as usual with VTK. > > Good luck > > Bryn > > *From:* vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] *On > Behalf Of *Giancarlo Facoetti > *Sent:* Tuesday, August 23, 2011 9:55 AM > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) > > Hi everybody, > > I'm using an open source library for NURBS management, called NURBS++. > I'm able to do everything: creation of the surface, control points > moving, surface points moving, visualiation of the surface with OpenGL > (gluNurbsSurface...) > I'm developing a VTK based application, and now I need to visualize > the NURBS++ surfaces into VTK pipeline, therefore without using > gluNurbsSurface but the VTK rendering > I found in the VTK documentation the class vtkExplicitCell.h that > tells about NURBS surfaces, but I didn't understand how to use it. > (http://davis.lbl.gov/Manuals/VTK-4.5/classvtkExplicitCell.html) > Do you have some suggestion please? > thank you! > > Giancarlo > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers ********************************************************************** This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ********************************************************************** From jothybasu at gmail.com Tue Aug 23 12:30:04 2011 From: jothybasu at gmail.com (Jothy) Date: Tue, 23 Aug 2011 17:30:04 +0100 Subject: [vtkusers] vtkImageData to 3D CArray In-Reply-To: References: Message-ID: Hi David, Now I realized the problem/limitation of multi-dimensional C array! Since I could not find out any example in Google on how to create C arrays with strides, I ended up in using boost multi_array. It's quite good, but the problem is when the array dimensions increase to about 500x500x500, I get a strange run time error. I googled about this and found that the errors occurs when the system can't allocate CONTIGUOUS MEMORY. Now I realize the reason behind your suggestion to use arrays with strides. I am resampling the vtkImageData to 1mm spacing from 2.5mm in all 3 dimensions. So there could be a factor of 8 increase in memory requirement. I tried to set the scalar data type to float even. I desperately need to use 1mm dimensions for my research. I have only 2GB RAM on win XP. I will try on the other computer with higher RAM. Do you have any example or references for creating arrays with strides. You were correct,C array are useless for image processing! Thank you Jothy On Fri, Aug 19, 2011 at 5:29 PM, David Gobbi wrote: > Hi Jothy, > > I'm not telling you to not use a C array. What I'm telling you is > that you should use a 1D C array with strides for each dimension. > Do not use a 3D C array. Read up on strides and learn how to use > them. You'll thank me later. > > - David > > > On Fri, Aug 19, 2011 at 10:23 AM, Jothy wrote: > > Thanks for your reply. > > > > I don't need to do any image processing with that C array. I need to get > the > > scalar values at [x,y,z] for a huge list of points from the vtkImageData > > (they are randomly located). First I tried with > > GetScalarComponentAsDouble(x,y,z,0). > > > > But it's too slow (for my purpose, 20-30 secs). After some Google search, > I > > came to know that acessing array with [] will be much faster that > > GetscalarComponent. > > > > I even looked at vtkImageIterator, it only has methods span, begin,end. > Most > > importantly I need to copy those scalar values for later uses, so mere > > scalar pointers won't help. That's why I am trying to do it with a c > array. > > > > Jothy > > > > On Fri, Aug 19, 2011 at 5:15 PM, David Gobbi > wrote: > >> > >> Hi Jothy, > >> > >> You probably don't want to create a 3D C array. In C, all dimensions > >> of a C array except for the first dimension must be constant. So if > >> you have variables N and M and you try doing this: > >> > >> short myarray[N][M]; > >> > >> then you will get a compile error. Multidimensional C arrays are > >> pretty much useless for image processing, people generally use a > >> 1D array and strides/increments. Do a search for "array strides" on > >> google. > >> > >> - David > >> > >> On Fri, Aug 19, 2011 at 9:54 AM, Jothy wrote: > >> > Hi all, > >> > > >> > I am trying to create a 3D C array form vtkImageData. I tried > >> > vtkImageExport, but I seems like only exporting it as a 1D array. Is > >> > there > >> > any other filter or how to convert it to a 3D array? I am new to c++ > and > >> > I > >> > don't find any matrix manipulation function as in MATLAb or Python in > c > >> > std > >> > lib. > >> > > >> > Thank you > >> > > >> > Jothy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 23 12:44:07 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 23 Aug 2011 10:44:07 -0600 Subject: [vtkusers] vtkImageData to 3D CArray In-Reply-To: References: Message-ID: Hi Jothy, When you run into these "contiguous memory" errors, you can usually temporarily fix the problem by rebooting your computer. All 32-bit Windows systems suffer from severe memory fragmentation, the longer it has been since the last reboot the more severe the problem is. The only real way to fix this is to switch to 64-bit. - David On Tue, Aug 23, 2011 at 10:30 AM, Jothy wrote: > Hi David, > > Now I realized the problem/limitation of multi-dimensional C array! > > Since I could not find out any example in Google on how to create C arrays > with strides, I ended up in using boost multi_array. > It's quite good, but the problem is when the array dimensions increase to > about 500x500x500, I get a strange run time error. I googled about this and > found that the errors occurs when the system can't allocate CONTIGUOUS > MEMORY. > > Now I realize the reason behind your suggestion to use arrays with strides. > I am resampling the vtkImageData to 1mm spacing from 2.5mm in all 3 > dimensions. So there could be a factor of 8 increase in memory requirement. > I tried to set the scalar data type to float even. > > I desperately need to use 1mm dimensions for my research. > > I have only 2GB RAM on win XP. I will try on the other computer with higher > RAM. > > Do you have any example or references for creating arrays with strides. > > You were correct,C array are useless for image processing! > > Thank you > > Jothy > > On Fri, Aug 19, 2011 at 5:29 PM, David Gobbi wrote: >> >> Hi Jothy, >> >> I'm not telling you to not use a C array. ?What I'm telling you is >> that you should use a 1D C array with strides for each dimension. >> Do not use a 3D C array. ?Read up on strides and learn how to use >> them. ?You'll thank me later. >> >> ?- David >> >> >> On Fri, Aug 19, 2011 at 10:23 AM, Jothy wrote: >> > Thanks for your reply. >> > >> > I don't need to do any image processing with that C array. I need to get >> > the >> > scalar values at [x,y,z] for a huge list of points from the vtkImageData >> > (they are randomly located). First I tried with >> > GetScalarComponentAsDouble(x,y,z,0). >> > >> > But it's too slow (for my purpose, 20-30 secs). After some Google >> > search, I >> > came to know that acessing array with [] will be much faster that >> > GetscalarComponent. >> > >> > I even looked at vtkImageIterator, it only has methods span, begin,end. >> > Most >> > importantly I need to copy those scalar values for later uses, so mere >> > scalar pointers won't help. That's why I am trying to do it with a c >> > array. >> > >> > Jothy >> > >> > On Fri, Aug 19, 2011 at 5:15 PM, David Gobbi >> > wrote: >> >> >> >> Hi Jothy, >> >> >> >> You probably don't want to create a 3D C array. ?In C, all dimensions >> >> of a C array except for the first dimension must be constant. ?So if >> >> you have variables N and M and you try doing this: >> >> >> >> short myarray[N][M]; >> >> >> >> then you will get a compile error. ?Multidimensional C arrays are >> >> pretty much useless for image processing, people generally use a >> >> 1D array and strides/increments. ?Do a search for "array strides" on >> >> google. >> >> >> >> ?- David >> >> >> >> On Fri, Aug 19, 2011 at 9:54 AM, Jothy wrote: >> >> > Hi all, >> >> > >> >> > I am trying to create a 3D C array form vtkImageData. I tried >> >> > vtkImageExport, but I seems like only exporting it as a 1D array. Is >> >> > there >> >> > any other filter or how to convert it to a 3D array? I am new to c++ >> >> > and >> >> > I >> >> > don't find any matrix manipulation function as in MATLAb or Python in >> >> > c >> >> > std >> >> > lib. >> >> > >> >> > Thank you >> >> > >> >> > Jothy > > From david.gobbi at gmail.com Tue Aug 23 12:44:07 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 23 Aug 2011 10:44:07 -0600 Subject: [vtkusers] vtkImageData to 3D CArray In-Reply-To: References: Message-ID: Hi Jothy, When you run into these "contiguous memory" errors, you can usually temporarily fix the problem by rebooting your computer. All 32-bit Windows systems suffer from severe memory fragmentation, the longer it has been since the last reboot the more severe the problem is. The only real way to fix this is to switch to 64-bit. - David On Tue, Aug 23, 2011 at 10:30 AM, Jothy wrote: > Hi David, > > Now I realized the problem/limitation of multi-dimensional C array! > > Since I could not find out any example in Google on how to create C arrays > with strides, I ended up in using boost multi_array. > It's quite good, but the problem is when the array dimensions increase to > about 500x500x500, I get a strange run time error. I googled about this and > found that the errors occurs when the system can't allocate CONTIGUOUS > MEMORY. > > Now I realize the reason behind your suggestion to use arrays with strides. > I am resampling the vtkImageData to 1mm spacing from 2.5mm in all 3 > dimensions. So there could be a factor of 8 increase in memory requirement. > I tried to set the scalar data type to float even. > > I desperately need to use 1mm dimensions for my research. > > I have only 2GB RAM on win XP. I will try on the other computer with higher > RAM. > > Do you have any example or references for creating arrays with strides. > > You were correct,C array are useless for image processing! > > Thank you > > Jothy > > On Fri, Aug 19, 2011 at 5:29 PM, David Gobbi wrote: >> >> Hi Jothy, >> >> I'm not telling you to not use a C array. ?What I'm telling you is >> that you should use a 1D C array with strides for each dimension. >> Do not use a 3D C array. ?Read up on strides and learn how to use >> them. ?You'll thank me later. >> >> ?- David >> >> >> On Fri, Aug 19, 2011 at 10:23 AM, Jothy wrote: >> > Thanks for your reply. >> > >> > I don't need to do any image processing with that C array. I need to get >> > the >> > scalar values at [x,y,z] for a huge list of points from the vtkImageData >> > (they are randomly located). First I tried with >> > GetScalarComponentAsDouble(x,y,z,0). >> > >> > But it's too slow (for my purpose, 20-30 secs). After some Google >> > search, I >> > came to know that acessing array with [] will be much faster that >> > GetscalarComponent. >> > >> > I even looked at vtkImageIterator, it only has methods span, begin,end. >> > Most >> > importantly I need to copy those scalar values for later uses, so mere >> > scalar pointers won't help. That's why I am trying to do it with a c >> > array. >> > >> > Jothy >> > >> > On Fri, Aug 19, 2011 at 5:15 PM, David Gobbi >> > wrote: >> >> >> >> Hi Jothy, >> >> >> >> You probably don't want to create a 3D C array. ?In C, all dimensions >> >> of a C array except for the first dimension must be constant. ?So if >> >> you have variables N and M and you try doing this: >> >> >> >> short myarray[N][M]; >> >> >> >> then you will get a compile error. ?Multidimensional C arrays are >> >> pretty much useless for image processing, people generally use a >> >> 1D array and strides/increments. ?Do a search for "array strides" on >> >> google. >> >> >> >> ?- David >> >> >> >> On Fri, Aug 19, 2011 at 9:54 AM, Jothy wrote: >> >> > Hi all, >> >> > >> >> > I am trying to create a 3D C array form vtkImageData. I tried >> >> > vtkImageExport, but I seems like only exporting it as a 1D array. Is >> >> > there >> >> > any other filter or how to convert it to a 3D array? I am new to c++ >> >> > and >> >> > I >> >> > don't find any matrix manipulation function as in MATLAb or Python in >> >> > c >> >> > std >> >> > lib. >> >> > >> >> > Thank you >> >> > >> >> > Jothy > > From david.gobbi at gmail.com Tue Aug 23 12:44:07 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 23 Aug 2011 10:44:07 -0600 Subject: [vtkusers] vtkImageData to 3D CArray In-Reply-To: References: Message-ID: Hi Jothy, When you run into these "contiguous memory" errors, you can usually temporarily fix the problem by rebooting your computer. All 32-bit Windows systems suffer from severe memory fragmentation, the longer it has been since the last reboot the more severe the problem is. The only real way to fix this is to switch to 64-bit. - David On Tue, Aug 23, 2011 at 10:30 AM, Jothy wrote: > Hi David, > > Now I realized the problem/limitation of multi-dimensional C array! > > Since I could not find out any example in Google on how to create C arrays > with strides, I ended up in using boost multi_array. > It's quite good, but the problem is when the array dimensions increase to > about 500x500x500, I get a strange run time error. I googled about this and > found that the errors occurs when the system can't allocate CONTIGUOUS > MEMORY. > > Now I realize the reason behind your suggestion to use arrays with strides. > I am resampling the vtkImageData to 1mm spacing from 2.5mm in all 3 > dimensions. So there could be a factor of 8 increase in memory requirement. > I tried to set the scalar data type to float even. > > I desperately need to use 1mm dimensions for my research. > > I have only 2GB RAM on win XP. I will try on the other computer with higher > RAM. > > Do you have any example or references for creating arrays with strides. > > You were correct,C array are useless for image processing! > > Thank you > > Jothy > > On Fri, Aug 19, 2011 at 5:29 PM, David Gobbi wrote: >> >> Hi Jothy, >> >> I'm not telling you to not use a C array. ?What I'm telling you is >> that you should use a 1D C array with strides for each dimension. >> Do not use a 3D C array. ?Read up on strides and learn how to use >> them. ?You'll thank me later. >> >> ?- David >> >> >> On Fri, Aug 19, 2011 at 10:23 AM, Jothy wrote: >> > Thanks for your reply. >> > >> > I don't need to do any image processing with that C array. I need to get >> > the >> > scalar values at [x,y,z] for a huge list of points from the vtkImageData >> > (they are randomly located). First I tried with >> > GetScalarComponentAsDouble(x,y,z,0). >> > >> > But it's too slow (for my purpose, 20-30 secs). After some Google >> > search, I >> > came to know that acessing array with [] will be much faster that >> > GetscalarComponent. >> > >> > I even looked at vtkImageIterator, it only has methods span, begin,end. >> > Most >> > importantly I need to copy those scalar values for later uses, so mere >> > scalar pointers won't help. That's why I am trying to do it with a c >> > array. >> > >> > Jothy >> > >> > On Fri, Aug 19, 2011 at 5:15 PM, David Gobbi >> > wrote: >> >> >> >> Hi Jothy, >> >> >> >> You probably don't want to create a 3D C array. ?In C, all dimensions >> >> of a C array except for the first dimension must be constant. ?So if >> >> you have variables N and M and you try doing this: >> >> >> >> short myarray[N][M]; >> >> >> >> then you will get a compile error. ?Multidimensional C arrays are >> >> pretty much useless for image processing, people generally use a >> >> 1D array and strides/increments. ?Do a search for "array strides" on >> >> google. >> >> >> >> ?- David >> >> >> >> On Fri, Aug 19, 2011 at 9:54 AM, Jothy wrote: >> >> > Hi all, >> >> > >> >> > I am trying to create a 3D C array form vtkImageData. I tried >> >> > vtkImageExport, but I seems like only exporting it as a 1D array. Is >> >> > there >> >> > any other filter or how to convert it to a 3D array? I am new to c++ >> >> > and >> >> > I >> >> > don't find any matrix manipulation function as in MATLAb or Python in >> >> > c >> >> > std >> >> > lib. >> >> > >> >> > Thank you >> >> > >> >> > Jothy > > From drescherjm at gmail.com Tue Aug 23 13:26:35 2011 From: drescherjm at gmail.com (John Drescher) Date: Tue, 23 Aug 2011 13:26:35 -0400 Subject: [vtkusers] vtkImageData to 3D CArray In-Reply-To: References: Message-ID: > I have only 2GB RAM on win XP. I will try on the other computer with higher > RAM. > That probably will not help much unless you use the /3GB boot switch and recompile everything to support LARGEADDRESSAWARE or much simpler switch to 64 bit os, compiler and application. Under 32 bit windows the default maximum contiguous address space for an application is around 1.2GB regardless of the amount of ram you have. This is due to memory fragmentation and where windows places the dlls in the 2GB of address space it allocates for your process. With the /3GB boot switch and the LARGEADDRESSAWARE linker switch you can increase your application address space to 3GB (again system ram does not matter) but this requires your code and vtk (and all libraries) to be recompiled to support the larger address space. Even then there will be a limit due to fragmentation that may require that you rebase some of your windows dlls. http://social.msdn.microsoft.com/forums/en-us/windowssdk/thread/E65E5454-A35C-4DFD-9532-9284460310E1 I used the /3GB switch and rebasing dlls for some time back in 2008 for processing lung CT with 0.625mm slices however it was more certainly more difficult than using 64 bit os .. that I do now. John From stevec at renci.org Tue Aug 23 13:42:46 2011 From: stevec at renci.org (Steven Chall) Date: Tue, 23 Aug 2011 17:42:46 +0000 Subject: [vtkusers] Turning off the auto highlighting on picked objects Message-ID: <330F028D4BFD4249AA03F5C869E3E2C11B3F78@MAIL-MBX2.ad.renci.org> Hi fellow VTK enthusiasts, I have what is in essence a 3D graph of vtkCubeSource objects from which I select one at a time, sometimes using the standard vtkPicker approach, sometimes using other mechanisms I've coded myself. Whichever mechanism I use to do the picking, I've also coded how I visually highlight/indicate what's been selected; thus, the red wireframe box that the vtkPicker approach leaves around the picked object is at best irrelevant. However, if I follow a vtkPicker-based pick A with a non-vtkPicker-based pick B, that red wireframe box remains around picked object A, even though by the internal logic of my application it's no longer picked. That the vtkPicker object thinks it's still picked doesn't matter to me - I track picking independently of that - but I can't figure out how to remove that red wireframe box that is a consequence of the vtkPicker's "picked" state. I'd imagine it's just a wireframe vtkCubeSource or the like and that it would have something to do with the vtkPicker's vtkActor's vtkProperty's bounds (as in picker->GetActor()->GetProperty->GetBounds(bounds), where bounds is an array of 6 floats and picker is a vtkPicker *), but snooping around in the source code hasn't gotten me to find where that red bounding box is drawn. Any suggestions on how I can turn it off and just generally access it? Thanks. Steve -Steve Chall Senior Research Software Developer Renaissance Computing Institute (RENCI) Phone: 919-681-9639 Email: stevec at renci.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From taijinian at gmail.com Tue Aug 23 14:00:43 2011 From: taijinian at gmail.com (Jenya Burstein) Date: Tue, 23 Aug 2011 11:00:43 -0700 Subject: [vtkusers] Is antiaaliasing not supported in VTK Charts? Message-ID: Hello, It appears that calling vtkRenderWindow::SetAAFrames() doesn't result in an antialiased vtk Charts based plot. Is that a known limitation? Best Regards, Jenya Burstein -------------- next part -------------- An HTML attachment was scrubbed... URL: From kacper.pluta at gmail.com Tue Aug 23 14:03:02 2011 From: kacper.pluta at gmail.com (Kacper Pluta) Date: Tue, 23 Aug 2011 20:03:02 +0200 Subject: [vtkusers] manipulation of the scene Message-ID: Hi! How do I rotate the whole scene? But I do not mean the camera. -- "If you build your empire on money, it'll fall like a house of cards, if you build it on love, you've built Taj Mahal!" - Mark Hartmaier -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Tue Aug 23 14:05:16 2011 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Tue, 23 Aug 2011 14:05:16 -0400 Subject: [vtkusers] Is antiaaliasing not supported in VTK Charts? In-Reply-To: References: Message-ID: On Tue, Aug 23, 2011 at 2:00 PM, Jenya Burstein wrote: > Hello, > > It appears that calling vtkRenderWindow::SetAAFrames() doesn't result in an > antialiased vtk Charts based plot. Is that a known limitation? > I have some pending fixes I need to get merged in to improve the situation. Marcus From daviddoria at gmail.com Tue Aug 23 14:30:13 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 23 Aug 2011 14:30:13 -0400 Subject: [vtkusers] CaptionActor2D text chopped off Message-ID: Hi all, I was experimenting with CaptionActor2D: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CaptionActor2D by using it to sequentially mark pixels in an image that the user clicks. It seems to work great except that the right side of each character seems to be chopped off? Even if I add additional text to the number: ss << Numbers.size() << " hi"; the number is still chopped. Can anyone reproduce or explain this behavior? Thanks, David From emonson at cs.duke.edu Tue Aug 23 15:07:51 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Tue, 23 Aug 2011 15:07:51 -0400 Subject: [vtkusers] Turning off the auto highlighting on picked objects In-Reply-To: <330F028D4BFD4249AA03F5C869E3E2C11B3F78@MAIL-MBX2.ad.renci.org> References: <330F028D4BFD4249AA03F5C869E3E2C11B3F78@MAIL-MBX2.ad.renci.org> Message-ID: <73B0AEB3-EAF5-436E-8585-3F7E714C2A56@cs.duke.edu> Hey Steve, I probably shouldn't be stepping in here since I don't use picking that often, but... So, it sounds like you're not populating a vtkSelection with your results, so you may want to try calling Initialize() on your picker, which clears out its list of actors and prop3ds. Otherwise, vtkAbstractPicker has an InitializePickList(), which clears out its vtkPropCollection... Talk to you later, -Eric On Aug 23, 2011, at 1:42 PM, Steven Chall wrote: > Hi fellow VTK enthusiasts, > I have what is in essence a 3D graph of vtkCubeSource objects from which I select one at a time, sometimes using the standard vtkPicker approach, sometimes using other mechanisms I?ve coded myself. Whichever mechanism I use to do the picking, I?ve also coded how I visually highlight/indicate what?s been selected; thus, the red wireframe box that the vtkPicker approach leaves around the picked object is at best irrelevant. However, if I follow a vtkPicker-based pick A with a non-vtkPicker-based pick B, that red wireframe box remains around picked object A, even though by the internal logic of my application it?s no longer picked. > > That the vtkPicker object thinks it?s still picked doesn?t matter to me ? I track picking independently of that ? but I can?t figure out how to remove that red wireframe box that is a consequence of the vtkPicker?s ?picked? state. I?d imagine it?s just a wireframe vtkCubeSource or the like and that it would have something to do with the vtkPicker?s vtkActor?s vtkProperty?s bounds (as in picker->GetActor()->GetProperty->GetBounds(bounds), where bounds is an array of 6 floats and picker is a vtkPicker *), but snooping around in the source code hasn?t gotten me to find where that red bounding box is drawn. Any suggestions on how I can turn it off and just generally access it? Thanks. > > Steve > > > -Steve Chall > Senior Research Software Developer > Renaissance Computing Institute (RENCI) > Phone: 919-681-9639 > Email: stevec at renci.org > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects athttp://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://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From kacper.pluta at gmail.com Tue Aug 23 15:50:17 2011 From: kacper.pluta at gmail.com (Kacper Pluta) Date: Tue, 23 Aug 2011 21:50:17 +0200 Subject: [vtkusers] A few questions about vtkAssembly Message-ID: Is it possible to update the coordinates of the elements of vtkAssembly, after moving the whole vtkAssembly? -- "If you build your empire on money, it'll fall like a house of cards, if you build it on love, you've built Taj Mahal!" - Mark Hartmaier -------------- next part -------------- An HTML attachment was scrubbed... URL: From wayne at 4raccoons.com Tue Aug 23 16:35:56 2011 From: wayne at 4raccoons.com (Wayne Christopher) Date: Tue, 23 Aug 2011 13:35:56 -0700 Subject: [vtkusers] Text annotations in 3D window In-Reply-To: <4DFA7003.1070206@4raccoons.com> References: <4DF94CA5.8090606@4raccoons.com> <4DFA7003.1070206@4raccoons.com> Message-ID: <4E540F2C.7090604@4raccoons.com> FYI, if anybody else is curious, vtkCaptionActor2D does exactly what I need... Wayne On 6/16/11 2:05 PM, Wayne Christopher wrote: > What I mean is, I would like the text to be readable no matter what > the model transformation is. With raw OpenGL I used to do something > like this (I don't have the original code): > > glXUseXFont( ... ); > glRasterPos3xv(xyz_pos); > glListBase(...) > glCallLists(....,string_to_draw); > > Thanks, > > Wayne > > On 6/16/11 1:46 PM, Aashish Chaudhary wrote: >> Hi Wayne, >> >> On Wed, Jun 15, 2011 at 8:21 PM, Wayne >> Christopher wrote: >>> I would like to place text annotations at specific 3D points. I can >>> do this >>> using vtkVectorText and vtkFollower, but the text appears with a >>> specific >>> size and orientation in 3D so when I move the camera it can be hard >>> to read. >> Yes, this is a known issue. >> >>> I would like the text to always be N pixels high and oriented >>> correctly in >>> the plane of the screen, but have its position fixed to a specific 3D >>> location. >> So I understood the first part. Can you describe what you exactly >> meant by "oriented correctly"? >> >> >> Are there any examples of this? Thanks, >>> Wayne >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://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://www.vtk.org/mailman/listinfo/vtkusers >>> >> >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From wayne at 4raccoons.com Tue Aug 23 16:56:14 2011 From: wayne at 4raccoons.com (Wayne Christopher) Date: Tue, 23 Aug 2011 13:56:14 -0700 Subject: [vtkusers] CaptionActor2D text chopped off In-Reply-To: References: Message-ID: <4E5413EE.4020000@4raccoons.com> I was able to make the text look nicer by calling BoldOff(), ItalicOff(), ShadowOff() on the CaptionTextProperty(). For some reason these are all on by default in vtkCaptionActor2Ds whereas they are off by default for vtkTextActors. Wayne On 8/23/11 11:30 AM, David Doria wrote: > Hi all, > > I was experimenting with CaptionActor2D: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CaptionActor2D > > by using it to sequentially mark pixels in an image that the user > clicks. It seems to work great except that the right side of each > character seems to be chopped off? > > Even if I add additional text to the number: > > ss<< Numbers.size()<< " hi"; > > the number is still chopped. > > Can anyone reproduce or explain this behavior? > > Thanks, > > 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://www.vtk.org/mailman/listinfo/vtkusers From taijinian at gmail.com Tue Aug 23 17:57:42 2011 From: taijinian at gmail.com (Jenya Burstein) Date: Tue, 23 Aug 2011 14:57:42 -0700 Subject: [vtkusers] Exporting a PNG image brings up a new window. Message-ID: Hello, I am having a problem of adding a PNG export capability to an application. Below is the functions that I use to export a PNG image. The problem is that when running the applicaton remotly over Exceed X server from Linux, a new window is displayed during vtkPNGWriter's Write() method. That doesn't happen on Windows. Is there a way to prevent that? Obviously, that is a very undesirable side-effect - the window is as large as the requested image size and it stays for the duration of the image export. It then disappears. Any advice is greatly appreciated, Jenya Burstein. void exportVTKPlotImage(vtkRenderWindow& renderWindow) const { vtkSmartPointer exportingRenderWindow = vtkSmartPointer::New(); exportingRenderWindow->OffScreenRenderingOn(); exportingRenderWindow->SetSize(1024, 768); vtkSmartPointer renderer = renderWindow.GetRenderers()->GetFirstRenderer(); exportingRenderWindow->AddRenderer(renderer); vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(exportingRenderWindow); vtkSmartPointer pngWriter = vtkSmartPointer::New(); pngWriter->SetInputConnection(windowToImageFilter->GetOutputPort()); pngWriter->SetFileName(file->absolutePath().c_str()); pngWriter->Write(); exportingRenderWindow->RemoveRenderer(renderer); renderer->SetRenderWindow(&renderWindow); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Tue Aug 23 18:25:33 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 23 Aug 2011 18:25:33 -0400 Subject: [vtkusers] CaptionActor2D text chopped off In-Reply-To: <4E5413EE.4020000@4raccoons.com> References: <4E5413EE.4020000@4raccoons.com> Message-ID: On Tue, Aug 23, 2011 at 4:56 PM, Wayne Christopher wrote: > I was able to make the text look nicer by calling BoldOff(), ItalicOff(), > ShadowOff() on the CaptionTextProperty(). ?For some reason these are all on > by default in vtkCaptionActor2Ds whereas they are off by default for > vtkTextActors. > > ? ?Wayne Ah, the shadow was the main problem, thanks! David From alexmalvtk at gmail.com Tue Aug 23 19:43:18 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Tue, 23 Aug 2011 16:43:18 -0700 Subject: [vtkusers] simple vtk application In-Reply-To: <1314095212.1946.23.camel@florian-desktop> References: <1314095212.1946.23.camel@florian-desktop> Message-ID: First, there are a multiple ways you can do things in vtk. Using multiple actors make sense only if you need an ability easy separate object from other objects and might be not efficient if you have large number of objects ( if your data has more than few hundred objects (pieces/files,) I will avoid using one actor per object. You also probably don't need multiple renderers. In my practice mostly often I used 2 designs: 1. per file: Reader -> filter -> actor One window and one renderer per application 2 per file: Reader -> filter -> every filter(s) output goes to combining filter as an input (for example vtkAppendPolyData) combining filter-> actor -> still one window and one renderer per application On Tue, Aug 23, 2011 at 3:26 AM, Florian Bruckner wrote: > hi, i'm new to vtk and i have a few design questions. I want to write a > simple visualization tool for our data. It should support multiple input > files and different filters for each input file. Each filter then needs > a mapper and an actor, if I understand that correctly. All those things > should be put into an new class asdf_input. > > Finally there is an renderer window where the data should be displayed. > So I would add the proper actors from the asdf_input object and add them > to multiple renderers. Then these multiple renderers are added to the > renderer window. All these things are put into another class > asdf_output. > > So this is the first plan. But after looking over the vtk class > reference i found vtkView, vtkDataRepresentation, ... and i was > wondering whether there is already something very similar available. > > So my question is whether there is already some top-level class > available, which allows to simplify the handling of multiple > input/filters/renderers. > > greetings > Florian > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers > From e0425375 at gmail.com Tue Aug 23 22:04:47 2011 From: e0425375 at gmail.com (Florian Bruckner) Date: Wed, 24 Aug 2011 04:04:47 +0200 Subject: [vtkusers] simple vtk application In-Reply-To: References: <1314095212.1946.23.camel@florian-desktop> Message-ID: ok, but can you tell which one of the 2 designs is more efficient for some cases: In my case i have multiple files that should be displayed at once (say max. 16. If I have time-series then there will always be max.16 files at a time). These files contain an unstructured grid as well as some vector / scalar data. Mainly I want to be able to display the grid and then toggle the vectordata (glyph) on and off. The scalar data should only change the color. So my intention was to create one mapper/actor for the structure and one mapper/actor for the glyph per file. Switching glyph on and off is then done by simple adding / removing the mapper to the proper renderer (there could be more than one if some files should be displayed next to each other). so this approximately would give 2*16 actors which are active at a time. do you think this could be a performance problem? if i would use this combine-filter i cannot control the color settings of structure and glyph seperately, right? because then this method is no option for me. E.g. I would like display the geometry with opacity and gray color if the glyph is switched on. thanks Alex for your fast reply FloB On Wed, Aug 24, 2011 at 1:43 AM, Alex Malyushytskyy wrote: > First, there are a multiple ways you can do things in vtk. > > Using multiple actors make sense only if you need an ability easy > separate object from other objects and might be not efficient > if you have large number of objects ( if your data has more than few > hundred objects (pieces/files,) I will avoid using one actor per > object. > > You also probably don't need multiple renderers. > > In my practice mostly often I used 2 designs: > > 1. ?per file: Reader -> filter -> actor > One window and one renderer per application > > 2 ?per file: Reader -> filter -> > > every filter(s) output goes to combining filter as an input (for > example vtkAppendPolyData) > > combining filter-> actor -> > still one ?window and one renderer per application > > > > > > On Tue, Aug 23, 2011 at 3:26 AM, Florian Bruckner wrote: >> hi, i'm new to vtk and i have a few design questions. I want to write a >> simple visualization tool for our data. It should support multiple input >> files and different filters for each input file. Each filter then needs >> a mapper and an actor, if I understand that correctly. All those things >> should be put into an new class asdf_input. >> >> Finally there is an renderer window where the data should be displayed. >> So I would add the proper actors from the asdf_input object and add them >> to multiple renderers. Then these multiple renderers are added to the >> renderer window. All these things are put into another class >> asdf_output. >> >> So this is the first plan. But after looking over the vtk class >> reference i found vtkView, vtkDataRepresentation, ... and i was >> wondering whether there is already something very similar available. >> >> So my question is whether there is already some top-level class >> available, which allows to simplify the handling of multiple >> input/filters/renderers. >> >> greetings >> Florian >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From tan3long at gmail.com Wed Aug 24 03:38:35 2011 From: tan3long at gmail.com (tan3long) Date: Wed, 24 Aug 2011 00:38:35 -0700 (PDT) Subject: [vtkusers] How to convert vtkpolydata to image? Message-ID: <1314171515316-4729551.post@n5.nabble.com> Hi, As the title,how can I get image output from vtkpolydata?Which filters can I use?Any examples? Thank you for your attention -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-convert-vtkpolydata-to-image-tp4729551p4729551.html Sent from the VTK - Users mailing list archive at Nabble.com. From quantum.leaf at gmail.com Wed Aug 24 04:07:10 2011 From: quantum.leaf at gmail.com (Liam Kurmos) Date: Wed, 24 Aug 2011 09:07:10 +0100 Subject: [vtkusers] How to convert vtkpolydata to image? In-Reply-To: <1314171515316-4729551.post@n5.nabble.com> References: <1314171515316-4729551.post@n5.nabble.com> Message-ID: you can find many examples on the vtk wiki of how to use vtk eg. http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere (a vtkSphereSources outputs a polydata) Liam On Wed, Aug 24, 2011 at 8:38 AM, tan3long wrote: > Hi, > > As the title,how can I get image output from vtkpolydata?Which filters can I > use?Any examples? > Thank you for your attention > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-convert-vtkpolydata-to-image-tp4729551p4729551.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://www.vtk.org/mailman/listinfo/vtkusers > From Claire.Fanny1995 at gmail.com Wed Aug 24 04:37:53 2011 From: Claire.Fanny1995 at gmail.com (Claire.Fanny) Date: Wed, 24 Aug 2011 01:37:53 -0700 (PDT) Subject: [vtkusers] Volume Rendering In-Reply-To: References: <1314085998226-4725863.post@n5.nabble.com> Message-ID: <1314175073013-4729687.post@n5.nabble.com> Well fine can you smple of gdcm. Regards Claire Fanny Software Developer -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-tp4725863p4729687.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Wed Aug 24 04:49:37 2011 From: jothybasu at gmail.com (Jothy) Date: Wed, 24 Aug 2011 09:49:37 +0100 Subject: [vtkusers] How to convert vtkpolydata to image? In-Reply-To: <1314171515316-4729551.post@n5.nabble.com> References: <1314171515316-4729551.post@n5.nabble.com> Message-ID: Look at vtkPolyDataToImageStencil and vtkImageDataGeometryFilter. Jothy On Wed, Aug 24, 2011 at 8:38 AM, tan3long wrote: > Hi, > > As the title,how can I get image output from vtkpolydata?Which filters can > I > use?Any examples? > Thank you for your attention > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-convert-vtkpolydata-to-image-tp4729551p4729551.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tan3long at gmail.com Wed Aug 24 05:19:50 2011 From: tan3long at gmail.com (Gauler Tan) Date: Wed, 24 Aug 2011 17:19:50 +0800 Subject: [vtkusers] How to convert vtkpolydata to image? In-Reply-To: <1314171515316-4729551.post@n5.nabble.com> References: <1314171515316-4729551.post@n5.nabble.com> Message-ID: I want to write an image as output(vtkJPEGWriter) from polydata(vtkCutter.getOutput()). I tried vtkDataSetToImageDataFilter,but failed...... What is the problem? Error Message is as below: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00220034, pid=4632, tid=1524 # # JRE version: 6.0_26-b03 # Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing windows-x86 ) # Problematic frame: # C 0x00220034 # # An error report file with more information is saved as: # D:\Workspaces\eclipse\Plane\hs_err_pid4632.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # 2011/8/24 tan3long > Hi, > > As the title,how can I get image output from vtkpolydata?Which filters can > I > use?Any examples? > Thank you for your attention > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-convert-vtkpolydata-to-image-tp4729551p4729551.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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oldrich.svec at gmail.com Wed Aug 24 05:22:53 2011 From: oldrich.svec at gmail.com (Oldrich Svec) Date: Wed, 24 Aug 2011 11:22:53 +0200 Subject: [vtkusers] Disconnected 3D lines segments Message-ID: Hi, I try to save an array of disconnected 3D line segments using Activiz .NET. I use the following sample code: points = vtkPoints.New() lines = vtkCellArray.New() id1 = points.InsertNextPoint(0.,0.,0.) id2 = points.InsertNextPoint(1.,0.,0.) id3 = points.InsertNextPoint(0.,1.,0.) id4 = points.InsertNextPoint(0.,0.,1.) line = vtkLine.New() line.GetPointIds().InsertNextId id1 line.GetPointIds().InsertNextId id2 lines.InsertNextCell line line = vtkLine.New() line.GetPointIds().InsertNextId id3 line.GetPointIds().InsertNextId id4 lines.InsertNextCell line poly = vtkPolyData.New() poly.SetPoints points poly.SetLines lines vtp = vtkPolyDataWriter.New() vtp.SetFileName @"D:\\test.vtk" vtp.SetFileTypeToASCII() vtp.SetInput poly vtp.Write() Those lines are however connected. How to make the two lines disconnected? PS: I obtain this vtk: # vtk DataFile Version 3.0 vtk output ASCII DATASET POLYDATA POINTS 4 float 0 0 0 1 0 0 0 1 0 0 0 1 LINES 2 10 4 0 0 0 1 4 0 0 2 3 and I want to obtain this vtk: # vtk DataFile Version 3.0 vtk output ASCII DATASET POLYDATA POINTS 4 float 0 0 0 1 0 0 0 1 0 0 0 1 LINES 2 6 2 0 1 2 2 3 From dzenanz at gmail.com Wed Aug 24 06:00:59 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 24 Aug 2011 12:00:59 +0200 Subject: [vtkusers] manipulation of the scene In-Reply-To: References: Message-ID: If you don't want to manipulate the camera, you can put the whole scene into an vtkAssembly and then apply transformation to it. On Tue, Aug 23, 2011 at 20:03, Kacper Pluta wrote: > Hi! > > How do I rotate the whole scene? But I do not mean the camera. > > -- > "If you build your empire on money, it'll fall like a house of cards, if > you build it on love, you've built Taj Mahal!" - Mark Hartmaier > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Wed Aug 24 06:17:25 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 24 Aug 2011 12:17:25 +0200 Subject: [vtkusers] simple vtk application In-Reply-To: References: <1314095212.1946.23.camel@florian-desktop> Message-ID: Hundred independent actors is quite normal, the performance problems start occurring with many thousands of actors. You don't have to remove actors, you can turn off their visibility actor->SetVisibility(0); On Wed, Aug 24, 2011 at 04:04, Florian Bruckner wrote: > ok, but can you tell which one of the 2 designs is more efficient for > some cases: > > In my case i have multiple files that should be displayed at once (say > max. 16. If I have time-series then there will always be max.16 files > at a time). These files contain an unstructured grid as well as some > vector / scalar data. Mainly I want to be able to display the grid and > then toggle the vectordata (glyph) on and off. The scalar data should > only change the color. So my intention was to create one mapper/actor > for the structure and one mapper/actor for the glyph per file. > Switching glyph on and off is then done by simple adding / removing > the mapper to the proper renderer (there could be more than one if > some files should be displayed next to each other). so this > approximately would give 2*16 actors which are active at a time. do > you think this could be a performance problem? > > if i would use this combine-filter i cannot control the color settings > of structure and glyph seperately, right? because then this method is > no option for me. E.g. I would like display the geometry with opacity > and gray color if the glyph is switched on. > > thanks Alex for your fast reply > FloB > > > On Wed, Aug 24, 2011 at 1:43 AM, Alex Malyushytskyy > wrote: > > First, there are a multiple ways you can do things in vtk. > > > > Using multiple actors make sense only if you need an ability easy > > separate object from other objects and might be not efficient > > if you have large number of objects ( if your data has more than few > > hundred objects (pieces/files,) I will avoid using one actor per > > object. > > > > You also probably don't need multiple renderers. > > > > In my practice mostly often I used 2 designs: > > > > 1. per file: Reader -> filter -> actor > > One window and one renderer per application > > > > 2 per file: Reader -> filter -> > > > > every filter(s) output goes to combining filter as an input (for > > example vtkAppendPolyData) > > > > combining filter-> actor -> > > still one window and one renderer per application > > > > > > > > > > > > On Tue, Aug 23, 2011 at 3:26 AM, Florian Bruckner > wrote: > >> hi, i'm new to vtk and i have a few design questions. I want to write a > >> simple visualization tool for our data. It should support multiple input > >> files and different filters for each input file. Each filter then needs > >> a mapper and an actor, if I understand that correctly. All those things > >> should be put into an new class asdf_input. > >> > >> Finally there is an renderer window where the data should be displayed. > >> So I would add the proper actors from the asdf_input object and add them > >> to multiple renderers. Then these multiple renderers are added to the > >> renderer window. All these things are put into another class > >> asdf_output. > >> > >> So this is the first plan. But after looking over the vtk class > >> reference i found vtkView, vtkDataRepresentation, ... and i was > >> wondering whether there is already something very similar available. > >> > >> So my question is whether there is already some top-level class > >> available, which allows to simplify the handling of multiple > >> input/filters/renderers. > >> > >> greetings > >> Florian > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > >> > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Wed Aug 24 06:22:53 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 24 Aug 2011 12:22:53 +0200 Subject: [vtkusers] How to convert vtkpolydata to image? In-Reply-To: References: <1314171515316-4729551.post@n5.nabble.com> Message-ID: Maybe this is what you are looking for: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot On Wed, Aug 24, 2011 at 11:19, Gauler Tan wrote: > I want to write an image as output(vtkJPEGWriter) from > polydata(vtkCutter.getOutput()). > > I tried vtkDataSetToImageDataFilter,but failed...... > > What is the problem? > > Error Message is as below: > > # > # A fatal error has been detected by the Java Runtime Environment: > # > # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00220034, pid=4632, > tid=1524 > # > # JRE version: 6.0_26-b03 > # Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing > windows-x86 ) > # Problematic frame: > # C 0x00220034 > # > # An error report file with more information is saved as: > # D:\Workspaces\eclipse\Plane\hs_err_pid4632.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # The crash happened outside the Java Virtual Machine in native code. > # See problematic frame for where to report the bug. > # > > 2011/8/24 tan3long > >> Hi, >> >> As the title,how can I get image output from vtkpolydata?Which filters can >> I >> use?Any examples? >> Thank you for your attention >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/How-to-convert-vtkpolydata-to-image-tp4729551p4729551.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://www.vtk.org/mailman/listinfo/vtkusers >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From e0425375 at gmail.com Wed Aug 24 06:45:01 2011 From: e0425375 at gmail.com (Florian Bruckner) Date: Wed, 24 Aug 2011 12:45:01 +0200 Subject: [vtkusers] simple vtk application In-Reply-To: References: <1314095212.1946.23.camel@florian-desktop> Message-ID: <1314182701.3199.9.camel@florian-desktop> ah, ok! a (hopefully) last question: i just implemented the first prototype of my application and i was facing the following problem: How can i add/remove a filter in the middle of a pipeline? i first create a pipeline which draws my geometry as well as some glyphs, ... But then there should be a switch which allows to apply a clipping filter. I know the object that the filter should act on. But i do not know which other objects have been connected to the original one. is there a method to find in a general way, what parts are connected to a given vtkAlgorithm? or do i have to do the bookkeeping on my own? greetings Florian On Wed, 2011-08-24 at 12:17 +0200, D?enan Zuki? wrote: > Hundred independent actors is quite normal, the performance problems > start occurring with many thousands of actors. > > > You don't have to remove actors, you can turn off their visibility > > actor->SetVisibility(0); > > > On Wed, Aug 24, 2011 at 04:04, Florian Bruckner > wrote: > ok, but can you tell which one of the 2 designs is more > efficient for > some cases: > > In my case i have multiple files that should be displayed at > once (say > max. 16. If I have time-series then there will always be > max.16 files > at a time). These files contain an unstructured grid as well > as some > vector / scalar data. Mainly I want to be able to display the > grid and > then toggle the vectordata (glyph) on and off. The scalar data > should > only change the color. So my intention was to create one > mapper/actor > for the structure and one mapper/actor for the glyph per file. > Switching glyph on and off is then done by simple adding / > removing > the mapper to the proper renderer (there could be more than > one if > some files should be displayed next to each other). so this > approximately would give 2*16 actors which are active at a > time. do > you think this could be a performance problem? > > if i would use this combine-filter i cannot control the color > settings > of structure and glyph seperately, right? because then this > method is > no option for me. E.g. I would like display the geometry with > opacity > and gray color if the glyph is switched on. > > thanks Alex for your fast reply > FloB > > > > On Wed, Aug 24, 2011 at 1:43 AM, Alex Malyushytskyy > wrote: > > First, there are a multiple ways you can do things in vtk. > > > > Using multiple actors make sense only if you need an ability > easy > > separate object from other objects and might be not > efficient > > if you have large number of objects ( if your data has more > than few > > hundred objects (pieces/files,) I will avoid using one actor > per > > object. > > > > You also probably don't need multiple renderers. > > > > In my practice mostly often I used 2 designs: > > > > 1. per file: Reader -> filter -> actor > > One window and one renderer per application > > > > 2 per file: Reader -> filter -> > > > > every filter(s) output goes to combining filter as an input > (for > > example vtkAppendPolyData) > > > > combining filter-> actor -> > > still one window and one renderer per application > > > > > > > > > > > > On Tue, Aug 23, 2011 at 3:26 AM, Florian Bruckner > wrote: > >> hi, i'm new to vtk and i have a few design questions. I > want to write a > >> simple visualization tool for our data. It should support > multiple input > >> files and different filters for each input file. Each > filter then needs > >> a mapper and an actor, if I understand that correctly. All > those things > >> should be put into an new class asdf_input. > >> > >> Finally there is an renderer window where the data should > be displayed. > >> So I would add the proper actors from the asdf_input object > and add them > >> to multiple renderers. Then these multiple renderers are > added to the > >> renderer window. All these things are put into another > class > >> asdf_output. > >> > >> So this is the first plan. But after looking over the vtk > class > >> reference i found vtkView, vtkDataRepresentation, ... and i > was > >> wondering whether there is already something very similar > available. > >> > >> So my question is whether there is already some top-level > class > >> available, which allows to simplify the handling of > multiple > >> input/filters/renderers. > >> > >> greetings > >> Florian > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > >> > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > From dzenanz at gmail.com Wed Aug 24 07:08:35 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 24 Aug 2011 13:08:35 +0200 Subject: [vtkusers] simple vtk application In-Reply-To: <1314182701.3199.9.camel@florian-desktop> References: <1314095212.1946.23.camel@florian-desktop> <1314182701.3199.9.camel@florian-desktop> Message-ID: I really cannot answer that because I do not like the filter pipeline approach and I don't use it extensively - I mostly use it to produce their output which I then keep in memory and use it as needed. 2011/8/24 Florian Bruckner > ah, ok! a (hopefully) last question: i just implemented the first > prototype of my application and i was facing the following problem: How > can i add/remove a filter in the middle of a pipeline? > > i first create a pipeline which draws my geometry as well as some > glyphs, ... But then there should be a switch which allows to apply a > clipping filter. I know the object that the filter should act on. But i > do not know which other objects have been connected to the original > one. > > is there a method to find in a general way, what parts are connected to > a given vtkAlgorithm? or do i have to do the bookkeeping on my own? > > greetings > Florian > > > On Wed, 2011-08-24 at 12:17 +0200, D?enan Zuki? wrote: > > Hundred independent actors is quite normal, the performance problems > > start occurring with many thousands of actors. > > > > > > You don't have to remove actors, you can turn off their visibility > > > > actor->SetVisibility(0); > > > > > > On Wed, Aug 24, 2011 at 04:04, Florian Bruckner > > wrote: > > ok, but can you tell which one of the 2 designs is more > > efficient for > > some cases: > > > > In my case i have multiple files that should be displayed at > > once (say > > max. 16. If I have time-series then there will always be > > max.16 files > > at a time). These files contain an unstructured grid as well > > as some > > vector / scalar data. Mainly I want to be able to display the > > grid and > > then toggle the vectordata (glyph) on and off. The scalar data > > should > > only change the color. So my intention was to create one > > mapper/actor > > for the structure and one mapper/actor for the glyph per file. > > Switching glyph on and off is then done by simple adding / > > removing > > the mapper to the proper renderer (there could be more than > > one if > > some files should be displayed next to each other). so this > > approximately would give 2*16 actors which are active at a > > time. do > > you think this could be a performance problem? > > > > if i would use this combine-filter i cannot control the color > > settings > > of structure and glyph seperately, right? because then this > > method is > > no option for me. E.g. I would like display the geometry with > > opacity > > and gray color if the glyph is switched on. > > > > thanks Alex for your fast reply > > FloB > > > > > > > > On Wed, Aug 24, 2011 at 1:43 AM, Alex Malyushytskyy > > wrote: > > > First, there are a multiple ways you can do things in vtk. > > > > > > Using multiple actors make sense only if you need an ability > > easy > > > separate object from other objects and might be not > > efficient > > > if you have large number of objects ( if your data has more > > than few > > > hundred objects (pieces/files,) I will avoid using one actor > > per > > > object. > > > > > > You also probably don't need multiple renderers. > > > > > > In my practice mostly often I used 2 designs: > > > > > > 1. per file: Reader -> filter -> actor > > > One window and one renderer per application > > > > > > 2 per file: Reader -> filter -> > > > > > > every filter(s) output goes to combining filter as an input > > (for > > > example vtkAppendPolyData) > > > > > > combining filter-> actor -> > > > still one window and one renderer per application > > > > > > > > > > > > > > > > > > On Tue, Aug 23, 2011 at 3:26 AM, Florian Bruckner > > wrote: > > >> hi, i'm new to vtk and i have a few design questions. I > > want to write a > > >> simple visualization tool for our data. It should support > > multiple input > > >> files and different filters for each input file. Each > > filter then needs > > >> a mapper and an actor, if I understand that correctly. All > > those things > > >> should be put into an new class asdf_input. > > >> > > >> Finally there is an renderer window where the data should > > be displayed. > > >> So I would add the proper actors from the asdf_input object > > and add them > > >> to multiple renderers. Then these multiple renderers are > > added to the > > >> renderer window. All these things are put into another > > class > > >> asdf_output. > > >> > > >> So this is the first plan. But after looking over the vtk > > class > > >> reference i found vtkView, vtkDataRepresentation, ... and i > > was > > >> wondering whether there is already something very similar > > available. > > >> > > >> So my question is whether there is already some top-level > > class > > >> available, which allows to simplify the handling of > > multiple > > >> input/filters/renderers. > > >> > > >> greetings > > >> Florian > > >> > > >> > > >> _______________________________________________ > > >> Powered by www.kitware.com > > >> > > >> Visit other Kitware open-source projects at > > http://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://www.vtk.org/mailman/listinfo/vtkusers > > >> > > > _______________________________________________ > > > Powered by www.kitware.com > > > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > > > Follow this link to subscribe/unsubscribe: > > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nsarrasin at phenix-systems.com Wed Aug 24 08:01:10 2011 From: nsarrasin at phenix-systems.com (nsarrasin) Date: Wed, 24 Aug 2011 05:01:10 -0700 (PDT) Subject: [vtkusers] Problem with QVTKWidget not expanding in win7. In-Reply-To: References: Message-ID: <1314187270839-4730175.post@n5.nabble.com> Hi all, I'm re-opening this post because I encounter the same problem. For example, displaying a contextual menu above the qvtkwidget, with aero disabled, freeze the refreshing of the window. For the moment, the only solution I have is to turn aero on. Any news since the last post ? Thanks by advance -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-QVTKWidget-not-expanding-in-win7-tp4533383p4730175.html Sent from the VTK - Users mailing list archive at Nabble.com. From emonson at cs.duke.edu Wed Aug 24 08:53:59 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Wed, 24 Aug 2011 08:53:59 -0400 Subject: [vtkusers] Disconnected 3D lines segments In-Reply-To: References: Message-ID: Hello, For me it works to explicitly set the Ids of the lines using SetId rather than using InsertNextId. My guess is that vtkLine is initialized with two points with both of their IDs set to 0, and then you're adding two new IDs on to the end of that vtkIdList. (Sorry if my syntax is wrong, I don't know VB and used C# to test...) line = vtkLine.New() line.GetPointIds().SetId 0 id1 line.GetPointIds().SetId 1 id2 lines.InsertNextCell line line = vtkLine.New() line.GetPointIds().SetId 0 id3 line.GetPointIds().SetId 1 id4 lines.InsertNextCell line Good luck, -Eric ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Eric E Monson Duke Visualization Technology Group On Aug 24, 2011, at 5:22 AM, Oldrich Svec wrote: > Hi, > > I try to save an array of disconnected 3D line segments using Activiz > .NET. I use the following sample code: > > points = vtkPoints.New() > lines = vtkCellArray.New() > > id1 = points.InsertNextPoint(0.,0.,0.) > id2 = points.InsertNextPoint(1.,0.,0.) > id3 = points.InsertNextPoint(0.,1.,0.) > id4 = points.InsertNextPoint(0.,0.,1.) > > line = vtkLine.New() > line.GetPointIds().InsertNextId id1 > line.GetPointIds().InsertNextId id2 > lines.InsertNextCell line > > line = vtkLine.New() > line.GetPointIds().InsertNextId id3 > line.GetPointIds().InsertNextId id4 > lines.InsertNextCell line > > poly = vtkPolyData.New() > poly.SetPoints points > poly.SetLines lines > > vtp = vtkPolyDataWriter.New() > vtp.SetFileName @"D:\\test.vtk" > vtp.SetFileTypeToASCII() > vtp.SetInput poly > vtp.Write() > > Those lines are however connected. How to make the two lines disconnected? > > PS: I obtain this vtk: > > # vtk DataFile Version 3.0 > vtk output > ASCII > DATASET POLYDATA > POINTS 4 float > 0 0 0 1 0 0 0 1 0 > 0 0 1 > LINES 2 10 > 4 0 0 0 1 > 4 0 0 2 3 > > and I want to obtain this vtk: > > # vtk DataFile Version 3.0 > vtk output > ASCII > DATASET POLYDATA > POINTS 4 float > 0 0 0 1 0 0 0 1 0 > 0 0 1 > LINES 2 6 > 2 0 1 > 2 2 3 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers From lloyd at itis.ethz.ch Wed Aug 24 09:23:40 2011 From: lloyd at itis.ethz.ch (Bryn Lloyd) Date: Wed, 24 Aug 2011 15:23:40 +0200 Subject: [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) In-Reply-To: References: <018501cc6179$95464810$bfd2d830$@ethz.ch> <4E53D141.8060007@gmail.com> Message-ID: <01f301cc6261$09afd5d0$1d0f8170$@ethz.ch> Well, I guess you might modify the gluNurbsSurface function, and use it to export the triangle mesh. Otherwise, you could visualize using NURBS directly into your VTK renderwindow using code like: #include #include "vtkPolyData.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkPolyDataMapper.h" #include "vtkProperty.h" #include "vtkActor.h" #include "vtkRenderWindow.h" #include "vtkRenderer.h" #include "vtkRenderWindowInteractor.h" #include "vtkProp3D.h" #include "vtkObjectFactory.h" #include "Options.h" #include "vtkSmartPointer.h" #define vtkNew(type,name) \ vtkSmartPointer name = vtkSmartPointer::New() // example code, replace e.g. by the NURBS++ "render" function void callOpenGLCode(double a[3], double b[3], double c[3]) { glEnable(GL_COLOR_MATERIAL); glClearColor(0.7f, 0.9f, 1.0f, 1.0f); glColor4f(1.0f, 0.0f, 0.0f, 1.0f); glEnable(GL_CULL_FACE); glCullFace(GL_FRONT); glBegin (GL_TRIANGLES); glVertex3f (a[0],a[1],a[2]); glVertex3f (b[0],b[1],b[2]); glVertex3f (c[0],c[1],c[2]); glEnd (); glCullFace(GL_BACK); glBegin (GL_TRIANGLES); glVertex3f (a[0],a[1],a[2]); glVertex3f (b[0],b[1],b[2]); glVertex3f (c[0],c[1],c[2]); glEnd (); } class vtkMyProp3D : public vtkProp3D { public: vtkTypeMacro(vtkMyProp3D,vtkProp3D); void PrintSelf(ostream& os, vtkIndent indent) {} static vtkMyProp3D *New(); int RenderOpaqueGeometry(vtkViewport *) { int renderedSomething = 0; callOpenGLCode(a,b,c); return renderedSomething; } void setABC(double _a[3], double _b[3], double _c[3]) { for(int i=0; i<3; i++) { a[i] = _a[i]; b[i] = _b[i]; c[i] = _c[i]; } } double* GetBounds() { double *bounds = new double[6]; for(int i=0; i<3; i++) { bounds[i*2] = vtkstd::min(vtkstd::min(a[i],b[i]),c[i]); bounds[i*2+1] = vtkstd::max(vtkstd::max(a[i],b[i]),c[i]); } return bounds; } double a[3]; double b[3]; double c[3]; }; vtkStandardNewMacro(vtkMyProp3D); int main (int argc, char **argv) { std::string iname; Options opt(argc,argv); opt.add("i",&iname,"input file"); opt.parse(); double a[] = {0,0,0}; double b[] = {1,0,0}; double c[] = {1,1,1}; double z = 0.3; // create input vtkNew(vtkPolyData, pdata); vtkNew(vtkPoints, pts); vtkNew(vtkCellArray, cells); pdata->SetPoints(pts); pdata->SetPolys(cells); pdata->GetPoints()->InsertNextPoint(a[0],a[1],a[2]+z); pdata->GetPoints()->InsertNextPoint(b[0],b[1],b[2]+z); pdata->GetPoints()->InsertNextPoint(c[0],c[1],c[2]+z); vtkIdType ids[] = {0,1,2}; cells->InsertNextCell(3, ids); // map to graphics library vtkNew(vtkPolyDataMapper, map); map->SetInput(pdata); // actor coordinates geometry, properties, transformation vtkNew(vtkActor, aSphere); aSphere->SetMapper(map); aSphere->GetProperty()->SetColor(0,0,1); // sphere color blue // a renderer and render window vtkNew(vtkRenderer, ren1); vtkNew(vtkRenderWindow, renWin); renWin->AddRenderer(ren1); // an interactor vtkNew(vtkRenderWindowInteractor, iren); iren->SetRenderWindow(renWin); // add the actor to the scene ren1->AddActor(aSphere); //ren1->SetBackground(1,1,1); // Background color white vtkNew(vtkMyProp3D,myprop); myprop->setABC(a,b,c); ren1->AddActor(myprop); // render an image (lights and cameras are created automatically) renWin->Render(); // begin mouse interaction iren->Start(); return 0; } From stevec at renci.org Wed Aug 24 09:46:48 2011 From: stevec at renci.org (Steven Chall) Date: Wed, 24 Aug 2011 13:46:48 +0000 Subject: [vtkusers] Turning off the auto highlighting on picked objects In-Reply-To: <73B0AEB3-EAF5-436E-8585-3F7E714C2A56@cs.duke.edu> References: <330F028D4BFD4249AA03F5C869E3E2C11B3F78@MAIL-MBX2.ad.renci.org> <73B0AEB3-EAF5-436E-8585-3F7E714C2A56@cs.duke.edu> Message-ID: <330F028D4BFD4249AA03F5C869E3E2C11B4803@MAIL-MBX2.ad.renci.org> Eric, Thanks for your suggestions. I tried calling InitializePickList, which seems like it should clean things up: however, it didn't make the unwanted bounding box disappear. The Initialize() method is protected, so I'd have to subclass vtkPicker to be able to access it externally. Not a big deal, but your idea inspired me to go one further and actually delete the vtkPicker object and recreate it when I want to get rid of its appurtenances. That still doesn't do it. It seems that somewhere in the process vtkPicker or some associated object spawns off an autonomous bounding box that hangs around even when vtkPicker goes away (or does it necessarily actually go away when I call Delete() on it?). Maybe some other object exerts control over it that I haven't tracked down yet. Thanks again for the ideas. Steve From: Eric E. Monson [mailto:emonson at cs.duke.edu] Sent: Tuesday, August 23, 2011 3:08 PM To: Steven Chall Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Turning off the auto highlighting on picked objects Hey Steve, I probably shouldn't be stepping in here since I don't use picking that often, but... So, it sounds like you're not populating a vtkSelection with your results, so you may want to try calling Initialize() on your picker, which clears out its list of actors and prop3ds. Otherwise, vtkAbstractPicker has an InitializePickList(), which clears out its vtkPropCollection... Talk to you later, -Eric On Aug 23, 2011, at 1:42 PM, Steven Chall wrote: Hi fellow VTK enthusiasts, I have what is in essence a 3D graph of vtkCubeSource objects from which I select one at a time, sometimes using the standard vtkPicker approach, sometimes using other mechanisms I've coded myself. Whichever mechanism I use to do the picking, I've also coded how I visually highlight/indicate what's been selected; thus, the red wireframe box that the vtkPicker approach leaves around the picked object is at best irrelevant. However, if I follow a vtkPicker-based pick A with a non-vtkPicker-based pick B, that red wireframe box remains around picked object A, even though by the internal logic of my application it's no longer picked. That the vtkPicker object thinks it's still picked doesn't matter to me - I track picking independently of that - but I can't figure out how to remove that red wireframe box that is a consequence of the vtkPicker's "picked" state. I'd imagine it's just a wireframe vtkCubeSource or the like and that it would have something to do with the vtkPicker's vtkActor's vtkProperty's bounds (as in picker->GetActor()->GetProperty->GetBounds(bounds), where bounds is an array of 6 floats and picker is a vtkPicker *), but snooping around in the source code hasn't gotten me to find where that red bounding box is drawn. Any suggestions on how I can turn it off and just generally access it? Thanks. Steve -Steve Chall Senior Research Software Developer Renaissance Computing Institute (RENCI) Phone: 919-681-9639 Email: stevec at renci.org _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects athttp://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://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From faco1976 at gmail.com Wed Aug 24 11:01:16 2011 From: faco1976 at gmail.com (Giancarlo Facoetti) Date: Wed, 24 Aug 2011 16:01:16 +0100 Subject: [vtkusers] visualizing NURBS++ surfaces (maybe a FAQ??) In-Reply-To: <01f301cc6261$09afd5d0$1d0f8170$@ethz.ch> References: <018501cc6179$95464810$bfd2d830$@ethz.ch> <4E53D141.8060007@gmail.com> <01f301cc6261$09afd5d0$1d0f8170$@ethz.ch> Message-ID: <4E55123C.6010702@gmail.com> Hi Bryn, you have given me a great suggestion! I didn't think about the simplest solution: using directly the OpenGL rendering function into my VTK renderwindow. I think that this is the easiest way. Furthermore, I will implement the nurbs control points with a VTK object, like a set of vertex or a vtkPolyData, in order to have the possibility to manipulate the points inside the VTK framework. After all, I need to render the nurbs surface only for visualization purpose, the modify/manipulation of the surface will be done by control points. thank you! Gaincarlo > Well, I guess you might modify the gluNurbsSurface function, and use it to > export the triangle mesh. > > Otherwise, you could visualize using NURBS directly into your VTK > renderwindow using code like: > > > #include > > #include "vtkPolyData.h" > #include "vtkPoints.h" > #include "vtkCellArray.h" > #include "vtkPolyDataMapper.h" > #include "vtkProperty.h" > #include "vtkActor.h" > #include "vtkRenderWindow.h" > #include "vtkRenderer.h" > #include "vtkRenderWindowInteractor.h" > > #include "vtkProp3D.h" > #include "vtkObjectFactory.h" > > #include "Options.h" > > #include "vtkSmartPointer.h" > #define vtkNew(type,name) \ > vtkSmartPointer name = vtkSmartPointer::New() > > // example code, replace e.g. by the NURBS++ "render" function > void callOpenGLCode(double a[3], double b[3], double c[3]) > { > glEnable(GL_COLOR_MATERIAL); > glClearColor(0.7f, 0.9f, 1.0f, 1.0f); > glColor4f(1.0f, 0.0f, 0.0f, 1.0f); > > glEnable(GL_CULL_FACE); > glCullFace(GL_FRONT); > > glBegin (GL_TRIANGLES); > glVertex3f (a[0],a[1],a[2]); > glVertex3f (b[0],b[1],b[2]); > glVertex3f (c[0],c[1],c[2]); > glEnd (); > > glCullFace(GL_BACK); > glBegin (GL_TRIANGLES); > glVertex3f (a[0],a[1],a[2]); > glVertex3f (b[0],b[1],b[2]); > glVertex3f (c[0],c[1],c[2]); > glEnd (); > } > > class vtkMyProp3D : public vtkProp3D > { > public: > vtkTypeMacro(vtkMyProp3D,vtkProp3D); > void PrintSelf(ostream& os, vtkIndent indent) {} > static vtkMyProp3D *New(); > > int RenderOpaqueGeometry(vtkViewport *) > { > int renderedSomething = 0; > callOpenGLCode(a,b,c); > return renderedSomething; > } > void setABC(double _a[3], double _b[3], double _c[3]) > { > for(int i=0; i<3; i++) > { > a[i] = _a[i]; > b[i] = _b[i]; > c[i] = _c[i]; > } > } > double* GetBounds() > { > double *bounds = new double[6]; > for(int i=0; i<3; i++) > { > bounds[i*2] = > vtkstd::min(vtkstd::min(a[i],b[i]),c[i]); > bounds[i*2+1] = > vtkstd::max(vtkstd::max(a[i],b[i]),c[i]); > } > return bounds; > } > double a[3]; > double b[3]; > double c[3]; > }; > > vtkStandardNewMacro(vtkMyProp3D); > > int main (int argc, char **argv) > { > > std::string iname; > Options opt(argc,argv); > opt.add("i",&iname,"input file"); > opt.parse(); > > double a[] = {0,0,0}; > double b[] = {1,0,0}; > double c[] = {1,1,1}; > double z = 0.3; > > // create input > vtkNew(vtkPolyData, pdata); > vtkNew(vtkPoints, pts); > vtkNew(vtkCellArray, cells); > pdata->SetPoints(pts); > pdata->SetPolys(cells); > pdata->GetPoints()->InsertNextPoint(a[0],a[1],a[2]+z); > pdata->GetPoints()->InsertNextPoint(b[0],b[1],b[2]+z); > pdata->GetPoints()->InsertNextPoint(c[0],c[1],c[2]+z); > vtkIdType ids[] = {0,1,2}; > cells->InsertNextCell(3, ids); > > // map to graphics library > vtkNew(vtkPolyDataMapper, map); > map->SetInput(pdata); > > // actor coordinates geometry, properties, transformation > vtkNew(vtkActor, aSphere); > aSphere->SetMapper(map); > aSphere->GetProperty()->SetColor(0,0,1); // sphere color blue > > // a renderer and render window > vtkNew(vtkRenderer, ren1); > vtkNew(vtkRenderWindow, renWin); > renWin->AddRenderer(ren1); > > // an interactor > vtkNew(vtkRenderWindowInteractor, iren); > iren->SetRenderWindow(renWin); > > // add the actor to the scene > ren1->AddActor(aSphere); > //ren1->SetBackground(1,1,1); // Background color white > > vtkNew(vtkMyProp3D,myprop); > myprop->setABC(a,b,c); > ren1->AddActor(myprop); > > // render an image (lights and cameras are created automatically) > renWin->Render(); > > // begin mouse interaction > iren->Start(); > > return 0; > } > > > > From emonson at cs.duke.edu Wed Aug 24 10:16:26 2011 From: emonson at cs.duke.edu (Eric E. Monson) Date: Wed, 24 Aug 2011 10:16:26 -0400 Subject: [vtkusers] Turning off the auto highlighting on picked objects In-Reply-To: <330F028D4BFD4249AA03F5C869E3E2C11B4803@MAIL-MBX2.ad.renci.org> References: <330F028D4BFD4249AA03F5C869E3E2C11B3F78@MAIL-MBX2.ad.renci.org> <73B0AEB3-EAF5-436E-8585-3F7E714C2A56@cs.duke.edu> <330F028D4BFD4249AA03F5C869E3E2C11B4803@MAIL-MBX2.ad.renci.org> Message-ID: <9C77783E-0765-4F14-877D-0B1D62E9BAD4@cs.duke.edu> Hey Steve, Yeah, sorry I hadn't noticed that Initialize is protected. That does seem strange that deleting the picker doesn't clear things out. I've never used vtkPicker itself, but always a subclass or one of the other prop pickers. If you want others to play around with it, maybe see if you can come up with a minimal example that reproduces the behavior. Good luck, -Eric On Aug 24, 2011, at 9:46 AM, Steven Chall wrote: > Eric, > Thanks for your suggestions. I tried calling InitializePickList, which seems like it should clean things up: however, it didn?t make the unwanted bounding box disappear. The Initialize() method is protected, so I?d have to subclass vtkPicker to be able to access it externally. Not a big deal, but your idea inspired me to go one further and actually delete the vtkPicker object and recreate it when I want to get rid of its appurtenances. That still doesn?t do it. It seems that somewhere in the process vtkPicker or some associated object spawns off an autonomous bounding box that hangs around even when vtkPicker goes away (or does it necessarily actually go away when I call Delete() on it?). Maybe some other object exerts control over it that I haven?t tracked down yet. Thanks again for the ideas. > > Steve > > From: Eric E. Monson [mailto:emonson at cs.duke.edu] > Sent: Tuesday, August 23, 2011 3:08 PM > To: Steven Chall > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Turning off the auto highlighting on picked objects > > Hey Steve, > > I probably shouldn't be stepping in here since I don't use picking that often, but... So, it sounds like you're not populating a vtkSelection with your results, so you may want to try calling Initialize() on your picker, which clears out its list of actors and prop3ds. Otherwise, vtkAbstractPicker has an InitializePickList(), which clears out its vtkPropCollection... > > Talk to you later, > -Eric > > > On Aug 23, 2011, at 1:42 PM, Steven Chall wrote: > > > Hi fellow VTK enthusiasts, > I have what is in essence a 3D graph of vtkCubeSource objects from which I select one at a time, sometimes using the standard vtkPicker approach, sometimes using other mechanisms I?ve coded myself. Whichever mechanism I use to do the picking, I?ve also coded how I visually highlight/indicate what?s been selected; thus, the red wireframe box that the vtkPicker approach leaves around the picked object is at best irrelevant. However, if I follow a vtkPicker-based pick A with a non-vtkPicker-based pick B, that red wireframe box remains around picked object A, even though by the internal logic of my application it?s no longer picked. > > That the vtkPicker object thinks it?s still picked doesn?t matter to me ? I track picking independently of that ? but I can?t figure out how to remove that red wireframe box that is a consequence of the vtkPicker?s ?picked? state. I?d imagine it?s just a wireframe vtkCubeSource or the like and that it would have something to do with the vtkPicker?s vtkActor?s vtkProperty?s bounds (as in picker->GetActor()->GetProperty->GetBounds(bounds), where bounds is an array of 6 floats and picker is a vtkPicker *), but snooping around in the source code hasn?t gotten me to find where that red bounding box is drawn. Any suggestions on how I can turn it off and just generally access it? Thanks. > > Steve > > > -Steve Chall > Senior Research Software Developer > Renaissance Computing Institute (RENCI) > Phone: 919-681-9639 > Email: stevec at renci.org > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects athttp://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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdsommer at mtu.edu Wed Aug 24 11:43:23 2011 From: jdsommer at mtu.edu (Jason Sommerville) Date: Wed, 24 Aug 2011 11:43:23 -0400 Subject: [vtkusers] Fwd: VTK on Windows XP: no display windows In-Reply-To: <4E551161.5020209@mtu.edu> References: <4E551161.5020209@mtu.edu> Message-ID: <4E551C1B.1070207@mtu.edu> I've built vtk on Windows XP according to the directions found here: http://sorrelh.blogspot.com/2011/01/building-and-installing-vtk-with-python.html I'm using Python 2.7, MSVC++ 2008 (v. 9) and I downloaded the 5.6.1release source code from here: http://www.vtk.org/VTK/resources/software.html#latest2 I can configure, generate, and build without errors. When I run any of the test executables, however, nothing happens. If I go to the command line and run them, the program appears to run for a few seconds, maybe two, and then returns. No display appears with the cone in the window, no output is put on the console. No error messages. If I run vtk.exe, (I'll admit, I'm not sure what this executable is actually supposed to do) it does put up an empty vtk window, but with a windows gray background, as if there were no OpenGL window in it. I have tested that OpenGL does, in fact, work on my system. Any thoughts on why this is happening or what I can do to further debug the issue? Thanks From sean at rogue-research.com Wed Aug 24 12:19:29 2011 From: sean at rogue-research.com (Sean McBride) Date: Wed, 24 Aug 2011 12:19:29 -0400 Subject: [vtkusers] Build fails on osx Lion: "symbol(s) not found for architecture x86_64" In-Reply-To: References: Message-ID: <20110824161929.1575400264@mail.rogue-research.com> On Mon, 22 Aug 2011 21:42:06 +0200, Luca Gherardi said: >> Linking CXX executable ../../../bin/GraphicsCxxTests >> Undefined symbols for architecture x86_64: >> "_glDepthMask", referenced from: >> vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) in >libvtkRendering.a(vtkOpenGLActor.cxx.o) I suspect it's unrelated to any i386 / x86_64 arch differences, but simply that those symbols (ex: glDepthMask) are not within any library you are linking with. Are you sure the X11 OpenGL has those symbols? You can check with 'nm -g', see 'man nm'. -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From pat.marion at kitware.com Wed Aug 24 13:15:23 2011 From: pat.marion at kitware.com (pat marion) Date: Wed, 24 Aug 2011 13:15:23 -0400 Subject: [vtkusers] KiwiViewer in App Store. New open-source library coming soon. Message-ID: Hi, I'm excited to announce Kitware's first entry in the Apple app store. KiwiViewer is a free, interactive application for exploration of geometric datasets on multi-touch mobile devices. You can learn more about the app at the website here: http://kiwiviewer.org And here is a press release: http://www.prweb.com/releases/prweb2011/8/prweb8741699.htm In progress are Android and WebGL versions of KiwiViewer. The KiwiViewer app uses VTK and a new library we're calling VES: VTK OpenGL ES rendering toolkit. We look forward to releasing VES open source under the Apache 2.0 license. With VES we hope to pave the way for development of VTK applications on mobile and web platforms. There's just a few things that we want to get in order before we open up the repository, so thanks for being patient! In the meantime, we'd like to hear your ideas. What sorts of things would you like to do on the mobile and web platforms? VES is a standalone repository right now, but in the future we see it becoming a module in the VTK repository, supplementing VTK's current OpenGL pipeline. Here's what you can expect in the short term: -We're aiming for an end of October public release -VES will include the KiwiViewer app for Android, iOS, and WebGL, demonstrating how to use VTK in the mobile and web domains -VES will include CMake scripts for cross compiling VTK on Android and iOS platforms (using the vtkmodular repository) -VES will be an open, fully inclusive effort. We hope the community is interested in helping us design APIs, and as always patches are welcome and we can give commit access to community members interested in collaboration. Stay tuned for future announcements, and don't hesitate to contact us with your project ideas! If you're a potential customer who'd like help moving your current application to a web or mobile platform, you can contact us at kitware at kitware.com. Pat -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Wed Aug 24 14:02:52 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 24 Aug 2011 20:02:52 +0200 Subject: [vtkusers] manipulation of the scene In-Reply-To: References: Message-ID: Well, as I said, I don't have experience in manipulating hierarchical scene graph. I know how it should be done on an abstract level, but I never had to do it. I would be stabbing in the dark just the same as you are doing it :) 2011/8/24 Kacper Pluta > Hi, I Used the vtkAssembly hierarchy and i have one new problem. When I > turn the tree so that new root was in the upright position. It seems to me > that the coordinates of the new roots are not current after tree rotation. > > Part of my code below. And screenshot as an attachment. > > root = Tree->GetParts()->GetLastProp3D(); > double *orientation = root->GetOrientation(); > Tree->SetOrientation(0,0,-*(orientation+2)); //left root n the upright > position > > > > LeftBranchActor->SetPosition(*(root->GetXRange()+1)+LeftBranch->GetRadius(),*(root->GetYRange())-LeftBranch->GetHeight()/2,0); > > LeftBranchActor->RotateZ(angle); > > > RightBranchActor->SetPosition(*(root->GetXRange())-RightBranch->GetRadius(),*(root->GetYRange())-RightBranch->GetHeight()/2,0); > > RightBranchActor->RotateZ(angle); > > Tree->AddPart(RightBranchActor); > Tree->AddPart(LeftBranchActor); > //Tree->SetOrientation(0,0,0); > > GenTree(Tree->GetParts()->GetLastProp3D(),--rate,radius*pow(r,1/n)); > > By the way thanks for your replies. > > > > 2011/8/24 D?enan Zuki? > >> GetMatrix or >> GetUserMatrix I guess. Try it and/or read documentation. I never used >> assemblies until a few days ago, and that was just for grouping. >> >> 2011/8/24 Kacper Pluta >> >>> How do I get to a particular matrix of element in the vtkAssembly >>> hierarchy? >>> >>> >>> 2011/8/24 D?enan Zuki? >>> >>>> Why don't you use a straightforward tree hierarchy of vtkAssemblies, >>>> each one having its own transformation matrix, nested under its parent's >>>> transformation matrix? That way you only need to worry about a branches >>>> transformation at its parents joint, and the hierarchy does the rest of the >>>> job for you? >>>> >>>> I have not read this, but you may check this out: >>>> http://www.maplesoft.com/applications/view.aspx?SID=6850&view=html >>>> >>>> Also you can try searching "scene graph hierarchy tutorial". >>>> >>>> 2011/8/24 Kacper Pluta >>>> >>>>> Now I see my mistake. I am using the coordinates of the root, and this >>>>> is yet another place than the family, which is a part. Except that this >>>>> knowledge did not give me any more answers ... >>>>> >>>>> >>>>> 2011/8/24 Kacper Pluta >>>>> >>>>>> I know but it's not a solution. I want to build 3d tree of cylinders, >>>>>> and I have a problem with inserting new branches at a right angle. It >>>>>> is very easy when the root is in the upright position. I tried to do this >>>>>> using vtkAssembly.The whole procedure is described in the following >>>>>> pseudocode. I have a problem with an appropriate setting for the >>>>>> family, after the restoration of the root to its original position. >>>>>> I thought it would be easier to add new branches without touching the >>>>>> root. I just manipulating the world coordinate system. >>>>>> >>>>>> Attached a part of the tree, which i want to get. >>>>>> >>>>>> NODE GenTree(NODE root, int bifurcation) >>>>>> { >>>>>> if(bifurcation > 0 && root != NULL) >>>>>> { >>>>>> >>>>>> Restart the angle of Parent root famili if exist; >>>>>> //(root is part of the family, e.g. the left child of his Parent) >>>>>> >>>>>> Restart the root angle; >>>>>> >>>>>> //Now root agnel is set to 90 degrees >>>>>> >>>>>> //make new bifurcation >>>>>> Create the children; >>>>>> Set children position to lower ends of root; >>>>>> Set children origin to center of root; >>>>>> rotate the children on Z axis; >>>>>> >>>>>> restore root angle; >>>>>> restore Parent of root famili angle; >>>>>> >>>>>> //Make root famili >>>>>> root->Famili = vtkAssembly::New(); >>>>>> root->Famili->AddPart(root-> >>>>>> Left->BranchActor); >>>>>> root->Famili->AddPart(root->Right->BranchActor); >>>>>> >>>>>> Set Famili origin?? >>>>>> rootate the root famili? >>>>>> //Now the family is at the end of the root. >>>>>> >>>>>> root->Left->Left = GenTree(root->Left,--bifurcation); >>>>>> //root->Left->Right = GenTree(root->Right,--bifurcation); >>>>>> } >>>>>> } >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> 2011/8/24 D?enan Zuki? >>>>>> >>>>>>> If you don't want to manipulate the camera, you can put the whole >>>>>>> scene into an vtkAssembly and then apply transformation to it. >>>>>>> >>>>>>> On Tue, Aug 23, 2011 at 20:03, Kacper Pluta wrote: >>>>>>> >>>>>>>> Hi! >>>>>>>> >>>>>>>> How do I rotate the whole scene? But I do not mean the camera. >>>>>>>> >>>>>>>> -- >>>>>>>> "If you build your empire on money, it'll fall like a house of >>>>>>>> cards, if you build it on love, you've built Taj Mahal!" - Mark Hartmaier >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://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://www.vtk.org/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> "If you build your empire on money, it'll fall like a house of cards, >>>>>> if you build it on love, you've built Taj Mahal!" - Mark Hartmaier >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> "If you build your empire on money, it'll fall like a house of cards, >>>>> if you build it on love, you've built Taj Mahal!" - Mark Hartmaier >>>>> >>>>> >>>> >>> >>> >>> -- >>> "If you build your empire on money, it'll fall like a house of cards, if >>> you build it on love, you've built Taj Mahal!" - Mark Hartmaier >>> >>> >> > > > -- > "If you build your empire on money, it'll fall like a house of cards, if > you build it on love, you've built Taj Mahal!" - Mark Hartmaier > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jd379252 at gmail.com Wed Aug 24 14:23:58 2011 From: jd379252 at gmail.com (pof) Date: Wed, 24 Aug 2011 20:23:58 +0200 Subject: [vtkusers] vtkusers Digest, Vol 88, Issue 28 In-Reply-To: References: Message-ID: <4E5541BE.70103@gmail.com> Hi David, I experienced the same type of problem with bold chopped characters. I think you should have a look at this post, where you'll see a solution was proposed to solve it (I applied it to vtk5.6.1 and it works): http://www.vtk.org/pipermail/vtkusers/2010-September/111444.html The patch proposed by Roger Bramon Feixas might not have been applied so far, which would be a pitty. Hope this can help Le 24/08/2011 15:23, vtkusers-request at vtk.org a ?crit : > ------------------------------ > > Message: 10 > Date: Tue, 23 Aug 2011 14:30:13 -0400 > From: David Doria > Subject: [vtkusers] CaptionActor2D text chopped off > To:vtkusers at vtk.org > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Hi all, > > I was experimenting with CaptionActor2D: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CaptionActor2D > > by using it to sequentially mark pixels in an image that the user > clicks. It seems to work great except that the right side of each > character seems to be chopped off? > > Even if I add additional text to the number: > > ss<< Numbers.size()<< " hi"; > > the number is still chopped. > > Can anyone reproduce or explain this behavior? > > Thanks, > > David > From carsten.bellon at bam.de Wed Aug 24 15:22:04 2011 From: carsten.bellon at bam.de (Bellon, Carsten) Date: Wed, 24 Aug 2011 19:22:04 +0000 Subject: [vtkusers] Picker problem with ATI driver on Windows Message-ID: <2FFBABA60D870A44B9F5ED6482A3FBB311C15BC7@SV0076.zit.bam.de> I'm using VTK 5.6.1 and have a Program with two VTK render windows. On both renderers I display the same (one) texture. In one of the render windows I use a vtkPropPicker. By calling PickProp (at positions on the texture) this causes render problems at te reder window where I'm picking (all rendered objects disappear) and the following VTK log: ERROR: In ..\..\vtk-5.6.1\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 217 vtkWin32OpenGLRenderWindow (054E0CF0): Attempting to call MakeCurrent for a different window than the one doing the picking, this can causes crashes and/or bad pick results This problem we have only on Windows with an ATI card (we tested an different cards and driver versions). We have no problems with the same cards on Linux, and also not with other graphic cards (intel onboard ...) on Windows, Linux & Mac. Thanks for any help, Carsten -- Dr.-Ing. BAM Berlin * 8.36 * D-12200 Berlin Carsten Bellon Tel/Fax: ++49 30 8104-3658 / -1837 Carsten.Bellon at bam.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From kacper.pluta at gmail.com Wed Aug 24 16:05:06 2011 From: kacper.pluta at gmail.com (Kacper Pluta) Date: Wed, 24 Aug 2011 22:05:06 +0200 Subject: [vtkusers] How to recalculate a matrix of parts of vtkAssembly? Message-ID: When a rotate vtkAssembly parts of it have old coordinate value. How can force recalculate it? -- "If you build your empire on money, it'll fall like a house of cards, if you build it on love, you've built Taj Mahal!" - Mark Hartmaier -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominik at itis.ethz.ch Wed Aug 24 17:31:38 2011 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Wed, 24 Aug 2011 23:31:38 +0200 Subject: [vtkusers] wxVTKRenderWindowInteractor segfaults Message-ID: I am doing something as simple as: class MyFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title, size=wx.Size(400,400)) # self.widget = wxVTKRenderWindowInteractor(self, -1) class App(wx.App): def OnInit(self): self.frame1 = MyFrame(None,'test1') self.frame1.Show() return True if __name__ == '__main__': app = App(0) app.MainLoop() The moment I uncomment the line with wxVTKRenderWindowInteractor I get a crash. Ubuntu 11.04 64bit vtk 5.6.1. Any ideas? Dominik From dominik at itis.ethz.ch Wed Aug 24 17:43:12 2011 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Wed, 24 Aug 2011 23:43:12 +0200 Subject: [vtkusers] wxVTKRenderWindowInteractor segfaults In-Reply-To: References: Message-ID: And the backtrace: #0 0x00007ffff0ba63a0 in XChangeWindowAttributes () from /usr/lib/x86_64-linux-gnu/libX11.so.6 #1 0x00007fffe6be6f09 in vtkXOpenGLRenderWindow::CreateAWindow (this=0x15baba0) at /home/dsz/pack/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindow.cxx:587 #2 0x00007fffe6be6be2 in vtkXOpenGLRenderWindow::WindowInitialize (this=0x15baba0) at /home/dsz/pack/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindow.cxx:1030 #3 0x00007fffe6be58cd in vtkXOpenGLRenderWindow::Start (this=0x15baba0) at /home/dsz/pack/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindow.cxx:1185 #4 0x00007fffe6afeb70 in vtkRenderWindow::DoStereoRender (this=0x15baba0) at /home/dsz/pack/vtk-5.6.1/Rendering/vtkRenderWindow.cxx:687 #5 0x00007fffe6afefd3 in vtkRenderWindow::DoFDRender (this=0x15baba0) at /home/dsz/pack/vtk-5.6.1/Rendering/vtkRenderWindow.cxx:676 #6 0x00007fffe6affa82 in vtkRenderWindow::DoAARender (this=0x15baba0) at /home/dsz/pack/vtk-5.6.1/Rendering/vtkRenderWindow.cxx:563 #7 0x00007fffe6aff0f9 in vtkRenderWindow::Render (this=0x15baba0) at /home/dsz/pack/vtk-5.6.1/Rendering/vtkRenderWindow.cxx:376 #8 0x00007fffe6be5e90 in vtkXOpenGLRenderWindow::Render (this=0x15baba0) at /home/dsz/pack/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindow.cxx:1845 #9 0x00007fffe70ef52a in PyvtkXOpenGLRenderWindow_Render (self=0x13bb5a0, args=) at /home/dsz/build/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindowPython.cxx:1166 #10 0x00000000004965f1 in PyEval_EvalFrameEx () #11 0x0000000000496dbf in PyEval_EvalFrameEx () #12 0x000000000049d325 in PyEval_EvalCodeEx () #13 0x00000000004c4526 in ?? () #14 0x000000000045d864 in PyObject_Call () #15 0x000000000045f43f in ?? () #16 0x000000000045d864 in PyObject_Call () #17 0x0000000000495d46 in PyEval_CallObjectWithKeywords () #18 0x00007ffff60fd4f6 in wxPyCallback::EventThunker(wxEvent&) () from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so #19 0x00007ffff4498ad5 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0 #20 0x00007ffff4498ebf in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0 #21 0x00007ffff4498f72 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0 #22 0x00007fffdd75290a in wxGLCanvas::OnInternalIdle() () from /usr/lib/libwx_gtk2u_gl-2.8.so.0 #23 0x00007ffff4d8a0bf in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #24 0x00007ffff4d8a0f4 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #25 0x00007ffff4d8a614 in wxAppBase::ProcessIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #26 0x00007ffff4cf8f8e in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #27 0x00007ffff19edbcd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #28 0x00007ffff19ee3a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #29 0x00007ffff19ee9f2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #30 0x00007ffff3995af7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #31 0x00007ffff4d0d578 in wxEventLoop::Run() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #32 0x00007ffff4d8a3eb in wxAppBase::MainLoop() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #33 0x00007ffff60fa077 in wxPyApp::MainLoop() () from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so #34 0x00007ffff6174333 in ?? () from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so #35 0x000000000049a54e in PyEval_EvalFrameEx () #36 0x000000000049d325 in PyEval_EvalCodeEx () #37 0x00000000004c4526 in ?? () #38 0x000000000045d864 in PyObject_Call () #39 0x000000000045f43f in ?? () #40 0x000000000045d864 in PyObject_Call () #41 0x0000000000496c4e in PyEval_EvalFrameEx () #42 0x0000000000496dbf in PyEval_EvalFrameEx () #43 0x000000000049d325 in PyEval_EvalCodeEx () #44 0x00000000004ecb02 in PyEval_EvalCode () #45 0x00000000004fdc74 in ?? () #46 0x000000000042c182 in PyRun_FileExFlags () #47 0x000000000042cb4a in PyRun_SimpleFileExFlags () #48 0x0000000000418c9e in Py_Main () #49 0x00007ffff69c2eff in __libc_start_main (main=0x417f80
, argc=2, ubp_av=0x7fffffffdf68, init=, fini=, rtld_fini=, stack_end=0x7fffffffdf58) at libc-start.c:226 #50 0x00000000004c62b1 in _start () On Wed, Aug 24, 2011 at 11:31 PM, Dominik Szczerba wrote: > I am doing something as simple as: > > class MyFrame(wx.Frame): > > ? ?def __init__(self, parent, title): > ? ? ? ?wx.Frame.__init__(self, parent, -1, title, > ? ? ? ? ? ? ? ? ? ? ? ? ?size=wx.Size(400,400)) > # ? ? ? ?self.widget = wxVTKRenderWindowInteractor(self, -1) > > class App(wx.App): > > ? ?def OnInit(self): > ? ? ? ?self.frame1 = MyFrame(None,'test1') > ? ? ? ?self.frame1.Show() > ? ? ? ?return True > > if __name__ == '__main__': > ? ?app = App(0) > ? ?app.MainLoop() > > > The moment I uncomment the line with wxVTKRenderWindowInteractor I get > a crash. Ubuntu 11.04 64bit vtk 5.6.1. Any ideas? > > Dominik > From dominik at itis.ethz.ch Wed Aug 24 17:57:01 2011 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Wed, 24 Aug 2011 23:57:01 +0200 Subject: [vtkusers] wxVTKRenderWindowInteractor segfaults In-Reply-To: References: Message-ID: More debugging: using wxVTKRenderWindow instead of wxVTKRenderWindowInteractor seems to work correctly, but does not allow, e.g., AddObserver, which is fundamental to my application. Any ideas how to go on? I saw a few related threads, none concluded. Dominik On Wed, Aug 24, 2011 at 11:43 PM, Dominik Szczerba wrote: > And the backtrace: > > #0 ?0x00007ffff0ba63a0 in XChangeWindowAttributes () from > /usr/lib/x86_64-linux-gnu/libX11.so.6 > #1 ?0x00007fffe6be6f09 in vtkXOpenGLRenderWindow::CreateAWindow > (this=0x15baba0) at > /home/dsz/pack/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindow.cxx:587 > #2 ?0x00007fffe6be6be2 in vtkXOpenGLRenderWindow::WindowInitialize > (this=0x15baba0) at > /home/dsz/pack/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindow.cxx:1030 > #3 ?0x00007fffe6be58cd in vtkXOpenGLRenderWindow::Start > (this=0x15baba0) at > /home/dsz/pack/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindow.cxx:1185 > #4 ?0x00007fffe6afeb70 in vtkRenderWindow::DoStereoRender > (this=0x15baba0) at > /home/dsz/pack/vtk-5.6.1/Rendering/vtkRenderWindow.cxx:687 > #5 ?0x00007fffe6afefd3 in vtkRenderWindow::DoFDRender (this=0x15baba0) > at /home/dsz/pack/vtk-5.6.1/Rendering/vtkRenderWindow.cxx:676 > #6 ?0x00007fffe6affa82 in vtkRenderWindow::DoAARender (this=0x15baba0) > at /home/dsz/pack/vtk-5.6.1/Rendering/vtkRenderWindow.cxx:563 > #7 ?0x00007fffe6aff0f9 in vtkRenderWindow::Render (this=0x15baba0) at > /home/dsz/pack/vtk-5.6.1/Rendering/vtkRenderWindow.cxx:376 > #8 ?0x00007fffe6be5e90 in vtkXOpenGLRenderWindow::Render > (this=0x15baba0) at > /home/dsz/pack/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindow.cxx:1845 > #9 ?0x00007fffe70ef52a in PyvtkXOpenGLRenderWindow_Render > (self=0x13bb5a0, args=) at > /home/dsz/build/vtk-5.6.1/Rendering/vtkXOpenGLRenderWindowPython.cxx:1166 > #10 0x00000000004965f1 in PyEval_EvalFrameEx () > #11 0x0000000000496dbf in PyEval_EvalFrameEx () > #12 0x000000000049d325 in PyEval_EvalCodeEx () > #13 0x00000000004c4526 in ?? () > #14 0x000000000045d864 in PyObject_Call () > #15 0x000000000045f43f in ?? () > #16 0x000000000045d864 in PyObject_Call () > #17 0x0000000000495d46 in PyEval_CallObjectWithKeywords () > #18 0x00007ffff60fd4f6 in wxPyCallback::EventThunker(wxEvent&) () from > /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so > #19 0x00007ffff4498ad5 in > wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, > wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0 > #20 0x00007ffff4498ebf in > wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from > /usr/lib/libwx_baseu-2.8.so.0 > #21 0x00007ffff4498f72 in wxEvtHandler::ProcessEvent(wxEvent&) () from > /usr/lib/libwx_baseu-2.8.so.0 > #22 0x00007fffdd75290a in wxGLCanvas::OnInternalIdle() () from > /usr/lib/libwx_gtk2u_gl-2.8.so.0 > #23 0x00007ffff4d8a0bf in wxAppBase::SendIdleEvents(wxWindow*, > wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0 > #24 0x00007ffff4d8a0f4 in wxAppBase::SendIdleEvents(wxWindow*, > wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0 > #25 0x00007ffff4d8a614 in wxAppBase::ProcessIdle() () from > /usr/lib/libwx_gtk2u_core-2.8.so.0 > #26 0x00007ffff4cf8f8e in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0 > #27 0x00007ffff19edbcd in g_main_context_dispatch () from > /lib/x86_64-linux-gnu/libglib-2.0.so.0 > #28 0x00007ffff19ee3a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 > #29 0x00007ffff19ee9f2 in g_main_loop_run () from > /lib/x86_64-linux-gnu/libglib-2.0.so.0 > #30 0x00007ffff3995af7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 > #31 0x00007ffff4d0d578 in wxEventLoop::Run() () from > /usr/lib/libwx_gtk2u_core-2.8.so.0 > #32 0x00007ffff4d8a3eb in wxAppBase::MainLoop() () from > /usr/lib/libwx_gtk2u_core-2.8.so.0 > #33 0x00007ffff60fa077 in wxPyApp::MainLoop() () from > /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so > #34 0x00007ffff6174333 in ?? () from > /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so > #35 0x000000000049a54e in PyEval_EvalFrameEx () > #36 0x000000000049d325 in PyEval_EvalCodeEx () > #37 0x00000000004c4526 in ?? () > #38 0x000000000045d864 in PyObject_Call () > #39 0x000000000045f43f in ?? () > #40 0x000000000045d864 in PyObject_Call () > #41 0x0000000000496c4e in PyEval_EvalFrameEx () > #42 0x0000000000496dbf in PyEval_EvalFrameEx () > #43 0x000000000049d325 in PyEval_EvalCodeEx () > #44 0x00000000004ecb02 in PyEval_EvalCode () > #45 0x00000000004fdc74 in ?? () > #46 0x000000000042c182 in PyRun_FileExFlags () > #47 0x000000000042cb4a in PyRun_SimpleFileExFlags () > #48 0x0000000000418c9e in Py_Main () > #49 0x00007ffff69c2eff in __libc_start_main (main=0x417f80
, > argc=2, ubp_av=0x7fffffffdf68, init=, fini= optimized out>, rtld_fini=, > stack_end=0x7fffffffdf58) at libc-start.c:226 > #50 0x00000000004c62b1 in _start () > > > On Wed, Aug 24, 2011 at 11:31 PM, Dominik Szczerba wrote: >> I am doing something as simple as: >> >> class MyFrame(wx.Frame): >> >> ? ?def __init__(self, parent, title): >> ? ? ? ?wx.Frame.__init__(self, parent, -1, title, >> ? ? ? ? ? ? ? ? ? ? ? ? ?size=wx.Size(400,400)) >> # ? ? ? ?self.widget = wxVTKRenderWindowInteractor(self, -1) >> >> class App(wx.App): >> >> ? ?def OnInit(self): >> ? ? ? ?self.frame1 = MyFrame(None,'test1') >> ? ? ? ?self.frame1.Show() >> ? ? ? ?return True >> >> if __name__ == '__main__': >> ? ?app = App(0) >> ? ?app.MainLoop() >> >> >> The moment I uncomment the line with wxVTKRenderWindowInteractor I get >> a crash. Ubuntu 11.04 64bit vtk 5.6.1. Any ideas? >> >> Dominik >> > From webmaster at insightsoftwareconsortium.org Thu Aug 25 00:03:10 2011 From: webmaster at insightsoftwareconsortium.org (Insight Journal) Date: Thu, 25 Aug 2011 00:03:10 -0400 Subject: [vtkusers] The Insight Journal-New Submission Message-ID: <201108250403.p7P43A44003976@insight-journal.org> Hello, A new submission has been added to the Insight Journal. Title: Small Hole Filling in ITK Author(s):Doria D. Abstract: This code provides an implementation of a simple technique to fill small holes in an image. We use a multi-pass method that fills pixels on the border of a hole with the average of its non-hole 8-connected neighbors. This process is repeated until all holes are filled. The code is available here: https://github.com/daviddoria/SmallHoleFiller Download and Review the paper at: http://www.insight-journal.org/browse/publication/835 Generated by the Insight Journal You are receiving this email because you asked to be informed by the Insight Journal for new submissions. To change your email preference go to http://www.insight-journal.org . From clinton at elemtech.com Thu Aug 25 00:24:31 2011 From: clinton at elemtech.com (=?utf-8?B?Y2xpbnRvbkBlbGVtdGVjaC5jb20=?=) Date: Wed, 24 Aug 2011 22:24:31 -0600 Subject: [vtkusers] =?utf-8?q?Problem_with_QVTKWidget_not_expanding_in_win?= =?utf-8?q?7=2E?= Message-ID: <20110825042419.B5C216016F1@mta2.zcs.xmission.com> No news... And no one has given a way to reproduce it. What version of Qt? And is it a problem in the latest Qt version? Clint ----- Reply message ----- From: "nsarrasin" Date: Wed, Aug 24, 2011 6:01 am Subject: [vtkusers] Problem with QVTKWidget not expanding in win7. To: Hi all, I'm re-opening this post because I encounter the same problem. For example, displaying a contextual menu above the qvtkwidget, with aero disabled, freeze the refreshing of the window. For the moment, the only solution I have is to turn aero on. Any news since the last post ? Thanks by advance -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-QVTKWidget-not-expanding-in-win7-tp4533383p4730175.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://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From jd379252 at gmail.com Thu Aug 25 02:26:00 2011 From: jd379252 at gmail.com (pof) Date: Thu, 25 Aug 2011 08:26:00 +0200 Subject: [vtkusers] CaptionActor2D text chopped off Message-ID: <4E55EAF8.70101@gmail.com> Hi David, I experienced the same type of problem with bold chopped characters. I think you should have a look at this post, where you'll see a solution was proposed to solve it (I applied it to vtk5.6.1 and it works): http://www.vtk.org/pipermail/vtkusers/2010-September/111444.html The patch proposed by Roger Bramon Feixas might not have been applied so far, which would be a pitty. Hope this can help Le 24/08/2011 15:23, vtkusers-request at vtk.org a ?crit : > ------------------------------ > > Message: 10 > Date: Tue, 23 Aug 2011 14:30:13 -0400 > From: David Doria > Subject: [vtkusers] CaptionActor2D text chopped off > To:vtkusers at vtk.org > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Hi all, > > I was experimenting with CaptionActor2D: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CaptionActor2D > > by using it to sequentially mark pixels in an image that the user > clicks. It seems to work great except that the right side of each > character seems to be chopped off? > > Even if I add additional text to the number: > > ss<< Numbers.size()<< " hi"; > > the number is still chopped. > > Can anyone reproduce or explain this behavior? > > Thanks, > > David > From jagjeet.nain at gmail.com Thu Aug 25 03:23:11 2011 From: jagjeet.nain at gmail.com (Jagjeet Nain) Date: Thu, 25 Aug 2011 09:23:11 +0200 Subject: [vtkusers] KiwiViewer in App Store. New open-source library coming soon. In-Reply-To: References: Message-ID: wow... thats a great news... with regards Nain On Wed, Aug 24, 2011 at 7:15 PM, pat marion wrote: > Hi, > > I'm excited to announce Kitware's first entry in the Apple app store. > KiwiViewer is a free, interactive application for exploration of geometric > datasets on multi-touch mobile devices. You can learn more about the app at > the website here: > > http://kiwiviewer.org > > And here is a press release: > > http://www.prweb.com/releases/prweb2011/8/prweb8741699.htm > > In progress are Android and WebGL versions of KiwiViewer. The KiwiViewer > app uses VTK and a new library we're calling VES: VTK OpenGL ES rendering > toolkit. We look forward to releasing VES open source under the Apache 2.0 > license. With VES we hope to pave the way for development of VTK > applications on mobile and web platforms. > > There's just a few things that we want to get in order before we open up > the repository, so thanks for being patient! In the meantime, we'd like to > hear your ideas. What sorts of things would you like to do on the mobile > and web platforms? > > VES is a standalone repository right now, but in the future we see it > becoming a module in the VTK repository, supplementing VTK's current OpenGL > pipeline. Here's what you can expect in the short term: > > -We're aiming for an end of October public release > -VES will include the KiwiViewer app for Android, iOS, and WebGL, > demonstrating how to use VTK in the mobile and web domains > -VES will include CMake scripts for cross compiling VTK on Android and iOS > platforms (using the vtkmodular repository) > -VES will be an open, fully inclusive effort. We hope the community is > interested in helping us design APIs, and as always patches are welcome and > we can give commit access to community members interested in collaboration. > > Stay tuned for future announcements, and don't hesitate to contact us with > your project ideas! If you're a potential customer who'd like help moving > your current application to a web or mobile platform, you can contact us at > kitware at kitware.com. > > Pat > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlokida at yahoo.fr Thu Aug 25 03:58:04 2011 From: mlokida at yahoo.fr (R M) Date: Thu, 25 Aug 2011 08:58:04 +0100 (BST) Subject: [vtkusers] VTK pipeline execution Message-ID: <1314259084.36261.YahooMailRC@web132217.mail.ird.yahoo.com> Hello, I have yet developped several vtk plugins that I only use in Paraview. Now, I have to develop an application in C++ with QT and using VTK. Maybe it is easy, but I would like to know how to manage the VTK Pipeline in my application. Do I have to develop the vtk pipeline like in the examples (http://www.vtk.org/Wiki/VTK/Examples/Cxx) , or do I have to use the request mechanism(for example, create a vtkInformationStringKey and using ProcessRequest) ? For example, if I want to add a new filter C between 2 existing filters (A, B), can I disconnect the connection between A & B and connect the ouput of A in the input of C and the output of C in the input of B ? Then to update the pipeline, Do I have to call update on A (and all the pipeline will be updated) or is it better to use the ProcessRequest for doing the update ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nsarrasin at phenix-systems.com Thu Aug 25 04:25:53 2011 From: nsarrasin at phenix-systems.com (nsarrasin) Date: Thu, 25 Aug 2011 01:25:53 -0700 (PDT) Subject: [vtkusers] Problem with QVTKWidget not expanding in win7. In-Reply-To: <20110825042419.B5C216016F1@mta2.zcs.xmission.com> References: <20110825042419.B5C216016F1@mta2.zcs.xmission.com> Message-ID: <1314260753977-4733565.post@n5.nabble.com> Here is additional information I can provide : - Qt 4.7 + vtk 5.6 - i have not tried any other version - step to reproduce (in my case) : -- displaying a qvtkwidget -- displaying a contextual menu (QMenu from Qt) above it -- while this menu is visible, try to move (rotate, pan, etc..) the scene. I have reproduce this step on several PC with windows seven. Everytime, the scene is only update in the region of the contextual menu, the other parts stay fixed. On some configuration, it takes few seconds for the window to refresh itself and on other config, I need to call GetRenderWindow()->Render();. I guess it depends on the graphic card. -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-QVTKWidget-not-expanding-in-win7-tp4533383p4733565.html Sent from the VTK - Users mailing list archive at Nabble.com. From drescherjm at gmail.com Thu Aug 25 04:32:51 2011 From: drescherjm at gmail.com (John Drescher) Date: Thu, 25 Aug 2011 04:32:51 -0400 Subject: [vtkusers] Problem with QVTKWidget not expanding in win7. In-Reply-To: <1314260753977-4733565.post@n5.nabble.com> References: <20110825042419.B5C216016F1@mta2.zcs.xmission.com> <1314260753977-4733565.post@n5.nabble.com> Message-ID: On Thu, Aug 25, 2011 at 4:25 AM, nsarrasin wrote: > Here is additional information I can provide : > - Qt 4.7 + vtk 5.6 > - i have not tried any other version > - step to reproduce (in my case) : > -- displaying a qvtkwidget > -- displaying a contextual menu (QMenu from Qt) above it > -- while this menu is visible, try to move (rotate, pan, etc..) the scene. > > I have reproduce this step on several PC with windows seven. Everytime, the > scene is only update in the region of the contextual menu, the other parts > stay fixed. > On some configuration, it takes few seconds for the window to refresh itself > and on other config, I need to call GetRenderWindow()->Render();. > I guess it depends on the graphic card. > I will try to test that at work today. I am using vtk-5.6.1 and Qt-4.7.3 on windows xp64 and windows 7 64 bit. I have never seen this effect however I never mess with the scene with a QMenu open. I definitely have manipulated the scene with QWidgets open but these dock to the right of the QVtkWidgets in my application and reduce their size. John John From agagliardi at ara.co.uk Thu Aug 25 04:39:08 2011 From: agagliardi at ara.co.uk (Adriano Gagliardi) Date: Thu, 25 Aug 2011 09:39:08 +0100 Subject: [vtkusers] [Paraview] KiwiViewer in App Store. New open-source library comingsoon. In-Reply-To: References: Message-ID: <56520470108048CBA92BC23115574949@win.ara> That's good news. Do you have any plans to port this to Android devices? Regards, Adriano =================================== Adriano Gagliardi MEng PhD Business Sector Leader Computational Aerodynamics Aircraft Research Association Ltd. Manton Lane Bedford Tel: 01234 32 4644 E-mail: agagliardi at ara.co.uk Url: www.ara.co.uk _____ From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On Behalf Of pat marion Sent: 24 August 2011 18:15 To: vtkusers at vtk.org; vtk-developers at vtk.org; paraview at paraview.org Subject: [Paraview] KiwiViewer in App Store. New open-source library comingsoon. Hi, I'm excited to announce Kitware's first entry in the Apple app store. KiwiViewer is a free, interactive application for exploration of geometric datasets on multi-touch mobile devices. You can learn more about the app at the website here: http://kiwiviewer.org And here is a press release: http://www.prweb.com/releases/prweb2011/8/prweb8741699.htm In progress are Android and WebGL versions of KiwiViewer. The KiwiViewer app uses VTK and a new library we're calling VES: VTK OpenGL ES rendering toolkit. We look forward to releasing VES open source under the Apache 2.0 license. With VES we hope to pave the way for development of VTK applications on mobile and web platforms. There's just a few things that we want to get in order before we open up the repository, so thanks for being patient! In the meantime, we'd like to hear your ideas. What sorts of things would you like to do on the mobile and web platforms? VES is a standalone repository right now, but in the future we see it becoming a module in the VTK repository, supplementing VTK's current OpenGL pipeline. Here's what you can expect in the short term: -We're aiming for an end of October public release -VES will include the KiwiViewer app for Android, iOS, and WebGL, demonstrating how to use VTK in the mobile and web domains -VES will include CMake scripts for cross compiling VTK on Android and iOS platforms (using the vtkmodular repository) -VES will be an open, fully inclusive effort. We hope the community is interested in helping us design APIs, and as always patches are welcome and we can give commit access to community members interested in collaboration. Stay tuned for future announcements, and don't hesitate to contact us with your project ideas! If you're a potential customer who'd like help moving your current application to a web or mobile platform, you can contact us at kitware at kitware.com. Pat ********************************************************************** This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ********************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Thu Aug 25 05:48:24 2011 From: drescherjm at gmail.com (John Drescher) Date: Thu, 25 Aug 2011 05:48:24 -0400 Subject: [vtkusers] VTK pipeline execution In-Reply-To: <1314259084.36261.YahooMailRC@web132217.mail.ird.yahoo.com> References: <1314259084.36261.YahooMailRC@web132217.mail.ird.yahoo.com> Message-ID: > For example, if I want to add a new filter C between 2 existing filters (A, > B), can? I disconnect the connection between A & B and connect the ouput of > A in the input of C and the output of C in the input of B ? Then to update > the pipeline, That is what I do in my application for the last 3 years and quite a few vtk versions. John From paul.m.edwards at gmail.com Thu Aug 25 06:05:27 2011 From: paul.m.edwards at gmail.com (Paul Edwards) Date: Thu, 25 Aug 2011 11:05:27 +0100 Subject: [vtkusers] [Paraview] KiwiViewer in App Store. New open-source library comingsoon. In-Reply-To: <56520470108048CBA92BC23115574949@win.ara> References: <56520470108048CBA92BC23115574949@win.ara> Message-ID: It says so on the webpage - didn't you read the link ;) Regards, Paul On 25 August 2011 09:39, Adriano Gagliardi wrote: > ** > That's good news. > > Do you have any plans to port this to Android devices? > > Regards, > > Adriano > > > =================================== > > Adriano Gagliardi MEng PhD > Business Sector Leader > Computational Aerodynamics > Aircraft Research Association Ltd. > Manton Lane > Bedford > > Tel: 01234 32 4644 > E-mail: agagliardi at ara.co.uk > Url: www.ara.co.uk > > > ------------------------------ > *From:* paraview-bounces at paraview.org [mailto: > paraview-bounces at paraview.org] *On Behalf Of *pat marion > *Sent:* 24 August 2011 18:15 > *To:* vtkusers at vtk.org; vtk-developers at vtk.org; paraview at paraview.org > *Subject:* [Paraview] KiwiViewer in App Store. New open-source library > comingsoon. > > Hi, > > I'm excited to announce Kitware's first entry in the Apple app store. > KiwiViewer is a free, interactive application for exploration of geometric > datasets on multi-touch mobile devices. You can learn more about the app at > the website here: > > http://kiwiviewer.org > > And here is a press release: > > http://www.prweb.com/releases/prweb2011/8/prweb8741699.htm > > In progress are Android and WebGL versions of KiwiViewer. The KiwiViewer > app uses VTK and a new library we're calling VES: VTK OpenGL ES rendering > toolkit. We look forward to releasing VES open source under the Apache 2.0 > license. With VES we hope to pave the way for development of VTK > applications on mobile and web platforms. > > There's just a few things that we want to get in order before we open up > the repository, so thanks for being patient! In the meantime, we'd like to > hear your ideas. What sorts of things would you like to do on the mobile > and web platforms? > > VES is a standalone repository right now, but in the future we see it > becoming a module in the VTK repository, supplementing VTK's current OpenGL > pipeline. Here's what you can expect in the short term: > > -We're aiming for an end of October public release > -VES will include the KiwiViewer app for Android, iOS, and WebGL, > demonstrating how to use VTK in the mobile and web domains > -VES will include CMake scripts for cross compiling VTK on Android and iOS > platforms (using the vtkmodular repository) > -VES will be an open, fully inclusive effort. We hope the community is > interested in helping us design APIs, and as always patches are welcome and > we can give commit access to community members interested in collaboration. > > Stay tuned for future announcements, and don't hesitate to contact us with > your project ideas! If you're a potential customer who'd like help moving > your current application to a web or mobile platform, you can contact us at > kitware at kitware.com. > > Pat > > ********************************************************************** > This email contains information that is private and confidential and is > intended only for the addressee. > If you are not the intended recipient please delete it and notify us > immediately by e-mailing the sender. > Note: All email sent to or from this address may be accessed by someone > other than the recipient, for > system management and security reasons. > Aircraft Research Association Ltd. Registered in England, Registration No > 503668 Registered Office: > Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 > > ********************************************************************** > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From agagliardi at ara.co.uk Thu Aug 25 06:14:25 2011 From: agagliardi at ara.co.uk (Adriano Gagliardi) Date: Thu, 25 Aug 2011 11:14:25 +0100 Subject: [vtkusers] [Paraview] KiwiViewer in App Store. New open-source library comingsoon. In-Reply-To: References: <56520470108048CBA92BC23115574949@win.ara> Message-ID: <848E5C0C434644659BFA8E19FE93C782@win.ara> Actually, I didn't get further than the first few lines. I'll pay more attention next time! :-p Cheers, Adriano =================================== Adriano Gagliardi MEng PhD Business Sector Leader Computational Aerodynamics Aircraft Research Association Ltd. Manton Lane Bedford Tel: 01234 32 4644 E-mail: agagliardi at ara.co.uk Url: www.ara.co.uk _____ From: Paul Edwards [mailto:paul.m.edwards at gmail.com] Sent: 25 August 2011 11:05 To: agagliardi at ara.co.uk Cc: pat marion; vtkusers at vtk.org; vtk-developers at vtk.org; paraview at paraview.org Subject: Re: [vtkusers] [Paraview] KiwiViewer in App Store. New open-source library comingsoon. It says so on the webpage - didn't you read the link ;) Regards, Paul On 25 August 2011 09:39, Adriano Gagliardi wrote: That's good news. Do you have any plans to port this to Android devices? Regards, Adriano =================================== Adriano Gagliardi MEng PhD Business Sector Leader Computational Aerodynamics Aircraft Research Association Ltd. Manton Lane Bedford Tel: 01234 32 4644 E-mail: agagliardi at ara.co.uk Url: www.ara.co.uk _____ From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On Behalf Of pat marion Sent: 24 August 2011 18:15 To: vtkusers at vtk.org; vtk-developers at vtk.org; paraview at paraview.org Subject: [Paraview] KiwiViewer in App Store. New open-source library comingsoon. Hi, I'm excited to announce Kitware's first entry in the Apple app store. KiwiViewer is a free, interactive application for exploration of geometric datasets on multi-touch mobile devices. You can learn more about the app at the website here: http://kiwiviewer.org And here is a press release: http://www.prweb.com/releases/prweb2011/8/prweb8741699.htm In progress are Android and WebGL versions of KiwiViewer. The KiwiViewer app uses VTK and a new library we're calling VES: VTK OpenGL ES rendering toolkit. We look forward to releasing VES open source under the Apache 2.0 license. With VES we hope to pave the way for development of VTK applications on mobile and web platforms. There's just a few things that we want to get in order before we open up the repository, so thanks for being patient! In the meantime, we'd like to hear your ideas. What sorts of things would you like to do on the mobile and web platforms? VES is a standalone repository right now, but in the future we see it becoming a module in the VTK repository, supplementing VTK's current OpenGL pipeline. Here's what you can expect in the short term: -We're aiming for an end of October public release -VES will include the KiwiViewer app for Android, iOS, and WebGL, demonstrating how to use VTK in the mobile and web domains -VES will include CMake scripts for cross compiling VTK on Android and iOS platforms (using the vtkmodular repository) -VES will be an open, fully inclusive effort. We hope the community is interested in helping us design APIs, and as always patches are welcome and we can give commit access to community members interested in collaboration. Stay tuned for future announcements, and don't hesitate to contact us with your project ideas! If you're a potential customer who'd like help moving your current application to a web or mobile platform, you can contact us at kitware at kitware.com. Pat ********************************************************************** This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ********************************************************************** _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers ********************************************************************** This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ********************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Thu Aug 25 07:28:52 2011 From: jothybasu at gmail.com (Jothy) Date: Thu, 25 Aug 2011 12:28:52 +0100 Subject: [vtkusers] calling destructors Message-ID: Hi all, This is c++ question rather than a vtk one, sorry for that. If I use this->imageData=vtkSmartPointer::New(); Should I call this-imageData->Delete() in the destructor of the class? Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Thu Aug 25 09:00:29 2011 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 25 Aug 2011 09:00:29 -0400 Subject: [vtkusers] calling destructors In-Reply-To: References: Message-ID: If this->imageData is a smart pointer, the delete will happen automatically once it get out of scope. But if you really want to delete the object at that point, you can do something like that as well. this->imageData = NULL; On Thu, Aug 25, 2011 at 7:28 AM, Jothy wrote: > Hi all, > > This is? c++ question rather than a vtk one, sorry for that. > > If I use > > this->imageData=vtkSmartPointer::New(); > > Should I call > > this-imageData->Delete() in the destructor of the class? > > Thanks > > Jothy > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > > From jothybasu at gmail.com Thu Aug 25 09:03:44 2011 From: jothybasu at gmail.com (Jothy) Date: Thu, 25 Aug 2011 14:03:44 +0100 Subject: [vtkusers] calling destructors In-Reply-To: References: Message-ID: Thanks very much. Jothy On Thu, Aug 25, 2011 at 2:00 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > If this->imageData is a smart pointer, the delete will happen > automatically once it get out of scope. > But if you really want to delete the object at that point, you can do > something like that as well. > > this->imageData = NULL; > > On Thu, Aug 25, 2011 at 7:28 AM, Jothy wrote: > > Hi all, > > > > This is c++ question rather than a vtk one, sorry for that. > > > > If I use > > > > this->imageData=vtkSmartPointer::New(); > > > > Should I call > > > > this-imageData->Delete() in the destructor of the class? > > > > Thanks > > > > Jothy > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://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://www.vtk.org/mailman/listinfo/vtkusers > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vicpe at alumni.uv.es Thu Aug 25 13:48:46 2011 From: vicpe at alumni.uv.es (vicpe at alumni.uv.es) Date: Thu, 25 Aug 2011 19:48:46 +0200 (CEST) Subject: [vtkusers] Geodesic method Message-ID: <6248498131vicpe@alumni.uv.es> Hello, My name is Victor, I am a spanish student and I am implementing a plugin on GIMIAS plateforme. I need to know if there is a geodesic method implemented on vtk for calculate the nearest point of a mesh depending of the point we select. Thank you very much. From daviddoria at gmail.com Thu Aug 25 13:52:40 2011 From: daviddoria at gmail.com (David Doria) Date: Thu, 25 Aug 2011 13:52:40 -0400 Subject: [vtkusers] Geodesic method In-Reply-To: <6248498131vicpe@alumni.uv.es> References: <6248498131vicpe@alumni.uv.es> Message-ID: On Thu, Aug 25, 2011 at 1:48 PM, wrote: > Hello, > > My name is Victor, I am a spanish student and I am implementing a plugin > on GIMIAS plateforme. I need to know if there is a geodesic method > implemented on vtk for calculate the nearest point of a mesh depending > of the point we select. > > Thank you very much. > These examples might get you started: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DijkstraGraphGeodesicPath http://www.vtk.org/Wiki/VTK/Examples/Cxx/DataStructures/vtkKdTree_BuildLocatorFromPoints_ClosestPoint David -------------- next part -------------- An HTML attachment was scrubbed... URL: From kacper.pluta at gmail.com Thu Aug 25 14:26:49 2011 From: kacper.pluta at gmail.com (Kacper Pluta) Date: Thu, 25 Aug 2011 20:26:49 +0200 Subject: [vtkusers] How to recalculate a matrix of parts of vtkAssembly? In-Reply-To: References: Message-ID: I prepared a program(You can compile it right away.) that demonstrates my problem. Main part looks like. /*********Start of code describing the problem.***************************/ //Send to the output the actual coordinates of last Item in vtkAssembly std::cout << "X min " << *root->GetLastProp3D()->GetXRange() << " X max " << *(root->GetLastProp3D()->GetXRange()+1) << " Y min " << *(root->GetLastProp3D()->GetYRange()) << " Y max " << *(root->GetLastProp3D()->GetYRange()+1) << std::endl; double *orientation = root->GetLastProp3D()->GetOrientation(); //Send to the output the actual orientation of last Item in vtkAssembly std::cout << "Orientation " << *orientation << " " << *(orientation+1) << " " << *(orientation+2) << std::endl; //Change orientation of whole vtkAssembly structure Tree->SetOrientation(90,35,45); Tree->SetPosition(0,2,1); orientation = root->GetLastProp3D()->GetOrientation(); //Send to the output the new coordinates of last Item in vtkAssembly std::cout << "X min " << *root->GetLastProp3D()->GetXRange() << " X max " << *(root->GetLastProp3D()->GetXRange()+1) << " Y min " << *(root->GetLastProp3D()->GetYRange()) << " Y max " << *(root->GetLastProp3D()->GetYRange()+1) << std::endl; //Send to the output the new orientation of last Item in vtkAssembly std::cout << "Orientation " << *orientation << " " << *(orientation+1) << " " << *(orientation+2) << std::endl; //Why nothing has changed? /*********End of code describing the problem.***************************/ 2011/8/24 Kacper Pluta > When a rotate vtkAssembly parts of it have old coordinate value. How can > force recalculate it? > > -- > "If you build your empire on money, it'll fall like a house of cards, if > you build it on love, you've built Taj Mahal!" - Mark Hartmaier > > -- "If you build your empire on money, it'll fall like a house of cards, if you build it on love, you've built Taj Mahal!" - Mark Hartmaier -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tree.zip Type: application/zip Size: 1846 bytes Desc: not available URL: From yxp233 at postech.ac.kr Thu Aug 25 21:25:34 2011 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Fri, 26 Aug 2011 10:25:34 +0900 Subject: [vtkusers] Put labels onto image Message-ID: <031101cc638f$0d8b7c20$28a27460$@ac.kr> Dear Users, I created several 3D objects, including sphere, cone, cylinder, and box. Then those objects were visualized on the same screen. My question is how to put labels on those objects, such as "Cone" on the cone, and "Cylinder" on the cylinder. And then, if I rotate the objects, the labels are also rotated in a synchronized pattern. Could anybody give me any ideas? Thank you. Xiaopeng -------------- next part -------------- An HTML attachment was scrubbed... URL: From wayne at 4raccoons.com Fri Aug 26 00:02:53 2011 From: wayne at 4raccoons.com (Wayne Christopher) Date: Thu, 25 Aug 2011 21:02:53 -0700 Subject: [vtkusers] Put labels onto image In-Reply-To: <031101cc638f$0d8b7c20$28a27460$@ac.kr> References: <031101cc638f$0d8b7c20$28a27460$@ac.kr> Message-ID: <4E571AED.4030401@4raccoons.com> I think what you need is a vtkCaptionActor2D. It is pretty much what you are describing. Wayne On 8/25/11 6:25 PM, Xiaopeng Yang wrote: > > Dear Users, > > I created several 3D objects, including sphere, cone, cylinder, and > box. Then those objects were visualized on the same screen. My > question is how to put labels on those objects, such as "Cone" on the > cone, and "Cylinder" on the cylinder. And then, if I rotate the > objects, the labels are also rotated in a synchronized pattern. > > Could anybody give me any ideas? > > Thank you. > > Xiaopeng > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxp233 at postech.ac.kr Fri Aug 26 03:43:05 2011 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Fri, 26 Aug 2011 16:43:05 +0900 Subject: [vtkusers] Put labels onto image In-Reply-To: <1314331414630770.018798.ptmail03@ptmail03> References: <031101cc638f$0d8b7c20$28a27460$@ac.kr> <1314331414630770.018798.ptmail03@ptmail03> Message-ID: <033101cc63c3$ca7ffde0$5f7ff9a0$@ac.kr> Hi Wayne, It works good. Thank you. However, when I rotate the 3D object, the caption which associated with a point on the 3D object should be covered (invisible) when that point is rotated to the backside (invisible). But is always visible and appear on the object, which can mislead the user to know the position of the caption. Do you have any good idea to avoid this happening? Thanks, Xiaopeng From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Wayne Christopher Sent: Friday, August 26, 2011 1:03 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] Put labels onto image I think what you need is a vtkCaptionActor2D. It is pretty much what you are describing. Wayne On 8/25/11 6:25 PM, Xiaopeng Yang wrote: Dear Users, I created several 3D objects, including sphere, cone, cylinder, and box. Then those objects were visualized on the same screen. My question is how to put labels on those objects, such as "Cone" on the cone, and "Cylinder" on the cylinder. And then, if I rotate the objects, the labels are also rotated in a synchronized pattern. Could anybody give me any ideas? Thank you. Xiaopeng -------------- next part -------------- An HTML attachment was scrubbed... URL: From e0425375 at gmail.com Fri Aug 26 04:42:23 2011 From: e0425375 at gmail.com (Florian Bruckner) Date: Fri, 26 Aug 2011 10:42:23 +0200 Subject: [vtkusers] gradient background direction Message-ID: <1314348143.2054.3.camel@florian-desktop> hi, is it somehow possible to set the direction of the gradient background? I would need this to make different renderers in a renderer-window visible to the user. Adding a box around the viewports would be another possibility, but i also didn't find an easy solution for this! (where no additional renderers / actors / ... have to be added, which could make the application slower) thanks FloB From artem.paraview at googlemail.com Fri Aug 26 05:56:59 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Fri, 26 Aug 2011 10:56:59 +0100 Subject: [vtkusers] Showing cube faces instead of axis? Message-ID: Hello, Is it possible for VTK to show coordinate 'planes' like on the picture attached, instead of just lines? That is I would like to see solid coordinate cube with 3 visible faces instead of 'wireframe' type of coordinate system. vtkCubeAxisActor2D apparently can show only lines. Best wishes Artem -------------- next part -------------- A non-text attachment was scrubbed... Name: graph.png Type: image/png Size: 83989 bytes Desc: not available URL: From daviddoria at gmail.com Fri Aug 26 07:33:25 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 26 Aug 2011 07:33:25 -0400 Subject: [vtkusers] Put labels onto image In-Reply-To: <033101cc63c3$ca7ffde0$5f7ff9a0$@ac.kr> References: <031101cc638f$0d8b7c20$28a27460$@ac.kr> <1314331414630770.018798.ptmail03@ptmail03> <033101cc63c3$ca7ffde0$5f7ff9a0$@ac.kr> Message-ID: On Fri, Aug 26, 2011 at 3:43 AM, Xiaopeng Yang wrote: > Hi Wayne,**** > > ** ** > > It works good. Thank you. However, when I rotate the 3D object, the caption > which associated with a point on the 3D object should be covered (invisible) > when that point is rotated to the backside (invisible). But is always > visible and appear on the object, which can mislead the user to know the > position of the caption.**** > > ** ** > > Do you have any good idea to avoid this happening?**** > > ** ** > > Thanks,**** > > Xiaopeng > CaptionActor2D is great for 2D, but for 3D I think you'll want: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower or http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Caption David -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxp233 at postech.ac.kr Fri Aug 26 09:14:43 2011 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Fri, 26 Aug 2011 22:14:43 +0900 Subject: [vtkusers] Put labels onto image In-Reply-To: <1314358408987273.018792.ptmail03@ptmail03> References: <031101cc638f$0d8b7c20$28a27460$@ac.kr> <1314331414630770.018798.ptmail03@ptmail03> <033101cc63c3$ca7ffde0$5f7ff9a0$@ac.kr> <1314358408987273.018792.ptmail03@ptmail03> Message-ID: <034e01cc63f2$1f0aaad0$5d200070$@ac.kr> David, The second example is what I want since I need to assign the caption to certain point in a 3D object. However, in the example, the caption itself does not move when I rotate the sphere. My question is how to make it move along with the 3D object during rotation. Thank you so much. Xiaopeng From: David Doria [mailto:daviddoria at gmail.com] Sent: Friday, August 26, 2011 8:33 PM To: Xiaopeng Yang Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Put labels onto image On Fri, Aug 26, 2011 at 3:43 AM, Xiaopeng Yang wrote: Hi Wayne, It works good. Thank you. However, when I rotate the 3D object, the caption which associated with a point on the 3D object should be covered (invisible) when that point is rotated to the backside (invisible). But is always visible and appear on the object, which can mislead the user to know the position of the caption. Do you have any good idea to avoid this happening? Thanks, Xiaopeng CaptionActor2D is great for 2D, but for 3D I think you'll want: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower or http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Caption David -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Fri Aug 26 09:26:12 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 26 Aug 2011 15:26:12 +0200 Subject: [vtkusers] gradient background direction In-Reply-To: <1314348143.2054.3.camel@florian-desktop> References: <1314348143.2054.3.camel@florian-desktop> Message-ID: I think that you can set a custom bitmap as a background. In it you can make any kind of gradient you like (I guess it will be smoothly stretched). On Fri, Aug 26, 2011 at 10:42, Florian Bruckner wrote: > hi, > > is it somehow possible to set the direction of the gradient background? > I would need this to make different renderers in a renderer-window > visible to the user. > > Adding a box around the viewports would be another possibility, but i > also didn't find an easy solution for this! (where no additional > renderers / actors / ... have to be added, which could make the > application slower) > > thanks > FloB > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Fri Aug 26 09:28:13 2011 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 26 Aug 2011 15:28:13 +0200 Subject: [vtkusers] Put labels onto image In-Reply-To: <034e01cc63f2$1f0aaad0$5d200070$@ac.kr> References: <031101cc638f$0d8b7c20$28a27460$@ac.kr> <1314331414630770.018798.ptmail03@ptmail03> <033101cc63c3$ca7ffde0$5f7ff9a0$@ac.kr> <1314358408987273.018792.ptmail03@ptmail03> <034e01cc63f2$1f0aaad0$5d200070$@ac.kr> Message-ID: You can group it into a vtkAssembly together with the sphere, and then rotate that assembly. On Fri, Aug 26, 2011 at 15:14, Xiaopeng Yang wrote: > David, **** > > ** ** > > The second example is what I want since I need to assign the caption to > certain point in a 3D object. However, in the example, the caption itself > does not move when I rotate the sphere. My question is how to make it move > along with the 3D object during rotation.**** > > ** ** > > Thank you so much.**** > > ** ** > > Xiaopeng**** > > ** ** > > *From:* David Doria [mailto:daviddoria at gmail.com] > *Sent:* Friday, August 26, 2011 8:33 PM > *To:* Xiaopeng Yang > *Cc:* vtkusers at vtk.org > > *Subject:* Re: [vtkusers] Put labels onto image**** > > ** ** > > On Fri, Aug 26, 2011 at 3:43 AM, Xiaopeng Yang > wrote:**** > > Hi Wayne,**** > > **** > > It works good. Thank you. However, when I rotate the 3D object, the caption > which associated with a point on the 3D object should be covered (invisible) > when that point is rotated to the backside (invisible). But is always > visible and appear on the object, which can mislead the user to know the > position of the caption.**** > > **** > > Do you have any good idea to avoid this happening?**** > > **** > > Thanks,**** > > Xiaopeng**** > > ** ** > > CaptionActor2D is great for 2D, but for 3D I think you'll want:**** > > ** ** > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower**** > > or**** > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Caption**** > > ** ** > > 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://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxp233 at postech.ac.kr Fri Aug 26 09:46:47 2011 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Fri, 26 Aug 2011 22:46:47 +0900 Subject: [vtkusers] Put labels onto image In-Reply-To: <1314365380747993.018795.ptmail03@ptmail03> References: <031101cc638f$0d8b7c20$28a27460$@ac.kr> <1314331414630770.018798.ptmail03@ptmail03> <033101cc63c3$ca7ffde0$5f7ff9a0$@ac.kr> <1314358408987273.018792.ptmail03@ptmail03> <034e01cc63f2$1f0aaad0$5d200070$@ac.kr> <1314365380747993.018795.ptmail03@ptmail03> Message-ID: <036e01cc63f6$99ad5540$cd07ffc0$@ac.kr> Thank you very much. One more question, I tried to put 2 captions onto the sphere. So I used two caption widgets. However, the two captions are overlapped at the left bottom corner. How to assign different location for different caption? Best, Xiaopeng From: D?enan Zuki? [mailto:dzenanz at gmail.com] Sent: Friday, August 26, 2011 10:28 PM To: Xiaopeng Yang Cc: David Doria; vtkusers at vtk.org Subject: Re: [vtkusers] Put labels onto image You can group it into a vtkAssembly together with the sphere, and then rotate that assembly. On Fri, Aug 26, 2011 at 15:14, Xiaopeng Yang wrote: David, The second example is what I want since I need to assign the caption to certain point in a 3D object. However, in the example, the caption itself does not move when I rotate the sphere. My question is how to make it move along with the 3D object during rotation. Thank you so much. Xiaopeng From: David Doria [mailto:daviddoria at gmail.com] Sent: Friday, August 26, 2011 8:33 PM To: Xiaopeng Yang Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Put labels onto image On Fri, Aug 26, 2011 at 3:43 AM, Xiaopeng Yang wrote: Hi Wayne, It works good. Thank you. However, when I rotate the 3D object, the caption which associated with a point on the 3D object should be covered (invisible) when that point is rotated to the backside (invisible). But is always visible and appear on the object, which can mislead the user to know the position of the caption. Do you have any good idea to avoid this happening? Thanks, Xiaopeng CaptionActor2D is great for 2D, but for 3D I think you'll want: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower or http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Caption 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://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From wayne at 4raccoons.com Fri Aug 26 09:57:26 2011 From: wayne at 4raccoons.com (Wayne Christopher) Date: Fri, 26 Aug 2011 06:57:26 -0700 Subject: [vtkusers] Put labels onto image In-Reply-To: <036e01cc63f6$99ad5540$cd07ffc0$@ac.kr> References: <031101cc638f$0d8b7c20$28a27460$@ac.kr> <1314331414630770.018798.ptmail03@ptmail03> <033101cc63c3$ca7ffde0$5f7ff9a0$@ac.kr> <1314358408987273.018792.ptmail03@ptmail03> <034e01cc63f2$1f0aaad0$5d200070$@ac.kr> <1314365380747993.018795.ptmail03@ptmail03> <036e01cc63f6$99ad5540$cd07ffc0$@ac.kr> Message-ID: <4E57A646.7010009@4raccoons.com> You should be able to change the position of the actor (as opposed to the attachment point) to move the relative caption position. See http://www.vtk.org/doc/nightly/html/classvtkCaptionActor2D.html#_details Wayne On 8/26/11 6:46 AM, Xiaopeng Yang wrote: > > Thank you very much. One more question, I tried to put 2 captions onto > the sphere. So I used two caption widgets. However, the two captions > are overlapped at the left bottom corner. How to assign different > location for different caption? > > Best, > > Xiaopeng > > *From:*Dz(enan Zukic' [mailto:dzenanz at gmail.com] > *Sent:* Friday, August 26, 2011 10:28 PM > *To:* Xiaopeng Yang > *Cc:* David Doria; vtkusers at vtk.org > *Subject:* Re: [vtkusers] Put labels onto image > > You can group it into a vtkAssembly together with the sphere, and then > rotate that assembly. > > On Fri, Aug 26, 2011 at 15:14, Xiaopeng Yang > wrote: > > David, > > The second example is what I want since I need to assign the caption > to certain point in a 3D object. However, in the example, the caption > itself does not move when I rotate the sphere. My question is how to > make it move along with the 3D object during rotation. > > Thank you so much. > > Xiaopeng > > *From:*David Doria [mailto:daviddoria at gmail.com > ] > *Sent:* Friday, August 26, 2011 8:33 PM > *To:* Xiaopeng Yang > *Cc:* vtkusers at vtk.org > > > *Subject:* Re: [vtkusers] Put labels onto image > > On Fri, Aug 26, 2011 at 3:43 AM, Xiaopeng Yang > wrote: > > Hi Wayne, > > It works good. Thank you. However, when I rotate the 3D object, the > caption which associated with a point on the 3D object should be > covered (invisible) when that point is rotated to the backside > (invisible). But is always visible and appear on the object, which can > mislead the user to know the position of the caption. > > Do you have any good idea to avoid this happening? > > Thanks, > > Xiaopeng > > CaptionActor2D is great for 2D, but for 3D I think you'll want: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower > > or > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Caption > > 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://www.vtk.org/mailman/listinfo/vtkusers > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From igorznt at gmail.com Fri Aug 26 10:25:55 2011 From: igorznt at gmail.com (igorznt) Date: Fri, 26 Aug 2011 07:25:55 -0700 (PDT) Subject: [vtkusers] Merge vtkImagedata Message-ID: <1314368755227-4738197.post@n5.nabble.com> I have an folder with 300 dicoms. I sorted then and created 3 vtkImagedata: the first from dicom 0 to dicom 100, the second from dicom 100 to dicom 200 and the third from dicom 200 to 300 and saved into 3 files using vtkXMLImageDataWriter . If i read one by one I get the perfect image data from the part but now I want to merge then. Any suggestion how? -- View this message in context: http://vtk.1045678.n5.nabble.com/Merge-vtkImagedata-tp4738197p4738197.html Sent from the VTK - Users mailing list archive at Nabble.com. From dominik at itis.ethz.ch Fri Aug 26 10:27:37 2011 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Fri, 26 Aug 2011 16:27:37 +0200 Subject: [vtkusers] Merge vtkImagedata In-Reply-To: <1314368755227-4738197.post@n5.nabble.com> References: <1314368755227-4738197.post@n5.nabble.com> Message-ID: There is a filter to append image datasets, search through the class list... On Fri, Aug 26, 2011 at 4:25 PM, igorznt wrote: > I have an folder with 300 dicoms. I sorted then and created 3 vtkImagedata: > the first from dicom 0 to dicom 100, the second from dicom 100 to dicom 200 > and the third from dicom 200 to 300 and saved into ?3 files using > vtkXMLImageDataWriter . If i read one by one I get the perfect image data > from the part but ?now I want to merge then. Any suggestion how? > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Merge-vtkImagedata-tp4738197p4738197.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://www.vtk.org/mailman/listinfo/vtkusers > > From igorznt at gmail.com Fri Aug 26 10:39:54 2011 From: igorznt at gmail.com (igorznt) Date: Fri, 26 Aug 2011 07:39:54 -0700 (PDT) Subject: [vtkusers] Merge vtkImagedata In-Reply-To: References: <1314368755227-4738197.post@n5.nabble.com> Message-ID: <1314369594482-4738246.post@n5.nabble.com> I tried vtkAppendFilter and his output is empty, I tried vtkImageAppend and vtkImageAppendComponents , both returned 1 single imagedata but wrong. -- View this message in context: http://vtk.1045678.n5.nabble.com/Merge-vtkImagedata-tp4738197p4738246.html Sent from the VTK - Users mailing list archive at Nabble.com. From webmaster at insightsoftwareconsortium.org Fri Aug 26 10:24:21 2011 From: webmaster at insightsoftwareconsortium.org (Insight Journal) Date: Fri, 26 Aug 2011 10:24:21 -0400 Subject: [vtkusers] New Submission: Interactive Correspondence Selection Message-ID: <201108261424.p7QEOLw4025173@insight-journal.org> Hello, A new submission has been added to the Insight Journal. Title: Interactive Correspondence Selection Authors: Doria D. Abstract: This document presents a GUI application to manually select corresponding points in two data sets. The data sets can each be either an image or a point cloud. If both data sets are images, the functionality is equivalent to Matlab's 'cpselect' function. There are many uses of selecting correspondences. If both data sets are images, the correspondences can be used to compute the fundamental matrix, or to perform registration. If both data sets are point clouds, the correspondences can be used to compute a landmark transformation. If one data set is an image and the other is a point cloud, the camera matrix relating the two can be computed. Download and review this publication at: http://hdl.handle.net/1926/210 Generated by the Insight Journal You are receiving this email because you asked to be informed by the Insight Journal for new submissions. To change your email preference visit http://www.insight-journal.org . From dominik at itis.ethz.ch Fri Aug 26 10:47:29 2011 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Fri, 26 Aug 2011 16:47:29 +0200 Subject: [vtkusers] Merge vtkImagedata In-Reply-To: <1314369594482-4738246.post@n5.nabble.com> References: <1314368755227-4738197.post@n5.nabble.com> <1314369594482-4738246.post@n5.nabble.com> Message-ID: Are the images you try to pile up the same size? There was some switch for that in vtkImageAppend options... On Fri, Aug 26, 2011 at 4:39 PM, igorznt wrote: > I tried vtkAppendFilter ? and his output is empty, > I tried vtkImageAppend and ? ? ?vtkImageAppendComponents , ?both returned 1 > single imagedata but wrong. > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Merge-vtkImagedata-tp4738197p4738246.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://www.vtk.org/mailman/listinfo/vtkusers > > From yxp233 at postech.ac.kr Fri Aug 26 10:53:40 2011 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Fri, 26 Aug 2011 23:53:40 +0900 Subject: [vtkusers] How to generate a point in 3D and change its location through dragging In-Reply-To: <1313589283638384.018791.ptmail03@ptmail03> References: <000001cc5c8d$f5a028c0$e0e07a40$@ac.kr> <1313589283638384.018791.ptmail03@ptmail03> Message-ID: <038d01cc63ff$f1b91270$d52b3750$@ac.kr> Hi David, Last time you sent me this example to change the location of a 3D point. In this example, I cannot rotate, translate the image through mouse event. Only thing that I can do is to drag the point to a new position. I found that using vtkInteractorStyleTrackballActor does not allow the default vtk interaction. So I changed it into vtkInteractorStyleTrackballCamera which allows the default vtk interaction. However, error occurred when I debugged the code. The error comes from " this->InteractionProp = this->MoveActor;": the InteractionProp is not a member of vtkInteractorStyleTrackballCamera. So what should I do to not only change the point location, but also rotate, translate, and zoom in/out the image? Thanks, Xiaopeng -----Original Message----- From: David Doria [mailto:daviddoria at gmail.com] Sent: Wednesday, August 17, 2011 10:55 PM To: Xiaopeng Yang Cc: vtk Subject: Re: [vtkusers] How to generate a point in 3D and change its location through dragging On Tue, Aug 16, 2011 at 11:30 PM, Xiaopeng Yang wrote: > Dear Users, > > I would like to generate a 3D point and then change its location through > mouse clicking and dragging. Does anybody have any good idea? Check out this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex David From daviddoria at gmail.com Fri Aug 26 11:53:27 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 26 Aug 2011 11:53:27 -0400 Subject: [vtkusers] How to generate a point in 3D and change its location through dragging In-Reply-To: <038d01cc63ff$f1b91270$d52b3750$@ac.kr> References: <000001cc5c8d$f5a028c0$e0e07a40$@ac.kr> <1313589283638384.018791.ptmail03@ptmail03> <038d01cc63ff$f1b91270$d52b3750$@ac.kr> Message-ID: On Fri, Aug 26, 2011 at 10:53 AM, Xiaopeng Yang wrote: > Hi David, > > Last time you sent me this example to change the location of a 3D point. In > this example, I cannot rotate, translate the image through mouse event. > Only > thing that I can do is to drag the point to a new position. I found that > using vtkInteractorStyleTrackballActor does not allow the default vtk > interaction. So I changed it into vtkInteractorStyleTrackballCamera which > allows the default vtk interaction. However, error occurred when I debugged > the code. The error comes from " this->InteractionProp = this->MoveActor;": > the InteractionProp is not a member of vtkInteractorStyleTrackballCamera. > > So what should I do to not only change the point location, but also rotate, > translate, and zoom in/out the image? > > Thanks, > Xiaopeng > I don't think there is a particularly nice solution. You could use this: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/StyleSwitch to switch between TrackballCamera and TrackballActor. Then once you are in TrackballActor mode, I would hold a key (i.e. control): http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/ShiftAndControl to indicate that you want to override the functionality of the left mouse button only when you have that key held down. Good luck, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Fri Aug 26 15:45:02 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 26 Aug 2011 15:45:02 -0400 Subject: [vtkusers] Black lines through ImageActor? Message-ID: I am using an ImageActor with InteractorStyleImage. I have noticed black lines appearing which break up my image into 4 tiles, as can be seen in this screenshot: http://daviddoria.com/Uploads/blacklines.jpg Is there a way to prevent this? Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Aug 26 16:10:11 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 26 Aug 2011 14:10:11 -0600 Subject: [vtkusers] Black lines through ImageActor? In-Reply-To: References: Message-ID: On Fri, Aug 26, 2011 at 1:45 PM, David Doria wrote: > I am using an ImageActor with InteractorStyleImage. I have noticed black > lines appearing which break up my image into 4 tiles, as can be seen in this > screenshot: > http://daviddoria.com/Uploads/blacklines.jpg > Is there a way to prevent this? The vtkImageActor will break the image up into multiple textures if the image is too large to fit into a single texture. There shouldn't be any black lines, though (and I have never seen black lines, myself). You should file a bug report that has details about your system (OS and graphics) and which version of VTK you are using. In VTK devel you can use vtkImageResliceMapper with vtkImageSlice to display large images, these classes allow an image to be efficiently and correctly displayed even if the image is too large for a texture. - David From daviddoria at gmail.com Fri Aug 26 16:52:11 2011 From: daviddoria at gmail.com (David Doria) Date: Fri, 26 Aug 2011 16:52:11 -0400 Subject: [vtkusers] Black lines through ImageActor? In-Reply-To: References: Message-ID: > > The vtkImageActor will break the image up into multiple textures if > the image is too large to fit into a single texture. There shouldn't > be any black lines, though (and I have never seen black lines, > myself). You should file a bug report that has details about your > system (OS and graphics) and which version of VTK you are using. > Done: http://vtk.org/Bug/view.php?id=12556 > In VTK devel you can use vtkImageResliceMapper with vtkImageSlice > to display large images, these classes allow an image to be efficiently > and correctly displayed even if the image is too large for a texture. vtkImageResliceMapper + vtkImageSlice worked perfectly (no black lines). Should this always be used instead of vtkImageActor? Or only for large images? http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageSlice David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Aug 26 17:09:24 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 26 Aug 2011 15:09:24 -0600 Subject: [vtkusers] Black lines through ImageActor? In-Reply-To: References: Message-ID: On Fri, Aug 26, 2011 at 2:52 PM, David Doria wrote: >> The vtkImageActor will break the image up into multiple textures if >> the image is too large to fit into a single texture. ?There shouldn't >> be any black lines, though (and I have never seen black lines, >> myself). ?You should file a bug report that has details about your >> system (OS and graphics) and which version of VTK you are using. > > Done:?http://vtk.org/Bug/view.php?id=12556 > >> >> In VTK devel you can use vtkImageResliceMapper with vtkImageSlice >> to display large images, these classes allow an image to be efficiently >> and correctly displayed even if the image is too large for a texture. > > vtkImageResliceMapper + vtkImageSlice worked perfectly (no black lines). > Should this always be used instead of vtkImageActor? Or only for large > images? > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageSlice The vtkImageResliceMapper should be used for large images, for oblique slices of 3D images, or for general-purpose high-quality image viewing. There is also a vtkImageSliceMapper class that is faster for small and medium-sized images, but it cannot do oblique slices and for large images it might suffer from the same problems as vtkImageActor. In VTK devel, there is no reason to use vtkImageActor. It is superseded by the classes described above. More info: http://www.vtk.org/Wiki/VTK/Image_Rendering_Classes Python example: VTK/Examples/ImageProcessing/Python/ImageInteractorReslice.py - David From dominik at itis.ethz.ch Fri Aug 26 17:11:08 2011 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Fri, 26 Aug 2011 23:11:08 +0200 Subject: [vtkusers] Black lines through ImageActor? In-Reply-To: References: Message-ID: I have seen similar thing on an intel integrated gfx chip and off-screen rendered screenshot bigger than the screen resolution. Dominik On Fri, Aug 26, 2011 at 9:45 PM, David Doria wrote: > I am using an ImageActor with InteractorStyleImage. I have noticed black > lines appearing which break up my image into 4 tiles, as can be seen in this > screenshot: > http://daviddoria.com/Uploads/blacklines.jpg > Is there a way to prevent this? > Thanks, > > 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://www.vtk.org/mailman/listinfo/vtkusers > > From david.gobbi at gmail.com Fri Aug 26 17:13:50 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 26 Aug 2011 15:13:50 -0600 Subject: [vtkusers] Black lines through ImageActor? In-Reply-To: References: Message-ID: On Fri, Aug 26, 2011 at 3:11 PM, Dominik Szczerba wrote: > I have seen similar thing on an intel integrated gfx chip and > off-screen rendered screenshot bigger than the screen resolution. That's useful. David, you didn't state what gfx you were using in the bug report, can you add the info? - David From efahlgren at lifemodeler.com Fri Aug 26 17:04:10 2011 From: efahlgren at lifemodeler.com (Fahlgren, Eric) Date: Fri, 26 Aug 2011 14:04:10 -0700 Subject: [vtkusers] nVidia driver problems Message-ID: Maybe this should go to the developer's list, if so let me know. I have occasionally had problems with nVidia video cards showing odd renderings of polydata object (shell/stl files with explicit normals). Up until now, changing the driver has fixed the problem (it's not necessarily the latest and greatest drivers that work, sometimes the solution is to use older ones). Well, I just got an nVidia Quadro FX3800 in a new machine and I cannot find the magic bullet to make the problem go away, so I need the wisdom of the list gods to help out. Here's the problem in graphical form: http://www.lifemodeler.com/eric/snapshot.html When the object in question is originally rendered, everything is fine. When I create a second view in the application (VTK inside wxWidgets) containing the same geometry, swapping back and forth between the two views causes this rendering error. Here are some clues: 1) Not the hardware. I swap the video card into a Windows XP Pro 32-bit machine and cannot reproduce the problem. Problematic machine is Win7 Pro 64-bit, the problem follows the OS (we've put the card into three machines now, 2x Win7 and 1x XP). 2) We don't see the problem in any other software, including other OGL-using CAD, CAM and CAE packages. 3) Does not happen on the "bad" machines when a Quadro FX1700 card is installed with the same driver versions. Does not happen with ATI FirePro V7800 on the "bad" machines. 4) Anything that causes the view to re-render (zoom, pan, or attribute changes on any object in the view), fixes the rendering and it looks "good" again. 5) In the past, this sort of render-mangling has happened on arbitrary objects, but in this current manifestation, it only appears to affect things with opacity != 1.0. I dug through both the developer and user archives, found something about texture maps causing problems when they were non-power-of-2 sized, but that's not it, as I can turn off all texture maps and see the same problem (besides, all my texture maps are 256x, or 512x...). Does anyone have ideas on how I can diagnose this? It sort of looks to me like the normals are backwards on the polydata object, but what would that mean? Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From quantum.leaf at gmail.com Sun Aug 28 05:48:00 2011 From: quantum.leaf at gmail.com (Liam Kurmos) Date: Sun, 28 Aug 2011 10:48:00 +0100 Subject: [vtkusers] RGBColor -> Scalar value. How to make reverse color lookup? Message-ID: Hi All, I am using vtkLookupTable to get colors from scalar, and now i would like to do the reverse. Is there any implementation to do this? or else convert a single colour RGB -> HSV from which i could calculate the value. Liam From daviddoria at gmail.com Sun Aug 28 09:10:57 2011 From: daviddoria at gmail.com (David Doria) Date: Sun, 28 Aug 2011 09:10:57 -0400 Subject: [vtkusers] RGBColor -> Scalar value. How to make reverse color lookup? In-Reply-To: References: Message-ID: On Sun, Aug 28, 2011 at 5:48 AM, Liam Kurmos wrote: > > Hi All, > > I am using vtkLookupTable to get colors from scalar, and now i would > like to do the reverse. Is there any implementation to do this? or > else convert a single colour RGB -> HSV from which i could calculate > the value. > > Liam I don't know about a reverse lookup in a vtkLookupTable, but this is the second function you asked for: http://www.vtk.org/doc/nightly/html/classvtkMath.html#acda272197c6723e3ff6e72822b1e1d79 static void vtkMath::RGBToHSV(const float?rgb[3], float?hsv[3]?) David From yxp233 at postech.ac.kr Sun Aug 28 22:04:37 2011 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Mon, 29 Aug 2011 11:04:37 +0900 Subject: [vtkusers] Regarding vtkPointWidget Message-ID: <03d401cc65f0$01784f40$0468edc0$@ac.kr> Dear Users, I was trying to visualize several selected 3D points and then would like to interactively change the location of each point to any other location in 3D. So I tried vtkPointWidget. However, it only allows the interaction with one point. Thus what should I do to interact with multiple points? Thanks a lot, Xiaopeng -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailagentrus at mail.ru Mon Aug 29 00:47:11 2011 From: mailagentrus at mail.ru (mailagentrus) Date: Sun, 28 Aug 2011 21:47:11 -0700 (PDT) Subject: [vtkusers] Create 3-D surface from contours in space Message-ID: <1314593231636-4745065.post@n5.nabble.com> Hello! I have 360 x-ray images (one image per degree). I got 2-D contours manually from all this pictures using itk. How can I create the surface from the 2-D contours? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-3-D-surface-from-contours-in-space-tp4745065p4745065.html Sent from the VTK - Users mailing list archive at Nabble.com. From sky.ping.2008 at 163.com Mon Aug 29 05:27:33 2011 From: sky.ping.2008 at 163.com (sky.ping.2008) Date: Mon, 29 Aug 2011 17:27:33 +0800 (CST) Subject: [vtkusers] need help Message-ID: <24d5d7f5.b039.13214dd80cf.Coremail.sky.ping.2008@163.com> hello dear: When i run the VTK C++ project i get a problom : "Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention." , the VTK C++ project can pass the Build and get zero warning or failure . If anyone knows, please tell me . thanks a lot . -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Mon Aug 29 08:35:59 2011 From: drescherjm at gmail.com (John Drescher) Date: Mon, 29 Aug 2011 08:35:59 -0400 Subject: [vtkusers] need help In-Reply-To: <24d5d7f5.b039.13214dd80cf.Coremail.sky.ping.2008@163.com> References: <24d5d7f5.b039.13214dd80cf.Coremail.sky.ping.2008@163.com> Message-ID: 2011/8/29 sky.ping.2008 : > hello dear: > When i run the VTK C++ project i get a? problom : "Run-Time Check Failure #0 > - The value of ESP was not properly saved across a function call.? This is > usually a result of calling a function declared with one calling convention > with a function pointer declared with a different calling convention." , the > VTK C++ project can pass the Build and get zero warning or failure . > If anyone knows, please tell me . > thanks a lot . > Are you using vtk as shared libraries (dlls)? If so is there more than 1 version of vtk installed on your machine? John From realandron at gmail.com Mon Aug 29 09:10:33 2011 From: realandron at gmail.com (Andrej Gluhov) Date: Mon, 29 Aug 2011 16:10:33 +0300 Subject: [vtkusers] How to create volume with color in vtkLookupTable? Message-ID: Hello! I create vtkImageData with vtkLookupTable. How I can create vtkVolume with the same colors? _lookupTable = new vtkLookupTable(); _doseColorMap = new vtkImageMapToColors(); double[] doseRange = (_source.GetScalarRange()); _lookupTable.SetNumberOfTableValues(100); _lookupTable.SetHueRange(0.83, 0); _lookupTable.SetTableRange(doseRange[0], doseRange[1]);//min dose,max dose _lookupTable.Build(); _doseColorMap.SetInput(_source); _doseColorMap.SetOutputFormatToRGBA(); _doseColorMap.SetLookupTable(_lookupTable); _doseColorMap.Update(); then I create volume: _volumeMapper = new vtkVolumeTextureMapper3D(); _volumeMapper.SetInput(doseColorMap.GetOutput()); _volume = new vtkVolume(); _volume.SetMapper(_volumeMapper); But volume is black. -- ? ?????????, ??????. Best regards, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From sky.ping.2008 at 163.com Mon Aug 29 09:19:51 2011 From: sky.ping.2008 at 163.com (sky.ping.2008) Date: Mon, 29 Aug 2011 21:19:51 +0800 (CST) Subject: [vtkusers] need help In-Reply-To: References: <24d5d7f5.b039.13214dd80cf.Coremail.sky.ping.2008@163.com> Message-ID: <173d414.85ba.13215b22f4f.Coremail.sky.ping.2008@163.com> Thank you for your help , the problem has been solved . As you said , there are two versions of vtk on my machine , and I uninstall one older version , then it works . Sky At 2011-08-29 20:35:59,"John Drescher" wrote: >2011/8/29 sky.ping.2008 : >> hello dear: >> When i run the VTK C++ project i get a? problom : "Run-Time Check Failure #0 >> - The value of ESP was not properly saved across a function call.? This is >> usually a result of calling a function declared with one calling convention >> with a function pointer declared with a different calling convention." , the >> VTK C++ project can pass the Build and get zero warning or failure . >> If anyone knows, please tell me . >> thanks a lot . >> > >Are you using vtk as shared libraries (dlls)? If so is there more than >1 version of vtk installed on your machine? > >John From dan.asimov at gmail.com Mon Aug 29 10:03:58 2011 From: dan.asimov at gmail.com (Dan Asimov) Date: Mon, 29 Aug 2011 10:03:58 -0400 Subject: [vtkusers] Surface artifacts from vtkVoxelContoursToSurfaceFilter Message-ID: Hi all, I'm trying to make a transparent surface for the heart from a stack of medical images. I use vtkContourWidget to draw the contours then pass them to vtkVoxelContoursToSurfaceFilter to get a surface then plot it. However, I get a surface as in the attached image with this kind of artifacts on the surface. I tried to smooth it using vtkSmoothPolyDataFilter but this didn't remove them. I thought this might occur because the surface normals are not correct, so I tried to use the filter sequence used in the medical2 example (i.e. vtkDataSetSurfaceFilter --> vtkPolyDataNormals --> vtkStripper --> vtkPolyDataMapper) but still have very similar result. What should I do to have a nice surface? Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: HeartSurface.png Type: image/png Size: 47452 bytes Desc: not available URL: From l.paul at uclouvain.be Mon Aug 29 10:27:41 2011 From: l.paul at uclouvain.be (Laurent) Date: Mon, 29 Aug 2011 07:27:41 -0700 (PDT) Subject: [vtkusers] Compute area from point cloud Message-ID: <1314628061802-4746331.post@n5.nabble.com> Hi all, I have a point cloud that is contained by a plane. I'd like to get the area of the described surface. I tried using vtkMassProperties, but I have to pass it triangles and not Points. If I first create triangles using Delaunay2D (different values for alpha and offset), I get badly generated triangles when my surface is concave. And it is very often! Is there a way - Either create properly generated triangles - Compute area from points Thanks, Laurent. -- View this message in context: http://vtk.1045678.n5.nabble.com/Compute-area-from-point-cloud-tp4746331p4746331.html Sent from the VTK - Users mailing list archive at Nabble.com. From jmrbcu at gmail.com Mon Aug 29 11:27:50 2011 From: jmrbcu at gmail.com (=?UTF-8?Q?Lic=2E_Jos=C3=A9_M=2E_Rodriguez_Bacallao?=) Date: Mon, 29 Aug 2011 11:27:50 -0400 Subject: [vtkusers] Black lines through ImageActor? In-Reply-To: References: Message-ID: what is a large image for U? On Fri, Aug 26, 2011 at 5:13 PM, David Gobbi wrote: > On Fri, Aug 26, 2011 at 3:11 PM, Dominik Szczerba wrote: >> I have seen similar thing on an intel integrated gfx chip and >> off-screen rendered screenshot bigger than the screen resolution. > > That's useful. ?David, you didn't state what gfx you were using in the > bug report, can you add the info? > > ?- 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://www.vtk.org/mailman/listinfo/vtkusers > -- Lic. Jos? M. Rodriguez Bacallao Centro de Biofisica Medica ----------------------------------------------------------------- Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo. Recuerda: El arca de Noe fue construida por aficionados, el titanic por profesionales ----------------------------------------------------------------- From david.gobbi at gmail.com Mon Aug 29 11:51:21 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 29 Aug 2011 09:51:21 -0600 Subject: [vtkusers] Black lines through ImageActor? In-Reply-To: References: Message-ID: Please use proper capitalization. And some people (including myself) do not like being referred to as "U". The definition of "large" depends on your graphics card, but a good rule-of-thumb is anything larger than 1024x1024. - David On Mon, Aug 29, 2011 at 9:27 AM, Lic. Jos? M. Rodriguez Bacallao wrote: > what is a large image for U? > > On Fri, Aug 26, 2011 at 5:13 PM, David Gobbi wrote: >> On Fri, Aug 26, 2011 at 3:11 PM, Dominik Szczerba wrote: >>> I have seen similar thing on an intel integrated gfx chip and >>> off-screen rendered screenshot bigger than the screen resolution. >> >> That's useful. ?David, you didn't state what gfx you were using in the >> bug report, can you add the info? >> >> ?- David From nunofernandes7 at gmail.com Mon Aug 29 12:10:23 2011 From: nunofernandes7 at gmail.com (nuno.jf) Date: Mon, 29 Aug 2011 09:10:23 -0700 (PDT) Subject: [vtkusers] doubt in conversion from VRML to VTK Message-ID: <1314634223896-4746682.post@n5.nabble.com> Dear Users, I have a doubt regarding a piece of code that converts a VRML file, containing geometric data, into a VTK (polydata) file. (link to the code: http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML) The code is similar to this: imp = vtkVRMLImporter::New(); imp -> SetFileName( fileName ); imp -> Read(); imp -> Update(); vtkDataSet *pDataset; vtkActorCollection *actors = imp -> GetRenderer()->GetActors(); actors -> InitTraversal(); pDataset = actors -> GetNextActor()->GetMapper()->GetInput(); vtkPolyData *polyData = vtkPolyData::SafeDownCast( pDataset ); polyData -> Update(); My question is: Why do we need to first convert to vtkDataSet, instead of directly converting to vtkPolyData, since vtkPolyData is a derived classe of vtkDataSet? I don't know If I am being totally clear, but why not doing this: imp = vtkVRMLImporter::New(); imp -> SetFileName( fileName ); imp -> Read(); imp -> Update(); vtkPolyData *pDataset::vtkPolyData::New(); vtkActorCollection *actors = imp -> GetRenderer()->GetActors(); actors -> InitTraversal(); pDataset = actors -> GetNextActor()->GetMapper()->GetInput(); pDataset->update(); Is this because there needs to be some specific way to convert the data to vtkPolyData? If so, is this done by SafeDownCast()? I know that SafeDownCast() converts a base-class pointer to a derive-class pointer and verifies the inheritance. I am a little confused, so any help would be greatly appreciated. Thank you, Nuno -- View this message in context: http://vtk.1045678.n5.nabble.com/doubt-in-conversion-from-VRML-to-VTK-tp4746682p4746682.html Sent from the VTK - Users mailing list archive at Nabble.com. From khaled.danwar53 at gmail.com Mon Aug 29 13:01:24 2011 From: khaled.danwar53 at gmail.com (khaled danwar) Date: Mon, 29 Aug 2011 18:01:24 +0100 Subject: [vtkusers] Marching cubes rendering Message-ID: Hello vtk users The program I am writing has a mixture of itk and vtk procedures, my problem is when I make use of vtkMarchingCubes. >From my understanding, I can use vtkMarchingCubes to render a 3D image in the viewing window (and effectively interact with it). I have a series of dicom files. I went through each and every one of them to select seeds for a region based segmentation procedure (itkConfidenceConnectedFilter), I then write segmented output into a new dicom file (I simply use itkImageWriter and filename to originalName.dcm and save it in another directory). The last task I need to do is to give a 3D visualisation of segmented dicom files (preferably using MarchingCubes). When I try the code below out, it complains about the files not being in 3D format when Im sure (I think Im sure, I'm anew user to vtk and itk) I saved it in 3D format. Code: typedef float InputPixelType; typedef unsigned short OutputPixelType; //define the image type that will read from the input DICOM file typedef itk::Image InputImageType; typedef itk::ImageFileReader ReaderType; //Load the data ReaderType3D::Pointer reader = ReaderType3D::New(); //we need to make use of GDCMImageIO to assist with reading a series of DICOM files in a different directory ImageIOType::Pointer dicomReadIO = ImageIOType::New(); reader->SetImageIO( dicomReadIO ); //get the directory whilst instructing to make use of as much information to distinguish between DICOM files NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); nameGenerator->SetUseSeriesDetails( true ); nameGenerator->SetInputDirectory( outputDirectory ); //extraxt the filenames SeriesIdContainer seriesUID = nameGenerator->GetSeriesUIDs(); FileNamesContainer fileNames = nameGenerator->GetFileNames( seriesUID.begin()->c_str() ); reader->SetFileNames( fileNames ); try { reader->Update(); } catch (itk::ExceptionObject &ex) { std::cout << ex << std::endl; } ExportFilterType::Pointer itkExporter = ExportFilterType::New(); itkExporter->SetInput( reader->GetOutput() ); //Create the vtkImageImport and connect it to the itk::VTKImageExport instance. vtkImageImport* vtkImporter = vtkImageImport::New(); ConnectPipelines(itkExporter, vtkImporter); //Smoothing the edges with gaussian vtkSmartPointer gaussianSmoothFilter = vtkSmartPointer::New(); gaussianSmoothFilter->SetInput(threshold->GetOutput()); //gaussianSmoothFilter->SetInputConnection(vtkImporter->GetOutputPort()); gaussianSmoothFilter->SetRadiusFactor(2); vtkImageToStructuredPoints *toStructuredPoints=vtkImageToStructuredPoints::New(); toStructuredPoints->SetInput(gaussianSmoothFilter->GetOutput()); //Marching Cubes vtkSmartPointer surface = vtkSmartPointer::New(); surface->SetInput(toStructuredPoints->GetOutput()); //surface->SetInputConnection(gaussianSmoothFilter->GetOutputPort()); surface->ComputeNormalsOn(); surface->ComputeGradientsOn(); //Create a mapper vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInput(surface->GetOutput()); mapper->SetInputConnection(surface->GetOutputPort()); // Visualize vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); vtkSmartPointer interactor = vtkSmartPointer::New(); renderer->AddActor(actor); renderWindow->AddRenderer(renderer); interactor->SetRenderWindow(renderWindow); renderWindow->SetSize(800,600); renderWindow->Render(); interactor->Start(); Error: ERROR: In C:.....\vtkMarchingCubes.cxx, line 415 vtkMarchingCubes (0000000002F58D40): Cannot contour data of dimension != 3 Any help would be appreciated including any insight on these vtk classes I may be using wrongly, Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexmalvtk at gmail.com Mon Aug 29 16:18:02 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Mon, 29 Aug 2011 13:18:02 -0700 Subject: [vtkusers] doubt in conversion from VRML to VTK In-Reply-To: <1314634223896-4746682.post@n5.nabble.com> References: <1314634223896-4746682.post@n5.nabble.com> Message-ID: Try to compile what you suggested and you will quickly find why. Mapper will return you pointer to vtkDataSet *: vtkDataSet * vtkMapper::GetInput(); vtkPolyData* pDataset::vtkPolyData::New(); ... pDataset = actors -> GetNextActor()->GetMapper()->GetInput(); // Line will not compile , vtkPolyData pointer is also pointer to vtkDataset . vtkDataset pointer might point to instance of the class which has noting to do with vtkPolyData, Since you know that you should deal with vtkPolyData you need to cast pointer, which has nothing to do with data conversion. Regards, Alex On Mon, Aug 29, 2011 at 9:10 AM, nuno.jf wrote: > Dear Users, > > I have a doubt regarding a piece of code that converts a VRML file, > containing geometric data, into a VTK (polydata) file. (link to the code: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML) > The code is similar to this: > > ? ? ? ?imp = vtkVRMLImporter::New(); > ? ? ? ?imp -> SetFileName( fileName ); > ? ? ? ?imp -> Read(); > ? ? ? ?imp -> Update(); > > ? ? ? ?vtkDataSet *pDataset; > ? ? ? ?vtkActorCollection *actors = imp -> GetRenderer()->GetActors(); > ? ? ? ?actors -> InitTraversal(); > ? ? ? ?pDataset = actors -> GetNextActor()->GetMapper()->GetInput(); > > ? ? ? ?vtkPolyData *polyData = vtkPolyData::SafeDownCast( pDataset ); > ? ? ? ?polyData -> Update(); > > My question is: Why do we need to first convert to vtkDataSet, instead of > directly converting to vtkPolyData, since vtkPolyData is a derived classe of > vtkDataSet? I don't know If I am being totally clear, but why not doing > this: > > ? ? ? ?imp = vtkVRMLImporter::New(); > ? ? ? ?imp -> SetFileName( fileName ); > ? ? ? ?imp -> Read(); > ? ? ? ?imp -> Update(); > > ? ? ? ?vtkPolyData *pDataset::vtkPolyData::New(); > ? ? ? ?vtkActorCollection *actors = imp -> GetRenderer()->GetActors(); > ? ? ? ?actors -> InitTraversal(); > ? ? ? ?pDataset = actors -> GetNextActor()->GetMapper()->GetInput(); > ? ? ? ?pDataset->update(); > > Is this because there needs to be some specific way to convert the data to > vtkPolyData? If so, is this done by SafeDownCast()? I know that > SafeDownCast() converts a base-class pointer to a derive-class pointer and > verifies the inheritance. > I am a little confused, so any help would be greatly appreciated. > Thank you, > > Nuno > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/doubt-in-conversion-from-VRML-to-VTK-tp4746682p4746682.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://www.vtk.org/mailman/listinfo/vtkusers > From alexmalvtk at gmail.com Mon Aug 29 16:27:24 2011 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Mon, 29 Aug 2011 13:27:24 -0700 Subject: [vtkusers] Problem with QVTKWidget not expanding in win7. In-Reply-To: References: <20110825042419.B5C216016F1@mta2.zcs.xmission.com> <1314260753977-4733565.post@n5.nabble.com> Message-ID: I have not built my application with latest vtk yet , But I seen problem in the Paraview (64 bit) which I also running on my Windows 7. After menu displayed over QVTK widget is hidden you piece of widget stops updating itself correctly. This is fixed if you resize the window (I just maximize it). Very annoying bug. Regards, Alex On Thu, Aug 25, 2011 at 1:32 AM, John Drescher wrote: > On Thu, Aug 25, 2011 at 4:25 AM, nsarrasin wrote: >> Here is additional information I can provide : >> - Qt 4.7 + vtk 5.6 >> - i have not tried any other version >> - step to reproduce (in my case) : >> -- displaying a qvtkwidget >> -- displaying a contextual menu (QMenu from Qt) above it >> -- while this menu is visible, try to move (rotate, pan, etc..) the scene. >> >> I have reproduce this step on several PC with windows seven. Everytime, the >> scene is only update in the region of the contextual menu, the other parts >> stay fixed. >> On some configuration, it takes few seconds for the window to refresh itself >> and on other config, I need to call GetRenderWindow()->Render();. >> I guess it depends on the graphic card. >> > > I will try to test that at work today. I am using vtk-5.6.1 and > Qt-4.7.3 on windows xp64 and windows 7 64 bit. I have never seen this > effect however I never mess with the scene with a QMenu open. I > definitely have manipulated the scene with QWidgets open but these > dock to the right of the QVtkWidgets in my application and reduce > their size. > > John > > John > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers > From drescherjm at gmail.com Mon Aug 29 16:32:46 2011 From: drescherjm at gmail.com (John Drescher) Date: Mon, 29 Aug 2011 16:32:46 -0400 Subject: [vtkusers] Problem with QVTKWidget not expanding in win7. In-Reply-To: References: <20110825042419.B5C216016F1@mta2.zcs.xmission.com> <1314260753977-4733565.post@n5.nabble.com> Message-ID: On Mon, Aug 29, 2011 at 4:27 PM, Alex Malyushytskyy wrote: > I have not built my application with latest vtk yet , > But I seen problem in the Paraview (64 bit) which I also running on my > Windows 7. > After menu displayed over QVTK widget is hidden you piece of widget > stops updating itself correctly. > This is fixed if you resize the window (I just maximize it). > I just tried this on my application (Qt based using vtk 5.6.1) since I am currently using it under 64 bit windows 7 and I did not experience any problem. I clicked on the file menu which covered 1/4 to 1/2 of the left side of my display. Then I used the scroll wheel to switch slices in the lung ct case I was looking at and there was no update problem at all. John From jmrbcu at gmail.com Mon Aug 29 17:10:21 2011 From: jmrbcu at gmail.com (=?UTF-8?Q?Lic=2E_Jos=C3=A9_M=2E_Rodriguez_Bacallao?=) Date: Mon, 29 Aug 2011 17:10:21 -0400 Subject: [vtkusers] Black lines through ImageActor? In-Reply-To: References: Message-ID: sorry for the "U", my mistake. So, for images larger than 1024x1024 and oblique slices I can use: vtkImageResliceMapper and mid size images (< 1024x1024): vtkImageSliceMapper? On Mon, Aug 29, 2011 at 11:51 AM, David Gobbi wrote: > Please use proper capitalization. ?And some people (including myself) > do not like being referred to as "U". > > The definition of "large" depends on your graphics card, but a good > rule-of-thumb is anything larger than 1024x1024. > > ?- David > > > On Mon, Aug 29, 2011 at 9:27 AM, Lic. Jos? M. Rodriguez Bacallao > wrote: >> what is a large image for U? >> >> On Fri, Aug 26, 2011 at 5:13 PM, David Gobbi wrote: >>> On Fri, Aug 26, 2011 at 3:11 PM, Dominik Szczerba wrote: >>>> I have seen similar thing on an intel integrated gfx chip and >>>> off-screen rendered screenshot bigger than the screen resolution. >>> >>> That's useful. ?David, you didn't state what gfx you were using in the >>> bug report, can you add the info? >>> >>> ?- David > -- Lic. Jos? M. Rodriguez Bacallao Centro de Biofisica Medica ----------------------------------------------------------------- Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo. Recuerda: El arca de Noe fue construida por aficionados, el titanic por profesionales ----------------------------------------------------------------- From wxjlixiang at gmail.com Mon Aug 29 20:50:14 2011 From: wxjlixiang at gmail.com (Xiang Lee) Date: Tue, 30 Aug 2011 08:50:14 +0800 Subject: [vtkusers] a problem about vtk parallel visiualization Message-ID: Hello, I am doing some program development using the vtk parallel module recently, now a tough problem has been haunting me for several weeks, which i can't find any help till now, briefly spearking, imitaing the example on vtk website, i wrote one taskparallel program, the debug result is correct, but when i run it using wmpiexec, setting 2 threads, i can't see the visiualization result, that is to say there is no win32OpenGL window displaying the visiualization result, at the same time, the correct print result prove that there are no running faults in either thread, now i am helpless, so can you give me a favor? Thx~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tshead at sandia.gov Mon Aug 29 23:18:21 2011 From: tshead at sandia.gov (Shead, Timothy) Date: Tue, 30 Aug 2011 03:18:21 +0000 Subject: [vtkusers] Generate in-memory JPEG images in Python Message-ID: Gang: I'm experimenting with generating an offscreen JPEG image on a web-server using VTK and Python, but I'm hung-up on how to convert the vtkUnsignedCharArray returned by vtkJPEGWriter::GetResult() into a Python string or buffer. Any thoughts? I see that it's easy to create a numpy array that points to the same memory, maybe there's something I could do with it? Many thanks, Tim Timothy M. Shead Sandia National Laboratories 1461, Scalable Analysis and Visualization From prakeshofficial at gmail.com Mon Aug 29 23:32:28 2011 From: prakeshofficial at gmail.com (rakesh patil) Date: Tue, 30 Aug 2011 09:02:28 +0530 Subject: [vtkusers] Can vtkArrayCalculator handle NAN values? Message-ID: Hello, I have two vtkDoubleArray objects. Say A and B. I need to perform A-B operation and store the resultant in suppose C. I use vtkArrayCalculator in order to do this. Now the problem is my array A contains some NAN values or say bad values. which I obviously want to avoid. And therefore I am not getting the expected results. So is there any way out to handle NAN's in vtkArrayCalculator..??? Thanks Regards Rakesh Patil -------------- next part -------------- An HTML attachment was scrubbed... URL: From e0425375 at gmail.com Tue Aug 30 03:25:10 2011 From: e0425375 at gmail.com (Florian Bruckner) Date: Tue, 30 Aug 2011 09:25:10 +0200 Subject: [vtkusers] set vtkInteractorStyleTrackballCamera rotation center Message-ID: <1314689110.1973.43.camel@florian-desktop> hi, is it somehow possible to set the rotation center when using vtkInteractorStyleTrackballCamera(). My problem is that if i move my geometry out of the center of the renderer, the rotation is still around the center of the renderer and not around the center of the geometry. Using SetFocalPoint() allows to set the focalpoint of the camera to the geometry, but then the geometry is centered again. in fact i want the have the same behaviour the i get with vtkInteractorStyleTrackballCamera() for one geometry, but it should also work for many geometries, without having to synchronize to motion of many actors. In my opinion moving the camera would be the best way to do this, but i did not archive this. thanks FloB From mlokida at yahoo.fr Tue Aug 30 04:16:20 2011 From: mlokida at yahoo.fr (R M) Date: Tue, 30 Aug 2011 09:16:20 +0100 (BST) Subject: [vtkusers] Iso lines visualisation on points grid Message-ID: <1314692180.10178.YahooMailRC@web132218.mail.ird.yahoo.com> Hello, Here's my problem, I have written a reader that read a point grid file. It is composed of points with a constant Z and for each points I have an associated value. My reader creates a vtkPolyData. Now I would like to create the iso lines of my grid. I have tried the contour filter (in paraview) but I have nothing at the ouput. If I use the delaunay filter, the output geometry is not nice. So, if someone know how I can create iso lines from points grid, that would be great. Thank You. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stoneyang0915 at gmail.com Tue Aug 30 04:16:32 2011 From: stoneyang0915 at gmail.com (Fan Yang) Date: Tue, 30 Aug 2011 16:16:32 +0800 Subject: [vtkusers] Problems in Using vtkContourFilter to Visualizing Message-ID: Hi, all, I am working the task of visualization of vessel segmentation right now. I am not sure whether the problems are in the ITK code or in the VTK code, but the problems occurs when adding vtk classes, so I post my problem here. I chose itk::CurvesLevelSetImageFilter for segmentation and vtkContourFilter for visualization. The pipeline are constructed based on the example code of the level set image filter in the following directory: InsightToolkit\Examples\Segmentation\itkCurvesLevelSetImageFilter.cxx After doing some experiments with single piece of 2D images (in dicom format), I modified the example code above to enable 3D reconstruction of the segmentation results. However, I received the following result in vtk's render window: http://i1238.photobucket.com/albums/ff483/cdfinder/result1.png The red blobs are generated in the approximity of the seeds "in" the region of vessels and are supposed to be two test balloons. But they apparently appear in the wrong position. Could anyone give me some advice? Thanks. Fan -- Fan YANG Institute of Automation Chinese Academy of Sciences No.95 Zhongguancun East Road Haidian District Beijing Municipality PR China 100190 -------------- next part -------------- An HTML attachment was scrubbed... URL: From claire.fanny1995 at gmail.com Tue Aug 30 07:25:23 2011 From: claire.fanny1995 at gmail.com (Claire Frances) Date: Tue, 30 Aug 2011 16:25:23 +0500 Subject: [vtkusers] 3D Object color Message-ID: Hi i am Claire well after putting a lot of efforts now i have successfully created a volume rendering of 2d images all is fine and great the only issue which i am getting is that i don't know how to add colors on 3d object. Regards Claire Fanny Software developer From daviddoria at gmail.com Tue Aug 30 07:52:06 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 30 Aug 2011 07:52:06 -0400 Subject: [vtkusers] 3D Object color In-Reply-To: References: Message-ID: On Tue, Aug 30, 2011 at 7:25 AM, Claire Frances wrote: > Hi i am Claire well after putting a lot of efforts now i have > successfully created a volume rendering of 2d images all is fine and > great the only issue which i am getting is ?that i don't know how to > add colors on 3d object. > > Regards > Claire Fanny Hi Claire, This message is best suited to the vtk-users list only. Which data structure are you trying to add colors to? vtkImageData? vtkPolyData? etc? David From bill.lorensen at gmail.com Tue Aug 30 08:01:12 2011 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 30 Aug 2011 08:01:12 -0400 Subject: [vtkusers] Marching cubes rendering In-Reply-To: References: Message-ID: Please post all of the code including all of the typedef's. On Mon, Aug 29, 2011 at 1:01 PM, khaled danwar wrote: > Hello vtk users > > The program I am writing has a mixture of itk and vtk procedures, my > problem is when I make use of vtkMarchingCubes. > > From my understanding, I can use vtkMarchingCubes to render a 3D image in > the viewing window (and effectively interact with it). > > I have a series of dicom files. I went through each and every one of them > to select seeds for a region based segmentation procedure > (itkConfidenceConnectedFilter), I then write segmented output into a new > dicom file (I simply use itkImageWriter and filename to originalName.dcm and > save it in another directory). The last task I need to do is to give a 3D > visualisation of segmented dicom files (preferably using MarchingCubes). > When I try the code below out, it complains about the files not being in 3D > format when Im sure (I think Im sure, I'm anew user to vtk and itk) I saved > it in 3D format. > > > Code: > > > typedef float InputPixelType; > typedef unsigned short OutputPixelType; > > //define the image type that will read from the input DICOM file > typedef itk::Image InputImageType; > typedef itk::ImageFileReader ReaderType; > > > //Load the data > ReaderType3D::Pointer reader = ReaderType3D::New(); > //we need to make use of GDCMImageIO to assist with reading a series of > DICOM files in a different directory > ImageIOType::Pointer dicomReadIO = ImageIOType::New(); > reader->SetImageIO( dicomReadIO ); > //get the directory whilst instructing to make use of as much information > to distinguish between DICOM files > NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); > nameGenerator->SetUseSeriesDetails( true ); > nameGenerator->SetInputDirectory( outputDirectory ); > //extraxt the filenames > SeriesIdContainer seriesUID = nameGenerator->GetSeriesUIDs(); > FileNamesContainer fileNames = nameGenerator->GetFileNames( > seriesUID.begin()->c_str() ); > > reader->SetFileNames( fileNames ); > try > { > reader->Update(); > } > catch (itk::ExceptionObject &ex) > { > std::cout << ex << std::endl; > } > > ExportFilterType::Pointer itkExporter = ExportFilterType::New(); > itkExporter->SetInput( reader->GetOutput() ); > //Create the vtkImageImport and connect it to the itk::VTKImageExport > instance. > vtkImageImport* vtkImporter = vtkImageImport::New(); > ConnectPipelines(itkExporter, vtkImporter); > > > //Smoothing the edges with gaussian > vtkSmartPointer gaussianSmoothFilter = > vtkSmartPointer::New(); > gaussianSmoothFilter->SetInput(threshold->GetOutput()); > > //gaussianSmoothFilter->SetInputConnection(vtkImporter->GetOutputPort()); > gaussianSmoothFilter->SetRadiusFactor(2); > > vtkImageToStructuredPoints > *toStructuredPoints=vtkImageToStructuredPoints::New(); > toStructuredPoints->SetInput(gaussianSmoothFilter->GetOutput()); > > //Marching Cubes > vtkSmartPointer surface = > vtkSmartPointer::New(); > surface->SetInput(toStructuredPoints->GetOutput()); > //surface->SetInputConnection(gaussianSmoothFilter->GetOutputPort()); > surface->ComputeNormalsOn(); > surface->ComputeGradientsOn(); > > //Create a mapper > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInput(surface->GetOutput()); > mapper->SetInputConnection(surface->GetOutputPort()); > > // Visualize > vtkSmartPointer actor = vtkSmartPointer::New(); > actor->SetMapper(mapper); > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > vtkSmartPointer interactor = > vtkSmartPointer::New(); > > renderer->AddActor(actor); > renderWindow->AddRenderer(renderer); > interactor->SetRenderWindow(renderWindow); > > renderWindow->SetSize(800,600); > renderWindow->Render(); > interactor->Start(); > > > > > > > > Error: > > ERROR: In C:.....\vtkMarchingCubes.cxx, line 415 > vtkMarchingCubes (0000000002F58D40): Cannot contour data of dimension != 3 > > > > Any help would be appreciated including any insight on these vtk classes I > may be using wrongly, Thanks. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oka at bpe.es.osaka-u.ac.jp Tue Aug 30 08:52:18 2011 From: oka at bpe.es.osaka-u.ac.jp (oka) Date: Tue, 30 Aug 2011 21:52:18 +0900 Subject: [vtkusers] extracted surface mesh Message-ID: <20110830215218.1B17.F353B791@bpe.es.osaka-u.ac.jp> Dear users, I extracted surface by PolyDataConnectivityFilter and want to get the mesh to reduce the number of vertices. Probably decimate is probable. How can I apply vtkDecimate to the mesh from PolyDataConnectivityFilter or could you show me any examples suitable ? Best regards, Oka -- oka From daviddoria at gmail.com Tue Aug 30 09:04:47 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 30 Aug 2011 09:04:47 -0400 Subject: [vtkusers] extracted surface mesh In-Reply-To: <20110830215218.1B17.F353B791@bpe.es.osaka-u.ac.jp> References: <20110830215218.1B17.F353B791@bpe.es.osaka-u.ac.jp> Message-ID: On Tue, Aug 30, 2011 at 8:52 AM, oka wrote: > Dear users, > > I extracted surface by PolyDataConnectivityFilter > and want to get the mesh to reduce the number of > vertices. Probably decimate is probable. > How can I apply vtkDecimate to the mesh > from PolyDataConnectivityFilter or could you > show me any examples suitable ? > > Best regards, > > Oka Here is an example of how to get something from the PolyDataConnectivityFilter: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/vtkPolyDataConnectivityFilter_LargestRegion and here are some ways to decimate a mesh: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Decimation http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/QuadricDecimation http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/QuadricClustering David From oka at bpe.es.osaka-u.ac.jp Tue Aug 30 09:34:17 2011 From: oka at bpe.es.osaka-u.ac.jp (czbebe) Date: Tue, 30 Aug 2011 06:34:17 -0700 (PDT) Subject: [vtkusers] extracted surface mesh In-Reply-To: References: <20110830215218.1B17.F353B791@bpe.es.osaka-u.ac.jp> Message-ID: <1314711257496-4750027.post@n5.nabble.com> Dear David, Thanks, I know examples. These examples seems to need polydata, In following example, there is no polydata, http://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/ExtractLargestIsosurface How can I assign "input" in decimation example ? decimate->SetInputConnection(input->GetProducerPort()); Best regards, Oka -- View this message in context: http://vtk.1045678.n5.nabble.com/extracted-surface-mesh-tp4749907p4750027.html Sent from the VTK - Users mailing list archive at Nabble.com. From nunofernandes7 at gmail.com Tue Aug 30 09:34:30 2011 From: nunofernandes7 at gmail.com (nuno.jf) Date: Tue, 30 Aug 2011 06:34:30 -0700 (PDT) Subject: [vtkusers] doubt in conversion from VRML to VTK In-Reply-To: References: <1314634223896-4746682.post@n5.nabble.com> Message-ID: <1314711270110-4750028.post@n5.nabble.com> Got it! Thank you very much Alex! Regards, Nuno -- View this message in context: http://vtk.1045678.n5.nabble.com/doubt-in-conversion-from-VRML-to-VTK-tp4746682p4750028.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Tue Aug 30 09:38:20 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 30 Aug 2011 09:38:20 -0400 Subject: [vtkusers] extracted surface mesh In-Reply-To: <1314711257496-4750027.post@n5.nabble.com> References: <20110830215218.1B17.F353B791@bpe.es.osaka-u.ac.jp> <1314711257496-4750027.post@n5.nabble.com> Message-ID: On Tue, Aug 30, 2011 at 9:34 AM, czbebe wrote: > Dear David, > > Thanks, I know examples. > These examples seems to need polydata, > In following example, there is no polydata, > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/ExtractLargestIsosurface > How can I assign "input" in decimation example ? > decimate->SetInputConnection(input->GetProducerPort()); > > Best regards, > > Oka What do you mean there is no polydata? confilter->GetOutputPort() is the input to vtkPolyDataMapper, so it can also be the input to the decimate filter: decimate->SetInputConnection(confilter->GetOutputPort()); David From oka at bpe.es.osaka-u.ac.jp Tue Aug 30 10:03:58 2011 From: oka at bpe.es.osaka-u.ac.jp (czbebe) Date: Tue, 30 Aug 2011 07:03:58 -0700 (PDT) Subject: [vtkusers] extracted surface mesh In-Reply-To: References: <20110830215218.1B17.F353B791@bpe.es.osaka-u.ac.jp> <1314711257496-4750027.post@n5.nabble.com> Message-ID: <1314713038486-4750152.post@n5.nabble.com> Dear David, confilter causes an error. : error: 'class vtkPolyDataCon nectivityFilter' has no member named 'GetProducerPort' Basic question is mesh can be constructed from polydata ? My intension is to make a reduced number of mesh for the extracted surface. Best regards, Oka -- View this message in context: http://vtk.1045678.n5.nabble.com/extracted-surface-mesh-tp4749907p4750152.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Tue Aug 30 10:10:43 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 30 Aug 2011 10:10:43 -0400 Subject: [vtkusers] extracted surface mesh In-Reply-To: <1314713038486-4750152.post@n5.nabble.com> References: <20110830215218.1B17.F353B791@bpe.es.osaka-u.ac.jp> <1314711257496-4750027.post@n5.nabble.com> <1314713038486-4750152.post@n5.nabble.com> Message-ID: On Tue, Aug 30, 2011 at 10:03 AM, czbebe wrote: > Dear David, > > confilter causes an error. > : error: 'class vtkPolyDataCon > nectivityFilter' has no member named 'GetProducerPort' > > Basic question is mesh can be constructed from polydata ? > My intension is to make a reduced number of mesh for the extracted > surface. > > Best regards, > > Oka Note that it should be GetOutputPort: decimate->SetInputConnection(confilter->GetOutputPort()); GetProducerPort() is only if you have an object (vtkPolyData) and want to pass it to the input of another filter. GetOutputPort() is if you want to pass the output of a filter (vtkPolyDataConnectivityFilter) to the input of another filter. David From artem.paraview at googlemail.com Tue Aug 30 10:21:47 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Tue, 30 Aug 2011 15:21:47 +0100 Subject: [vtkusers] Overlaying simulation results on PNG image Message-ID: Hi, I have a 2D concentration field defined over 1000x1000m area on 50x50 rectangular grid. I have PNG image of the map of the area (e.g. 400x400 pixels). I need to draw the concentration field over the map (and to be able to rotate the resulting 2D image in 3D). How can I make both pictures to cover the same area? Providing, that I have vtkSmartPointer data_set vtkSmartPointer png_reader already filled with data and omitting parts for setting the lookup table I do the following: //For PNG image: vtkSmartPointer image_viewer = vtkSmartPointer::New(); image_viewer->SetInputConnection(png_reader->GetOutputPort()); vtkSmartPointer mapper_png = vtkSmartPointer::New(); mapper_png->SetInput(image_viewer->GetInput()); actor_png->SetMapper(mapper_png); //For conc field: vtkSmartPointer mapper_field = vtkSmartPointer::New(); mapper_field->SetInput(data_set); actor_field->SetMapper(mapper_field); and then add both actors to window for rendering. The PNG image covers just as fraction of the area covered with concentration filed. Is it possible to make PNG file automatically stretched over the concentration field area Or, if it should be done manually, how to calculate the required stretching coefficient? Best wishes Artem From sebastien.jourdain at kitware.com Tue Aug 30 10:28:00 2011 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 30 Aug 2011 10:28:00 -0400 Subject: [vtkusers] Overlaying simulation results on PNG image In-Reply-To: References: Message-ID: Hi Artem, you can use the actor transformation of the PNG image to stretch to the current value. As I don't fully understand your problem, I might provide an invalid answer. But based on the bounds of both your data, you should be able to determine the scale that you want to apply to the PNG so it could match the other. Good luck, Seb On Tue, Aug 30, 2011 at 10:21 AM, Artem Babayan wrote: > Hi, > > I have a 2D concentration field defined over 1000x1000m area on 50x50 > rectangular grid. I have PNG image of the map of the area (e.g. > 400x400 pixels). I need to draw the concentration field over the map > (and to be able to rotate the resulting ?2D image in 3D). How can I > make both pictures to cover the same area? > > Providing, that I have > > vtkSmartPointer data_set > vtkSmartPointer png_reader > > already filled with data and omitting parts for setting the lookup > table I do the following: > > //For PNG image: > ?vtkSmartPointer image_viewer = > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?vtkSmartPointer::New(); > ?image_viewer->SetInputConnection(png_reader->GetOutputPort()); > > ?vtkSmartPointer mapper_png = > ? ? ? ? ? ? ? vtkSmartPointer::New(); > ?mapper_png->SetInput(image_viewer->GetInput()); > > ?actor_png->SetMapper(mapper_png); > > //For conc field: > ?vtkSmartPointer mapper_field = > ? ? ? ? ? ? ? vtkSmartPointer::New(); > ?mapper_field->SetInput(data_set); > ?actor_field->SetMapper(mapper_field); > > and then add both actors to window for rendering. The PNG image covers > just as fraction of the area covered with concentration filed. Is it > possible to make PNG file automatically stretched over the > concentration field area Or, if it should be done manually, how to > calculate the required stretching coefficient? > > Best wishes > Artem > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers > From bill.lorensen at gmail.com Tue Aug 30 10:46:40 2011 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 30 Aug 2011 10:46:40 -0400 Subject: [vtkusers] Marching cubes rendering In-Reply-To: References: Message-ID: I suggest using the meta file format to save your segmented 3d volume. In your itkImageWriter, set the filename to something.mha. Likewise on the reader. On Tue, Aug 30, 2011 at 9:12 AM, khaled danwar wrote: > Hi Bill, > > Attached is the c++ file, thanks for any help you can give. I'm suspecting > that I am not writing my segmentation outputs to their files correctly, but, > then again, I am very new to itk and vtk and I could be wrong. Sorry about > the code being untidy and not organized; I wanted to get the final result > before anything else. > > I've done some researching and found that particular vtk examples in the > Medical folder were suggested (ie Medical1, Medical2, Medical3.cxx and > especially GenerateModelsFromLabel.cxx, the last one tends to be suited to > getting the 3d render I want after segmentation, but Im not sure what kind > of files they are asking for as inputs, ie " DATADIR/headsq/quarter" and > 'Input Volume' (is the latter just a series of dicom files?)). > > Thanks > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Aug 30 11:22:54 2011 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 30 Aug 2011 11:22:54 -0400 Subject: [vtkusers] Marching cubes rendering In-Reply-To: References: Message-ID: I don't know abut the segmented DICOM files you wrote. I'd have see see that code. However, I'm sure the .mha files will work. On Tue, Aug 30, 2011 at 11:14 AM, khaled danwar wrote: > So, instead of writing the segmented outputs to new dicom files, write them > to .mha files and then read them for use through marching cubes, is that > right? > > Just so that I know, are.mha files the usual files you would use for 3d > rendering, they have a dimension of 3. I only ask because I would've assumed > that's the case for the segmented dicom files I make and yet the marching > cubes complained, as mentioned previously. > > Thanks for the info > > > On Tue, Aug 30, 2011 at 3:46 PM, Bill Lorensen wrote: > >> I suggest using the meta file format to save your segmented 3d volume. In >> your itkImageWriter, set the filename to something.mha. Likewise on the >> reader. >> >> On Tue, Aug 30, 2011 at 9:12 AM, khaled danwar > > wrote: >> >>> Hi Bill, >>> >>> Attached is the c++ file, thanks for any help you can give. I'm >>> suspecting that I am not writing my segmentation outputs to their files >>> correctly, but, then again, I am very new to itk and vtk and I could be >>> wrong. Sorry about the code being untidy and not organized; I wanted to get >>> the final result before anything else. >>> >>> I've done some researching and found that particular vtk examples in the >>> Medical folder were suggested (ie Medical1, Medical2, Medical3.cxx and >>> especially GenerateModelsFromLabel.cxx, the last one tends to be suited to >>> getting the 3d render I want after segmentation, but Im not sure what kind >>> of files they are asking for as inputs, ie " DATADIR/headsq/quarter" and >>> 'Input Volume' (is the latter just a series of dicom files?)). >>> >>> Thanks >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tshead at sandia.gov Tue Aug 30 11:49:20 2011 From: tshead at sandia.gov (Shead, Timothy) Date: Tue, 30 Aug 2011 15:49:20 +0000 Subject: [vtkusers] Generate in-memory JPEG images in Python In-Reply-To: References: Message-ID: On Aug 29, 2011, at 9:18 PM, Shead, Timothy wrote: > Gang: > > I'm experimenting with generating an offscreen JPEG image on a web-server using VTK and Python, but I'm hung-up on how to convert the vtkUnsignedCharArray returned by vtkJPEGWriter::GetResult() into a Python string or buffer. Any thoughts? I see that it's easy to create a numpy array that points to the same memory, maybe there's something I could do with it? OK, answering my own question - you can convert vtkUnsignedCharArray to a numpy.ndarray using vtk.util.numpy_support.vtk_to_numpy(), then use the numpy array's tostring() method. Feedback welcome if there's anything more direct. Cheers, Tim Timothy M. Shead Sandia National Laboratories 1461, Scalable Analysis and Visualization From david.gobbi at gmail.com Tue Aug 30 11:53:58 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 30 Aug 2011 09:53:58 -0600 Subject: [vtkusers] Generate in-memory JPEG images in Python In-Reply-To: References: Message-ID: On Tue, Aug 30, 2011 at 9:49 AM, Shead, Timothy wrote: > > On Aug 29, 2011, at 9:18 PM, Shead, Timothy wrote: > >> Gang: >> >> I'm experimenting with generating an offscreen JPEG image on a web-server using VTK and Python, but I'm hung-up on how to convert the vtkUnsignedCharArray returned by vtkJPEGWriter::GetResult() into a Python string or buffer. ?Any thoughts? ?I see that it's easy to create a numpy array that points to the same memory, maybe there's something I could do with it? > > OK, answering my own question - you can convert vtkUnsignedCharArray to a numpy.ndarray using vtk.util.numpy_support.vtk_to_numpy(), then use the numpy array's tostring() method. ?Feedback welcome if there's anything more direct. Tim, no conversion should be necessary at all. The vtkDataArray classes support the python buffer protocol directly. Just pass the vtkDataArray to any python method that takes a buffer object, and it should just work. - David From artem.paraview at googlemail.com Tue Aug 30 12:02:08 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Tue, 30 Aug 2011 17:02:08 +0100 Subject: [vtkusers] Overlaying simulation results on PNG image In-Reply-To: References: Message-ID: Hi, Sebastien Thank you for reply. The problem is illustrated by attached picture -- it shows 'background' png file and visualized concentration field together. The generated image size is 800x800. The original size of the 'background' PNG image is ~ 600x900 pixels, but it occupies only a very small portion of the final picture (the black square). So I would like to know why is it 'scaled down' and how to make it cover the whole simulation area (in this case 30x30 cells 500m each). Best wishes Artem On 30 August 2011 15:28, Sebastien Jourdain wrote: > Hi Artem, > > you can use the actor transformation of the PNG image to stretch to > the current value. > As I don't fully understand your problem, I might provide an invalid > answer. But based on the bounds of both your data, you should be able > to determine the scale that you want to apply to the PNG so it could > match the other. > > Good luck, > > Seb > > On Tue, Aug 30, 2011 at 10:21 AM, Artem Babayan > wrote: >> Hi, >> >> I have a 2D concentration field defined over 1000x1000m area on 50x50 >> rectangular grid. I have PNG image of the map of the area (e.g. >> 400x400 pixels). I need to draw the concentration field over the map >> (and to be able to rotate the resulting ?2D image in 3D). How can I >> make both pictures to cover the same area? >> >> Providing, that I have >> >> vtkSmartPointer data_set >> vtkSmartPointer png_reader >> >> already filled with data and omitting parts for setting the lookup >> table I do the following: >> >> //For PNG image: >> ?vtkSmartPointer image_viewer = >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?vtkSmartPointer::New(); >> ?image_viewer->SetInputConnection(png_reader->GetOutputPort()); >> >> ?vtkSmartPointer mapper_png = >> ? ? ? ? ? ? ? vtkSmartPointer::New(); >> ?mapper_png->SetInput(image_viewer->GetInput()); >> >> ?actor_png->SetMapper(mapper_png); >> >> //For conc field: >> ?vtkSmartPointer mapper_field = >> ? ? ? ? ? ? ? vtkSmartPointer::New(); >> ?mapper_field->SetInput(data_set); >> ?actor_field->SetMapper(mapper_field); >> >> and then add both actors to window for rendering. The PNG image covers >> just as fraction of the area covered with concentration filed. Is it >> possible to make PNG file automatically stretched over the >> concentration field area Or, if it should be done manually, how to >> calculate the required stretching coefficient? >> >> Best wishes >> Artem >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 11958 bytes Desc: not available URL: From bentivegna at cct.lsu.edu Tue Aug 30 12:00:44 2011 From: bentivegna at cct.lsu.edu (Eloisa Bentivegna) Date: Tue, 30 Aug 2011 18:00:44 +0200 Subject: [vtkusers] Interpolation options. Message-ID: <83AE0153-2DCF-4C35-9611-950711BAEF51@cct.lsu.edu> Hello, I'm using vtkProbeFilter in order to interpolate data from an unstructured grid, but doxygen doesn't mention much in the way of interpolation options. How can one learn about the type of available stencils or interpolation orders? Thanks! Eloisa From sean.ziegeler at nrlssc.navy.mil Tue Aug 30 14:10:13 2011 From: sean.ziegeler at nrlssc.navy.mil (Sean Ziegeler) Date: Tue, 30 Aug 2011 13:10:13 -0500 Subject: [vtkusers] Can vtkArrayCalculator handle NAN values? In-Reply-To: References: Message-ID: Numpy has a few functions, like nansum that perform operations that ignore NaN's. See: http://docs.scipy.org/doc/numpy/reference/generated/numpy.nansum.html However, if you are simply subtracting two arrays, e.g., C=A-B, and A has NaN's in positions where B does not, you will have to decide how to treat the NaN's based on your application. By default, the array values in C where A was NaN will be set to NaN. If you want to do something else, I suggest replacing all NaNs with a value that makes sense for your application. You can do that using the numpy isnan() function: http://docs.scipy.org/doc/numpy/reference/generated/numpy.isnan.html#numpy.isnan -Sean On 08/29/11 22:32, rakesh patil wrote: > Hello, > > I have two vtkDoubleArray objects. Say A and B. I need to perform A-B > operation and store the resultant in suppose C. > > I use vtkArrayCalculator in order to do this. Now the problem is my > array A contains some NAN values or say bad values. which I obviously > want to avoid. And therefore I am not getting the expected results. > > So is there any way out to handle NAN's in vtkArrayCalculator..??? > > Thanks > > Regards > Rakesh Patil > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://www.vtk.org/mailman/listinfo/vtkusers From lindeval at dmat.ufrr.br Tue Aug 30 15:40:04 2011 From: lindeval at dmat.ufrr.br (lindeval at dmat.ufrr.br) Date: Tue, 30 Aug 2011 15:40:04 -0400 (GMT-04:00) Subject: [vtkusers] how to convert vtkImageData to vtkpolyData?? In-Reply-To: <28568152.123511314732207942.JavaMail.root@waimiri.ufrr.br> Message-ID: <26417977.123761314733204016.JavaMail.root@waimiri.ufrr.br> Hello everybody! I have a raw file that was read with vtkImageReader, and I want to transform in vtkPolyData. How do I? Thanks in advance. From daviddoria at gmail.com Tue Aug 30 15:43:17 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 30 Aug 2011 15:43:17 -0400 Subject: [vtkusers] how to convert vtkImageData to vtkpolyData?? In-Reply-To: <26417977.123761314733204016.JavaMail.root@waimiri.ufrr.br> References: <28568152.123511314732207942.JavaMail.root@waimiri.ufrr.br> <26417977.123761314733204016.JavaMail.root@waimiri.ufrr.br> Message-ID: On Tue, Aug 30, 2011 at 3:40 PM, wrote: > Hello everybody! I have a raw file that was read with vtkImageReader, and I want to transform in vtkPolyData. How do I? > > Thanks in advance. It depends on what you want. Do you want just a set of points in the polydata that have the same location and color as the pixels in the image? What are you trying to do? David From david.gobbi at gmail.com Tue Aug 30 15:56:44 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 30 Aug 2011 13:56:44 -0600 Subject: [vtkusers] Interpolation options. In-Reply-To: <83AE0153-2DCF-4C35-9611-950711BAEF51@cct.lsu.edu> References: <83AE0153-2DCF-4C35-9611-950711BAEF51@cct.lsu.edu> Message-ID: Hi Eloisa, The vtkProbeFilter does not allow you to choose how the interpolation is done. The interpolation is always first order. - David On Tue, Aug 30, 2011 at 10:00 AM, Eloisa Bentivegna wrote: > Hello, > > I'm using vtkProbeFilter in order to interpolate data from an unstructured grid, but doxygen doesn't mention much in the way of interpolation options. How can one learn about the type of available stencils or interpolation orders? > > Thanks! > Eloisa From daviddoria at gmail.com Tue Aug 30 15:58:59 2011 From: daviddoria at gmail.com (David Doria) Date: Tue, 30 Aug 2011 15:58:59 -0400 Subject: [vtkusers] how to convert vtkImageData to vtkpolyData?? In-Reply-To: <10453365.124351314734204508.JavaMail.root@waimiri.ufrr.br> References: <4496410.124331314734189161.JavaMail.root@waimiri.ufrr.br> <10453365.124351314734204508.JavaMail.root@waimiri.ufrr.br> Message-ID: On Tue, Aug 30, 2011 at 3:56 PM, wrote: > I turn my raw file in a file wavefront(.obj) > > In this example, > > > vtkSmartPointer sphereSource = > ?vtkSmartPointer :: New (); > > ? vtkSmartPointer writer = > ? vtkSmartPointer :: New (); > ? writer-> SetInputConnection (sphereSource-> GetOutputPort ()); > ? writer-> SetFileName (outputFilename.c_str ()); > ? writer-> Update (); > > I go with the object ball and get a wavefront file (. obj). > > I wanted to do the same with my raw file, (phantom voxels) > > ?reader = vtkSmartPointer :: New (); > ?reader-> SetFileDimensionality (3); > ?reader-> SetDataByteOrderToLittleEndian (); > ?reader-> SetFileName (nameFile.toStdString (). c_str ()); > ?reader-> SetNumberOfScalarComponents (1); > ?reader-> SetDataScalarTypeToUnsignedChar (); > ?reader-> SetDataExtent (0,441,0,255,0,1353); > ?reader-> SetDataSpacing (1.0,1.0,1.0); > ?reader-> SetDataOrigin (0.0,0.0,0.0); > ?reader-> Update (); > > ..... > > Is that clear? Please keep your replies on the mailing list so everyone can help and learn. So you are just trying to write a vtkImageData? If so, you can use vtkXMLImageDataWriter to write a VTI file (which can be read in Paraview) or you can use the vtkMetaImageWriter: http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/MetaImageWriter David From itzastu at gmail.com Tue Aug 30 16:00:27 2011 From: itzastu at gmail.com (Stu Griffin) Date: Tue, 30 Aug 2011 13:00:27 -0700 (PDT) Subject: [vtkusers] Help with VTK and zlib?? Message-ID: <1314734427842-4751587.post@n5.nabble.com> G'day all, I am very new to this game so thank you in advance for your patience. I am trying to build VTK on my mac as x86_64 with carbon and then attempting to use the sample carbon xcode project to get my bearings. I am using CMake to build VTK 5.6 source and this step seems to be going all smoothly. I have a nice static library that links into the xcode project with the appropriate source trees and no red links that i can find. I have changed the build settings to target OSX10.6 and x86_64 and this seems fine. However i can only get as far as building everything successfully before it all falls over during the linking stage. The errors that occur at this stage are; Undefined symbols for architecture x86_64: "_vtk_zlib_crc32", referenced from: _vtk_png_reset_crc in libvtkpng.a(png.c.o) _vtk_png_calculate_crc in libvtkpng.a(png.c.o) "_vtk_zlib_inflateReset", referenced from: _vtk_png_reset_zstream in libvtkpng.a(png.c.o) _vtk_png_decompress_chunk in libvtkpng.a(pngrutil.c.o) _vtk_png_read_finish_row in libvtkpng.a(pngrutil.c.o) _ZIPPreDecode in libvtktiff.a(tif_zip.c.o) _PixarLogPreDecode in libvtktiff.a(tif_pixarlog.c.o) "_vtk_zlib_inflateInit_", referenced from: _vtk_png_create_read_struct in libvtkpng.a(pngread.c.o) _vtk_png_read_init_3 in libvtkpng.a(pngread.c.o) _ZIPSetupDecode in libvtktiff.a(tif_zip.c.o) _PixarLogSetupDecode in libvtktiff.a(tif_pixarlog.c.o) "_vtk_zlib_inflate", referenced from: _vtk_png_read_row in libvtkpng.a(pngread.c.o) _vtk_png_decompress_chunk in libvtkpng.a(pngrutil.c.o) _vtk_png_read_finish_row in libvtkpng.a(pngrutil.c.o) _ZIPDecode in libvtktiff.a(tif_zip.c.o) _PixarLogDecode in libvtktiff.a(tif_pixarlog.c.o) "_vtk_zlib_inflateEnd", referenced from: _vtk_png_read_destroy in libvtkpng.a(pngread.c.o) _ZIPCleanup in libvtktiff.a(tif_zip.c.o) _PixarLogCleanup in libvtktiff.a(tif_pixarlog.c.o) "_vtk_zlib_inflateSync", referenced from: _ZIPDecode in libvtktiff.a(tif_zip.c.o) _PixarLogDecode in libvtktiff.a(tif_pixarlog.c.o) "_vtk_zlib_deflateInit_", referenced from: _ZIPSetupEncode in libvtktiff.a(tif_zip.c.o) _PixarLogSetupEncode in libvtktiff.a(tif_pixarlog.c.o) "_vtk_zlib_deflateReset", referenced from: _ZIPPreEncode in libvtktiff.a(tif_zip.c.o) _PixarLogPreEncode in libvtktiff.a(tif_pixarlog.c.o) "_vtk_zlib_deflate", referenced from: _ZIPEncode in libvtktiff.a(tif_zip.c.o) _ZIPPostEncode in libvtktiff.a(tif_zip.c.o) _PixarLogEncode in libvtktiff.a(tif_pixarlog.c.o) _PixarLogPostEncode in libvtktiff.a(tif_pixarlog.c.o) "_vtk_zlib_deflateEnd", referenced from: _ZIPCleanup in libvtktiff.a(tif_zip.c.o) _PixarLogCleanup in libvtktiff.a(tif_pixarlog.c.o) "_vtk_zlib_deflateParams", referenced from: _ZIPVSetField in libvtktiff.a(tif_zip.c.o) _PixarLogVSetField in libvtktiff.a(tif_pixarlog.c.o) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status I have tried using the VTK_Use_System_Zlib argument during the CMake process to no avail and am really not sure where to look next. I would really appreciate a steer in the right direction. Thank you in advance, Stewart Griffin -- View this message in context: http://vtk.1045678.n5.nabble.com/Help-with-VTK-and-zlib-tp4751587p4751587.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Aug 30 16:15:47 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 30 Aug 2011 14:15:47 -0600 Subject: [vtkusers] Help with VTK and zlib?? In-Reply-To: <1314734427842-4751587.post@n5.nabble.com> References: <1314734427842-4751587.post@n5.nabble.com> Message-ID: Hi Stu, It looks like the xcode project isn't linking libvtkzlib.a. Don't turn on the VTK_USE_SYSTEM_ZLIB option, it is best for VTK to build its own zlib (which is the libvtkzip.a referred to above). Also, if you are building x86_64, then you will have to use Cocoa. As far as I understand, Carbon is 32-bit only. - David On Tue, Aug 30, 2011 at 2:00 PM, Stu Griffin wrote: > G'day all, > > I am very new to this game so thank you in advance for your patience. > > I am trying to build VTK on my mac as x86_64 with carbon and then attempting > to use the sample carbon xcode project to get my bearings. > > I am using CMake to build VTK 5.6 source and this step seems to be going all > smoothly. I have a nice static library that links into the xcode project > with the appropriate source trees and no red links that i can find. I have > changed the build settings to target OSX10.6 and x86_64 and this seems fine. > > However i can only get as far as building everything successfully before it > all falls over during the linking stage. > > The errors that occur at this stage are; > > Undefined symbols for architecture x86_64: > ?"_vtk_zlib_crc32", referenced from: > ? ? ?_vtk_png_reset_crc in libvtkpng.a(png.c.o) > ? ? ?_vtk_png_calculate_crc in libvtkpng.a(png.c.o) > ?"_vtk_zlib_inflateReset", referenced from: > ? ? ?_vtk_png_reset_zstream in libvtkpng.a(png.c.o) > ? ? ?_vtk_png_decompress_chunk in libvtkpng.a(pngrutil.c.o) > ? ? ?_vtk_png_read_finish_row in libvtkpng.a(pngrutil.c.o) > ? ? ?_ZIPPreDecode in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogPreDecode in libvtktiff.a(tif_pixarlog.c.o) > ?"_vtk_zlib_inflateInit_", referenced from: > ? ? ?_vtk_png_create_read_struct in libvtkpng.a(pngread.c.o) > ? ? ?_vtk_png_read_init_3 in libvtkpng.a(pngread.c.o) > ? ? ?_ZIPSetupDecode in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogSetupDecode in libvtktiff.a(tif_pixarlog.c.o) > ?"_vtk_zlib_inflate", referenced from: > ? ? ?_vtk_png_read_row in libvtkpng.a(pngread.c.o) > ? ? ?_vtk_png_decompress_chunk in libvtkpng.a(pngrutil.c.o) > ? ? ?_vtk_png_read_finish_row in libvtkpng.a(pngrutil.c.o) > ? ? ?_ZIPDecode in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogDecode in libvtktiff.a(tif_pixarlog.c.o) > ?"_vtk_zlib_inflateEnd", referenced from: > ? ? ?_vtk_png_read_destroy in libvtkpng.a(pngread.c.o) > ? ? ?_ZIPCleanup in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogCleanup in libvtktiff.a(tif_pixarlog.c.o) > ?"_vtk_zlib_inflateSync", referenced from: > ? ? ?_ZIPDecode in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogDecode in libvtktiff.a(tif_pixarlog.c.o) > ?"_vtk_zlib_deflateInit_", referenced from: > ? ? ?_ZIPSetupEncode in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogSetupEncode in libvtktiff.a(tif_pixarlog.c.o) > ?"_vtk_zlib_deflateReset", referenced from: > ? ? ?_ZIPPreEncode in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogPreEncode in libvtktiff.a(tif_pixarlog.c.o) > ?"_vtk_zlib_deflate", referenced from: > ? ? ?_ZIPEncode in libvtktiff.a(tif_zip.c.o) > ? ? ?_ZIPPostEncode in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogEncode in libvtktiff.a(tif_pixarlog.c.o) > ? ? ?_PixarLogPostEncode in libvtktiff.a(tif_pixarlog.c.o) > ?"_vtk_zlib_deflateEnd", referenced from: > ? ? ?_ZIPCleanup in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogCleanup in libvtktiff.a(tif_pixarlog.c.o) > ?"_vtk_zlib_deflateParams", referenced from: > ? ? ?_ZIPVSetField in libvtktiff.a(tif_zip.c.o) > ? ? ?_PixarLogVSetField in libvtktiff.a(tif_pixarlog.c.o) > ld: symbol(s) not found for architecture x86_64 > collect2: ld returned 1 exit status > > I have tried using the VTK_Use_System_Zlib argument during the CMake process > to no avail and am really not sure where to look next. > > I would really appreciate a steer in the right direction. > > Thank you in advance, > Stewart Griffin From ryanleesmith at gmail.com Tue Aug 30 17:09:45 2011 From: ryanleesmith at gmail.com (Ryan Smith) Date: Tue, 30 Aug 2011 14:09:45 -0700 Subject: [vtkusers] Simple Point Picker Question- Message-ID: Hi- I have an application using FLTK and VTK together via the vtkFlRenderWindowInteractor class. I have my point picking working after using the following example http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/PointPicker My concern is that I am only displaying a 2D image and after enabling interaction, the camera swings around in 3D when the user picks a point and distorts my image. Can I modify the following code to allow point picking but disable the camera view from moving? Thanks in advance- -Ryan class MouseInteractorStylePP : public vtkInteractorStyleTrackballCamera{ public: static MouseInteractorStylePP* New(); vtkTypeMacro(MouseInteractorStylePP, vtkInteractorStyleTrackballCamera); virtual void OnLeftButtonDown() { std::cout << "Picking pixel: " << this->Interactor->GetEventPosition()[0] << " " << this->Interactor->GetEventPosition()[1] << std::endl; vtkInteractorStyleTrackballCamera::OnLeftButtonDown(); } }; -------------- next part -------------- An HTML attachment was scrubbed... URL: From bentivegna at cct.lsu.edu Tue Aug 30 17:15:31 2011 From: bentivegna at cct.lsu.edu (Eloisa Bentivegna) Date: Tue, 30 Aug 2011 23:15:31 +0200 Subject: [vtkusers] Interpolation options. In-Reply-To: References: <83AE0153-2DCF-4C35-9611-950711BAEF51@cct.lsu.edu> Message-ID: <22B1EC03-1B1B-4D46-BBBD-4719DAF791E8@cct.lsu.edu> On Aug 30, 2011, at 9:56 PM, David Gobbi wrote: > Hi Eloisa, > > The vtkProbeFilter does not allow you to choose how the interpolation > is done. The interpolation is always first order. I see. Are there alternatives in VTK that implement higher-order interpolation? Thanks for your help, Eloisa From david.gobbi at gmail.com Tue Aug 30 17:30:47 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 30 Aug 2011 15:30:47 -0600 Subject: [vtkusers] Interpolation options. In-Reply-To: <22B1EC03-1B1B-4D46-BBBD-4719DAF791E8@cct.lsu.edu> References: <83AE0153-2DCF-4C35-9611-950711BAEF51@cct.lsu.edu> <22B1EC03-1B1B-4D46-BBBD-4719DAF791E8@cct.lsu.edu> Message-ID: On Tue, Aug 30, 2011 at 3:15 PM, Eloisa Bentivegna wrote: > On Aug 30, 2011, at 9:56 PM, David Gobbi wrote: > >> Hi Eloisa, >> >> The vtkProbeFilter does not allow you to choose how the interpolation >> is done. ?The interpolation is always first order. > > I see. Are there alternatives in VTK that implement higher-order interpolation? Not that I'm aware of. The VTK mesh interpolation code in the vtkCell subclasses has no knowledge of the neighboring cells, so higher order interpolation would be difficult to implement. Hopefully there is someone out there who has done it and can provide some pointers. - David From sureshj at gmail.com Tue Aug 30 17:43:58 2011 From: sureshj at gmail.com (Suresh Joshi) Date: Tue, 30 Aug 2011 17:43:58 -0400 Subject: [vtkusers] vtkImageViewer memory usage In-Reply-To: <4DFC1ABC.4010904@gmail.com> References: <4DFC1ABC.4010904@gmail.com> Message-ID: Hi Pratik and everyone else, I've finally gotten around to re-visiting this problem and I'm getting some strange results. I've taken Pratik's advice and made a test app using the JPEGReader example inside of a Win32 app. So, I initialize/show an empty HWND, and then separately create 3 imageViewers (linked to 3 HWNDs that I had previously created). My memory consumption is as follows: After InitInstance: 14.5 MB After 1st ImageViewer: 34.1 MB After 2nd ImageViewer: 40 MB After 3rd ImageViewer: 46.2 MB *Note: this is using a test image which has a file size of 27KB, width=400pixels, height=400pixels and a bit depth of 8. So, according to this, my first image viewer required 20MB to create, second and third required closer to 6MB. I have also re-tested this using 3 different JPEGReaders as inputs to the imageViewers and there is negligible difference. As well, I used a 3kB version of my test-image and it showed the same memory footprint. So, does anyone know why there is this sort of discrepancy? I have little knowledge of how the internals of the renderers and windows work, so I'm at a loss and would appreciate any help (as well, if there is any way for me to reduce this footprint as much as possible, as I could have as many as 40 of these windows open at once!). Thanks! -Suresh P.S. I've attached my sample code // inside main function: // Perform application initialization: if (!InitInstance1 (hInstance, nCmdShow)) { return FALSE; } vtkSmartPointer jpegReader = vtkSmartPointer::New(); jpegReader->SetFileName ( "D:\\Albert-Einstein.jpg" ); vtkSmartPointer imageViewer; imageViewer = vtkSmartPointer::New(); imageViewer->SetInput(jpegReader->GetOutput()); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); imageViewer->SetParentId( hWnd1 ); imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->Render(); imageViewer->GetRenderer()->ResetCamera(); imageViewer->Render(); vtkSmartPointer imageViewer1; imageViewer1 = vtkSmartPointer::New(); imageViewer1->SetInput(jpegReader->GetOutput()); vtkSmartPointer renderWindowInteractor1 = vtkSmartPointer::New(); imageViewer1->SetParentId( hWnd2 ); imageViewer1->SetupInteractor(renderWindowInteractor1); imageViewer1->Render(); imageViewer1->GetRenderer()->ResetCamera(); imageViewer1->Render(); vtkSmartPointer imageViewer2; imageViewer2 = vtkSmartPointer::New(); imageViewer2->SetInput(jpegReader->GetOutput()); vtkSmartPointer renderWindowInteractor2 = vtkSmartPointer::New(); imageViewer2->SetParentId( hWnd3 ); imageViewer2->SetupInteractor(renderWindowInteractor2); imageViewer2->Render(); imageViewer2->GetRenderer()->ResetCamera(); imageViewer2->Render(); On Fri, Jun 17, 2011 at 11:25 PM, pratik wrote: > Hi, > You can try using this: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/JPEGReader > as a template. > I ran it on Debian Linux and for a 104.9kb file the process is taking 12MB > > HTH, > Pratik > On Saturday 18 June 2011 08:24 AM, Suresh Joshi wrote: >> >> Hello everyone, >> >> Although I don't want to double post and spam the list, I haven't >> heard any responses to a question I posted on May 27th, so I'll give >> it another shot with some updated information: >> >> My question is still the same and I'm wondering why my stock >> vtkImageViewer pipeline (quoted below) is using around 50MB of memory >> on my Windows 7 machine. The jpeg I am displaying is 400x400 pixels. >> >> Also, if I were to create a separate >> Renderer+Window+Interactor+Mapper+etc, the memory footprint should >> still be the same, correct? >> >> Thanks everyone! >> -SJ >> >> >> On Fri, May 27, 2011 at 3:06 PM, Suresh Joshi ?wrote: >> >>> >>> Hello all, >>> >>> I've done a fair bit of Googling, but haven't found many topics about >>> this. >>> >>> In most of my applications dealing with ITK/VTK, I haven't cared too >>> much about the memory used by the viewer, because I'd usually also >>> have a 3D volumetric reconstruction/registration running at the same >>> time, but for the first time I've taken note of the memory used by the >>> viewer window itself. >>> >>> In a naive application (in C++ usually, but for instance in python here): >>> ******* >>> reader = vtkJPEGReader() >>> # 27kb JPEG file >>> reader.SetFileName( "Albert-Einstein.jpg" ) >>> reader.Update() >>> >>> viewer = vtkImageViewer() >>> viewer.SetInputConnection( read.GetOutputPort() ) >>> >>> interactor = vtkRenderWindowInteractor() >>> viewer.SetupInteractor( interactor ) >>> >>> viewer.Render() >>> interactor.Start() >>> ******* >>> >>> This 'program' seems to use about 50MB of memory on my Windows 7 box >>> (with VTK 5.6). When I place these viewers (in c++) in my >>> applications, I notice a similar usage... >>> >>> Now, the problem for me this time is that I need a less >>> memory-intensive viewer, because I would like to instantiate multiple >>> (lets say at least 10) vtkImageViewers in my app (yet, greedily, I >>> would like to keep similar functionality, with interactions and all). >>> >>> So I guess I have a few questions: >>> a) Is there any documentation anywhere discussing the memory >>> footprints of the vtk viewers/viewports/windows/etc and discussing the >>> best practices when it comes to keeping memory usage down? >>> b) Is my naive approach of creating multiple vtkImageViewers the worst >>> thing I can do (keeping in mind that it gives the exact functionality >>> that I desire right now)? >>> c) Should I be looking at having one renderWindow with multiple >>> viewports instead, with one or more interactors? (And is this >>> noticeably better?) >>> >>> Thanks everyone! >>> -SJ >>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://www.vtk.org/mailman/listinfo/vtkusers >> > > From sean at rogue-research.com Tue Aug 30 17:44:26 2011 From: sean at rogue-research.com (Sean McBride) Date: Tue, 30 Aug 2011 17:44:26 -0400 Subject: [vtkusers] Help with VTK and zlib?? In-Reply-To: References: <1314734427842-4751587.post@n5.nabble.com> Message-ID: <20110830214426.4927078@mail.rogue-research.com> On Tue, 30 Aug 2011 14:15:47 -0600, David Gobbi said: >It looks like the xcode project isn't linking libvtkzlib.a. I agree. >Don't turn on the >VTK_USE_SYSTEM_ZLIB option, it is best for VTK to build its own zlib >(which is the libvtkzip.a referred to above). Why? I would suggest the opposite. zlib is already included with the OS, and presumably QA'ed by Apple. Why increase code bloat by building it again? Also, Apple seems faster than the VTK community at updating zlib, as Lion contains 1.2.5 while VTK is still at 1.2.3. If you use VTK_USE_SYSTEM_ZLIB, you'll of course need to link to Apples zlib in your Xcode project. >Also, if you are building x86_64, then you will have to use Cocoa. As far >as I understand, Carbon is 32-bit only. More precisely, any UI portions of Carbon are 32 bit only, including, I believe, AGL. I definitely advise against using Carbon for any new projects. -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From david.gobbi at gmail.com Tue Aug 30 17:56:51 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 30 Aug 2011 15:56:51 -0600 Subject: [vtkusers] Help with VTK and zlib?? In-Reply-To: <20110830214426.4927078@mail.rogue-research.com> References: <1314734427842-4751587.post@n5.nabble.com> <20110830214426.4927078@mail.rogue-research.com> Message-ID: On Tue, Aug 30, 2011 at 3:44 PM, Sean McBride wrote: > On Tue, 30 Aug 2011 14:15:47 -0600, David Gobbi said: > >>Don't turn on the >>VTK_USE_SYSTEM_ZLIB option, it is best for VTK to build its own zlib >>(which is the libvtkzip.a referred to above). > > Why? ?I would suggest the opposite. ?zlib is already included with the OS, and presumably QA'ed by Apple. ?Why increase code bloat by building it again? ?Also, Apple seems faster than the VTK community at updating zlib, as Lion contains 1.2.5 while VTK is still at 1.2.3. It is usually my policy not to mess with things that work. The default setting is for VTK to build its own zlib, and doing things this way has never failed me :) - David From z_lezhnin at mail2000.ru Wed Aug 31 00:48:48 2011 From: z_lezhnin at mail2000.ru (ZLv) Date: Tue, 30 Aug 2011 21:48:48 -0700 (PDT) Subject: [vtkusers] Is there any way to get data from user in VTK? In-Reply-To: References: <1313557073846-4706833.post@n5.nabble.com> Message-ID: <1314766128465-4752901.post@n5.nabble.com> Thank you, it's a good advice. -- View this message in context: http://vtk.1045678.n5.nabble.com/Is-there-any-way-to-get-data-from-user-in-VTK-tp4706833p4752901.html Sent from the VTK - Users mailing list archive at Nabble.com. From tan3long at gmail.com Wed Aug 31 02:13:11 2011 From: tan3long at gmail.com (tan3long) Date: Tue, 30 Aug 2011 23:13:11 -0700 (PDT) Subject: [vtkusers] How to use vtkFLUENTReader? Message-ID: <1314771191471-4753046.post@n5.nabble.com> I have some sample data.First,I use Gambit+FLUENT to simulate a temperature field;Second,use FLUENT output data to render a heat map.How can I combine VTK with FLUENT? Is there any demo code?If you can help me,contact me by tan3long at gmail.com. Thanks and regards, Gauler -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkFLUENTReader-tp4753046p4753046.html Sent from the VTK - Users mailing list archive at Nabble.com. From scc.wwl at gmail.com Wed Aug 31 08:45:55 2011 From: scc.wwl at gmail.com (Wenlong Wang) Date: Wed, 31 Aug 2011 13:45:55 +0100 Subject: [vtkusers] How to get intensity of a point on a 3D model In-Reply-To: References: Message-ID: Dear all, I'm new to vtk and I have a 3D model in vtk. I'm trying to get intensity of a specific point on it. I'm working on it with VC++. The model is represented by an object of vtkPolyData. But I can't find any function to do this. Anyone get any idea? Thank you very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Wed Aug 31 08:50:08 2011 From: jothybasu at gmail.com (Jothy) Date: Wed, 31 Aug 2011 13:50:08 +0100 Subject: [vtkusers] How to get bounds of each bounding box in vtkOBBTree Message-ID: Hi all, I am trying to compute an optimal orientated bounding box for a vtkPolyData. I set the max level to 10 in vtkOBBTree. Does it means that it will have maximum 10 bounding boxes. If so, how to get the bounds of each bounding box? Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Wed Aug 31 08:51:17 2011 From: daviddoria at gmail.com (David Doria) Date: Wed, 31 Aug 2011 08:51:17 -0400 Subject: [vtkusers] How to get bounds of each bounding box in vtkOBBTree In-Reply-To: References: Message-ID: On Wed, Aug 31, 2011 at 8:50 AM, Jothy wrote: > Hi all, > > I am trying to compute an optimal orientated bounding box for a vtkPolyData. > I set the max level to 10 in vtkOBBTree. Does it means that it will have > maximum 10 bounding boxes. If so, how to get the bounds of each bounding > box? > > Thanks > > Jothy This should help you out: http://www.vtk.org/Wiki/VTK/Examples/Cxx/DataStructures/VisualizeOBBTree David From daviddoria at gmail.com Wed Aug 31 08:52:07 2011 From: daviddoria at gmail.com (David Doria) Date: Wed, 31 Aug 2011 08:52:07 -0400 Subject: [vtkusers] How to get intensity of a point on a 3D model In-Reply-To: References: Message-ID: On Wed, Aug 31, 2011 at 8:45 AM, Wenlong Wang wrote: > Dear all, > > I'm new to vtk and I have a 3D model in vtk. I'm trying to get intensity > of?a specific point on it.?I'm working on it with VC++. The model is > represented by an object of ?vtkPolyData. > > But I can't find any function to do this. Anyone get any idea? > > Thank you very much. What do you mean by intensity? Is your model a mesh and you want to know how much light in the scene is reflecting from a particular point inside of one of the triangles of the mesh? David From kingvsk at aol.com Wed Aug 31 08:54:03 2011 From: kingvsk at aol.com (Sathish Kumar) Date: Wed, 31 Aug 2011 18:24:03 +0530 Subject: [vtkusers] Error while building VTK with 3d Mouse (3D Space Navigator) Support... Message-ID: <4E5E2EEB.6040503@aol.com> Hi all... I am building VTK 5.6.1 with 3D Mouse support as guided from here . But I got the following error. make[2]: *** [java/vtk/vtkAbstractMapper3D.class] Error 1 make[1]: *** [Wrapping/Java/CMakeFiles/VTKJavaRendering.dir/all] Error 2 make: *** [all] Error 2 Please see the attachment for the detailed error report. Operating System : Linux Mint 10. VTK Version : 5.6.1. How can I correct this. Thanks, Sathish, -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Error.txt URL: From jothybasu at gmail.com Wed Aug 31 09:09:41 2011 From: jothybasu at gmail.com (Jothy) Date: Wed, 31 Aug 2011 14:09:41 +0100 Subject: [vtkusers] How to get bounds of each bounding box in vtkOBBTree In-Reply-To: References: Message-ID: Thanks David, But I couldn't figure out how to get the bounds of the individual boxes. Jothy On Wed, Aug 31, 2011 at 1:51 PM, David Doria wrote: > On Wed, Aug 31, 2011 at 8:50 AM, Jothy wrote: > > Hi all, > > > > I am trying to compute an optimal orientated bounding box for a > vtkPolyData. > > I set the max level to 10 in vtkOBBTree. Does it means that it will have > > maximum 10 bounding boxes. If so, how to get the bounds of each bounding > > box? > > > > Thanks > > > > Jothy > > This should help you out: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/DataStructures/VisualizeOBBTree > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Wed Aug 31 09:53:14 2011 From: daviddoria at gmail.com (David Doria) Date: Wed, 31 Aug 2011 09:53:14 -0400 Subject: [vtkusers] How to get bounds of each bounding box in vtkOBBTree In-Reply-To: References: Message-ID: On Wed, Aug 31, 2011 at 9:09 AM, Jothy wrote: > Thanks David, > > But I couldn't figure out how to get the bounds of the individual boxes. > > Jothy It looks like the GenerateRepresentation calls a (unfortunately protected) GeneratePolygons function. I don't think there is a built in way to get each box, but you could subclass OBBTree and call that function on your subclass object. David From daviddoria at gmail.com Wed Aug 31 09:57:01 2011 From: daviddoria at gmail.com (David Doria) Date: Wed, 31 Aug 2011 09:57:01 -0400 Subject: [vtkusers] How to get intensity of a point on a 3D model In-Reply-To: References: Message-ID: >> The intensity I mentioned is light intensity on particular point on my >> model. My model is composed by 5090 3D points. I put all these points into a >> vtkPolyData object and bind it to an vtkActor. I haven't set any lighting >> sources but ambient light. >> >> Yes, I want to know how much light in the scene is reflecting from a >> particular point at the surface of my model. > And yes, the model is a mesh. >> Thank you very much. >> >> Wenlong Please keep your replies on the mailing list so everyone can help and learn. How do you want to specify the point at which to get the intensity? As a 3D point? Do you want the intensities only at points that exist in your model? Or also at points inside the model triangles? Unfortunately I've never done this, but this information will certainly help you get an answer from someone who has. David From scc.wwl at gmail.com Wed Aug 31 10:05:02 2011 From: scc.wwl at gmail.com (Wenlong Wang) Date: Wed, 31 Aug 2011 15:05:02 +0100 Subject: [vtkusers] How to get intensity of a point on a 3D model In-Reply-To: References: Message-ID: OK. Sorry it's first time i use this system. Wenlong 2011/8/31 David Doria > >> The intensity I mentioned is light intensity on particular point on my > >> model. My model is composed by 5090 3D points. I put all these points > into a > >> vtkPolyData object and bind it to an vtkActor. I haven't set any > lighting > >> sources but ambient light. > >> > >> Yes, I want to know how much light in the scene is reflecting from a > >> particular point at the surface of my model. > > And yes, the model is a mesh. > > >> Thank you very much. > >> > >> Wenlong > > Please keep your replies on the mailing list so everyone can help and > learn. > > How do you want to specify the point at which to get the intensity? As > a 3D point? Do you want the intensities only at points that exist in > your model? Or also at points inside the model triangles? > > Unfortunately I've never done this, but this information will > certainly help you get an answer from someone who has. > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scc.wwl at gmail.com Wed Aug 31 10:08:50 2011 From: scc.wwl at gmail.com (Wenlong Wang) Date: Wed, 31 Aug 2011 15:08:50 +0100 Subject: [vtkusers] How to get intensity of a point on a 3D model In-Reply-To: References: Message-ID: Thanks, David. I can refresh this issue time to time. Maybe someone knows can help me. Thank you for your kindly help. Wenlong 2011/8/31 David Doria > >> The intensity I mentioned is light intensity on particular point on my > >> model. My model is composed by 5090 3D points. I put all these points > into a > >> vtkPolyData object and bind it to an vtkActor. I haven't set any > lighting > >> sources but ambient light. > >> > >> Yes, I want to know how much light in the scene is reflecting from a > >> particular point at the surface of my model. > > And yes, the model is a mesh. > > >> Thank you very much. > >> > >> Wenlong > > Please keep your replies on the mailing list so everyone can help and > learn. > > How do you want to specify the point at which to get the intensity? As > a 3D point? Do you want the intensities only at points that exist in > your model? Or also at points inside the model triangles? > > Unfortunately I've never done this, but this information will > certainly help you get an answer from someone who has. > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scc.wwl at gmail.com Wed Aug 31 10:17:01 2011 From: scc.wwl at gmail.com (Wenlong Wang) Date: Wed, 31 Aug 2011 15:17:01 +0100 Subject: [vtkusers] How to get light intensity of a particular point on a 3D surface model Message-ID: Dear all, I've posted this question once, but didn't explain it well. So I reorganized it as following: I have a 3D surface model. It is composed by 5090 3D points, each point has x, y, z coordinate. I put all these points into a vtkPolyData Obeject and bind it to a vtkActor. I didn't put any other light sources in my model but the ambient light. I want to get the light intensity of a particular point. The point is indicated by its point ID. And I'm working on this with VC++. My problem is, I can't find any vtk function to get the light intensity of a particular point. Does anyone have idea how to do it? Thank you very much. Wenlong -------------- next part -------------- An HTML attachment was scrubbed... URL: From artem.paraview at googlemail.com Wed Aug 31 13:17:54 2011 From: artem.paraview at googlemail.com (Artem Babayan) Date: Wed, 31 Aug 2011 18:17:54 +0100 Subject: [vtkusers] Draw one image on top of another Message-ID: Hello, I draw concentration distribution field over the map -- images for map and concentration fields are in the separate actors (vtkActor). I add these actors to the render window: window->GetRenderers()->GetFirstRenderer()->AddActor(actor_map); window->GetRenderers()->GetFirstRenderer()->AddActor(actor_field); However, two images gets mixed together -- instead of non-transparent parts of concentration field overwriting the map image they are shown together with pixels from the map going through the fields' pixels in some places. It happens regardless of the order I add actors to rendered. Is it a way to ensure, that image in actor_field is always on the top of actor_map? Best wishes Artem From drescherjm at gmail.com Wed Aug 31 13:21:57 2011 From: drescherjm at gmail.com (John Drescher) Date: Wed, 31 Aug 2011 13:21:57 -0400 Subject: [vtkusers] Draw one image on top of another In-Reply-To: References: Message-ID: On Wed, Aug 31, 2011 at 1:17 PM, Artem Babayan wrote: > Hello, > > I draw concentration distribution field over the map -- images for map > and concentration fields are in the separate actors (vtkActor). I add > these actors to the render window: > > ? ? ? ? window->GetRenderers()->GetFirstRenderer()->AddActor(actor_map); > ? ? ? ? window->GetRenderers()->GetFirstRenderer()->AddActor(actor_field); > > However, two images gets mixed together -- instead of non-transparent > parts of concentration field overwriting the map image they are shown > together with pixels from the map going through the fields' pixels in > some places. It happens regardless of the order I add actors to > rendered. Is it a way to ensure, that image in actor_field is always > on the top of actor_map? > I use the technique that is in the following example in my code: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/Transparency John From zynique.schoeman at gmail.com Wed Aug 31 14:29:38 2011 From: zynique.schoeman at gmail.com (Zee) Date: Wed, 31 Aug 2011 11:29:38 -0700 (PDT) Subject: [vtkusers] Level of detail for image data In-Reply-To: References: Message-ID: <1314815378552-4755383.post@n5.nabble.com> Hi there! Have you found a solution to this problem? I need to implement the same thing and am having some trouble :( thanks in advance -- View this message in context: http://vtk.1045678.n5.nabble.com/Level-of-detail-for-image-data-tp1228031p4755383.html Sent from the VTK - Users mailing list archive at Nabble.com. From zynique.schoeman at gmail.com Wed Aug 31 15:53:30 2011 From: zynique.schoeman at gmail.com (Zee) Date: Wed, 31 Aug 2011 12:53:30 -0700 (PDT) Subject: [vtkusers] vtkPropPicker abd Actor2D - Desperate In-Reply-To: References: Message-ID: <1314820410664-4755773.post@n5.nabble.com> Hi, if anyone else had this problem, here is the solution: (well kind of) It seems that if you use a vtkImageMapper with vtkActor2D then, for some reason, it displays in the translated positionbut it doesn't pick up 'picks' in the translated position. So, if you replaec this with some other mapper (in my case i used vtkPolyDataMapper2D), it will work fine. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkPropPicker-abd-Actor2D-Desperate-tp4641504p4755773.html Sent from the VTK - Users mailing list archive at Nabble.com. From jhaiduce at gmail.com Wed Aug 31 16:07:54 2011 From: jhaiduce at gmail.com (John Haiducek) Date: Wed, 31 Aug 2011 14:07:54 -0600 Subject: [vtkusers] VTK build fails to link to swscale Message-ID: When I build VTK I get errors like this: Linking CXX executable ../../../../bin/QVTKCxxTests ../../../../bin/libvtkIO.so.5.2.1: undefined reference to `sws_freeContext' ../../../../bin/libvtkIO.so.5.2.1: undefined reference to `sws_scale' ../../../../bin/libvtkIO.so.5.2.1: undefined reference to `sws_getCachedContext' collect2: ld returned 1 exit status make[2]: *** [bin/QVTKCxxTests] Error 1 make[1]: *** [GUISupport/Qt/Testing/Cxx/CMakeFiles/QVTKCxxTests.dir/all] Error 2 make: *** [all] Error 2 The error goes away when I add -lswscale to my CXXFLAGS, but surely there's a better way to fix it? John Haiducek From zynique.schoeman at gmail.com Wed Aug 31 16:12:31 2011 From: zynique.schoeman at gmail.com (Zee) Date: Wed, 31 Aug 2011 13:12:31 -0700 (PDT) Subject: [vtkusers] Subdividing & LOD large amount of data for effective rendering and interaction Message-ID: <1314821551416-4755852.post@n5.nabble.com> Hi there we need to develop an application that displays a mosaic of JPEG pictures, showing aerial photographs of a strech of coast. It should allow the user to zoom or pan as they please (as they need to count seals lying on the beach). So far, the application already allows the loading of a single photo as well as zooming and panning - but the total area the user should be able to iew consists of hundreds of photos! Obviously it will be inefficient to load all the photos at once, and one will most probably run out of memory. As an alternative we want to reduce or increase LOD as the user zooms as well as load relavent photos (or parts of photos) as the user pans. We were thinking of using vtkRenderLargeImage or maybe vtkImageReslice to load the images as required, while vtkLODActor takes care of the LOD as the user zooms. Are these classes the correct classes to use? or is there a better option? Thank you in advance -- View this message in context: http://vtk.1045678.n5.nabble.com/Subdividing-LOD-large-amount-of-data-for-effective-rendering-and-interaction-tp4755852p4755852.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Aug 31 17:51:27 2011 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 31 Aug 2011 15:51:27 -0600 Subject: [vtkusers] Subdividing & LOD large amount of data for effective rendering and interaction In-Reply-To: <1314821551416-4755852.post@n5.nabble.com> References: <1314821551416-4755852.post@n5.nabble.com> Message-ID: Hi Zee, If you are using the devel version of VTK, and if you stick with image sizes that fit in memory, you can use the new vtkImageResliceMapper class. It is an image mapper that has vtkImageReslice built in for doing resize operations, I use it regularly for RGB images that are up to 10000x10000 and it should work fine even for images that are much larger. But displaying image sets that are too large to fit in memory is a whole different ball game. Right now there is no good way of doing this with the imaging pipeline. It can be done with streaming, but it would be far too slow for your application. What would be needed in VTK would be a new class that could act as a multi-resolution image cache, loading images from disk as needed, and generating a contiguous output array for display at the desired resolution and covering the correct area. This wouldn't be an easy class to write, given the complexity of the VTK pipeline mechanism. - David On Wed, Aug 31, 2011 at 2:12 PM, Zee wrote: > Hi there > we need to develop an application that displays a mosaic of JPEG pictures, > showing aerial photographs of a strech of coast. It should allow the user to > zoom or pan as they please (as they need to count seals lying on the beach). > So far, the application already allows the loading of a single photo as well > as zooming and panning - but the total area the user should be able to iew > consists of hundreds of photos! > > Obviously it will be inefficient to load all the photos at once, and one > will most probably run out of memory. As an alternative we want to reduce or > increase LOD as the user zooms as well as load relavent photos (or parts of > photos) as the user pans. > > We were thinking of using vtkRenderLargeImage or maybe vtkImageReslice to > load the images as required, while vtkLODActor takes care of the LOD as the > user zooms. > > Are these classes the correct classes to use? or is there a better option? > > Thank you in advance From clinton at elemtech.com Wed Aug 31 18:22:52 2011 From: clinton at elemtech.com (Clinton Stimpson) Date: Wed, 31 Aug 2011 16:22:52 -0600 Subject: [vtkusers] PyQt SIP wrapping test fails In-Reply-To: References: Message-ID: <201108311622.52393.clinton@elemtech.com> On Tuesday, August 23, 2011 06:50:56 am Eric E. Monson wrote: > Hey all, > > Is anyone able to successfully run TestQVTKWidget.py with the current > development VTK version? I don't think any dashboards cover it and I get: > > ERROR: testQVTKWidget (__main__.TestQVTKWidget) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "TestQVTKWidget.py", line 22, in testQVTKWidget > w2.SetRenderWindow(win2) > TypeError: QVTKWidget.SetRenderWindow(): argument 1 has unexpected type > 'vtkobject' > > I hadn't updated VTK since May, and decided to do so yesterday. Some of the > new ContextInteractorStyle Charts stuff broke the way I set up charts with > PyQt4 (using QVTKRenderWindowInteractor), and I couldn't fix it, so I > thought I'd check how hard it would be to switch over to the QVTKWidget, > but I can't get the test or my other examples to run... > > My (Py)Qt stuff may be out of date, so I could update if anyone thought > that would help: OS X 10.6.8, system Python 2.6.1, Qt 4.7.0 (from source, > cocoa, x86_64), PyQt 4.8.1, sip 4.11.2. > It doesn't work for me anymore either. It works in the release branch though. As for the dashboard coverage, Jeff Baumes would know the status of that. I did a git bisect to see which commit caused the problem, but its not obvious why that commit caused the problem. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com From tshead at sandia.gov Wed Aug 31 18:40:03 2011 From: tshead at sandia.gov (Shead, Timothy) Date: Wed, 31 Aug 2011 22:40:03 +0000 Subject: [vtkusers] The definitive guide to capturing the contents of a vtkRenderWindow in Python ... Message-ID: ... is what I'm hoping someone will describe here. I know it can work on my hardware, because pvserver successfully sends images to a (separate process) ParaView client, but I'll be darned if I see how ... Many thanks, Tim Timothy M. Shead Sandia National Laboratories 1461, Scalable Analysis and Visualization From minghuangvtk at yahoo.com Wed Aug 31 21:38:18 2011 From: minghuangvtk at yahoo.com (Ming Huang) Date: Wed, 31 Aug 2011 18:38:18 -0700 (PDT) Subject: [vtkusers] how to install and use vtk 5.4 Message-ID: <1314841098.23426.YahooMailNeo@web122317.mail.ne1.yahoo.com> I am a vtk user. but now I want to install vtk on my laptop.? I have vs 2008 express edtion.? How do I install vtk 5.4 so that I can run programs using vtk on visual studio 2008.? I tried downloading vtk and unzipping it, and then including all the paths in the vc++ directories, but I still got this error >c:\vtk 5.4\common\vtkWin32Header.h(27) : fatal error C1083: Cannot open include file: 'vtkConfigure.h': No such file or directory which was in the vtkWin32Header.h file -------------- next part -------------- An HTML attachment was scrubbed... URL: