<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thanks for the reply Cory.<div class=""><br class=""></div><div class="">Found a simpler solution by using vtkCylinderSource and vtkCubeSource which can then be subtracted using vtkIntersectionPolyDataFilter.</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Richard</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 01 Apr 2015, at 16:01, Cory Quammen <<a href="mailto:cory.quammen@kitware.com" class="">cory.quammen@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><span style="font-size:12.8000001907349px" class="">There is no filter in VTK that I know of that will do this. The complaint that a vtkImageData is required is because that filter expects vtkImageData as input, and you gave it vtkPolyData - in other words, it won't work.</span><div style="font-size:12.8000001907349px" class=""><br class=""></div><div style="font-size:12.8000001907349px" class="">You might try this contribution on the VTK journal: <a href="http://www.vtkjournal.org/browse/publication/949" target="_blank" class="">http://www.vtkjournal.org/browse/publication/949</a></div><div style="font-size:12.8000001907349px" class=""><br class=""></div><div style="font-size:12.8000001907349px" class="">HTH,</div><div style="font-size:12.8000001907349px" class="">Cory</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Apr 1, 2015 at 5:24 AM, mbcx9rb9 <span dir="ltr" class=""><<a href="mailto:richard.j.brown@live.co.uk" target="_blank" class="">richard.j.brown@live.co.uk</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br class="">
<br class="">
A very simple question I think. I'd like to produce a polygon representing<br class="">
the overlap between two overlaps (in this case a circle and a rectangle). I<br class="">
have tried vtkImageDifference and vtkIntersectionPolyDataFilter to no avail.<br class="">
<br class="">
I generated the circle using vtkRegularPolygonSource and the square with<br class="">
vtkPoints with vtkPolyon to create a vtkCellArray to create vtkPolyData.<br class="">
<br class="">
My problem, however, is when using SetInputConnection for vtkImageDifference<br class="">
or vtkIntersectionPolyDataFilter, I get the error "Input for connection<br class="">
index 0 on input port index 1 for algorithm<br class="">
vtkImageDifference(0x7ff2ea844400) is of type vtkPolyData, but a<br class="">
vtkImageData is required."<br class="">
<br class="">
Can anyone give me any pointers? It seems like such a simple task but I'm<br class="">
stumped.<br class="">
<br class="">
Regards<br class="">
<br class="">
<br class="">
<br class="">
--<br class="">
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/intersecting-polygons-tp5731280.html" target="_blank" class="">http://vtk.1045678.n5.nabble.com/intersecting-polygons-tp5731280.html</a><br class="">
Sent from the VTK - Users mailing list archive at <a href="http://Nabble.com" class="">Nabble.com</a>.<br class="">
_______________________________________________<br class="">
Powered by <a href="http://www.kitware.com/" target="_blank" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank" class="">http://www.kitware.com/opensource/opensource.html</a><br class="">
<br class="">
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" class="">http://www.vtk.org/Wiki/VTK_FAQ</a><br class="">
<br class="">
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank" class="">http://markmail.org/search/?q=vtkusers</a><br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank" class="">http://public.kitware.com/mailman/listinfo/vtkusers</a><br class="">
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature">Cory Quammen<br class="">R&D Engineer<br class="">Kitware, Inc.</div>
</div>
</div></blockquote></div><br class=""></div></body></html>