[vtkusers] Need Help

Jon Haitz Legarreta jhlegarreta at vicomtech.org
Fri Jun 28 05:53:26 EDT 2013


Dear Rahul,
it is just the way VTK creates pointers to objects. VTK uses/prefers Smart
Pointers to raw pointers to free the user from the problems related to
faults and leaks when one forgets to delete a pointer to deallocate the
allocated memory, handles the out of scope situations, etc.

The argument between <> is the type of object the Smart Pointer actually
points at, i.e., it will allocate an amount of memory depending on the type
of object.

You may want to have a look at this reference:
http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers

HTH,
JON HAITZ

<http://www.vicomtech.org/>
Jon Haitz Legarreta GorroñoIkertzailea / Investigador / Researcher
eOsasuna eta Aplikazio Biomedikoak /
eSalud y Aplicaciones Biomedicas / eHealth & Biomedical Applications
Donostia - San Sebastián -
Spain<http://www.vicomtech.es/castellano/html/contacto/index.html>
<http://www.vicomtech.org/>
Tel: +[34] 943 30 92 30jhlegarreta at vicomtech.org
Aviso Legal - Política de
privacidad<http://www.vicomtech.es/castellano/html/informacion_legal/index.html>/
Lege
Oharra - Pribatutasun
politika<http://www.vicomtech.es/euskera/html/informacion_legal/index.html>/
Legal
Notice - Privacy
policy<http://www.vicomtech.es/ingles/html/informacion_legal/index.html>


On 28 June 2013 11:42, rahul indoria <rahulindoria5 at gmail.com> wrote:

> Hi,
>    i am new on vtk and facing many problems in understanding VTK  examples.
>
> could you please tell me the meaning of this statement:
>
>
>  vtkSmartPointer< vtkImageReader2Factory > imageFactory = vtkSmartPointer< vtkImageReader2Factory >::New();
>
>
> Looking forward your reply soon.
>
>
>
> rahul indoria
>
>
>
>
>
> On Mon, Jun 24, 2013 at 5:49 PM, <vtkusers-request at vtk.org> wrote:
>
>> Send vtkusers mailing list submissions to
>>         vtkusers at vtk.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://www.vtk.org/mailman/listinfo/vtkusers
>> or, via email, send a message with subject or body 'help' to
>>         vtkusers-request at vtk.org
>>
>> You can reach the person managing the list at
>>         vtkusers-owner at vtk.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of vtkusers digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: Plane polydata intersection (Cory Quammen)
>>    2. Re: Dispose to vtk objects (David Cole)
>>    3. Please Help (rahul indoria)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 24 Jun 2013 11:42:52 -0400
>> From: Cory Quammen <cquammen at cs.unc.edu>
>> Subject: Re: [vtkusers] Plane polydata intersection
>> To: Laurent Chauvin <lchauvin at bwh.harvard.edu>
>> Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> Message-ID:
>>         <
>> CANmPiKDmt-pXosFGSeQFOzG-uOFE6QhEaW-nnuEEN128w89ozQ at mail.gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Laurent,
>>
>> By shaders, I mean GLSL shaders [1]. You can write custom vertex and
>> fragment shaders than enable very careful control of how various
>> elements of your scene are rendered. You can do things like modify the
>> position of vertices, apply custom lighting, calculate the distance of
>> each rendered pixels position to a plane, etc.
>>
>> In this case, you could simply have a fragment program that renders
>> your polydata. For each fragment, you can get the coordinates of the
>> fragment. With those coordinates, you can compute the distance to your
>> plane. If the distance is outside some threshold, you can discard the
>> fragment, which means it won't wind up in the final image. In the end,
>> you should wind up with a thin strip of your original geometry
>> representing the intersection of the geometry with the plane.
>>
>> In VTK, shaders are set through properties of vtkActors [2].
>> Unfortunately, there isn't much documentation nor many examples for
>> shaders available (that I know of), so I can't give you any quick
>> pointers on how to use them.
>>
>> [1] http://en.wikipedia.org/wiki/GLSL
>>
>> [2]
>> http://www.vtk.org/doc/nightly/html/classvtkProperty.html#a399829856851c282d776eb138fca97d7
>>
>> Cory
>>
>> On Mon, Jun 24, 2013 at 11:05 AM, Laurent Chauvin
>> <lchauvin at bwh.harvard.edu> wrote:
>> > Hi Cory.
>> >
>> > Indeed the plane I will use can change position and direction.
>> >
>> > Please, could you explain what is custom shaders and how to use them to
>> > compute distance ?
>> >
>> > Thank you.
>> > -Laurent
>> >
>> >
>> >
>> > On Jun 24, 2013, at 10:46 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
>> >
>> > Laurent,
>> >
>> > If your plane doesn't change orientation, then you should be able to
>> > change your isolevel value as you move the plane along its normal,
>> > thereby avoiding the distance computation, e.g., compute the distance
>> > one time relative to the current plane, then add 5 to the isolevel if
>> > your plane moves 5 units along the plane normal, etc.
>> >
>> > For a non-geometry based approach, you might use custom shaders to
>> > compute the distance of each vertex to your plane and discard
>> > fragments that aren't within some distance to the plane. This would be
>> > fast but may suffer from giving you a more-than-one-pixel-thick
>> > representation of the intersection in parts of the scene closest to
>> > the camera and perhaps missing some pixels in parts of the scene
>> > furthest from the camera.
>> >
>> > Hope that helps,
>> > Cory
>> >
>> >
>> >
>> > On Mon, Jun 24, 2013 at 10:20 AM, Laurent Chauvin
>> > <lchauvin at bwh.harvard.edu> wrote:
>> >
>> > Hi Cory,
>> >
>> > Thank you for your reply.
>> >
>> > However, you said I have to compute distance from each point to my
>> plane,
>> > then use vtkContourFilter.
>> > But I think it would be really heavy computation to compute distance
>> from
>> > each point to the plane every time I move the plane, isn't it ?
>> >
>> > I would like to be able to display the intersection while the plane is
>> > moving. If I have a polydata like a bone or a skull or something like
>> that,
>> > it would be really long to compute this distance, isn't it ?
>> >
>> > Thank you.
>> > -Laurent
>> >
>> >
>> >
>> > On Jun 24, 2013, at 10:04 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
>> >
>> > On Sun, Jun 23, 2013 at 12:41 PM, Laurent Chauvin
>> > <lchauvin at bwh.harvard.edu> wrote:
>> >
>> > Hi Cory,
>> >
>> > Thank you very much for your reply.
>> > However, I'm not sure to understand what you mean.
>> > Should I create a new polydata with all points at the same z
>> coordinates ?
>> >
>> >
>> > Laurent,
>> >
>> > You don't need to create a new polydata. Instead, you can add a new
>> > vtkDataArray (likely a vtkFloatArray or vtkDataArray in this case) to
>> > the point data of whatever polydata you already have by using
>> > vtkPolyData::GetPointData()->AddArray(...).
>> >
>> > For axis-aligned planes, this new array could simply contain the x, y,
>> > or z coordinate of each of the points in your vtkPolyData. If you want
>> > an intersection of your poly data with a plane spanning x and y, you
>> > would add a point data array storing all the z values. You can then
>> > use the vtkContourFilter to get the polydata consisting of line
>> > segments that represents the intersection of your polydata with the
>> > plane at a given z value by specifying that z value as the isolevel
>> > for the contour filter. You have to make sure you tell the
>> > vtkContourFilter to use your new coordinate array.
>> >
>> > For an quick example of this concept, I've attached a simple ParaView
>> > statefile showing how you can do this for a cylinder polydata. In this
>> > example, I've specified my plane as spanning the x and y coordinates
>> > with z value 0.2. In ParaView, I've used the Calculator to compute the
>> > array consisting of the z coordinates of each point in the cylinder.
>> > Forgive me if you don't have ParaView installed, we use it all the
>> > time when prototyping visualizations.
>> >
>> > Does this work with some oblique planes ( not parallel to x,y, or z
>> axis ) ?
>> >
>> >
>> > For the general case of an arbitrary plane, you would want to compute
>> > the distance from each point your desired plan instead of creating a
>> > new array containing the x, y, or z coordinates of each point. Then
>> > you would set the vtkContourFilter isolevel to 0. The point plane
>> > calculation is pretty simple:
>> > http://mathworld.wolfram.com/Point-PlaneDistance.html
>> >
>> > Does that make sense?
>> >
>> > Thank you.
>> > -Laurent
>> >
>> >
>> > On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <cquammen at cs.unc.edu>
>> wrote:
>> >
>> >
>> > Laurent,
>> >
>> > For this special case of computing the intersection between a polydata
>> > and a plane, you can use a little trick. First, you can compute a new
>> > point data set for your polydata with,say, the z coordinates of each
>> > point in the polydata. Then, to get the intersection with an xy plane,
>> > you then use the vtkContourFilter operating on this coordinate point
>> > data and specify the z value that corresponds to your plane. The
>> > result should be equivalent to the intersection of the polydata with
>> > that plane.
>> >
>> > It should be relatively fast to compute the contour, so you can
>> > probably do this interactively.
>> >
>> > Hope that helps,
>> > Cory
>> >
>> > On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin
>> > <lchauvin at bwh.harvard.edu> wrote:
>> >
>> > Hello,
>> >
>> > I'm working on Slicer, and I was trying to find a nice way to display
>> > intersection between polydata and a plane.
>> > I read we could use a vtkCutter, but the thing is, I would like to do
>> > this
>> > interactively. I want to be able to move the plane, and update the
>> > intersection while moving the plane.
>> > I'm not sure using vtkCutter for this purpose would work. I think
>> > vtkCutter
>> > will take some times to execute, then moving the plane will be slow.
>> >
>> > I know this question has been asked before, but I would like if there
>> > were
>> > some update since then. New widgets or object that I could use for that
>> > ?
>> >
>> > I was thinking using vtkImageReslice, get polydata of the plane and
>> > compute
>> > the intersection between the 2 polydata, but I think it would also be to
>> > computing intensive to be able to do it smoothly with an interactive
>> > plane.
>> >
>> > Thank you.
>> > -Laurent
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://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
>> >
>> >
>> >
>> >
>> >
>> > --
>> > Laurent Chauvin, MS
>> > Surgical Navigation and Robotics Laboratory, Radiology
>> > Brigham And Women's Hospital, Harvard Medical School
>> > http://wiki.ncigt.org/index.php/User:Lchauvin
>> >
>> >
>> >
>> >
>> > --
>> > Cory Quammen
>> > Research Associate
>> > Department of Computer Science
>> > The University of North Carolina at Chapel Hill
>> > <PlaneIntersectionExample.pvsm>
>> >
>> >
>> >
>> >
>> >
>> > --
>> > 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
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Mon, 24 Jun 2013 15:42:21 +0000
>> From: David Cole <dlrdave at aol.com>
>> Subject: Re: [vtkusers] Dispose to vtk objects
>> To: " vtkusers at vtk.org " <vtkusers at vtk.org>, Max
>>         <smapersmaper at gmail.com>
>> Message-ID: <20130624154810.60BF964D8D at public.kitware.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> > Hi VTKers,
>> > Could someone please clarify this,
>> > I think it is relevant to any activiz application...
>> > I wrote a huge dispose function for disposing all the pipeline
>> > Is it really necessary? For this I need to track all the actors and all
>> the
>> > filters for them to get disposed...
>>
>>
>>
>>
>> As I said in my previous replies to this thread, you should only call
>> ?Dispose? explicitly if it turns out to be necessary for a particular
>> construction of a connected objects network.
>>
>>
>> In general, you should NOT need to call Dispose.
>>
>>
>> You CAN call it if necessary, but ONLY if you?re sure no other references
>> to the object exist on the managed side. (Because if they do, and you
>> Dispose of the object, that other reference may try to call a method on it
>> later that will not succeed because Dispose has already been called...)
>>
>>
>> I would say it is safe to call it at Form_Closed time or app shutdown, or
>> some other similar situation in which many objects are being Disposed,
>> deleted and forgotten about, and there will be no more calls via any
>> references to them.
>>
>>
>> Calls to Dispose are unnecessary unless proven otherwise.
>>
>>
>> If you have a particular code snippet to send along, where you think
>> Dispose really is necessary, then talking about a particular example is
>> easier than this sort of general discussion.
>>
>>
>>
>> David C.
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/3201356d/attachment-0001.htm
>> >
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Mon, 24 Jun 2013 17:49:27 +0200
>> From: rahul indoria <rahulindoria5 at gmail.com>
>> Subject: [vtkusers] Please Help
>> To: vtkusers at vtk.org
>> Message-ID:
>>         <CAGQ+16L6R7NT9dJrr2E6y=Wkf2z+MtcxSr9KG0fMmGB2vow=
>> PA at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> *Hi,
>>     I am new on vtk, my question is :
>>
>> are the mappers and filters same thing in VTK?
>>
>> Looking forward your reply soon.
>> *
>> *
>> *
>> *Regards*
>> *
>> *
>> *rahul indoria*
>>
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Jun 24, 2013 at 5:41 PM, <vtkusers-request at vtk.org> wrote:
>>
>> > Send vtkusers mailing list submissions to
>> >         vtkusers at vtk.org
>> >
>> > To subscribe or unsubscribe via the World Wide Web, visit
>> >         http://www.vtk.org/mailman/listinfo/vtkusers
>> > or, via email, send a message with subject or body 'help' to
>> >         vtkusers-request at vtk.org
>> >
>> > You can reach the person managing the list at
>> >         vtkusers-owner at vtk.org
>> >
>> > When replying, please edit your Subject line so it is more specific
>> > than "Re: Contents of vtkusers digest..."
>> >
>> >
>> > Today's Topics:
>> >
>> >    1. Re: vtkusers Digest, Vol 110, Issue 31 (rahul indoria)
>> >    2. Re: Plane polydata intersection (Laurent Chauvin)
>> >    3. Re: synchronous update between vtkImagePlaneWidget and
>> >       vtkResliceCursorWidget (Dean Inglis)
>> >    4. Re: Plane polydata intersection (Cory Quammen)
>> >    5. Re: Plane polydata intersection (Laurent Chauvin)
>> >    6. Re: vtkborderwidget in vtk6.0rc3 (David Cole)
>> >    7. Re: building vtk6, simple example (Marcus D. Hanwell)
>> >    8. Re: Render Control (David Cole)
>> >
>> >
>> > ----------------------------------------------------------------------
>> >
>> > Message: 1
>> > Date: Mon, 24 Jun 2013 16:16:46 +0200
>> > From: rahul indoria <rahulindoria5 at gmail.com>
>> > Subject: Re: [vtkusers] vtkusers Digest, Vol 110, Issue 31
>> > To: vtkusers at vtk.org
>> > Message-ID:
>> >         <
>> > CAGQ+16J9HaSHfsxzKBM7Bv08fqqEYv07Tpq7SQRU2QLN+Peajg at mail.gmail.com>
>> > Content-Type: text/plain; charset="iso-8859-1"
>> >
>> > Hi,
>> >     I am new on vtk, my question is :
>> >
>> > are the mappers and filters same thing in VTK?
>> >
>> > Looking forward your reply soon.
>> >
>> >
>> > On Mon, Jun 24, 2013 at 4:04 PM, <vtkusers-request at vtk.org> wrote:
>> >
>> > > Send vtkusers mailing list submissions to
>> > >         vtkusers at vtk.org
>> > >
>> > > To subscribe or unsubscribe via the World Wide Web, visit
>> > >         http://www.vtk.org/mailman/listinfo/vtkusers
>> > > or, via email, send a message with subject or body 'help' to
>> > >         vtkusers-request at vtk.org
>> > >
>> > > You can reach the person managing the list at
>> > >         vtkusers-owner at vtk.org
>> > >
>> > > When replying, please edit your Subject line so it is more specific
>> > > than "Re: Contents of vtkusers digest..."
>> > >
>> > >
>> > > Today's Topics:
>> > >
>> > >    1. Re: Plane polydata intersection (Cory Quammen)
>> > >    2. Re: Plane polydata intersection (Laurent Chauvin)
>> > >    3. vtkLineWidget with fix length (manzohar)
>> > >    4. Problems building the Piston Library (UJJWAL aryan)
>> > >    5. Re: Draw points with gaussian fade out (Michka Popoff)
>> > >    6. Re: Render Control (David Cole)
>> > >    7. Re: Render Control (Max)
>> > >    8. VTK build with postfix d : error (Ashish Singh)
>> > >    9. Re: VTK build with postfix d : error (Ashish Singh)
>> > >   10. Generating a polyhedron cell from polydata in Python
>> > >       (Gu?ni Karl Rosenkj?r)
>> > >   11. building vtk6, simple example (Randy Heiland)
>> > >   12. vtkborderwidget in vtk6.0rc3 (chasank)
>> > >   13. Re: Plane polydata intersection (Cory Quammen)
>> > >
>> > >
>> > > ----------------------------------------------------------------------
>> > >
>> > > Message: 1
>> > > Date: Sun, 23 Jun 2013 12:31:56 -0400
>> > > From: Cory Quammen <cquammen at cs.unc.edu>
>> > > Subject: Re: [vtkusers] Plane polydata intersection
>> > > To: Laurent Chauvin <lchauvin at bwh.harvard.edu>
>> > > Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> > > Message-ID:
>> > >         <
>> > > CANmPiKCPp3VM6moALR0XB2Rx2OkHQk_9R339ntO+AVgqhJHoFw at mail.gmail.com>
>> > > Content-Type: text/plain; charset=ISO-8859-1
>> > >
>> > > Laurent,
>> > >
>> > > For this special case of computing the intersection between a polydata
>> > > and a plane, you can use a little trick. First, you can compute a new
>> > > point data set for your polydata with,say, the z coordinates of each
>> > > point in the polydata. Then, to get the intersection with an xy plane,
>> > > you then use the vtkContourFilter operating on this coordinate point
>> > > data and specify the z value that corresponds to your plane. The
>> > > result should be equivalent to the intersection of the polydata with
>> > > that plane.
>> > >
>> > > It should be relatively fast to compute the contour, so you can
>> > > probably do this interactively.
>> > >
>> > > Hope that helps,
>> > > Cory
>> > >
>> > > On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin
>> > > <lchauvin at bwh.harvard.edu> wrote:
>> > > > Hello,
>> > > >
>> > > > I'm working on Slicer, and I was trying to find a nice way to
>> display
>> > > > intersection between polydata and a plane.
>> > > > I read we could use a vtkCutter, but the thing is, I would like to
>> do
>> > > this
>> > > > interactively. I want to be able to move the plane, and update the
>> > > > intersection while moving the plane.
>> > > > I'm not sure using vtkCutter for this purpose would work. I think
>> > > vtkCutter
>> > > > will take some times to execute, then moving the plane will be slow.
>> > > >
>> > > > I know this question has been asked before, but I would like if
>> there
>> > > were
>> > > > some update since then. New widgets or object that I could use for
>> > that ?
>> > > >
>> > > > I was thinking using vtkImageReslice, get polydata of the plane and
>> > > compute
>> > > > the intersection between the 2 polydata, but I think it would also
>> be
>> > to
>> > > > computing intensive to be able to do it smoothly with an interactive
>> > > plane.
>> > > >
>> > > > Thank you.
>> > > > -Laurent
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > _______________________________________________
>> > > > Powered by www.kitware.com
>> > > >
>> > > > Visit other Kitware open-source projects at
>> > > > http://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
>> > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 2
>> > > Date: Sun, 23 Jun 2013 12:41:39 -0400
>> > > From: Laurent Chauvin <lchauvin at bwh.harvard.edu>
>> > > Subject: Re: [vtkusers] Plane polydata intersection
>> > > To: Cory Quammen <cquammen at cs.unc.edu>
>> > > Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> > > Message-ID:
>> > >         <
>> > > CAPGPbaJZGVNO-vzOjuYr6532VHOZhc2nd8ncEV+c14_2qWNxng at mail.gmail.com>
>> > > Content-Type: text/plain; charset="iso-8859-1"
>> > >
>> > > Hi Cory,
>> > >
>> > > Thank you very much for your reply.
>> > > However, I'm not sure to understand what you mean.
>> > > Should I create a new polydata with all points at the same z
>> coordinates
>> > ?
>> > >
>> > > Does this work with some oblique planes ( not parallel to x,y, or z
>> axis
>> > )
>> > > ?
>> > >
>> > > Thank you.
>> > > -Laurent
>> > >
>> > >
>> > > On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <cquammen at cs.unc.edu>
>> > > wrote:
>> > >
>> > > > Laurent,
>> > > >
>> > > > For this special case of computing the intersection between a
>> polydata
>> > > > and a plane, you can use a little trick. First, you can compute a
>> new
>> > > > point data set for your polydata with,say, the z coordinates of each
>> > > > point in the polydata. Then, to get the intersection with an xy
>> plane,
>> > > > you then use the vtkContourFilter operating on this coordinate point
>> > > > data and specify the z value that corresponds to your plane. The
>> > > > result should be equivalent to the intersection of the polydata with
>> > > > that plane.
>> > > >
>> > > > It should be relatively fast to compute the contour, so you can
>> > > > probably do this interactively.
>> > > >
>> > > > Hope that helps,
>> > > > Cory
>> > > >
>> > > > On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin
>> > > > <lchauvin at bwh.harvard.edu> wrote:
>> > > > > Hello,
>> > > > >
>> > > > > I'm working on Slicer, and I was trying to find a nice way to
>> display
>> > > > > intersection between polydata and a plane.
>> > > > > I read we could use a vtkCutter, but the thing is, I would like
>> to do
>> > > > this
>> > > > > interactively. I want to be able to move the plane, and update the
>> > > > > intersection while moving the plane.
>> > > > > I'm not sure using vtkCutter for this purpose would work. I think
>> > > > vtkCutter
>> > > > > will take some times to execute, then moving the plane will be
>> slow.
>> > > > >
>> > > > > I know this question has been asked before, but I would like if
>> there
>> > > > were
>> > > > > some update since then. New widgets or object that I could use for
>> > > that ?
>> > > > >
>> > > > > I was thinking using vtkImageReslice, get polydata of the plane
>> and
>> > > > compute
>> > > > > the intersection between the 2 polydata, but I think it would
>> also be
>> > > to
>> > > > > computing intensive to be able to do it smoothly with an
>> interactive
>> > > > plane.
>> > > > >
>> > > > > Thank you.
>> > > > > -Laurent
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > _______________________________________________
>> > > > > Powered by www.kitware.com
>> > > > >
>> > > > > Visit other Kitware open-source projects at
>> > > > > http://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
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Laurent Chauvin, MS
>> > > Surgical Navigation and Robotics Laboratory, Radiology
>> > > Brigham And Women's Hospital, Harvard Medical School
>> > > http://wiki.ncigt.org/index.php/User:Lchauvin
>> > > -------------- next part --------------
>> > > An HTML attachment was scrubbed...
>> > > URL: <
>> > >
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130623/42b4458e/attachment-0001.htm
>> > > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 3
>> > > Date: Sun, 23 Jun 2013 10:42:03 -0700 (PDT)
>> > > From: manzohar <lancia58 at gmail.com>
>> > > Subject: [vtkusers] vtkLineWidget with fix length
>> > > To: vtkusers at vtk.org
>> > > Message-ID: <1372009323193-5721537.post at n5.nabble.com>
>> > > Content-Type: text/plain; charset=us-ascii
>> > >
>> > > Is there a way to fix the length of the line of vtkLineWidget ?
>> > >
>> > > Thanks
>> > > Zohar
>> > >
>> > >
>> > >
>> > > --
>> > > View this message in context:
>> > >
>> >
>> http://vtk.1045678.n5.nabble.com/vtkLineWidget-with-fix-length-tp5721537.html
>> > > Sent from the VTK - Users mailing list archive at Nabble.com.
>> > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 4
>> > > Date: Mon, 24 Jun 2013 00:21:27 +0530
>> > > From: UJJWAL aryan <meetukme at gmail.com>
>> > > Subject: [vtkusers] Problems building the Piston Library
>> > > To: vtkusers at vtk.org
>> > > Message-ID:
>> > >         <CAJdiYKDwMO94-r6dcmnehJhgV76R1=n9bXE4d=
>> > > SX0iR-iA0Dgw at mail.gmail.com>
>> > > Content-Type: text/plain; charset="iso-8859-1"
>> > >
>> > > Hi All,
>> > >
>> > > I was trying to install *vtk 6.0.0.rc3* on my system and it was
>> showing
>> > the
>> > > error PISTON_INCLUDE_DIR NOT FOUND. So, I decided to download and
>> install
>> > > LANL's piston library (http://viz.lanl.gov/projects/PISTON.html) .
>> While
>> > > building the Piston Library , it gave the following error :-
>> > >
>> > > *nvcc fatal   : A single input file is required for a non-link phase
>> when
>> > > an outputfile is specified. CMake Error at
>> > > tutorial1GPU_generated_tutorial1.cu.o.cmake:206 (message):*
>> > > * Error generating
>> > >
>> > >
>> >
>> /usr/local/piston/build/tutorial/CMakeFiles/tutorial1GPU.dir//./tutorial1GPU_generated_tutorial1.cu.o
>> > > *
>> > >
>> > > So, I opened *tutorial1GPU_generated_tutorial1.cu.o.cmake *in Vim and
>> on
>> > > line 80 i noticed something unusual. I noticed that in
>> > > set(CUDA_NVCC_INCLUDE_ARGS ... only a part of the string was
>> displayed in
>> > > red while remaining part was simple white. The line was very long and
>> i
>> > > think, that after a certain number of characters like 5000 or so, the
>> > > system was not recognizing any other character as a string.
>> > >
>> > > I am not sure but maybe that is the source of the problem. Kindly
>> take a
>> > > look into it and enlighten. I am attaching the *
>> > > tutorial1GPU_generated_tutorial1.cu.o.cmake *with this mail.
>> > >
>> > > --
>> > > Ujjwal
>> > > IIIT Hyderabad
>> > > -------------- next part --------------
>> > > An HTML attachment was scrubbed...
>> > > URL: <
>> > >
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/1adeb7f2/attachment-0001.htm
>> > > >
>> > > -------------- next part --------------
>> > > A non-text attachment was scrubbed...
>> > > Name: tutorial1GPU_generated_tutorial1.cu.o.cmake
>> > > Type: application/octet-stream
>> > > Size: 27350 bytes
>> > > Desc: not available
>> > > URL: <
>> > >
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/1adeb7f2/attachment-0001.obj
>> > > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 5
>> > > Date: Sun, 23 Jun 2013 23:47:08 +0200
>> > > From: Michka Popoff <michkapopoff at gmail.com>
>> > > Subject: Re: [vtkusers] Draw points with gaussian fade out
>> > > To: "Biddiscombe, John A." <biddisco at cscs.ch>
>> > > Cc: vtkusers <vtkusers at vtk.org>
>> > > Message-ID: <00C39685-9939-41E3-9EC7-75C462824A91 at gmail.com>
>> > > Content-Type: text/plain; charset="windows-1252"
>> > >
>> > > Thank you for the code. I looked at the pictures, it seems to do what
>> I
>> > > want.
>> > >
>> > > 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.
>> > >
>> > > I launched cmake on the folder, I got the two following errors :
>> > >
>> > > 1)
>> > >
>> > >  CMake Error at CMakeLists.txt:8 (INCLUDE):
>> > >    include could not find load file:
>> > >      CMakeMacros_CSCS.cmake
>> > >
>> > > 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.
>> > > So I removed the call to this file.
>> > >
>> > > 2)
>> > >
>> > >  CMake Error at CMakeLists.txt:93 (VTK_MAKE_INSTANTIATOR3):
>> > >    Unknown CMake command "VTK_MAKE_INSTANTIATOR3".
>> > >
>> > > Apparently this is due because VTK_MAKE_INSTANTIATOR3 is no more
>> needed,
>> > > so I also removed the line calling it.
>> > >
>> > > Now the cmake is able to finish it's configuration.
>> > >
>> > >
>> > > Then I did a "make" and got the following error :
>> > >
>> > > In file included from
>> > >
>> >
>> /Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.h:51:
>> > > /Users/michkapopoff/Desktop/build/vtkCSCSPointSpritesConfigure.h:7:5:
>> > > error: expected value in expression
>> > > #if
>> > >     ^
>> > > In file included from
>> > >
>> >
>> /Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.cpp:33:
>> > >
>> >
>> /Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.h:52:10:
>> > > fatal error: 'vtkPainterPolyDataMapper.h' file not found
>> > > #include "vtkPainterPolyDataMapper.h"
>> > >          ^
>> > > 2 errors generated.
>> > > make[2]: ***
>> [CMakeFiles/vtkCSCSPointSprites.dir/vtkPointSpriteMapper.o]
>> > > Error 1
>> > > make[1]: *** [CMakeFiles/vtkCSCSPointSprites.dir/all] Error 2
>> > > make: *** [all] Error 2
>> > >
>> > > So it doesn't' find my include did, so I need to add the path to the
>> > > INCLUDE_DIRECTORIES.
>> > > I added the path directly with SET(). Perhaps not the cleanest
>> solution
>> > > but it worked :
>> > >
>> > > SET( CSCS_POINTSPRITES_INCLUDE_DIRS
>> > >   ${PROJECT_SOURCE_DIR}
>> > >   ${PROJECT_BINARY_DIR}
>> > >   /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10
>> > > )
>> > >
>> > > So, next I got this error :
>> > >
>> > > /Users/michkapopoff/Desktop/build/vtkCSCSPointSpritesConfigure.h:7:5:
>> > > error: expected value in expression
>> > > #if
>> > >     ^
>> > > In file included from
>> > >
>> >
>> /Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.cpp:33:
>> > > In file included from
>> > >
>> >
>> /Users/michkapopoff/Desktop/vtkCSCSPointSprites/vtkPointSpriteMapper.h:52:
>> > > In file included from
>> > >
>> >
>> /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkPainterPolyDataMapper.h:25:
>> > > In file included from
>> > > /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkPolyDataMapper.h:25:
>> > > In file included from
>> > > /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkMapper.h:55:
>> > > In file included from
>> > >
>> /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkAbstractMapper3D.h:32:
>> > > In file included from
>> > > /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkAbstractMapper.h:28:
>> > > In file included from
>> > > /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkAlgorithm.h:32:
>> > > In file included from
>> > > /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkObject.h:41:
>> > > In file included from
>> > > /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkObjectBase.h:43:
>> > > In file included from
>> > > /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkIndent.h:24:
>> > > In file included from
>> > > /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkSystemIncludes.h:40:
>> > > In file included from
>> > > /usr/local/Cellar/vtk/5.10.1/include/vtk-5.10/vtkIOStream.h:108:
>> > > In file included from /usr/include/c++/4.2.1/backward/strstream:51:
>> > > /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
>> > >       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
>> > >       C++ includes, or <iostream> instead of the deprecated header
>> > > <iostream.h>. To disable this warning use -Wno-deprecated.
>> [-W#warnings]
>> > > #warning This file includes at least one deprecated or antiquated
>> > header. \
>> > >  ^
>> > > 1 warning and 1 error generated.
>> > > make[2]: ***
>> [CMakeFiles/vtkCSCSPointSprites.dir/vtkPointSpriteMapper.o]
>> > > Error 1
>> > > make[1]: *** [CMakeFiles/vtkCSCSPointSprites.dir/all] Error 2
>> > > make: *** [all] Error 2
>> > >
>> > > Perhaps you have an idea for this one ?
>> > >
>> > > Thanks in advance
>> > >
>> > > Michka Popoff
>> > >
>> > >
>> > > On 21 juin 2013, at 14:39, "Biddiscombe, John A." <biddisco at cscs.ch>
>> > > wrote:
>> > >
>> > > > 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
>> > > >
>> > > > JB
>> > > >
>> > > > From: Michka Popoff [mailto:michkapopoff at gmail.com]
>> > > > Sent: 20 June 2013 15:36
>> > > > To: vtkusers
>> > > > Cc: Biddiscombe, John A.; Markus Neuner
>> > > > Subject: Re: [vtkusers] Draw points with gaussian fade out
>> > > >
>> > > > Thanks for your answers,
>> > > >
>> > > > 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)
>> > > > The example in the docs use a vtkImageViewer2,and I want to have a
>> > > vtkactor to put it in my 3d scenery.
>> > > > 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 ...
>> > > > It's also not really working, the colors are messed up, and I don't
>> > > understand the vtkpoints usage for the vtkFastSplatter.
>> > > >
>> > > > 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).
>> > > >
>> > > >
>> > > > 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 ?
>> > > >
>> > > >
>> > > > Regards
>> > > >
>> > > > Michka
>> > > >
>> > > >
>> > > > Le 19 juin 2013 ? 23:29, Biddiscombe, John A. a ?crit :
>> > > >
>> > > > Try googling vtkPointSpriteMapper
>> > > > A modified version using painters is in paraview, but the original
>> was
>> > > designed for straight vtk use.
>> > > >
>> > > > JB
>> > > > (apologies if you get multiple copies of this, email misfired)
>> > > >
>> > > >
>> > > > Le 19 juin 2013 ? 19:57, Markus Neuner a ?crit :
>> > > >
>> > > >
>> > > > Hi,
>> > > >
>> > > > oh vtkGaussianSplatter is the wrong class. It generates a volume,
>> but
>> > > you could visualize it with volume rendering.
>> > > >
>> > > > The first version is basically what FastSplatter does (
>> > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/FastSplatter).
>> > > >
>> > > > 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).
>> > > >
>> > > > You can derive from vtkGLSLShaderProgram and implement the
>> procedures
>> > > described in this examplehttp://prideout.net/blog/p60/Splat.zipwritten
>> > > by Philip Rideout.
>> > > >
>> > > > Regards,
>> > > > Markus
>> > > >
>> > > >
>> > > > On 06/16/2013 06:31 PM, Michka Popoff wrote:
>> > > >
>> > > > Hi
>> > > >
>> > > > thank you for your help.
>> > > >
>> > > > 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.
>> > > >
>> > > > 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 :
>> > > >
>> > > > #!/usr/bin/env python
>> > > >
>> > > > import vtk
>> > > > from numpy import random
>> > > >
>> > > > # Create points
>> > > > points = vtk.vtkPoints()
>> > > > for i in range(10):
>> > > >     for j in range(10):
>> > > >         points.InsertNextPoint(i, j, 0.0)
>> > > >
>> > > > polydata = vtk.vtkPolyData()
>> > > > polydata.SetPoints(points)
>> > > >
>> > > > popSplatter = vtk.vtkGaussianSplatter()
>> > > > popSplatter.SetInput(polydata)
>> > > > popSplatter.SetSampleDimensions(50, 50, 50)
>> > > > popSplatter.SetRadius(0.05)
>> > > > popSplatter.ScalarWarpingOff()
>> > > > popSplatter.Update()
>> > > >
>> > > > popSurface = vtk.vtkContourFilter()
>> > > > popSurface.SetInputConnection(popSplatter.GetOutputPort())
>> > > > popSurface.SetValue(0, 0.01)
>> > > >
>> > > > popMapper = vtk.vtkPolyDataMapper()
>> > > > popMapper.SetInputConnection(popSurface.GetOutputPort())
>> > > > popMapper.ImmediateModeRenderingOn()
>> > > >
>> > > > popActor = vtk.vtkActor()
>> > > > popActor.SetMapper(popMapper)
>> > > >
>> > > > # Renderer
>> > > > renderer = vtk.vtkRenderer()
>> > > > renderer.AddActor(popActor)
>> > > > renderer.ResetCamera()
>> > > >
>> > > > # Render Window
>> > > > renderWindow = vtk.vtkRenderWindow()
>> > > > renderWindow.AddRenderer(renderer)
>> > > >
>> > > > # Interactor
>> > > > renderWindowInteractor = vtk.vtkRenderWindowInteractor()
>> > > > renderWindowInteractor.SetRenderWindow(renderWindow)
>> > > >
>> > > > # Begin Interaction
>> > > > renderWindow.Render()
>> > > > renderWindowInteractor.Start()
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > On 16 juin 2013, at 11:14, Markus Neuner <neuner.markus at gmx.net>
>> > wrote:
>> > > >
>> > > > Hi Michka,
>> > > >
>> > > > You could try to generate volumetric data using Gaussian splats.
>> > > >
>> > > > There are two solutions to this problem:
>> > > > - Create the 3D Gaussian function on the CPU during application
>> > > initialization, and create a 3D texture from that.
>> > > >
>> > > > - But better and much faster is to compute the Gaussian directly in
>> the
>> > > fragment shader.
>> > > >
>> > > > Have a look at vtkGaussianSplatter it may do what you want.
>> > > >
>> > > > Regards,
>> > > > Markus
>> > > >
>> > > >
>> > > > On 06/15/2013 05:18 PM, Michka Popoff wrote:
>> > > > Hi
>> > > >
>> > > > 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.
>> > > > So the center will be bright (maximum intensity), and the border
>> will
>> > > have no color.
>> > > >
>> > > > 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).
>> > > >
>> > > > The result for 1 point would look like this :
>> > > http://www.princeton.edu/~rvdb/images/deconv/Gauss2Psf.jpg
>> > > >
>> > > > Are there some filters/mappers I could use directly ? Or can I
>> perhaps
>> > > try to "hijack" vtkgaussiansplatter to achieve this ?
>> > > >
>> > > > Thanks in advance
>> > > >
>> > > > Michka Popoff
>> > > > _______________________________________________
>> > > > 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
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > <vtkCSCSPointSprites.zip>
>> > >
>> > > -------------- next part --------------
>> > > An HTML attachment was scrubbed...
>> > > URL: <
>> > >
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130623/56895d53/attachment-0001.htm
>> > > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 6
>> > > Date: Mon, 24 Jun 2013 01:09:58 +0000
>> > > From: David Cole <dlrdave at aol.com>
>> > > Subject: Re: [vtkusers] Render Control
>> > > To: " vtkusers at vtk.org " <vtkusers at vtk.org>, Max
>> > >         <smapersmaper at gmail.com>
>> > > Message-ID: <20130624011336.5098F643EA at public.kitware.com>
>> > > Content-Type: text/plain; charset="utf-8"
>> > >
>> > > The ?problem? is that Visual Studio is 32-bit only, so it can only
>> show
>> > > the x86 build in Design Mode.
>> > >
>> > >
>> > > 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.
>> > >
>> > >
>> > >
>> > > Cheers (hope this helps),
>> > >
>> > > David C.
>> > >
>> > >
>> > >
>> > >
>> > > From: Max
>> > > Sent: ?Sunday?, ?June? ?23?, ?2013 ?9?:?55? ?AM
>> > > To: vtkusers at vtk.org
>> > >
>> > > Hi VTKers,
>> > > When I'm downloading the 86 bit version of activiz I see the render
>> > control
>> > > and can add it to my winforms,
>> > > but when i download the 64 bit activiz version, it is not shown and i
>> > > cannot
>> > > add it through the kitware dll.
>> > > And when i'm building 86 project the form is shown correctly, but
>> with 64
>> > > bit version, it cannot show it in design mode, only the run mode.
>> > > Does anyone know what can be the problem?
>> > >
>> > > Thank you,
>> > > Max
>> > >
>> > >
>> > >
>> > > --
>> > > View this message in context:
>> > > http://vtk.1045678.n5.nabble.com/Render-Control-tp5721532.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: <
>> > >
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/95604706/attachment-0001.htm
>> > > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 7
>> > > Date: Sun, 23 Jun 2013 21:08:10 -0700 (PDT)
>> > > From: Max <smapersmaper at gmail.com>
>> > > Subject: Re: [vtkusers] Render Control
>> > > To: vtkusers at vtk.org
>> > > Message-ID: <1372046890508-5721541.post at n5.nabble.com>
>> > > Content-Type: text/plain; charset=us-ascii
>> > >
>> > > Hi David and thank you for the reply,
>> > > so what is the way to add the render control to the winform in 64 bit?
>> > > Currently what I did:
>> > > Installed 86 bit version of activiz,
>> > > installed 64 bit version of activiz,
>> > > then i saw the 86 bit render control in toolbox,
>> > > added it to the winform,
>> > > then i saw that it adds automatically the kitware dll 86 bit ,
>> > > but i need to make the vtk project 64 bit since all my application
>> > solution
>> > > works on 64 bit,
>> > > so i removed the 86 kitware dll and added 2 64 bit dlls, kitware dll
>> and
>> > > mummy dll
>> > > well, it works in runtime, but it says it cannot find the kitware clr
>> in
>> > > design time.
>> > > Also i don't think that for it to work i need to install also 86 bit
>> > > version
>> > > of activiz
>> > > i tried to add the control through kitware dll but it cannot find
>> it...
>> > > Something is not right here i think...
>> > > Can you please tell me what i did wrong?
>> > >
>> > > Thank you,
>> > > Max
>> > >
>> > >
>> > >
>> > > --
>> > > View this message in context:
>> > >
>> http://vtk.1045678.n5.nabble.com/Render-Control-tp5721532p5721541.html
>> > > Sent from the VTK - Users mailing list archive at Nabble.com.
>> > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 8
>> > > Date: Mon, 24 Jun 2013 12:26:25 +0530
>> > > From: Ashish Singh <asinghmlists at gmail.com>
>> > > Subject: [vtkusers] VTK build with postfix d : error
>> > > To: vtkusers at vtk.org
>> > > Message-ID:
>> > >         <
>> > > CAOqamVFZjnwAPrKXSAmaecXwp-tavUGyj1WowzrZ86V_v3xA7w at mail.gmail.com>
>> > > Content-Type: text/plain; charset="iso-8859-1"
>> > >
>> > > Hi,
>> > >
>> > > 1) I am trying to build VTK5.10.1 with Qt 4.8.4 on Windows 7, x64
>> > platform
>> > > with Visual Studio 2010 with postfix 'd' option. The build goes fine
>> > > without any errors. I am able to run the cone example( plain VTK
>> example)
>> > > using my build.  But when I run the RenderWindowNoUiFile ( VTK + Qt
>> > > example), I get a runtime error saying -
>> > > "The application was unable to start correct (0xc000000d). Click OK to
>> > > close the application"
>> > >
>> > > 2) When I try to build "Install" for this VTK build, I  get the
>> following
>> > > error:
>> > >
>> > > 1>  -- Up-to-date: E:/VTKDebugBin/bin/QVTKd.dll
>> > > 1>  CMake Error at GUISupport/Qt/PluginInstall.cmake:13 (FILE):
>> > > 1>    file INSTALL cannot find
>> > > "E:/VTKDebugBuild/bin/Debug/QVTKWidgetPlugin.dll".
>> > > 1>  Call Stack (most recent call first):
>> > > 1>    GUISupport/Qt/cmake_install.cmake:89 (INCLUDE)
>> > > 1>    GUISupport/cmake_install.cmake:32 (INCLUDE)
>> > > 1>    cmake_install.cmake:181 (INCLUDE)
>> > > 1>
>> > > 1>
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: The command "setlocal
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"
>> > > -DBUILD_TYPE=Debug -P cmake_install.cmake
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: if %errorlevel% neq 0 goto :cmEnd
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: :cmEnd
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: :cmErrorLevel
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: exit /b %1
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: :cmDone
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: if %errorlevel% neq 0 goto :VCEnd
>> > > 1>C:\Program Files
>> > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > error
>> > > MSB3073: :VCEnd" exited with code 1.
>> > > 1>
>> > > 1>Build FAILED.
>> > > 1>
>> > > 1>Time Elapsed 00:00:10.95
>> > > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>> > ==========
>> > >
>> > > Can anyone please help me figure out what is going wrong here and how
>> to
>> > > fix these 2 issues?
>> > >
>> > > The details of my environment are:
>> > > VTK version: 5.10.1
>> > > Qt: 4.8.4
>> > > OS: windows 7 64 bit
>> > > Visual Studio 2010
>> > >
>> > > Thanks,
>> > > Ashish
>> > > -------------- next part --------------
>> > > An HTML attachment was scrubbed...
>> > > URL: <
>> > >
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/e052c949/attachment-0001.htm
>> > > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 9
>> > > Date: Mon, 24 Jun 2013 13:45:40 +0530
>> > > From: Ashish Singh <asinghmlists at gmail.com>
>> > > Subject: Re: [vtkusers] VTK build with postfix d : error
>> > > To: vtkusers at vtk.org
>> > > Message-ID:
>> > >         <CAOqamVG9VOK+iG=CnpFDbxq8TWjVmjMbR+=
>> > > W7aimJ5JHPZkH4w at mail.gmail.com>
>> > > Content-Type: text/plain; charset="iso-8859-1"
>> > >
>> > > I am replying to my own post. For issue # 2, I checked file
>> > > GUISupport/Qt/PluginInstall.cmake
>> > >
>> > > The contents of this file are as follows:
>> > > ----
>> > > # Configured file and directory locations.
>> > > SET(VTK_LIB_DIR "E:/VTKDebugBuild/bin")
>> > > SET(VTK_INSTALL_QT_DIR "/plugins/designer")
>> > > SET(VTK_INSTALL_QT_PLUGIN_DIR
>> > > "${CMAKE_INSTALL_PREFIX}${VTK_INSTALL_QT_DIR}")
>> > > SET(VTK_INSTALL_QT_PLUGIN_FILE "QVTKWidgetPlugin.dll")
>> > > SET(VTK_CONFIGURATIONS "Debug;Release;MinSizeRel;RelWithDebInfo")
>> > >
>> > > IF(VTK_CONFIGURATIONS)
>> > >   SET(VTK_LIBSUBDIR "/${BUILD_TYPE}")
>> > > ENDIF(VTK_CONFIGURATIONS)
>> > >
>> > > # Install the file to the specified location.
>> > > FILE(INSTALL DESTINATION "${VTK_INSTALL_QT_PLUGIN_DIR}" TYPE
>> > SHARED_LIBRARY
>> > >   FILES
>> "${VTK_LIB_DIR}${VTK_LIBSUBDIR}/${VTK_INSTALL_QT_PLUGIN_FILE}")
>> > > ----
>> > > If we look at line :
>> > > SET(VTK_INSTALL_QT_PLUGIN_FILE "QVTKWidgetPlugin.dll")
>> > >
>> > > we see that it is looking for file "QVTKWidgetPlugin.dll". But since,
>> I
>> > > already added a postfix d, it cannot find this file and therefore is
>> > giving
>> > > errors. If I change the file name to QVTKWidgetPlugind.dll, the build
>> > > "Install" step succeeds.
>> > >
>> > > Is this a bug?
>> > >
>> > > Issue # 1, still remains. I am still not able to run the
>> > > RenderWindowNoUiFile example after adding postfix d.
>> > >
>> > > Can anyone please help?
>> > >
>> > > Thanks,
>> > > Ashish
>> > >
>> > > On Mon, Jun 24, 2013 at 12:26 PM, Ashish Singh <
>> asinghmlists at gmail.com
>> > > >wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > 1) I am trying to build VTK5.10.1 with Qt 4.8.4 on Windows 7, x64
>> > > platform
>> > > > with Visual Studio 2010 with postfix 'd' option. The build goes fine
>> > > > without any errors. I am able to run the cone example( plain VTK
>> > example)
>> > > > using my build.  But when I run the RenderWindowNoUiFile ( VTK + Qt
>> > > > example), I get a runtime error saying -
>> > > > "The application was unable to start correct (0xc000000d). Click OK
>> to
>> > > > close the application"
>> > > >
>> > > > 2) When I try to build "Install" for this VTK build, I  get the
>> > following
>> > > > error:
>> > > >
>> > > > 1>  -- Up-to-date: E:/VTKDebugBin/bin/QVTKd.dll
>> > > > 1>  CMake Error at GUISupport/Qt/PluginInstall.cmake:13 (FILE):
>> > > > 1>    file INSTALL cannot find
>> > > > "E:/VTKDebugBuild/bin/Debug/QVTKWidgetPlugin.dll".
>> > > > 1>  Call Stack (most recent call first):
>> > > > 1>    GUISupport/Qt/cmake_install.cmake:89 (INCLUDE)
>> > > > 1>    GUISupport/cmake_install.cmake:32 (INCLUDE)
>> > > > 1>    cmake_install.cmake:181 (INCLUDE)
>> > > > 1>
>> > > > 1>
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: The command "setlocal
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"
>> > > > -DBUILD_TYPE=Debug -P cmake_install.cmake
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: if %errorlevel% neq 0 goto :cmEnd
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: :cmEnd
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: :cmErrorLevel
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: exit /b %1
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: :cmDone
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: if %errorlevel% neq 0 goto :VCEnd
>> > > > 1>C:\Program Files
>> > > > (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):
>> > > error
>> > > > MSB3073: :VCEnd" exited with code 1.
>> > > > 1>
>> > > > 1>Build FAILED.
>> > > > 1>
>> > > > 1>Time Elapsed 00:00:10.95
>> > > > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>> > > ==========
>> > > >
>> > > > Can anyone please help me figure out what is going wrong here and
>> how
>> > to
>> > > > fix these 2 issues?
>> > > >
>> > > > The details of my environment are:
>> > > > VTK version: 5.10.1
>> > > > Qt: 4.8.4
>> > > > OS: windows 7 64 bit
>> > > > Visual Studio 2010
>> > > >
>> > > > Thanks,
>> > > > Ashish
>> > > >
>> > > -------------- next part --------------
>> > > An HTML attachment was scrubbed...
>> > > URL: <
>> > >
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/f3ff4e48/attachment-0001.htm
>> > > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 10
>> > > Date: Mon, 24 Jun 2013 09:13:26 +0000
>> > > From: Gu?ni Karl Rosenkj?r <grosenkj at eos.ubc.ca>
>> > > Subject: [vtkusers] Generating a polyhedron cell from polydata in
>> > >         Python
>> > > To: VTKusers <vtkusers at vtk.org>
>> > > Message-ID:
>> > >         <CAOqTh=
>> > > m3A110FVXoHTb77wU3CvdFNcOHqaF0kCVP1TJvy-WE5w at mail.gmail.com>
>> > > Content-Type: text/plain; charset="iso-8859-1"
>> > >
>> > > Hello all vtk users,
>> > >
>> > > I am trying to make a polyhedron cell (vtkUnstructuredGrid) from a
>> > > polydata. Googling for information on how to do this I have found
>> these
>> > C++
>> > > test and used the as a guide.
>> > >
>> > > However when I run my code on Fedora 17 64bit, using python 2.7.3 and
>> vtk
>> > > 5.10.1 (self compiled), I get an error when using InsertNextCell call
>> of
>> > > the vtkUnstructuredGrid object.
>> > >
>> > > Here is a example code I am using:
>> > > import vtk
>> > >
>> > > # Read the polyData
>> > > cube = vtk.vtkCubeSource()
>> > > Poly = cube.GetOutput()
>> > >
>> > > # Extract the information needed from the poly data
>> > > numPts = vtk.vtkIdTypeArray()
>> > > numPts.InsertNextValue(Poly.GetNumberOfPoints())
>> > > ptsIds = vtk.vtkIdTypeArray()
>> > > for cP in range(numPts.GetValue(0)): ptsIds.InsertNextValue(cP)
>> > > numCellFaces = vtk.vtkIdTypeArray()
>> > > numCellFaces.InsertNextValue(Poly.GetNumberOfPolys())
>> > > faces = vtk.vtkIdTypeArray()
>> > > for cF in range(numCellFaces.GetValue(0)):
>> > >     numPtsInFace = vtk.vtkIdTypeArray()
>> > >     numPtsInFace.InsertNextValue(
>> Poly.GetCell(cF).GetNumberOfPoints())
>> > >     faces.InsertNextValue(numPtsInFace)
>> > >     for cPF in range(numPtsInFace.GetValue(0)):
>> > >         faces.InsertNextValue(Poly.GetCell(cF).GetPointId(cPF))
>> > >
>> > > # Make the grid
>> > > UnstructPolyHed = vtk.vtkUnstructuredGrid()
>> > > UnstructPolyHed.SetPoints(Poly.GetPoints())
>> > >
>> > >
>> >
>> UnstructPolyHed.InsertNextCell(vtk.VTK_POLYHEDRON,numPts,ptsIds,numCellFaces,faces)
>> > >
>> > >
>> > > But I always end with this error: InsertNextCell() takes exactly 2
>> > > arguments (5 given)
>> > >
>> > > The example used 5 inputs as follows
>> > > InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds, vtkIdType
>> > > nfaces, vtkIdType *faces)
>> > >
>> > >
>> > > What am I doing incorrectly?
>> > >
>> > > Thanks in advance.
>> > >
>> > > Cheers,
>> > > Gudni Karl
>> > > -------------- next part --------------
>> > > An HTML attachment was scrubbed...
>> > > URL: <
>> > >
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/c805ba42/attachment-0001.htm
>> > > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 11
>> > > Date: Mon, 24 Jun 2013 09:25:01 -0400
>> > > From: Randy Heiland <heiland at indiana.edu>
>> > > Subject: [vtkusers] building vtk6, simple example
>> > > To: vtkusers at vtk.org
>> > > Message-ID: <86953D8F-E239-49CE-AEF8-044F0B7C5BAD at indiana.edu>
>> > > Content-Type: text/plain; charset=us-ascii
>> > >
>> > > Hello,
>> > >
>> > > 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:
>> > > cmake  -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++
>> > >  -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc  ../VTK6.0.0.rc3
>> > >
>> > > and make install.  Then I downloaded the tarball from here:
>> > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader , did
>> a
>> > > successful cmake on it, but then got:
>> > >
>> > > ~/dev/vtk6-play/SimplePointsReader/build$ make
>> > > Scanning dependencies of target SimplePointsReader
>> > > [100%] Building CXX object
>> > > CMakeFiles/SimplePointsReader.dir/SimplePointsReader.cxx.o
>> > > Linking CXX executable
>> > > SimplePointsReader.app/Contents/MacOS/SimplePointsReader
>> > > ld: library not found for -lvtkFiltersParallelFlowPaths
>> > > collect2: ld returned 1 exit status
>> > >
>> > > 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.:
>> > > ~/dev/vtk6-build$ ls /usr/local/lib/libvtk*Paral*.dylib
>> > > /usr/local/lib/libvtkFiltersParallel-6.0.1.dylib*
>> > > /usr/local/lib/libvtkFiltersParallel-6.0.dylib@
>> > > /usr/local/lib/libvtkFiltersParallelImaging-6.0.1.dylib*
>> > > /usr/local/lib/libvtkFiltersParallelImaging-6.0.dylib@
>> > > /usr/local/lib/libvtkIOParallel-6.0.1.dylib*
>> > > /usr/local/lib/libvtkIOParallel-6.0.dylib@
>> > > /usr/local/lib/libvtkParallelCore-6.0.1.dylib*
>> > > /usr/local/lib/libvtkParallelCore-6.0.dylib@
>> > >
>> > > Fwiw, I also have:
>> > > ~/dev/vtk6-build$ grep parallel CMakeCache.txt |grep bool
>> > > Module_vtkFiltersParallelFlowPaths:BOOL=OFF
>> > > Module_vtkFiltersParallelGeometry:BOOL=OFF
>> > > Module_vtkFiltersParallelMPI:BOOL=OFF
>> > > Module_vtkFiltersParallelStatistics:BOOL=OFF
>> > > Module_vtkIOMPIParallel:BOOL=OFF
>> > > Module_vtkIOParallelExodus:BOOL=OFF
>> > > Module_vtkIOParallelLSDyna:BOOL=OFF
>> > > Module_vtkIOParallelNetCDF:BOOL=OFF
>> > > Module_vtkInfovisParallel:BOOL=OFF
>> > > Module_vtkParallelMPI:BOOL=OFF
>> > > Module_vtkRenderingParallel:BOOL=OFF
>> > >
>> > > 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.
>> > >
>> > > thanks, Randy
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 12
>> > > Date: Mon, 24 Jun 2013 07:01:15 -0700 (PDT)
>> > > From: chasank <chasank at gmail.com>
>> > > Subject: [vtkusers] vtkborderwidget in vtk6.0rc3
>> > > To: vtkusers at vtk.org
>> > > Message-ID: <1372082475230-5721550.post at n5.nabble.com>
>> > > Content-Type: text/plain; charset=us-ascii
>> > >
>> > > Hi,
>> > >
>> > > Although vtk5.10.1 has vtkBorderWidget class, vtk6.0rc3 has not
>> > > vtkBorderWidget class. Also, this class is not marked as deprecated in
>> > > deprecated list (http://www.vtk.org/doc/nightly/html/deprecated.html).
>> I
>> > > wonder whether vtk6.0 stable version will have this class. If not,
>> which
>> > > class will be used instead of vtkBorderWidget in vtk6.0 stable
>> version.
>> > >
>> > >
>> > >
>> > > --
>> > > View this message in context:
>> > >
>> >
>> http://vtk.1045678.n5.nabble.com/vtkborderwidget-in-vtk6-0rc3-tp5721550.html
>> > > Sent from the VTK - Users mailing list archive at Nabble.com.
>> > >
>> > >
>> > > ------------------------------
>> > >
>> > > Message: 13
>> > > Date: Mon, 24 Jun 2013 10:04:14 -0400
>> > > From: Cory Quammen <cquammen at cs.unc.edu>
>> > > Subject: Re: [vtkusers] Plane polydata intersection
>> > > To: Laurent Chauvin <lchauvin at bwh.harvard.edu>
>> > > Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> > > Message-ID:
>> > >         <CANmPiKAiLM3NwHvKY4aUejELTQ=+ihOifUJ-xZYkKo7EAWR=
>> > > qA at mail.gmail.com>
>> > > Content-Type: text/plain; charset="iso-8859-1"
>> > >
>> > > On Sun, Jun 23, 2013 at 12:41 PM, Laurent Chauvin
>> > > <lchauvin at bwh.harvard.edu> wrote:
>> > > > Hi Cory,
>> > > >
>> > > > Thank you very much for your reply.
>> > > > However, I'm not sure to understand what you mean.
>> > > > Should I create a new polydata with all points at the same z
>> > coordinates
>> > > ?
>> > >
>> > > Laurent,
>> > >
>> > > You don't need to create a new polydata. Instead, you can add a new
>> > > vtkDataArray (likely a vtkFloatArray or vtkDataArray in this case) to
>> > > the point data of whatever polydata you already have by using
>> > > vtkPolyData::GetPointData()->AddArray(...).
>> > >
>> > > For axis-aligned planes, this new array could simply contain the x, y,
>> > > or z coordinate of each of the points in your vtkPolyData. If you want
>> > > an intersection of your poly data with a plane spanning x and y, you
>> > > would add a point data array storing all the z values. You can then
>> > > use the vtkContourFilter to get the polydata consisting of line
>> > > segments that represents the intersection of your polydata with the
>> > > plane at a given z value by specifying that z value as the isolevel
>> > > for the contour filter. You have to make sure you tell the
>> > > vtkContourFilter to use your new coordinate array.
>> > >
>> > > For an quick example of this concept, I've attached a simple ParaView
>> > > statefile showing how you can do this for a cylinder polydata. In this
>> > > example, I've specified my plane as spanning the x and y coordinates
>> > > with z value 0.2. In ParaView, I've used the Calculator to compute the
>> > > array consisting of the z coordinates of each point in the cylinder.
>> > > Forgive me if you don't have ParaView installed, we use it all the
>> > > time when prototyping visualizations.
>> > >
>> > > > Does this work with some oblique planes ( not parallel to x,y, or z
>> > axis
>> > > ) ?
>> > >
>> > > For the general case of an arbitrary plane, you would want to compute
>> > > the distance from each point your desired plan instead of creating a
>> > > new array containing the x, y, or z coordinates of each point. Then
>> > > you would set the vtkContourFilter isolevel to 0. The point plane
>> > > calculation is pretty simple:
>> > > http://mathworld.wolfram.com/Point-PlaneDistance.html
>> > >
>> > > Does that make sense?
>> > >
>> > > > Thank you.
>> > > > -Laurent
>> > > >
>> > > >
>> > > > On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <cquammen at cs.unc.edu
>> >
>> > > wrote:
>> > > >>
>> > > >> Laurent,
>> > > >>
>> > > >> For this special case of computing the intersection between a
>> polydata
>> > > >> and a plane, you can use a little trick. First, you can compute a
>> new
>> > > >> point data set for your polydata with,say, the z coordinates of
>> each
>> > > >> point in the polydata. Then, to get the intersection with an xy
>> plane,
>> > > >> you then use the vtkContourFilter operating on this coordinate
>> point
>> > > >> data and specify the z value that corresponds to your plane. The
>> > > >> result should be equivalent to the intersection of the polydata
>> with
>> > > >> that plane.
>> > > >>
>> > > >> It should be relatively fast to compute the contour, so you can
>> > > >> probably do this interactively.
>> > > >>
>> > > >> Hope that helps,
>> > > >> Cory
>> > > >>
>> > > >> On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin
>> > > >> <lchauvin at bwh.harvard.edu> wrote:
>> > > >> > Hello,
>> > > >> >
>> > > >> > I'm working on Slicer, and I was trying to find a nice way to
>> > display
>> > > >> > intersection between polydata and a plane.
>> > > >> > I read we could use a vtkCutter, but the thing is, I would like
>> to
>> > do
>> > > >> > this
>> > > >> > interactively. I want to be able to move the plane, and update
>> the
>> > > >> > intersection while moving the plane.
>> > > >> > I'm not sure using vtkCutter for this purpose would work. I think
>> > > >> > vtkCutter
>> > > >> > will take some times to execute, then moving the plane will be
>> slow.
>> > > >> >
>> > > >> > I know this question has been asked before, but I would like if
>> > there
>> > > >> > were
>> > > >> > some update since then. New widgets or object that I could use
>> for
>> > > that
>> > > >> > ?
>> > > >> >
>> > > >> > I was thinking using vtkImageReslice, get polydata of the plane
>> and
>> > > >> > compute
>> > > >> > the intersection between the 2 polydata, but I think it would
>> also
>> > be
>> > > to
>> > > >> > computing intensive to be able to do it smoothly with an
>> interactive
>> > > >> > plane.
>> > > >> >
>> > > >> > Thank you.
>> > > >> > -Laurent
>> > > >> >
>> > > >> >
>> > > >> >
>> > > >> >
>> > > >> > _______________________________________________
>> > > >> > Powered by www.kitware.com
>> > > >> >
>> > > >> > Visit other Kitware open-source projects at
>> > > >> > http://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
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Laurent Chauvin, MS
>> > > > Surgical Navigation and Robotics Laboratory, Radiology
>> > > > Brigham And Women's Hospital, Harvard Medical School
>> > > > http://wiki.ncigt.org/index.php/User:Lchauvin
>> > >
>> > >
>> > >
>> > > --
>> > > Cory Quammen
>> > > Research Associate
>> > > Department of Computer Science
>> > > The University of North Carolina at Chapel Hill
>> > > -------------- next part --------------
>> > > A non-text attachment was scrubbed...
>> > > Name: PlaneIntersectionExample.pvsm
>> > > Type: application/octet-stream
>> > > Size: 119252 bytes
>> > > Desc: not available
>> > > URL: <
>> > >
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/a4f8c898/attachment.obj
>> > > >
>> > >
>> > > ------------------------------
>> > >
>> > > _______________________________________________
>> > > vtkusers mailing list
>> > > vtkusers at vtk.org
>> > > http://www.vtk.org/mailman/listinfo/vtkusers
>> > >
>> > >
>> > > End of vtkusers Digest, Vol 110, Issue 31
>> > > *****************************************
>> > >
>> >
>> >
>> >
>> > --
>> > *Best  Regards
>> > Rahul Indoria
>> > Mobile No: +49-157-35652212*
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL: <
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/9490191a/attachment-0001.htm
>> > >
>> >
>> > ------------------------------
>> >
>> > Message: 2
>> > Date: Mon, 24 Jun 2013 10:20:15 -0400
>> > From: Laurent Chauvin <lchauvin at bwh.harvard.edu>
>> > Subject: Re: [vtkusers] Plane polydata intersection
>> > To: Cory Quammen <cquammen at cs.unc.edu>
>> > Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> > Message-ID: <74BDA439-1EE1-430A-B61E-A0CCD569634B at bwh.harvard.edu>
>> > Content-Type: text/plain; charset="iso-8859-1"
>> >
>> > Hi Cory,
>> >
>> > Thank you for your reply.
>> >
>> > However, you said I have to compute distance from each point to my
>> plane,
>> > then use vtkContourFilter.
>> > But I think it would be really heavy computation to compute distance
>> from
>> > each point to the plane every time I move the plane, isn't it ?
>> >
>> > I would like to be able to display the intersection while the plane is
>> > moving. If I have a polydata like a bone or a skull or something like
>> that,
>> > it would be really long to compute this distance, isn't it ?
>> >
>> > Thank you.
>> > -Laurent
>> >
>> >
>> >
>> > On Jun 24, 2013, at 10:04 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
>> >
>> > > On Sun, Jun 23, 2013 at 12:41 PM, Laurent Chauvin
>> > > <lchauvin at bwh.harvard.edu> wrote:
>> > >> Hi Cory,
>> > >>
>> > >> Thank you very much for your reply.
>> > >> However, I'm not sure to understand what you mean.
>> > >> Should I create a new polydata with all points at the same z
>> > coordinates ?
>> > >
>> > > Laurent,
>> > >
>> > > You don't need to create a new polydata. Instead, you can add a new
>> > > vtkDataArray (likely a vtkFloatArray or vtkDataArray in this case) to
>> > > the point data of whatever polydata you already have by using
>> > > vtkPolyData::GetPointData()->AddArray(...).
>> > >
>> > > For axis-aligned planes, this new array could simply contain the x, y,
>> > > or z coordinate of each of the points in your vtkPolyData. If you want
>> > > an intersection of your poly data with a plane spanning x and y, you
>> > > would add a point data array storing all the z values. You can then
>> > > use the vtkContourFilter to get the polydata consisting of line
>> > > segments that represents the intersection of your polydata with the
>> > > plane at a given z value by specifying that z value as the isolevel
>> > > for the contour filter. You have to make sure you tell the
>> > > vtkContourFilter to use your new coordinate array.
>> > >
>> > > For an quick example of this concept, I've attached a simple ParaView
>> > > statefile showing how you can do this for a cylinder polydata. In this
>> > > example, I've specified my plane as spanning the x and y coordinates
>> > > with z value 0.2. In ParaView, I've used the Calculator to compute the
>> > > array consisting of the z coordinates of each point in the cylinder.
>> > > Forgive me if you don't have ParaView installed, we use it all the
>> > > time when prototyping visualizations.
>> > >
>> > >> Does this work with some oblique planes ( not parallel to x,y, or z
>> > axis ) ?
>> > >
>> > > For the general case of an arbitrary plane, you would want to compute
>> > > the distance from each point your desired plan instead of creating a
>> > > new array containing the x, y, or z coordinates of each point. Then
>> > > you would set the vtkContourFilter isolevel to 0. The point plane
>> > > calculation is pretty simple:
>> > > http://mathworld.wolfram.com/Point-PlaneDistance.html
>> > >
>> > > Does that make sense?
>> > >
>> > >> Thank you.
>> > >> -Laurent
>> > >>
>> > >>
>> > >> On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <cquammen at cs.unc.edu>
>> > wrote:
>> > >>>
>> > >>> Laurent,
>> > >>>
>> > >>> For this special case of computing the intersection between a
>> polydata
>> > >>> and a plane, you can use a little trick. First, you can compute a
>> new
>> > >>> point data set for your polydata with,say, the z coordinates of each
>> > >>> point in the polydata. Then, to get the intersection with an xy
>> plane,
>> > >>> you then use the vtkContourFilter operating on this coordinate point
>> > >>> data and specify the z value that corresponds to your plane. The
>> > >>> result should be equivalent to the intersection of the polydata with
>> > >>> that plane.
>> > >>>
>> > >>> It should be relatively fast to compute the contour, so you can
>> > >>> probably do this interactively.
>> > >>>
>> > >>> Hope that helps,
>> > >>> Cory
>> > >>>
>> > >>> On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin
>> > >>> <lchauvin at bwh.harvard.edu> wrote:
>> > >>>> Hello,
>> > >>>>
>> > >>>> I'm working on Slicer, and I was trying to find a nice way to
>> display
>> > >>>> intersection between polydata and a plane.
>> > >>>> I read we could use a vtkCutter, but the thing is, I would like to
>> do
>> > >>>> this
>> > >>>> interactively. I want to be able to move the plane, and update the
>> > >>>> intersection while moving the plane.
>> > >>>> I'm not sure using vtkCutter for this purpose would work. I think
>> > >>>> vtkCutter
>> > >>>> will take some times to execute, then moving the plane will be
>> slow.
>> > >>>>
>> > >>>> I know this question has been asked before, but I would like if
>> there
>> > >>>> were
>> > >>>> some update since then. New widgets or object that I could use for
>> > that
>> > >>>> ?
>> > >>>>
>> > >>>> I was thinking using vtkImageReslice, get polydata of the plane and
>> > >>>> compute
>> > >>>> the intersection between the 2 polydata, but I think it would also
>> be
>> > to
>> > >>>> computing intensive to be able to do it smoothly with an
>> interactive
>> > >>>> plane.
>> > >>>>
>> > >>>> Thank you.
>> > >>>> -Laurent
>> > >>>>
>> > >>>>
>> > >>>>
>> > >>>>
>> > >>>> _______________________________________________
>> > >>>> Powered by www.kitware.com
>> > >>>>
>> > >>>> Visit other Kitware open-source projects at
>> > >>>> http://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
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Laurent Chauvin, MS
>> > >> Surgical Navigation and Robotics Laboratory, Radiology
>> > >> Brigham And Women's Hospital, Harvard Medical School
>> > >> http://wiki.ncigt.org/index.php/User:Lchauvin
>> > >
>> > >
>> > >
>> > > --
>> > > Cory Quammen
>> > > Research Associate
>> > > Department of Computer Science
>> > > The University of North Carolina at Chapel Hill
>> > > <PlaneIntersectionExample.pvsm>
>> >
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL: <
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/84634e38/attachment-0001.htm
>> > >
>> >
>> > ------------------------------
>> >
>> > Message: 3
>> > Date: Mon, 24 Jun 2013 10:44:29 -0400
>> > From: Dean Inglis <inglis.dl at gmail.com>
>> > Subject: Re: [vtkusers] synchronous update between vtkImagePlaneWidget
>> >         and     vtkResliceCursorWidget
>> > To: ljp19890525 <ljp19890525 at 163.com>
>> > Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> > Message-ID:
>> >         <CABX+von=ToFhe54mk_p=JczfgXE66aOcjYnf+DN1M_hz5O=
>> > 1qg at mail.gmail.com>
>> > Content-Type: text/plain; charset="iso-8859-1"
>> >
>> > Hi,
>> >
>> > try the following code snippet.  Basically, create a callback class
>> wherein
>> > you decide how to update the reslice cursor widget from the image plane
>> > widget.
>> > Add the callback to listen for the image plane widget's
>> InteractionEvent.
>> >
>> > regards,
>> > Dean
>> >
>> >
>> > class myCallback : public vtkCommand
>> > {
>> >   public:
>> >     static myCallback *New() {
>> >       return new myCallback; }
>> >
>> >     void Execute( vtkObject* vtkNotUsed(caller), unsigned long
>> > vtkNotUsed(event),
>> >                   void * vtkNotUsed(callData) )
>> >     {
>> >       /** do something with ipwidget and rcwidget when the ipwidget
>> fires a
>> >            an interaction event signal */
>> >     }
>> >
>> >  myCallback():ipwidget( 0 ), rcwidget( 0 ){}
>> >   ~myCallback(){ this->ipwidget= 0; this->rcwidget = 0; }
>> >   vtkImagePlaneWidget* ipwidget;
>> >   vtkResliceCursorWidget* rcwidget;
>> > };
>> >
>> >
>> > void myclass::some_setup_method()
>> > {
>> >   vtkSmartPointer<myCallback> cbk = vtkSmartPointer<myCallback>::New();
>> >   cbk->ipwidget = this->ipwidget;
>> >   cbk->rcwidget = this->rcwidget;
>> >   this->ipwidget->AddObserver( vtkCommand::InteractionEvent, cbk );
>> > }
>> >
>> >
>> >
>> > On Thu, Jun 20, 2013 at 10:15 PM, nil_debug <ljp19890525 at 163.com>
>> wrote:
>> >
>> > > **
>> > > Hello,
>> > > Is anyone can help me? Now I have defined a vtkImagePlaneWidget and a
>> > > vtkResliceCursorWidget,  I would like to when dragging the
>> > >  vtkImagePlaneWidget the   vtkResliceCursorWidget can move.In a word
>>  I
>> > > don't know how to a "AddObserver" for the vtkImagePlaneWidget from
>> > > the vtkResliceCursorWidget! I do know  I should define a
>> "myCallBack",but
>> > > How?
>> > > Will be deeply grateful !
>> > >
>> > > ------------------------------
>> > > nil_debug
>> > >
>> > > _______________________________________________
>> > > Powered by www.kitware.com
>> > >
>> > > Visit other Kitware open-source projects at
>> > > http://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: <
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/2a076878/attachment-0001.htm
>> > >
>> >
>> > ------------------------------
>> >
>> > Message: 4
>> > Date: Mon, 24 Jun 2013 10:46:10 -0400
>> > From: Cory Quammen <cquammen at cs.unc.edu>
>> > Subject: Re: [vtkusers] Plane polydata intersection
>> > To: Laurent Chauvin <lchauvin at bwh.harvard.edu>
>> > Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> > Message-ID:
>> >         <CANmPiKDicXmSpCLMJyZM5Q7-VA=
>> > 0JuAPQn6Ke7X2bZZvDKf3kQ at mail.gmail.com>
>> > Content-Type: text/plain; charset=ISO-8859-1
>> >
>> > Laurent,
>> >
>> > If your plane doesn't change orientation, then you should be able to
>> > change your isolevel value as you move the plane along its normal,
>> > thereby avoiding the distance computation, e.g., compute the distance
>> > one time relative to the current plane, then add 5 to the isolevel if
>> > your plane moves 5 units along the plane normal, etc.
>> >
>> > For a non-geometry based approach, you might use custom shaders to
>> > compute the distance of each vertex to your plane and discard
>> > fragments that aren't within some distance to the plane. This would be
>> > fast but may suffer from giving you a more-than-one-pixel-thick
>> > representation of the intersection in parts of the scene closest to
>> > the camera and perhaps missing some pixels in parts of the scene
>> > furthest from the camera.
>> >
>> > Hope that helps,
>> > Cory
>> >
>> >
>> >
>> > On Mon, Jun 24, 2013 at 10:20 AM, Laurent Chauvin
>> > <lchauvin at bwh.harvard.edu> wrote:
>> > > Hi Cory,
>> > >
>> > > Thank you for your reply.
>> > >
>> > > However, you said I have to compute distance from each point to my
>> plane,
>> > > then use vtkContourFilter.
>> > > But I think it would be really heavy computation to compute distance
>> from
>> > > each point to the plane every time I move the plane, isn't it ?
>> > >
>> > > I would like to be able to display the intersection while the plane is
>> > > moving. If I have a polydata like a bone or a skull or something like
>> > that,
>> > > it would be really long to compute this distance, isn't it ?
>> > >
>> > > Thank you.
>> > > -Laurent
>> > >
>> > >
>> > >
>> > > On Jun 24, 2013, at 10:04 AM, Cory Quammen <cquammen at cs.unc.edu>
>> wrote:
>> > >
>> > > On Sun, Jun 23, 2013 at 12:41 PM, Laurent Chauvin
>> > > <lchauvin at bwh.harvard.edu> wrote:
>> > >
>> > > Hi Cory,
>> > >
>> > > Thank you very much for your reply.
>> > > However, I'm not sure to understand what you mean.
>> > > Should I create a new polydata with all points at the same z
>> coordinates
>> > ?
>> > >
>> > >
>> > > Laurent,
>> > >
>> > > You don't need to create a new polydata. Instead, you can add a new
>> > > vtkDataArray (likely a vtkFloatArray or vtkDataArray in this case) to
>> > > the point data of whatever polydata you already have by using
>> > > vtkPolyData::GetPointData()->AddArray(...).
>> > >
>> > > For axis-aligned planes, this new array could simply contain the x, y,
>> > > or z coordinate of each of the points in your vtkPolyData. If you want
>> > > an intersection of your poly data with a plane spanning x and y, you
>> > > would add a point data array storing all the z values. You can then
>> > > use the vtkContourFilter to get the polydata consisting of line
>> > > segments that represents the intersection of your polydata with the
>> > > plane at a given z value by specifying that z value as the isolevel
>> > > for the contour filter. You have to make sure you tell the
>> > > vtkContourFilter to use your new coordinate array.
>> > >
>> > > For an quick example of this concept, I've attached a simple ParaView
>> > > statefile showing how you can do this for a cylinder polydata. In this
>> > > example, I've specified my plane as spanning the x and y coordinates
>> > > with z value 0.2. In ParaView, I've used the Calculator to compute the
>> > > array consisting of the z coordinates of each point in the cylinder.
>> > > Forgive me if you don't have ParaView installed, we use it all the
>> > > time when prototyping visualizations.
>> > >
>> > > Does this work with some oblique planes ( not parallel to x,y, or z
>> axis
>> > ) ?
>> > >
>> > >
>> > > For the general case of an arbitrary plane, you would want to compute
>> > > the distance from each point your desired plan instead of creating a
>> > > new array containing the x, y, or z coordinates of each point. Then
>> > > you would set the vtkContourFilter isolevel to 0. The point plane
>> > > calculation is pretty simple:
>> > > http://mathworld.wolfram.com/Point-PlaneDistance.html
>> > >
>> > > Does that make sense?
>> > >
>> > > Thank you.
>> > > -Laurent
>> > >
>> > >
>> > > On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <cquammen at cs.unc.edu>
>> > wrote:
>> > >
>> > >
>> > > Laurent,
>> > >
>> > > For this special case of computing the intersection between a polydata
>> > > and a plane, you can use a little trick. First, you can compute a new
>> > > point data set for your polydata with,say, the z coordinates of each
>> > > point in the polydata. Then, to get the intersection with an xy plane,
>> > > you then use the vtkContourFilter operating on this coordinate point
>> > > data and specify the z value that corresponds to your plane. The
>> > > result should be equivalent to the intersection of the polydata with
>> > > that plane.
>> > >
>> > > It should be relatively fast to compute the contour, so you can
>> > > probably do this interactively.
>> > >
>> > > Hope that helps,
>> > > Cory
>> > >
>> > > On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin
>> > > <lchauvin at bwh.harvard.edu> wrote:
>> > >
>> > > Hello,
>> > >
>> > > I'm working on Slicer, and I was trying to find a nice way to display
>> > > intersection between polydata and a plane.
>> > > I read we could use a vtkCutter, but the thing is, I would like to do
>> > > this
>> > > interactively. I want to be able to move the plane, and update the
>> > > intersection while moving the plane.
>> > > I'm not sure using vtkCutter for this purpose would work. I think
>> > > vtkCutter
>> > > will take some times to execute, then moving the plane will be slow.
>> > >
>> > > I know this question has been asked before, but I would like if there
>> > > were
>> > > some update since then. New widgets or object that I could use for
>> that
>> > > ?
>> > >
>> > > I was thinking using vtkImageReslice, get polydata of the plane and
>> > > compute
>> > > the intersection between the 2 polydata, but I think it would also be
>> to
>> > > computing intensive to be able to do it smoothly with an interactive
>> > > plane.
>> > >
>> > > Thank you.
>> > > -Laurent
>> > >
>> > >
>> > >
>> > >
>> > > _______________________________________________
>> > > Powered by www.kitware.com
>> > >
>> > > Visit other Kitware open-source projects at
>> > > http://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
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > > Laurent Chauvin, MS
>> > > Surgical Navigation and Robotics Laboratory, Radiology
>> > > Brigham And Women's Hospital, Harvard Medical School
>> > > http://wiki.ncigt.org/index.php/User:Lchauvin
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > > Cory Quammen
>> > > Research Associate
>> > > Department of Computer Science
>> > > The University of North Carolina at Chapel Hill
>> > > <PlaneIntersectionExample.pvsm>
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > Cory Quammen
>> > Research Associate
>> > Department of Computer Science
>> > The University of North Carolina at Chapel Hill
>> >
>> >
>> > ------------------------------
>> >
>> > Message: 5
>> > Date: Mon, 24 Jun 2013 11:05:39 -0400
>> > From: Laurent Chauvin <lchauvin at bwh.harvard.edu>
>> > Subject: Re: [vtkusers] Plane polydata intersection
>> > To: Cory Quammen <cquammen at cs.unc.edu>
>> > Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> > Message-ID: <339D1015-DE2E-4A6E-9E74-F78C876AE7DF at bwh.harvard.edu>
>> > Content-Type: text/plain; charset="iso-8859-1"
>> >
>> > Hi Cory.
>> >
>> > Indeed the plane I will use can change position and direction.
>> >
>> > Please, could you explain what is custom shaders and how to use them to
>> > compute distance ?
>> >
>> > Thank you.
>> > -Laurent
>> >
>> >
>> >
>> > On Jun 24, 2013, at 10:46 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
>> >
>> > > Laurent,
>> > >
>> > > If your plane doesn't change orientation, then you should be able to
>> > > change your isolevel value as you move the plane along its normal,
>> > > thereby avoiding the distance computation, e.g., compute the distance
>> > > one time relative to the current plane, then add 5 to the isolevel if
>> > > your plane moves 5 units along the plane normal, etc.
>> > >
>> > > For a non-geometry based approach, you might use custom shaders to
>> > > compute the distance of each vertex to your plane and discard
>> > > fragments that aren't within some distance to the plane. This would be
>> > > fast but may suffer from giving you a more-than-one-pixel-thick
>> > > representation of the intersection in parts of the scene closest to
>> > > the camera and perhaps missing some pixels in parts of the scene
>> > > furthest from the camera.
>> > >
>> > > Hope that helps,
>> > > Cory
>> > >
>> > >
>> > >
>> > > On Mon, Jun 24, 2013 at 10:20 AM, Laurent Chauvin
>> > > <lchauvin at bwh.harvard.edu> wrote:
>> > >> Hi Cory,
>> > >>
>> > >> Thank you for your reply.
>> > >>
>> > >> However, you said I have to compute distance from each point to my
>> > plane,
>> > >> then use vtkContourFilter.
>> > >> But I think it would be really heavy computation to compute distance
>> > from
>> > >> each point to the plane every time I move the plane, isn't it ?
>> > >>
>> > >> I would like to be able to display the intersection while the plane
>> is
>> > >> moving. If I have a polydata like a bone or a skull or something like
>> > that,
>> > >> it would be really long to compute this distance, isn't it ?
>> > >>
>> > >> Thank you.
>> > >> -Laurent
>> > >>
>> > >>
>> > >>
>> > >> On Jun 24, 2013, at 10:04 AM, Cory Quammen <cquammen at cs.unc.edu>
>> wrote:
>> > >>
>> > >> On Sun, Jun 23, 2013 at 12:41 PM, Laurent Chauvin
>> > >> <lchauvin at bwh.harvard.edu> wrote:
>> > >>
>> > >> Hi Cory,
>> > >>
>> > >> Thank you very much for your reply.
>> > >> However, I'm not sure to understand what you mean.
>> > >> Should I create a new polydata with all points at the same z
>> > coordinates ?
>> > >>
>> > >>
>> > >> Laurent,
>> > >>
>> > >> You don't need to create a new polydata. Instead, you can add a new
>> > >> vtkDataArray (likely a vtkFloatArray or vtkDataArray in this case) to
>> > >> the point data of whatever polydata you already have by using
>> > >> vtkPolyData::GetPointData()->AddArray(...).
>> > >>
>> > >> For axis-aligned planes, this new array could simply contain the x,
>> y,
>> > >> or z coordinate of each of the points in your vtkPolyData. If you
>> want
>> > >> an intersection of your poly data with a plane spanning x and y, you
>> > >> would add a point data array storing all the z values. You can then
>> > >> use the vtkContourFilter to get the polydata consisting of line
>> > >> segments that represents the intersection of your polydata with the
>> > >> plane at a given z value by specifying that z value as the isolevel
>> > >> for the contour filter. You have to make sure you tell the
>> > >> vtkContourFilter to use your new coordinate array.
>> > >>
>> > >> For an quick example of this concept, I've attached a simple ParaView
>> > >> statefile showing how you can do this for a cylinder polydata. In
>> this
>> > >> example, I've specified my plane as spanning the x and y coordinates
>> > >> with z value 0.2. In ParaView, I've used the Calculator to compute
>> the
>> > >> array consisting of the z coordinates of each point in the cylinder.
>> > >> Forgive me if you don't have ParaView installed, we use it all the
>> > >> time when prototyping visualizations.
>> > >>
>> > >> Does this work with some oblique planes ( not parallel to x,y, or z
>> > axis ) ?
>> > >>
>> > >>
>> > >> For the general case of an arbitrary plane, you would want to compute
>> > >> the distance from each point your desired plan instead of creating a
>> > >> new array containing the x, y, or z coordinates of each point. Then
>> > >> you would set the vtkContourFilter isolevel to 0. The point plane
>> > >> calculation is pretty simple:
>> > >> http://mathworld.wolfram.com/Point-PlaneDistance.html
>> > >>
>> > >> Does that make sense?
>> > >>
>> > >> Thank you.
>> > >> -Laurent
>> > >>
>> > >>
>> > >> On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <cquammen at cs.unc.edu>
>> > wrote:
>> > >>
>> > >>
>> > >> Laurent,
>> > >>
>> > >> For this special case of computing the intersection between a
>> polydata
>> > >> and a plane, you can use a little trick. First, you can compute a new
>> > >> point data set for your polydata with,say, the z coordinates of each
>> > >> point in the polydata. Then, to get the intersection with an xy
>> plane,
>> > >> you then use the vtkContourFilter operating on this coordinate point
>> > >> data and specify the z value that corresponds to your plane. The
>> > >> result should be equivalent to the intersection of the polydata with
>> > >> that plane.
>> > >>
>> > >> It should be relatively fast to compute the contour, so you can
>> > >> probably do this interactively.
>> > >>
>> > >> Hope that helps,
>> > >> Cory
>> > >>
>> > >> On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin
>> > >> <lchauvin at bwh.harvard.edu> wrote:
>> > >>
>> > >> Hello,
>> > >>
>> > >> I'm working on Slicer, and I was trying to find a nice way to display
>> > >> intersection between polydata and a plane.
>> > >> I read we could use a vtkCutter, but the thing is, I would like to do
>> > >> this
>> > >> interactively. I want to be able to move the plane, and update the
>> > >> intersection while moving the plane.
>> > >> I'm not sure using vtkCutter for this purpose would work. I think
>> > >> vtkCutter
>> > >> will take some times to execute, then moving the plane will be slow.
>> > >>
>> > >> I know this question has been asked before, but I would like if there
>> > >> were
>> > >> some update since then. New widgets or object that I could use for
>> that
>> > >> ?
>> > >>
>> > >> I was thinking using vtkImageReslice, get polydata of the plane and
>> > >> compute
>> > >> the intersection between the 2 polydata, but I think it would also
>> be to
>> > >> computing intensive to be able to do it smoothly with an interactive
>> > >> plane.
>> > >>
>> > >> Thank you.
>> > >> -Laurent
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> _______________________________________________
>> > >> Powered by www.kitware.com
>> > >>
>> > >> Visit other Kitware open-source projects at
>> > >> http://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
>> > >>
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Laurent Chauvin, MS
>> > >> Surgical Navigation and Robotics Laboratory, Radiology
>> > >> Brigham And Women's Hospital, Harvard Medical School
>> > >> http://wiki.ncigt.org/index.php/User:Lchauvin
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Cory Quammen
>> > >> Research Associate
>> > >> Department of Computer Science
>> > >> The University of North Carolina at Chapel Hill
>> > >> <PlaneIntersectionExample.pvsm>
>> > >>
>> > >>
>> > >
>> > >
>> > >
>> > > --
>> > > Cory Quammen
>> > > Research Associate
>> > > Department of Computer Science
>> > > The University of North Carolina at Chapel Hill
>> >
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL: <
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/f599a5c7/attachment-0001.htm
>> > >
>> >
>> > ------------------------------
>> >
>> > Message: 6
>> > Date: Mon, 24 Jun 2013 15:32:32 +0000
>> > From: David Cole <dlrdave at aol.com>
>> > Subject: Re: [vtkusers] vtkborderwidget in vtk6.0rc3
>> > To: " vtkusers at vtk.org " <vtkusers at vtk.org>, chasank
>> >         <chasank at gmail.com>
>> > Message-ID: <20130624153446.3248465791 at public.kitware.com>
>> > Content-Type: text/plain; charset="utf-8"
>> >
>> > > Although vtk5.10.1 has vtkBorderWidget class, vtk6.0rc3 has not
>> > > vtkBorderWidget class. Also, this class is not marked as deprecated in
>> > > deprecated list (http://www.vtk.org/doc/nightly/html/deprecated.html).
>> I
>> > > wonder whether vtk6.0 stable version will have this class. If not,
>> which
>> > > class will be used instead of vtkBorderWidget in vtk6.0 stable
>> version.
>> >
>> >
>> >
>> > If I do a checkout of VTK 6.0.0.rc3:
>> >
>> > $ git checkout v6.0.0.rc3
>> >
>> >
>> > And then look for files with ?border? in the name:
>> >
>> > $ find . | grep -i border
>> > ./Interaction/Widgets/Testing/Cxx/TestBorderWidget.cxx
>> > ./Interaction/Widgets/Testing/Cxx/vtkBorderWidgetTest1.cxx
>> > ./Interaction/Widgets/vtkBorderRepresentation.cxx
>> > ./Interaction/Widgets/vtkBorderRepresentation.h
>> > ./Interaction/Widgets/vtkBorderWidget.cxx
>> > ./Interaction/Widgets/vtkBorderWidget.h
>> > ./Rendering/OpenGL/Testing/Cxx/TestImageResliceMapperBorder.cxx
>> > ./Rendering/OpenGL/Testing/Cxx/TestImageSliceMapperBorder.cxx
>> >
>> >
>> > They do indeed appear to be in VTK 6.0.0 rc3. I wonder why you don?t
>> think
>> > they?re there...?
>> >
>> >
>> >
>> > HTH,
>> >
>> > David C.
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL: <
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/bfe3d410/attachment-0001.htm
>> > >
>> >
>> > ------------------------------
>> >
>> > Message: 7
>> > Date: Mon, 24 Jun 2013 11:39:19 -0400
>> > From: "Marcus D. Hanwell" <marcus.hanwell at kitware.com>
>> > Subject: Re: [vtkusers] building vtk6, simple example
>> > To: Randy Heiland <heiland at indiana.edu>
>> > Cc: vtkusers at vtk.org
>> > Message-ID:
>> >         <CAMkPkZVtAAPd7UqEpS1_JvncYmbaRb0qJ4=
>> > E1RbwMQwcEvMSwA at mail.gmail.com>
>> > Content-Type: text/plain; charset="iso-8859-1"
>> >
>> > On Mon, Jun 24, 2013 at 9:25 AM, Randy Heiland <heiland at indiana.edu>
>> > wrote:
>> >
>> > > Hello,
>> > >
>> > > 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:
>> > > cmake  -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++
>> > >  -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc  ../VTK6.0.0.rc3
>> > >
>> > > and make install.  Then I downloaded the tarball from here:
>> > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader , did
>> a
>> > > successful cmake on it, but then got:
>> > >
>> > > ~/dev/vtk6-play/SimplePointsReader/build$ make
>> > > Scanning dependencies of target SimplePointsReader
>> > > [100%] Building CXX object
>> > > CMakeFiles/SimplePointsReader.dir/SimplePointsReader.cxx.o
>> > > Linking CXX executable
>> > > SimplePointsReader.app/Contents/MacOS/SimplePointsReader
>> > > ld: library not found for -lvtkFiltersParallelFlowPaths
>> > > collect2: ld returned 1 exit status
>> > >
>> > > 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.:
>> > > ~/dev/vtk6-build$ ls /usr/local/lib/libvtk*Paral*.dylib
>> > > /usr/local/lib/libvtkFiltersParallel-6.0.1.dylib*
>> > > /usr/local/lib/libvtkFiltersParallel-6.0.dylib@
>> > > /usr/local/lib/libvtkFiltersParallelImaging-6.0.1.dylib*
>> > > /usr/local/lib/libvtkFiltersParallelImaging-6.0.dylib@
>> > > /usr/local/lib/libvtkIOParallel-6.0.1.dylib*
>> > > /usr/local/lib/libvtkIOParallel-6.0.dylib@
>> > > /usr/local/lib/libvtkParallelCore-6.0.1.dylib*
>> > > /usr/local/lib/libvtkParallelCore-6.0.dylib@
>> > >
>> > > Fwiw, I also have:
>> > > ~/dev/vtk6-build$ grep parallel CMakeCache.txt |grep bool
>> > > Module_vtkFiltersParallelFlowPaths:BOOL=OFF
>> > > Module_vtkFiltersParallelGeometry:BOOL=OFF
>> > > Module_vtkFiltersParallelMPI:BOOL=OFF
>> > > Module_vtkFiltersParallelStatistics:BOOL=OFF
>> > > Module_vtkIOMPIParallel:BOOL=OFF
>> > > Module_vtkIOParallelExodus:BOOL=OFF
>> > > Module_vtkIOParallelLSDyna:BOOL=OFF
>> > > Module_vtkIOParallelNetCDF:BOOL=OFF
>> > > Module_vtkInfovisParallel:BOOL=OFF
>> > > Module_vtkParallelMPI:BOOL=OFF
>> > > Module_vtkRenderingParallel:BOOL=OFF
>> > >
>> > > 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.
>> > >
>> >
>> > Part of this stems from the CMakeLists.txt in the example - if you use
>> > find_package(VTK) without specifying components then use
>> ${VTK_LIBRARIES}
>> > you will basically link to everything VTK built. This is not normally
>> what
>> > people want, and you can see the pre-6.0 version called out vtkHybrid.
>> The
>> > wiki page below provides more background,
>> >
>> > http://www.vtk.org/Wiki/VTK/Build_System_Migration
>> >
>> > It leads to the question of why the VTK you built thinks
>> > vtkFiltersParallelFlowPaths was enabled when it was now. We will build
>> some
>> > of the parallel modules that do not require MPI for example - they are
>> > probably in the StandAlone group, although it is possible they would be
>> > better in a parallel group of their own. The examples attempt to work
>> with
>> > VTK 5 and 6, adding the components would make that harder to achieve
>> which
>> > is why I think their CMake code is written the way it is.
>> >
>> > Hope that makes it clearer, thanks for bringing this up. I would like to
>> > get to the bottom of why VTK has incorrectly labelled a module as
>> enabled
>> > that was not built.
>> >
>> > Marcus
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL: <
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/13bd033c/attachment-0001.htm
>> > >
>> >
>> > ------------------------------
>> >
>> > Message: 8
>> > Date: Mon, 24 Jun 2013 15:34:54 +0000
>> > From: David Cole <dlrdave at aol.com>
>> > Subject: Re: [vtkusers] Render Control
>> > To: " vtkusers at vtk.org " <vtkusers at vtk.org>, Max
>> >         <smapersmaper at gmail.com>
>> > Message-ID: <20130624154152.DF67C63DED at public.kitware.com>
>> > Content-Type: text/plain; charset="utf-8"
>> >
>> > > Hi David and thank you for the reply,
>> >
>> >
>> > sure, no problem.
>> >
>> >
>> >
>> > > so what is the way to add the render control to the winform in 64 bit?
>> > > Currently what I did:
>> >
>> > >   ...
>> > > well, it works in runtime
>> >
>> >
>> > Good, it?s supposed to.
>> >
>> >
>> >
>> > > but it says it cannot find the kitware clr in
>> > > design time.
>> >
>> >
>> > It?s right, because Visual Studio is a 32-bit host, and it CANNOT LOAD
>> > 64-bit controls. It can only load ?Any CPU? controls that can be
>> > just-in-time compiled to a 32-bit architecture. The ActiViz dlls cannot
>> be
>> > just-in-time compiled to any old architecture -- it has to match the
>> > underlying native dlls that get loaded.
>> >
>> >
>> > So, this is normal and expected behavior in the case of ActiViz. It?s
>> > strange when you first encounter it, because there aren?t many .NET
>> > controls that have this type of native code dependency. But it is the
>> way
>> > it is, and Visual Studio itself will probably never be a 64-bit app.
>> >
>> >
>> >
>> > > Also i don't think that for it to work i need to install also 86 bit
>> > version
>> > > of activiz
>> >
>> >
>> > Yes, you do, if you want to add it the ?normal? way you add things at
>> > design time in Visual Studio. You have to add it as the 32-bit control,
>> > then switch your application?s target architecture and swap the
>> references
>> > to the 64-bit versions... Then just ignore the Visual Studio design-time
>> > ?errors? that you get. If you can build and run it, then it?s all
>> working
>> > as best it can.
>> >
>> >
>> >
>> > > i tried to add the control through kitware dll but it cannot find
>> it...
>> > > Something is not right here i think...
>> > > Can you please tell me what i did wrong?
>> >
>> >
>> > I don?t think you?ve done anything wrong, because you say ?it works in
>> > runtime? -- if you had done something wrong, it wouldn?t.
>> >
>> >
>> >
>> > Cheers,
>> >
>> > David C.
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL: <
>> >
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/6aca9872/attachment.htm
>> > >
>> >
>> > ------------------------------
>> >
>> > _______________________________________________
>> > vtkusers mailing list
>> > vtkusers at vtk.org
>> > http://www.vtk.org/mailman/listinfo/vtkusers
>> >
>> >
>> > End of vtkusers Digest, Vol 110, Issue 32
>> > *****************************************
>> >
>>
>>
>>
>> --
>> *Best  Regards
>> Rahul Indoria
>> Mobile No: +49-157-35652212*
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130624/44d4626d/attachment.htm
>> >
>>
>> ------------------------------
>>
>> _______________________________________________
>> vtkusers mailing list
>> vtkusers at vtk.org
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>> End of vtkusers Digest, Vol 110, Issue 33
>> *****************************************
>>
>
>
>
> --
> *Best  Regards
> Rahul Indoria
> Mobile No: +49-157-35652212*
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://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: <http://www.vtk.org/pipermail/vtkusers/attachments/20130628/aeef935f/attachment.htm>


More information about the vtkusers mailing list