<div dir="ltr">Both, I will study.<br><br>Thanks,<br><br>Jothy<br><br><div class="gmail_quote">On Sat, Jun 5, 2010 at 7:38 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">What do you want? A filled contour? Or a boundary of the contour? Or both?<br>
<br>
All are possible with the pipelines you have.<br>
<br>
Please study and experiment on your own for a while.<br>
<div><div></div><div class="h5"><br>
On Sat, Jun 5, 2010 at 2:28 PM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
> But I should see it as a filled contour.<br>
><br>
> On Sat, Jun 5, 2010 at 6:48 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> That is exactly what it should show. I guess I am misunderstanding your<br>
>> problem<br>
>><br>
>> On Sat, Jun 5, 2010 at 1:40 PM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
>> > Sorry,<br>
>> ><br>
>> > I meant , I don't understand the featureEdges behaviour.<br>
>> ><br>
>> > On Sat, Jun 5, 2010 at 6:39 PM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
>> >><br>
>> >> No Bill, this shows only the edge (outline) in surface and wireframe<br>
>> >> mode<br>
>> >><br>
>> >> I really understand the behaviour of fretureEdges.<br>
>> >><br>
>> >> see the attached screenshot.<br>
>> >><br>
>> >> Thanks,<br>
>> >><br>
>> >> Jothy<br>
>> >><br>
>> >><br>
>> >><br>
>> >> On Sat, Jun 5, 2010 at 6:25 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>> >> wrote:<br>
>> >>><br>
>> >>> If this does not work, I'll convert python to C++ (I am not a python<br>
>> >>> guy). Maybe in the next day or so.<br>
>> >>><br>
>> >>> On Sat, Jun 5, 2010 at 1:24 PM, Bill Lorensen<br>
>> >>> <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>> >>> wrote:<br>
>> >>> > Try<br>
>> >>> > cutter->Stripper->cutPoly->TriangleFilter->FeatureEdges->Mapper<br>
>> >>> ><br>
>> >>> > On Sat, Jun 5, 2010 at 1:13 PM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
>> >>> >> Here is the code<br>
>> >>> >><br>
>> >>> >> # A simple script to demonstrate the vtkCutter function<br>
>> >>> >> import vtk<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> #Create a cube<br>
>> >>> >> cube=vtk.vtkSphereSource()<br>
>> >>> >> cube.SetRadius(50)<br>
>> >>> >> cube.SetThetaResolution(100)<br>
>> >>> >> cube.SetPhiResolution(100)<br>
>> >>> >> cubeMapper=vtk.vtkPolyDataMapper()<br>
>> >>> >> cubeMapper.SetInputConnection(cube.GetOutputPort())<br>
>> >>> >><br>
>> >>> >> #create a plane to cut,here it cuts in the XZ direction (xz<br>
>> >>> >> normal=(1,0,0);XY =(0,0,1),YZ =(0,1,0)<br>
>> >>> >> plane=vtk.vtkPlane()<br>
>> >>> >> plane.SetOrigin(20,0,0)<br>
>> >>> >> plane.SetNormal(1,0,0)<br>
>> >>> >><br>
>> >>> >> #create cutter<br>
>> >>> >> cutter=vtk.vtkCutter()<br>
>> >>> >> cutter.SetCutFunction(plane)<br>
>> >>> >> cutter.SetInput(cubeMapper.GetInput())<br>
>> >>> >> cutter.Update()<br>
>> >>> >><br>
>> >>> >> FeatureEdges=vtk.vtkFeatureEdges()<br>
>> >>> >> FeatureEdges.SetInputConnection(cutter.GetOutputPort())<br>
>> >>> >> FeatureEdges.BoundaryEdgesOn()<br>
>> >>> >> FeatureEdges.FeatureEdgesOff()<br>
>> >>> >> FeatureEdges.NonManifoldEdgesOff()<br>
>> >>> >> FeatureEdges.ManifoldEdgesOff()<br>
>> >>> >> FeatureEdges.Update()<br>
>> >>> >><br>
>> >>> >> cutStrips=vtk.vtkStripper() ; #Forms loops (closed polylines) from<br>
>> >>> >> cutter<br>
>> >>> >> cutStrips.SetInputConnection(cutter.GetOutputPort())<br>
>> >>> >> cutStrips.Update()<br>
>> >>> >> cutPoly=vtk.vtkPolyData() ; #This trick defines polygons as<br>
>> >>> >> polyline<br>
>> >>> >> loop<br>
>> >>> >> cutPoly.SetPoints((cutStrips.GetOutput()).GetPoints())<br>
>> >>> >> cutPoly.SetPolys((cutStrips.GetOutput()).GetLines())<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> cutMapper=vtk.vtkPolyDataMapper()<br>
>> >>> >> #cutMapper.SetInput(FeatureEdges.GetOutput())<br>
>> >>> >> cutMapper.SetInput(cutPoly)<br>
>> >>> >> cutActor=vtk.vtkActor()<br>
>> >>> >> cutActor.GetProperty().SetColor(1,1,0)<br>
>> >>> >> cutActor.GetProperty().SetEdgeColor(0,1,0)<br>
>> >>> >> cutActor.GetProperty().SetLineWidth(2)<br>
>> >>> >> cutActor.GetProperty().EdgeVisibilityOn()<br>
>> >>> >> ##cutActor.GetProperty().SetOpacity(0.7)<br>
>> >>> >> cutActor.SetMapper(cutMapper)<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> #create renderers and add actors of plane and cube<br>
>> >>> >> ren = vtk.vtkRenderer()<br>
>> >>> >> ren.AddActor(cutActor)<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> #Add renderer to renderwindow and render<br>
>> >>> >> renWin = vtk.vtkRenderWindow()<br>
>> >>> >> renWin.AddRenderer(ren)<br>
>> >>> >> renWin.SetSize(600, 600)<br>
>> >>> >> iren = vtk.vtkRenderWindowInteractor()<br>
>> >>> >> iren.SetRenderWindow(renWin)<br>
>> >>> >> ren.SetBackground(0,0,0)<br>
>> >>> >> renWin.Render()<br>
>> >>> >><br>
>> >>> >> What's the problem then?<br>
>> >>> >><br>
>> >>> >> Thank you,<br>
>> >>> >><br>
>> >>> >> Jothy<br>
>> >>> >><br>
>> >>> >> On Sat, Jun 5, 2010 at 6:10 PM, Bill Lorensen<br>
>> >>> >> <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>> >>> >> wrote:<br>
>> >>> >>><br>
>> >>> >>> No, it should not modify its input.<br>
>> >>> >>><br>
>> >>> >>> On Sat, Jun 5, 2010 at 12:34 PM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>><br>
>> >>> >>> wrote:<br>
>> >>> >>> > Got it Bill!<br>
>> >>> >>> ><br>
>> >>> >>> > There is a trick<br>
>> >>> >>> ><br>
>> >>> >>> > pipeline is as I uesd before from capCow.tcl but introducin<br>
>> >>> >>> > vtkfeatureEdges<br>
>> >>> >>> > after vtkCutter and setting the stripper input from cutter not<br>
>> >>> >>> > from<br>
>> >>> >>> > featureEdges.<br>
>> >>> >>> ><br>
>> >>> >>> > I am bit confused, does this featureedges modifies the cutter<br>
>> >>> >>> > output<br>
>> >>> >>> > and makes this modified outpur available to cutter->GetOutput()<br>
>> >>> >>> ><br>
>> >>> >>> > Seems to be special type of operation ( or is it a bug!).<br>
>> >>> >>> ><br>
>> >>> >>> > Here is the screenshot<br>
>> >>> >>> ><br>
>> >>> >>> > I will add an example to wiki.<br>
>> >>> >>> ><br>
>> >>> >>> ><br>
>> >>> >>> > Thanks,<br>
>> >>> >>> ><br>
>> >>> >>> ><br>
>> >>> >>> > On Sat, Jun 5, 2010 at 5:03 PM, Bill Lorensen<br>
>> >>> >>> > <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>> >>> >>> > wrote:<br>
>> >>> >>> >><br>
>> >>> >>> >> Can you post an image of what you get?<br>
>> >>> >>> >><br>
>> >>> >>> >> On Sat, Jun 5, 2010 at 11:34 AM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>><br>
>> >>> >>> >> wrote:<br>
>> >>> >>> >> > Here is it!<br>
>> >>> >>> >> ><br>
>> >>> >>> >> > # A simple script to demonstrate the vtkCutter function<br>
>> >>> >>> >> > import vtk<br>
>> >>> >>> >> ><br>
>> >>> >>> >> ><br>
>> >>> >>> >> > #Create a cube<br>
>> >>> >>> >> > cube=vtk.vtkSphereSource()<br>
>> >>> >>> >> > cube.SetRadius(50)<br>
>> >>> >>> >> > cube.SetThetaResolution(200)<br>
>> >>> >>> >> > cube.SetPhiResolution(200)<br>
>> >>> >>> >> > cubeMapper=vtk.vtkPolyDataMapper()<br>
>> >>> >>> >> > cubeMapper.SetInputConnection(cube.GetOutputPort())<br>
>> >>> >>> >> ><br>
>> >>> >>> >> > #create a plane to cut,here it cuts in the XZ direction (xz<br>
>> >>> >>> >> > normal=(1,0,0);XY =(0,0,1),YZ =(0,1,0)<br>
>> >>> >>> >> > plane=vtk.vtkPlane()<br>
>> >>> >>> >> > plane.SetOrigin(10,0,0)<br>
>> >>> >>> >> > plane.SetNormal(1,0,0)<br>
>> >>> >>> >> ><br>
>> >>> >>> >> > #create cutter<br>
>> >>> >>> >> > cutter=vtk.vtkCutter()<br>
>> >>> >>> >> > cutter.SetCutFunction(plane)<br>
>> >>> >>> >> > cutter.SetInput(cubeMapper.GetInput())<br>
>> >>> >>> >> > cutter.Update()<br>
>> >>> >>> >> ><br>
>> >>> >>> >> > FeatureEdges=vtk.vtkFeatureEdges()<br>
>> >>> >>> >> > FeatureEdges.SetInputConnection(cutter.GetOutputPort())<br>
>> >>> >>> >> > FeatureEdges.BoundaryEdgesOn()<br>
>> >>> >>> >> > FeatureEdges.FeatureEdgesOff()<br>
>> >>> >>> >> > FeatureEdges.NonManifoldEdgesOff()<br>
>> >>> >>> >> > FeatureEdges.ManifoldEdgesOff()<br>
>> >>> >>> >> > FeatureEdges.Update()<br>
>> >>> >>> >> ><br>
>> >>> >>> >> ><br>
>> >>> >>> >> ><br>
>> >>> >>> >> ><br>
>> >>> >>> >> > cutMapper=vtk.vtkPolyDataMapper()<br>
>> >>> >>> >> > cutMapper.SetInput(FeatureEdges.GetOutput())<br>
>> >>> >>> >> > cutActor=vtk.vtkActor()<br>
>> >>> >>> >> > cutActor.GetProperty().SetColor(1,1,0)<br>
>> >>> >>> >> > cutActor.GetProperty().SetEdgeColor(1,0.5,0)<br>
>> >>> >>> >> > cutActor.GetProperty().SetLineWidth(2)<br>
>> >>> >>> >> > cutActor.GetProperty().EdgeVisibilityOn()<br>
>> >>> >>> >> > cutActor.GetProperty().SetOpacity(0.7)<br>
>> >>> >>> >> > cutActor.SetMapper(cutMapper)<br>
>> >>> >>> >> ><br>
>> >>> >>> >> ><br>
>> >>> >>> >> > #create renderers and add actors of plane and cube<br>
>> >>> >>> >> > ren = vtk.vtkRenderer()<br>
>> >>> >>> >> > ren.AddActor(cutActor)<br>
>> >>> >>> >> ><br>
>> >>> >>> >> ><br>
>> >>> >>> >> > #Add renderer to renderwindow and render<br>
>> >>> >>> >> > renWin = vtk.vtkRenderWindow()<br>
>> >>> >>> >> > renWin.AddRenderer(ren)<br>
>> >>> >>> >> > renWin.SetSize(600, 600)<br>
>> >>> >>> >> > iren = vtk.vtkRenderWindowInteractor()<br>
>> >>> >>> >> > iren.SetRenderWindow(renWin)<br>
>> >>> >>> >> > ren.SetBackground(0,0,0)<br>
>> >>> >>> >> > renWin.Render()<br>
>> >>> >>> >> ><br>
>> >>> >>> >> > On Fri, Jun 4, 2010 at 10:07 PM, Bill Lorensen<br>
>> >>> >>> >> > <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>> >>> >>> >> > wrote:<br>
>> >>> >>> >> >><br>
>> >>> >>> >> >> From the output of vtkCutter, insert vtkFeatureEdges with<br>
>> >>> >>> >> >> BoundaryEdgesOn()<br>
>> >>> >>> >> >> FeatureEdgesOff()<br>
>> >>> >>> >> >> NonManifoldEdgesOff()<br>
>> >>> >>> >> >> ManifoldEdgesOff()<br>
>> >>> >>> >> >><br>
>> >>> >>> >> >><br>
>> >>> >>> >> >><br>
>> >>> >>> >> >> On Fri, Jun 4, 2010 at 4:16 PM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>><br>
>> >>> >>> >> >> wrote:<br>
>> >>> >>> >> >> > Hi all,<br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> >> > With the help of CapCow.tcl example I am able to fill the<br>
>> >>> >>> >> >> > contour<br>
>> >>> >>> >> >> > I<br>
>> >>> >>> >> >> > got<br>
>> >>> >>> >> >> > from<br>
>> >>> >>> >> >> > vtkCutter. But, the problem is I am the edge to be<br>
>> >>> >>> >> >> > visible,<br>
>> >>> >>> >> >> > so I<br>
>> >>> >>> >> >> > set<br>
>> >>> >>> >> >> > edge<br>
>> >>> >>> >> >> > visibility on, it makes all the triangle edges on. I want<br>
>> >>> >>> >> >> > only the<br>
>> >>> >>> >> >> > outline<br>
>> >>> >>> >> >> > on.<br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> >> > Any suggestions?<br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> >> > Thanks,<br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> >> > Jothy<br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> >> > _______________________________________________<br>
>> >>> >>> >> >> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> >> > Visit other Kitware open-source projects at<br>
>> >>> >>> >> >> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> >> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> >>> >>> >> >> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> >> > Follow this link to subscribe/unsubscribe:<br>
>> >>> >>> >> >> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> >> ><br>
>> >>> >>> >> ><br>
>> >>> >>> >> ><br>
>> >>> >>> ><br>
>> >>> >>> ><br>
>> >>> >><br>
>> >>> >><br>
>> >>> ><br>
>> >><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>