<div dir="ltr">Hi,<div style> I am new on vtk, my question is :</div><div style><br></div><div style>are the mappers and filters same thing in VTK?</div><div style><br></div><div style>Looking forward your reply soon.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 24, 2013 at 4:04 PM, <span dir="ltr"><<a href="mailto:vtkusers-request@vtk.org" target="_blank">vtkusers-request@vtk.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send vtkusers mailing list submissions to<br>
<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:vtkusers-request@vtk.org">vtkusers-request@vtk.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:vtkusers-owner@vtk.org">vtkusers-owner@vtk.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of vtkusers digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Plane polydata intersection (Cory Quammen)<br>
2. Re: Plane polydata intersection (Laurent Chauvin)<br>
3. vtkLineWidget with fix length (manzohar)<br>
4. Problems building the Piston Library (UJJWAL aryan)<br>
5. Re: Draw points with gaussian fade out (Michka Popoff)<br>
6. Re: Render Control (David Cole)<br>
7. Re: Render Control (Max)<br>
8. VTK build with postfix d : error (Ashish Singh)<br>
9. Re: VTK build with postfix d : error (Ashish Singh)<br>
10. Generating a polyhedron cell from polydata in Python<br>
(Gu?ni Karl Rosenkj?r)<br>
11. building vtk6, simple example (Randy Heiland)<br>
12. vtkborderwidget in vtk6.0rc3 (chasank)<br>
13. Re: Plane polydata intersection (Cory Quammen)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 23 Jun 2013 12:31:56 -0400<br>
From: Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>><br>
Subject: Re: [vtkusers] Plane polydata intersection<br>
To: Laurent Chauvin <<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>><br>
Cc: "<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
Message-ID:<br>
<<a href="mailto:CANmPiKCPp3VM6moALR0XB2Rx2OkHQk_9R339ntO%2BAVgqhJHoFw@mail.gmail.com">CANmPiKCPp3VM6moALR0XB2Rx2OkHQk_9R339ntO+AVgqhJHoFw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Laurent,<br>
<br>
For this special case of computing the intersection between a polydata<br>
and a plane, you can use a little trick. First, you can compute a new<br>
point data set for your polydata with,say, the z coordinates of each<br>
point in the polydata. Then, to get the intersection with an xy plane,<br>
you then use the vtkContourFilter operating on this coordinate point<br>
data and specify the z value that corresponds to your plane. The<br>
result should be equivalent to the intersection of the polydata with<br>
that plane.<br>
<br>
It should be relatively fast to compute the contour, so you can<br>
probably do this interactively.<br>
<br>
Hope that helps,<br>
Cory<br>
<br>
On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin<br>
<<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>> wrote:<br>
> Hello,<br>
><br>
> I'm working on Slicer, and I was trying to find a nice way to display<br>
> intersection between polydata and a plane.<br>
> I read we could use a vtkCutter, but the thing is, I would like to do this<br>
> interactively. I want to be able to move the plane, and update the<br>
> intersection while moving the plane.<br>
> I'm not sure using vtkCutter for this purpose would work. I think vtkCutter<br>
> will take some times to execute, then moving the plane will be slow.<br>
><br>
> I know this question has been asked before, but I would like if there were<br>
> some update since then. New widgets or object that I could use for that ?<br>
><br>
> I was thinking using vtkImageReslice, get polydata of the plane and compute<br>
> the intersection between the 2 polydata, but I think it would also be to<br>
> computing intensive to be able to do it smoothly with an interactive plane.<br>
><br>
> Thank you.<br>
> -Laurent<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
<br>
<br>
<br>
--<br>
Cory Quammen<br>
Research Associate<br>
Department of Computer Science<br>
The University of North Carolina at Chapel Hill<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sun, 23 Jun 2013 12:41:39 -0400<br>
From: Laurent Chauvin <<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>><br>
Subject: Re: [vtkusers] Plane polydata intersection<br>
To: Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>><br>
Cc: "<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAPGPbaJZGVNO-vzOjuYr6532VHOZhc2nd8ncEV%2Bc14_2qWNxng@mail.gmail.com">CAPGPbaJZGVNO-vzOjuYr6532VHOZhc2nd8ncEV+c14_2qWNxng@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi Cory,<br>
<br>
Thank you very much for your reply.<br>
However, I'm not sure to understand what you mean.<br>
Should I create a new polydata with all points at the same z coordinates ?<br>
<br>
Does this work with some oblique planes ( not parallel to x,y, or z axis ) ?<br>
<br>
Thank you.<br>
-Laurent<br>
<br>
<br>
On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>> wrote:<br>
<br>
> Laurent,<br>
><br>
> For this special case of computing the intersection between a polydata<br>
> and a plane, you can use a little trick. First, you can compute a new<br>
> point data set for your polydata with,say, the z coordinates of each<br>
> point in the polydata. Then, to get the intersection with an xy plane,<br>
> you then use the vtkContourFilter operating on this coordinate point<br>
> data and specify the z value that corresponds to your plane. The<br>
> result should be equivalent to the intersection of the polydata with<br>
> that plane.<br>
><br>
> It should be relatively fast to compute the contour, so you can<br>
> probably do this interactively.<br>
><br>
> Hope that helps,<br>
> Cory<br>
><br>
> On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin<br>
> <<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>> wrote:<br>
> > Hello,<br>
> ><br>
> > I'm working on Slicer, and I was trying to find a nice way to display<br>
> > intersection between polydata and a plane.<br>
> > I read we could use a vtkCutter, but the thing is, I would like to do<br>
> this<br>
> > interactively. I want to be able to move the plane, and update the<br>
> > intersection while moving the plane.<br>
> > I'm not sure using vtkCutter for this purpose would work. I think<br>
> vtkCutter<br>
> > will take some times to execute, then moving the plane will be slow.<br>
> ><br>
> > I know this question has been asked before, but I would like if there<br>
> were<br>
> > some update since then. New widgets or object that I could use for that ?<br>
> ><br>
> > I was thinking using vtkImageReslice, get polydata of the plane and<br>
> compute<br>
> > the intersection between the 2 polydata, but I think it would also be to<br>
> > computing intensive to be able to do it smoothly with an interactive<br>
> plane.<br>
> ><br>
> > Thank you.<br>
> > -Laurent<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Please keep messages on-topic and check the VTK FAQ at:<br>
> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
> ><br>
><br>
><br>
><br>
> --<br>
> Cory Quammen<br>
> Research Associate<br>
> Department of Computer Science<br>
> The University of North Carolina at Chapel Hill<br>
><br>
<br>
<br>
<br>
--<br>
Laurent Chauvin, MS<br>
Surgical Navigation and Robotics Laboratory, Radiology<br>
Brigham And Women's Hospital, Harvard Medical School<br>
<a href="http://wiki.ncigt.org/index.php/User:Lchauvin" target="_blank">http://wiki.ncigt.org/index.php/User:Lchauvin</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20130623/42b4458e/attachment-0001.htm" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20130623/42b4458e/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Sun, 23 Jun 2013 10:42:03 -0700 (PDT)<br>
From: manzohar <<a href="mailto:lancia58@gmail.com">lancia58@gmail.com</a>><br>
Subject: [vtkusers] vtkLineWidget with fix length<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Message-ID: <<a href="mailto:1372009323193-5721537.post@n5.nabble.com">1372009323193-5721537.post@n5.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Is there a way to fix the length of the line of vtkLineWidget ?<br>
<br>
Thanks<br>
Zohar<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkLineWidget-with-fix-length-tp5721537.html" target="_blank">http://vtk.1045678.n5.nabble.com/vtkLineWidget-with-fix-length-tp5721537.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Mon, 24 Jun 2013 00:21:27 +0530<br>
From: UJJWAL aryan <<a href="mailto:meetukme@gmail.com">meetukme@gmail.com</a>><br>
Subject: [vtkusers] Problems building the Piston Library<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Message-ID:<br>
<CAJdiYKDwMO94-r6dcmnehJhgV76R1=n9bXE4d=<a href="mailto:SX0iR-iA0Dgw@mail.gmail.com">SX0iR-iA0Dgw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi All,<br>
<br>
I was trying to install *vtk 6.0.0.rc3* on my system and it was showing the<br>
error PISTON_INCLUDE_DIR NOT FOUND. So, I decided to download and install<br>
LANL's piston library (<a href="http://viz.lanl.gov/projects/PISTON.html" target="_blank">http://viz.lanl.gov/projects/PISTON.html</a>) . While<br>
building the Piston Library , it gave the following error :-<br>
<br>
*nvcc fatal : A single input file is required for a non-link phase when<br>
an outputfile is specified. CMake Error at<br>
tutorial1GPU_generated_tutorial1.cu.o.cmake:206 (message):*<br>
* Error generating<br>
/usr/local/piston/build/tutorial/CMakeFiles/tutorial1GPU.dir//./tutorial1GPU_generated_tutorial1.cu.o<br>
*<br>
<br>
So, I opened *tutorial1GPU_generated_tutorial1.cu.o.cmake *in Vim and on<br>
line 80 i noticed something unusual. I noticed that in<br>
set(CUDA_NVCC_INCLUDE_ARGS ... only a part of the string was displayed in<br>
red while remaining part was simple white. The line was very long and i<br>
think, that after a certain number of characters like 5000 or so, the<br>
system was not recognizing any other character as a string.<br>
<br>
I am not sure but maybe that is the source of the problem. Kindly take a<br>
look into it and enlighten. I am attaching the *<br>
tutorial1GPU_generated_tutorial1.cu.o.cmake *with this mail.<br>
<br>
--<br>
Ujjwal<br>
IIIT Hyderabad<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20130624/1adeb7f2/attachment-0001.htm" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20130624/1adeb7f2/attachment-0001.htm</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: tutorial1GPU_generated_tutorial1.cu.o.cmake<br>
Type: application/octet-stream<br>
Size: 27350 bytes<br>
Desc: not available<br>
URL: <<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20130624/1adeb7f2/attachment-0001.obj" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20130624/1adeb7f2/attachment-0001.obj</a>><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Sun, 23 Jun 2013 23:47:08 +0200<br>
From: Michka Popoff <<a href="mailto:michkapopoff@gmail.com">michkapopoff@gmail.com</a>><br>
Subject: Re: [vtkusers] Draw points with gaussian fade out<br>
To: "Biddiscombe, John A." <<a href="mailto:biddisco@cscs.ch">biddisco@cscs.ch</a>><br>
Cc: vtkusers <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
Message-ID: <<a href="mailto:00C39685-9939-41E3-9EC7-75C462824A91@gmail.com">00C39685-9939-41E3-9EC7-75C462824A91@gmail.com</a>><br>
Content-Type: text/plain; charset="windows-1252"<br>
<br>
Thank you for the code. I looked at the pictures, it seems to do what I want.<br>
<br>
I am trying to install it but my knowledge is quite limited. As I understand I can build it without recompiling the whole VTK ? Hope I can get python bindings for it.<br>
<br>
I launched cmake on the folder, I got the two following errors :<br>
<br>
1)<br>
<br>
CMake Error at CMakeLists.txt:8 (INCLUDE):<br>
include could not find load file:<br>
CMakeMacros_CSCS.cmake<br>
<br>
I was not able to find this file. I looked on the internet, and downloaded some old Paraview and VTK's from 2006/2007, but was not able to find the file.<br>
So I removed the call to this file.<br>
<br>
2)<br>
<br>
CMake Error at CMakeLists.txt:93 (VTK_MAKE_INSTANTIATOR3):<br>
Unknown CMake command "VTK_MAKE_INSTANTIATOR3".<br>
<br>
Apparently this is due because VTK_MAKE_INSTANTIATOR3 is no more needed, so I also removed the line calling it.<br>
<br>
Now the cmake is able to finish it's configuration.<br>
<br>
<br>
Then I did a "make" and got the following error :<br>
<br>
In file included from /Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.h:51:<br>
/Users/michkapopoff/Desktop/build/vtkCSCSPointSpritesConfigure.h:7:5: error: expected value in expression<br>
#if<br>
^<br>
In file included from /Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.cpp:33:<br>
/Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.h:52:10: fatal error: 'vtkPainterPolyDataMapper.h' file not found<br>
#include "vtkPainterPolyDataMapper.h"<br>
^<br>
2 errors generated.<br>
make[2]: *** [CMakeFiles/vtkCSCSPointSprites.dir/vtkPointSpriteMapper.o] Error 1<br>
make[1]: *** [CMakeFiles/vtkCSCSPointSprites.dir/all] Error 2<br>
make: *** [all] Error 2<br>
<br>
So it doesn't' find my include did, so I need to add the path to the INCLUDE_DIRECTORIES.<br>
I added the path directly with SET(). Perhaps not the cleanest solution but it worked :<br>
<br>
SET( CSCS_POINTSPRITES_INCLUDE_DIRS<br>
${PROJECT_SOURCE_DIR}<br>
${PROJECT_BINARY_DIR}<br>
/usr/local/Cellar/vtk/5.10.1/include/vtk-5.10<br>
)<br>
<br>
So, next I got this error :<br>
<br>
/Users/michkapopoff/Desktop/build/vtkCSCSPointSpritesConfigure.h:7:5: error: expected value in expression<br>
#if<br>
^<br>
In file included from /Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.cpp:33:<br>
In file included from /Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.h:52:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkPainterPolyDataMapper.h:25:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkPolyDataMapper.h:25:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkMapper.h:55:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkAbstractMapper3D.h:32:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkAbstractMapper.h:28:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkAlgorithm.h:32:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkObject.h:41:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkObjectBase.h:43:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkIndent.h:24:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkSystemIncludes.h:40:<br>
In file included from /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkIOStream.h:108:<br>
In file included from /usr/include/c++/4.2.1/backward/strstream:51:<br>
/usr/include/c++/4.2.1/backward/backward_warning.h:32:2: warning: This file includes at least one deprecated or antiquated header. Please consider<br>
using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for<br>
C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. [-W#warnings]<br>
#warning This file includes at least one deprecated or antiquated header. \<br>
^<br>
1 warning and 1 error generated.<br>
make[2]: *** [CMakeFiles/vtkCSCSPointSprites.dir/vtkPointSpriteMapper.o] Error 1<br>
make[1]: *** [CMakeFiles/vtkCSCSPointSprites.dir/all] Error 2<br>
make: *** [all] Error 2<br>
<br>
Perhaps you have an idea for this one ?<br>
<br>
Thanks in advance<br>
<br>
Michka Popoff<br>
<br>
<br>
On 21 juin 2013, at 14:39, "Biddiscombe, John A." <<a href="mailto:biddisco@cscs.ch">biddisco@cscs.ch</a>> wrote:<br>
<br>
> I?m attaching a very set of code from the original cvs repo that had the point sprite mapper. You should be able to compiled this against vtk, but not that the dates on the files go back to 2006, so you may need to update stuff<br>
><br>
> JB<br>
><br>
> From: Michka Popoff [mailto:<a href="mailto:michkapopoff@gmail.com">michkapopoff@gmail.com</a>]<br>
> Sent: 20 June 2013 15:36<br>
> To: vtkusers<br>
> Cc: Biddiscombe, John A.; Markus Neuner<br>
> Subject: Re: [vtkusers] Draw points with gaussian fade out<br>
><br>
> Thanks for your answers,<br>
><br>
> I try to fight my way through vtkFastSplatter, but there is only one example and I do not understand everything. (The documentation is a little sparse)<br>
> The example in the docs use a vtkImageViewer2,and I want to have a vtkactor to put it in my 3d scenery.<br>
> So I mapped the splatter on a vtkplane through a vtktexture (to be able to have a vtkactor). Hope this will not lead to performance problems once I try to display millions of vtkactors ...<br>
> It's also not really working, the colors are messed up, and I don't understand the vtkpoints usage for the vtkFastSplatter.<br>
><br>
> 5 points are used in the example, which display 5 splats, but I was not able to have only one splat centered in the middle (even using only 1 point, at 0,0,0).<br>
><br>
><br>
> For vtkPointSpriteMapper, is not in vtk, so I have to find the way to take it from paraview, add it to vtk, and make the python bindings for it. Any idea how to achieve this ?<br>
><br>
><br>
> Regards<br>
><br>
> Michka<br>
><br>
><br>
> Le 19 juin 2013 ? 23:29, Biddiscombe, John A. a ?crit :<br>
><br>
> Try googling vtkPointSpriteMapper<br>
> A modified version using painters is in paraview, but the original was designed for straight vtk use.<br>
><br>
> JB<br>
> (apologies if you get multiple copies of this, email misfired)<br>
><br>
><br>
> Le 19 juin 2013 ? 19:57, Markus Neuner a ?crit :<br>
><br>
><br>
> Hi,<br>
><br>
> oh vtkGaussianSplatter is the wrong class. It generates a volume, but you could visualize it with volume rendering.<br>
><br>
> The first version is basically what FastSplatter does (<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/FastSplatter" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/FastSplatter</a>).<br>
><br>
> For the second version i can't find a class in vtk that can actually does this (compute the Gaussian directly in the fragment shader).<br>
><br>
> You can derive from vtkGLSLShaderProgram and implement the procedures described in this examplehttp://<a href="http://prideout.net/blog/p60/Splat.zip" target="_blank">prideout.net/blog/p60/Splat.zip</a> written by Philip Rideout.<br>
><br>
> Regards,<br>
> Markus<br>
><br>
><br>
> On 06/16/2013 06:31 PM, Michka Popoff wrote:<br>
><br>
> Hi<br>
><br>
> thank you for your help.<br>
><br>
> 1) For the first solution, what would be the class to use to create the texture from the gaussian equation ? Once I have the textures, I could map them to planes. I did wrote some OpenGL code a while ago where I did this with a shader, billboarding the textures so that the gaussians would always face the camera. This was very fast.<br>
><br>
> 2) I saw vtkGaussianSplatter, but I don't know if I can set a different radius and exponent factor for each point ? In the class these values can only be set globally. I wrote some code (in python), inspired from the FinancialField example from vtkGaussianSplatter, but the splats are passed through vtkContourFilter to make a surface. I think this is messing with my gaussians, and I don't know how to do this without vtkContourFilter. I found no other example for vtkGaussianSplatter. Here is the code I wrote, displaying 10x10 points :<br>
><br>
> #!/usr/bin/env python<br>
><br>
> import vtk<br>
> from numpy import random<br>
><br>
> # Create points<br>
> points = vtk.vtkPoints()<br>
> for i in range(10):<br>
> for j in range(10):<br>
> points.InsertNextPoint(i, j, 0.0)<br>
><br>
> polydata = vtk.vtkPolyData()<br>
> polydata.SetPoints(points)<br>
><br>
> popSplatter = vtk.vtkGaussianSplatter()<br>
> popSplatter.SetInput(polydata)<br>
> popSplatter.SetSampleDimensions(50, 50, 50)<br>
> popSplatter.SetRadius(0.05)<br>
> popSplatter.ScalarWarpingOff()<br>
> popSplatter.Update()<br>
><br>
> popSurface = vtk.vtkContourFilter()<br>
> popSurface.SetInputConnection(popSplatter.GetOutputPort())<br>
> popSurface.SetValue(0, 0.01)<br>
><br>
> popMapper = vtk.vtkPolyDataMapper()<br>
> popMapper.SetInputConnection(popSurface.GetOutputPort())<br>
> popMapper.ImmediateModeRenderingOn()<br>
><br>
> popActor = vtk.vtkActor()<br>
> popActor.SetMapper(popMapper)<br>
><br>
> # Renderer<br>
> renderer = vtk.vtkRenderer()<br>
> renderer.AddActor(popActor)<br>
> renderer.ResetCamera()<br>
><br>
> # Render Window<br>
> renderWindow = vtk.vtkRenderWindow()<br>
> renderWindow.AddRenderer(renderer)<br>
><br>
> # Interactor<br>
> renderWindowInteractor = vtk.vtkRenderWindowInteractor()<br>
> renderWindowInteractor.SetRenderWindow(renderWindow)<br>
><br>
> # Begin Interaction<br>
> renderWindow.Render()<br>
> renderWindowInteractor.Start()<br>
><br>
><br>
><br>
><br>
> On 16 juin 2013, at 11:14, Markus Neuner <<a href="mailto:neuner.markus@gmx.net">neuner.markus@gmx.net</a>> wrote:<br>
><br>
> Hi Michka,<br>
><br>
> You could try to generate volumetric data using Gaussian splats.<br>
><br>
> There are two solutions to this problem:<br>
> - Create the 3D Gaussian function on the CPU during application initialization, and create a 3D texture from that.<br>
><br>
> - But better and much faster is to compute the Gaussian directly in the fragment shader.<br>
><br>
> Have a look at vtkGaussianSplatter it may do what you want.<br>
><br>
> Regards,<br>
> Markus<br>
><br>
><br>
> On 06/15/2013 05:18 PM, Michka Popoff wrote:<br>
> Hi<br>
><br>
> I want to draw a lot of points in VTK (~1.000.000), with each point's color fading out to a transparent value, following a gaussian function.<br>
> So the center will be bright (maximum intensity), and the border will have no color.<br>
><br>
> I am able to draw a lot of points using vtkPoints, I can also change their color, but I am looking for a way to apply the fade out to every point. Of course the parameters of the gaussian function will be different for each point (intensity value in the middle, diameter).<br>
><br>
> The result for 1 point would look like this :<a href="http://www.princeton.edu/~rvdb/images/deconv/Gauss2Psf.jpg" target="_blank">http://www.princeton.edu/~rvdb/images/deconv/Gauss2Psf.jpg</a><br>
><br>
> Are there some filters/mappers I could use directly ? Or can I perhaps try to "hijack" vtkgaussiansplatter to achieve this ?<br>
><br>
> Thanks in advance<br>
><br>
> Michka Popoff<br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects athttp://<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
><br>
><br>
> <vtkCSCSPointSprites.zip><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20130623/56895d53/attachment-0001.htm" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20130623/56895d53/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Mon, 24 Jun 2013 01:09:58 +0000<br>
From: David Cole <<a href="mailto:dlrdave@aol.com">dlrdave@aol.com</a>><br>
Subject: Re: [vtkusers] Render Control<br>
To: " <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a> " <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>>, Max<br>
<<a href="mailto:smapersmaper@gmail.com">smapersmaper@gmail.com</a>><br>
Message-ID: <<a href="mailto:20130624011336.5098F643EA@public.kitware.com">20130624011336.5098F643EA@public.kitware.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
The ?problem? is that Visual Studio is 32-bit only, so it can only show the x86 build in Design Mode.<br>
<br>
<br>
This happens because the ActiViz dll has underlying architecture-specific native dlls for VTK that it loads. Since they are arch-specific and VS is 32-bit only.... it can only handle the x86 dlls.<br>
<br>
<br>
<br>
Cheers (hope this helps),<br>
<br>
David C.<br>
<br>
<br>
<br>
<br>
From: Max<br>
Sent: ?Sunday?, ?June? ?23?, ?2013 ?9?:?55? ?AM<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
<br>
Hi VTKers,<br>
When I'm downloading the 86 bit version of activiz I see the render control<br>
and can add it to my winforms,<br>
but when i download the 64 bit activiz version, it is not shown and i cannot<br>
add it through the kitware dll.<br>
And when i'm building 86 project the form is shown correctly, but with 64<br>
bit version, it cannot show it in design mode, only the run mode.<br>
Does anyone know what can be the problem?<br>
<br>
Thank you,<br>
Max<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Render-Control-tp5721532.html" target="_blank">http://vtk.1045678.n5.nabble.com/Render-Control-tp5721532.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20130624/95604706/attachment-0001.htm" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20130624/95604706/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Sun, 23 Jun 2013 21:08:10 -0700 (PDT)<br>
From: Max <<a href="mailto:smapersmaper@gmail.com">smapersmaper@gmail.com</a>><br>
Subject: Re: [vtkusers] Render Control<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Message-ID: <<a href="mailto:1372046890508-5721541.post@n5.nabble.com">1372046890508-5721541.post@n5.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Hi David and thank you for the reply,<br>
so what is the way to add the render control to the winform in 64 bit?<br>
Currently what I did:<br>
Installed 86 bit version of activiz,<br>
installed 64 bit version of activiz,<br>
then i saw the 86 bit render control in toolbox,<br>
added it to the winform,<br>
then i saw that it adds automatically the kitware dll 86 bit ,<br>
but i need to make the vtk project 64 bit since all my application solution<br>
works on 64 bit,<br>
so i removed the 86 kitware dll and added 2 64 bit dlls, kitware dll and<br>
mummy dll<br>
well, it works in runtime, but it says it cannot find the kitware clr in<br>
design time.<br>
Also i don't think that for it to work i need to install also 86 bit version<br>
of activiz<br>
i tried to add the control through kitware dll but it cannot find it...<br>
Something is not right here i think...<br>
Can you please tell me what i did wrong?<br>
<br>
Thank you,<br>
Max<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Render-Control-tp5721532p5721541.html" target="_blank">http://vtk.1045678.n5.nabble.com/Render-Control-tp5721532p5721541.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Mon, 24 Jun 2013 12:26:25 +0530<br>
From: Ashish Singh <<a href="mailto:asinghmlists@gmail.com">asinghmlists@gmail.com</a>><br>
Subject: [vtkusers] VTK build with postfix d : error<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Message-ID:<br>
<<a href="mailto:CAOqamVFZjnwAPrKXSAmaecXwp-tavUGyj1WowzrZ86V_v3xA7w@mail.gmail.com">CAOqamVFZjnwAPrKXSAmaecXwp-tavUGyj1WowzrZ86V_v3xA7w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi,<br>
<br>
1) I am trying to build VTK5.10.1 with Qt 4.8.4 on Windows 7, x64 platform<br>
with Visual Studio 2010 with postfix 'd' option. The build goes fine<br>
without any errors. I am able to run the cone example( plain VTK example)<br>
using my build. But when I run the RenderWindowNoUiFile ( VTK + Qt<br>
example), I get a runtime error saying -<br>
"The application was unable to start correct (0xc000000d). Click OK to<br>
close the application"<br>
<br>
2) When I try to build "Install" for this VTK build, I get the following<br>
error:<br>
<br>
1> -- Up-to-date: E:/VTKDebugBin/bin/QVTKd.dll<br>
1> CMake Error at GUISupport/Qt/PluginInstall.cmake:13 (FILE):<br>
1> file INSTALL cannot find<br>
"E:/VTKDebugBuild/bin/Debug/QVTKWidgetPlugin.dll".<br>
1> Call Stack (most recent call first):<br>
1> GUISupport/Qt/cmake_install.cmake:89 (INCLUDE)<br>
1> GUISupport/cmake_install.cmake:32 (INCLUDE)<br>
1> cmake_install.cmake:181 (INCLUDE)<br>
1><br>
1><br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: The command "setlocal<br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"<br>
-DBUILD_TYPE=Debug -P cmake_install.cmake<br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: if %errorlevel% neq 0 goto :cmEnd<br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: :cmEnd<br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone<br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: :cmErrorLevel<br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: exit /b %1<br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: :cmDone<br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: if %errorlevel% neq 0 goto :VCEnd<br>
1>C:\Program Files<br>
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
MSB3073: :VCEnd" exited with code 1.<br>
1><br>
1>Build FAILED.<br>
1><br>
1>Time Elapsed 00:00:10.95<br>
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<br>
<br>
Can anyone please help me figure out what is going wrong here and how to<br>
fix these 2 issues?<br>
<br>
The details of my environment are:<br>
VTK version: 5.10.1<br>
Qt: 4.8.4<br>
OS: windows 7 64 bit<br>
Visual Studio 2010<br>
<br>
Thanks,<br>
Ashish<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20130624/e052c949/attachment-0001.htm" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20130624/e052c949/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 9<br>
Date: Mon, 24 Jun 2013 13:45:40 +0530<br>
From: Ashish Singh <<a href="mailto:asinghmlists@gmail.com">asinghmlists@gmail.com</a>><br>
Subject: Re: [vtkusers] VTK build with postfix d : error<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Message-ID:<br>
<CAOqamVG9VOK+iG=CnpFDbxq8TWjVmjMbR+=<a href="mailto:W7aimJ5JHPZkH4w@mail.gmail.com">W7aimJ5JHPZkH4w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
I am replying to my own post. For issue # 2, I checked file<br>
GUISupport/Qt/PluginInstall.cmake<br>
<br>
The contents of this file are as follows:<br>
----<br>
# Configured file and directory locations.<br>
SET(VTK_LIB_DIR "E:/VTKDebugBuild/bin")<br>
SET(VTK_INSTALL_QT_DIR "/plugins/designer")<br>
SET(VTK_INSTALL_QT_PLUGIN_DIR<br>
"${CMAKE_INSTALL_PREFIX}${VTK_INSTALL_QT_DIR}")<br>
SET(VTK_INSTALL_QT_PLUGIN_FILE "QVTKWidgetPlugin.dll")<br>
SET(VTK_CONFIGURATIONS "Debug;Release;MinSizeRel;RelWithDebInfo")<br>
<br>
IF(VTK_CONFIGURATIONS)<br>
SET(VTK_LIBSUBDIR "/${BUILD_TYPE}")<br>
ENDIF(VTK_CONFIGURATIONS)<br>
<br>
# Install the file to the specified location.<br>
FILE(INSTALL DESTINATION "${VTK_INSTALL_QT_PLUGIN_DIR}" TYPE SHARED_LIBRARY<br>
FILES "${VTK_LIB_DIR}${VTK_LIBSUBDIR}/${VTK_INSTALL_QT_PLUGIN_FILE}")<br>
----<br>
If we look at line :<br>
SET(VTK_INSTALL_QT_PLUGIN_FILE "QVTKWidgetPlugin.dll")<br>
<br>
we see that it is looking for file "QVTKWidgetPlugin.dll". But since, I<br>
already added a postfix d, it cannot find this file and therefore is giving<br>
errors. If I change the file name to QVTKWidgetPlugind.dll, the build<br>
"Install" step succeeds.<br>
<br>
Is this a bug?<br>
<br>
Issue # 1, still remains. I am still not able to run the<br>
RenderWindowNoUiFile example after adding postfix d.<br>
<br>
Can anyone please help?<br>
<br>
Thanks,<br>
Ashish<br>
<br>
On Mon, Jun 24, 2013 at 12:26 PM, Ashish Singh <<a href="mailto:asinghmlists@gmail.com">asinghmlists@gmail.com</a>>wrote:<br>
<br>
> Hi,<br>
><br>
> 1) I am trying to build VTK5.10.1 with Qt 4.8.4 on Windows 7, x64 platform<br>
> with Visual Studio 2010 with postfix 'd' option. The build goes fine<br>
> without any errors. I am able to run the cone example( plain VTK example)<br>
> using my build. But when I run the RenderWindowNoUiFile ( VTK + Qt<br>
> example), I get a runtime error saying -<br>
> "The application was unable to start correct (0xc000000d). Click OK to<br>
> close the application"<br>
><br>
> 2) When I try to build "Install" for this VTK build, I get the following<br>
> error:<br>
><br>
> 1> -- Up-to-date: E:/VTKDebugBin/bin/QVTKd.dll<br>
> 1> CMake Error at GUISupport/Qt/PluginInstall.cmake:13 (FILE):<br>
> 1> file INSTALL cannot find<br>
> "E:/VTKDebugBuild/bin/Debug/QVTKWidgetPlugin.dll".<br>
> 1> Call Stack (most recent call first):<br>
> 1> GUISupport/Qt/cmake_install.cmake:89 (INCLUDE)<br>
> 1> GUISupport/cmake_install.cmake:32 (INCLUDE)<br>
> 1> cmake_install.cmake:181 (INCLUDE)<br>
> 1><br>
> 1><br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: The command "setlocal<br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"<br>
> -DBUILD_TYPE=Debug -P cmake_install.cmake<br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: if %errorlevel% neq 0 goto :cmEnd<br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: :cmEnd<br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone<br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: :cmErrorLevel<br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: exit /b %1<br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: :cmDone<br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: if %errorlevel% neq 0 goto :VCEnd<br>
> 1>C:\Program Files<br>
> (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error<br>
> MSB3073: :VCEnd" exited with code 1.<br>
> 1><br>
> 1>Build FAILED.<br>
> 1><br>
> 1>Time Elapsed 00:00:10.95<br>
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<br>
><br>
> Can anyone please help me figure out what is going wrong here and how to<br>
> fix these 2 issues?<br>
><br>
> The details of my environment are:<br>
> VTK version: 5.10.1<br>
> Qt: 4.8.4<br>
> OS: windows 7 64 bit<br>
> Visual Studio 2010<br>
><br>
> Thanks,<br>
> Ashish<br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20130624/f3ff4e48/attachment-0001.htm" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20130624/f3ff4e48/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 10<br>
Date: Mon, 24 Jun 2013 09:13:26 +0000<br>
From: Gu?ni Karl Rosenkj?r <<a href="mailto:grosenkj@eos.ubc.ca">grosenkj@eos.ubc.ca</a>><br>
Subject: [vtkusers] Generating a polyhedron cell from polydata in<br>
Python<br>
To: VTKusers <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
Message-ID:<br>
<CAOqTh=<a href="mailto:m3A110FVXoHTb77wU3CvdFNcOHqaF0kCVP1TJvy-WE5w@mail.gmail.com">m3A110FVXoHTb77wU3CvdFNcOHqaF0kCVP1TJvy-WE5w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hello all vtk users,<br>
<br>
I am trying to make a polyhedron cell (vtkUnstructuredGrid) from a<br>
polydata. Googling for information on how to do this I have found these C++<br>
test and used the as a guide.<br>
<br>
However when I run my code on Fedora 17 64bit, using python 2.7.3 and vtk<br>
5.10.1 (self compiled), I get an error when using InsertNextCell call of<br>
the vtkUnstructuredGrid object.<br>
<br>
Here is a example code I am using:<br>
import vtk<br>
<br>
# Read the polyData<br>
cube = vtk.vtkCubeSource()<br>
Poly = cube.GetOutput()<br>
<br>
# Extract the information needed from the poly data<br>
numPts = vtk.vtkIdTypeArray()<br>
numPts.InsertNextValue(Poly.GetNumberOfPoints())<br>
ptsIds = vtk.vtkIdTypeArray()<br>
for cP in range(numPts.GetValue(0)): ptsIds.InsertNextValue(cP)<br>
numCellFaces = vtk.vtkIdTypeArray()<br>
numCellFaces.InsertNextValue(Poly.GetNumberOfPolys())<br>
faces = vtk.vtkIdTypeArray()<br>
for cF in range(numCellFaces.GetValue(0)):<br>
numPtsInFace = vtk.vtkIdTypeArray()<br>
numPtsInFace.InsertNextValue( Poly.GetCell(cF).GetNumberOfPoints())<br>
faces.InsertNextValue(numPtsInFace)<br>
for cPF in range(numPtsInFace.GetValue(0)):<br>
faces.InsertNextValue(Poly.GetCell(cF).GetPointId(cPF))<br>
<br>
# Make the grid<br>
UnstructPolyHed = vtk.vtkUnstructuredGrid()<br>
UnstructPolyHed.SetPoints(Poly.GetPoints())<br>
UnstructPolyHed.InsertNextCell(vtk.VTK_POLYHEDRON,numPts,ptsIds,numCellFaces,faces)<br>
<br>
<br>
But I always end with this error: InsertNextCell() takes exactly 2<br>
arguments (5 given)<br>
<br>
The example used 5 inputs as follows<br>
InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds, vtkIdType<br>
nfaces, vtkIdType *faces)<br>
<br>
<br>
What am I doing incorrectly?<br>
<br>
Thanks in advance.<br>
<br>
Cheers,<br>
Gudni Karl<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20130624/c805ba42/attachment-0001.htm" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20130624/c805ba42/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 11<br>
Date: Mon, 24 Jun 2013 09:25:01 -0400<br>
From: Randy Heiland <<a href="mailto:heiland@indiana.edu">heiland@indiana.edu</a>><br>
Subject: [vtkusers] building vtk6, simple example<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Message-ID: <<a href="mailto:86953D8F-E239-49CE-AEF8-044F0B7C5BAD@indiana.edu">86953D8F-E239-49CE-AEF8-044F0B7C5BAD@indiana.edu</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Hello,<br>
<br>
Thought I'd take a stab at VTK6 and will ask the about the build process, in general, as well as a specific link error, while I also dig a little deeper. I did a simple cmake/build via:<br>
cmake -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc ../VTK6.0.0.rc3<br>
<br>
and make install. Then I downloaded the tarball from here: <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader</a> , did a successful cmake on it, but then got:<br>
<br>
~/dev/vtk6-play/SimplePointsReader/build$ make<br>
Scanning dependencies of target SimplePointsReader<br>
[100%] Building CXX object CMakeFiles/SimplePointsReader.dir/SimplePointsReader.cxx.o<br>
Linking CXX executable SimplePointsReader.app/Contents/MacOS/SimplePointsReader<br>
ld: library not found for -lvtkFiltersParallelFlowPaths<br>
collect2: ld returned 1 exit status<br>
<br>
This seemed curious, since I hadn't turned on any parallel flags in the VTK cmake. But sure enough, I saw that some parallel libs had been built, e.g.:<br>
~/dev/vtk6-build$ ls /usr/local/lib/libvtk*Paral*.dylib<br>
/usr/local/lib/libvtkFiltersParallel-6.0.1.dylib*<br>
/usr/local/lib/libvtkFiltersParallel-6.0.dylib@<br>
/usr/local/lib/libvtkFiltersParallelImaging-6.0.1.dylib*<br>
/usr/local/lib/libvtkFiltersParallelImaging-6.0.dylib@<br>
/usr/local/lib/libvtkIOParallel-6.0.1.dylib*<br>
/usr/local/lib/libvtkIOParallel-6.0.dylib@<br>
/usr/local/lib/libvtkParallelCore-6.0.1.dylib*<br>
/usr/local/lib/libvtkParallelCore-6.0.dylib@<br>
<br>
Fwiw, I also have:<br>
~/dev/vtk6-build$ grep parallel CMakeCache.txt |grep bool<br>
Module_vtkFiltersParallelFlowPaths:BOOL=OFF<br>
Module_vtkFiltersParallelGeometry:BOOL=OFF<br>
Module_vtkFiltersParallelMPI:BOOL=OFF<br>
Module_vtkFiltersParallelStatistics:BOOL=OFF<br>
Module_vtkIOMPIParallel:BOOL=OFF<br>
Module_vtkIOParallelExodus:BOOL=OFF<br>
Module_vtkIOParallelLSDyna:BOOL=OFF<br>
Module_vtkIOParallelNetCDF:BOOL=OFF<br>
Module_vtkInfovisParallel:BOOL=OFF<br>
Module_vtkParallelMPI:BOOL=OFF<br>
Module_vtkRenderingParallel:BOOL=OFF<br>
<br>
So, a couple questions - why are parallel libs being built and why does this example seem to require them? Apologies if I missed info on the wiki, etc.<br>
<br>
thanks, Randy<br>
<br>
------------------------------<br>
<br>
Message: 12<br>
Date: Mon, 24 Jun 2013 07:01:15 -0700 (PDT)<br>
From: chasank <<a href="mailto:chasank@gmail.com">chasank@gmail.com</a>><br>
Subject: [vtkusers] vtkborderwidget in vtk6.0rc3<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Message-ID: <<a href="mailto:1372082475230-5721550.post@n5.nabble.com">1372082475230-5721550.post@n5.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Hi,<br>
<br>
Although vtk5.10.1 has vtkBorderWidget class, vtk6.0rc3 has not<br>
vtkBorderWidget class. Also, this class is not marked as deprecated in<br>
deprecated list (<a href="http://www.vtk.org/doc/nightly/html/deprecated.html" target="_blank">http://www.vtk.org/doc/nightly/html/deprecated.html</a>). I<br>
wonder whether vtk6.0 stable version will have this class. If not, which<br>
class will be used instead of vtkBorderWidget in vtk6.0 stable version.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkborderwidget-in-vtk6-0rc3-tp5721550.html" target="_blank">http://vtk.1045678.n5.nabble.com/vtkborderwidget-in-vtk6-0rc3-tp5721550.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<br>
<br>
------------------------------<br>
<br>
Message: 13<br>
Date: Mon, 24 Jun 2013 10:04:14 -0400<br>
From: Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>><br>
Subject: Re: [vtkusers] Plane polydata intersection<br>
To: Laurent Chauvin <<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>><br>
Cc: "<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
Message-ID:<br>
<CANmPiKAiLM3NwHvKY4aUejELTQ=+ihOifUJ-xZYkKo7EAWR=<a href="mailto:qA@mail.gmail.com">qA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
On Sun, Jun 23, 2013 at 12:41 PM, Laurent Chauvin<br>
<<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>> wrote:<br>
> Hi Cory,<br>
><br>
> Thank you very much for your reply.<br>
> However, I'm not sure to understand what you mean.<br>
> Should I create a new polydata with all points at the same z coordinates ?<br>
<br>
Laurent,<br>
<br>
You don't need to create a new polydata. Instead, you can add a new<br>
vtkDataArray (likely a vtkFloatArray or vtkDataArray in this case) to<br>
the point data of whatever polydata you already have by using<br>
vtkPolyData::GetPointData()->AddArray(...).<br>
<br>
For axis-aligned planes, this new array could simply contain the x, y,<br>
or z coordinate of each of the points in your vtkPolyData. If you want<br>
an intersection of your poly data with a plane spanning x and y, you<br>
would add a point data array storing all the z values. You can then<br>
use the vtkContourFilter to get the polydata consisting of line<br>
segments that represents the intersection of your polydata with the<br>
plane at a given z value by specifying that z value as the isolevel<br>
for the contour filter. You have to make sure you tell the<br>
vtkContourFilter to use your new coordinate array.<br>
<br>
For an quick example of this concept, I've attached a simple ParaView<br>
statefile showing how you can do this for a cylinder polydata. In this<br>
example, I've specified my plane as spanning the x and y coordinates<br>
with z value 0.2. In ParaView, I've used the Calculator to compute the<br>
array consisting of the z coordinates of each point in the cylinder.<br>
Forgive me if you don't have ParaView installed, we use it all the<br>
time when prototyping visualizations.<br>
<br>
> Does this work with some oblique planes ( not parallel to x,y, or z axis ) ?<br>
<br>
For the general case of an arbitrary plane, you would want to compute<br>
the distance from each point your desired plan instead of creating a<br>
new array containing the x, y, or z coordinates of each point. Then<br>
you would set the vtkContourFilter isolevel to 0. The point plane<br>
calculation is pretty simple:<br>
<a href="http://mathworld.wolfram.com/Point-PlaneDistance.html" target="_blank">http://mathworld.wolfram.com/Point-PlaneDistance.html</a><br>
<br>
Does that make sense?<br>
<br>
> Thank you.<br>
> -Laurent<br>
><br>
><br>
> On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>> wrote:<br>
>><br>
>> Laurent,<br>
>><br>
>> For this special case of computing the intersection between a polydata<br>
>> and a plane, you can use a little trick. First, you can compute a new<br>
>> point data set for your polydata with,say, the z coordinates of each<br>
>> point in the polydata. Then, to get the intersection with an xy plane,<br>
>> you then use the vtkContourFilter operating on this coordinate point<br>
>> data and specify the z value that corresponds to your plane. The<br>
>> result should be equivalent to the intersection of the polydata with<br>
>> that plane.<br>
>><br>
>> It should be relatively fast to compute the contour, so you can<br>
>> probably do this interactively.<br>
>><br>
>> Hope that helps,<br>
>> Cory<br>
>><br>
>> On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin<br>
>> <<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>> wrote:<br>
>> > Hello,<br>
>> ><br>
>> > I'm working on Slicer, and I was trying to find a nice way to display<br>
>> > intersection between polydata and a plane.<br>
>> > I read we could use a vtkCutter, but the thing is, I would like to do<br>
>> > this<br>
>> > interactively. I want to be able to move the plane, and update the<br>
>> > intersection while moving the plane.<br>
>> > I'm not sure using vtkCutter for this purpose would work. I think<br>
>> > vtkCutter<br>
>> > will take some times to execute, then moving the plane will be slow.<br>
>> ><br>
>> > I know this question has been asked before, but I would like if there<br>
>> > were<br>
>> > some update since then. New widgets or object that I could use for that<br>
>> > ?<br>
>> ><br>
>> > I was thinking using vtkImageReslice, get polydata of the plane and<br>
>> > compute<br>
>> > the intersection between the 2 polydata, but I think it would also be to<br>
>> > computing intensive to be able to do it smoothly with an interactive<br>
>> > plane.<br>
>> ><br>
>> > Thank you.<br>
>> > -Laurent<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Cory Quammen<br>
>> Research Associate<br>
>> Department of Computer Science<br>
>> The University of North Carolina at Chapel Hill<br>
><br>
><br>
><br>
><br>
> --<br>
> Laurent Chauvin, MS<br>
> Surgical Navigation and Robotics Laboratory, Radiology<br>
> Brigham And Women's Hospital, Harvard Medical School<br>
> <a href="http://wiki.ncigt.org/index.php/User:Lchauvin" target="_blank">http://wiki.ncigt.org/index.php/User:Lchauvin</a><br>
<br>
<br>
<br>
--<br>
Cory Quammen<br>
Research Associate<br>
Department of Computer Science<br>
The University of North Carolina at Chapel Hill<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: PlaneIntersectionExample.pvsm<br>
Type: application/octet-stream<br>
Size: 119252 bytes<br>
Desc: not available<br>
URL: <<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20130624/a4f8c898/attachment.obj" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20130624/a4f8c898/attachment.obj</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
vtkusers mailing list<br>
<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
<br>
End of vtkusers Digest, Vol 110, Issue 31<br>
*****************************************<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><span style="color:rgb(0,0,255)"><b>Best Regards<br>Rahul Indoria<br>Mobile No: +49-157-35652212</b></span><br></div>
</div>