<HTML><HEAD><TITLE>Mail</TITLE>
<META name=GENERATOR
content="KsDHTMLEDLib.ocx, FreeWare HTML Editor 1.164.2, ?Kurt Senfer">
<META content="text/html; charset=GB2312" http-equiv=Content-Type></HEAD>
<BODY style="FONT-FAMILY: РВЛОМе; FONT-SIZE: 9pt" leftMargin=5 topMargin=5 #ffffff>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf">Thanks for your
answer.</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf">Yes, I also have tried to clip
polydata, not normals.</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf">But the result's color is just not
same as the original model.</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf">So I think maybe it is my model's
problem,because the model is converted from a vrml model. </FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf">I used vtkTableBasedClipDataSet,
and the color is right. I was confused.</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #cce8cf">And when treat it as a DataSet with
normals, the color is right. </FONT></DIV>
<DIV>Do you know the reason?</DIV>
<DIV> </DIV>
<DIV>Thank you very much!</DIV>
<DIV>
<DIV>2012/12/13 </DIV><A
href="mailto:gongweixue@sina.com">gongweixue@sina.com</A></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV
style="LINE-HEIGHT: normal; FONT-VARIANT: normal; FONT-STYLE: normal; FONT-SIZE: 9pt; FONT-WEIGHT: normal">-----
Original Message ----- </DIV>
<DIV
style="LINE-HEIGHT: normal; FONT-VARIANT: normal; FONT-STYLE: normal; BACKGROUND: #e4e4e4; FONT-SIZE: 9pt; FONT-WEIGHT: normal; font-color: black"><B>From:
</B><A href="mailto:alexmalvtk@gmail.com">Alex Malyushytskyy</A> </DIV>
<DIV
style="LINE-HEIGHT: normal; FONT-VARIANT: normal; FONT-STYLE: normal; FONT-SIZE: 9pt; FONT-WEIGHT: normal"><B>To:
</B><A href="mailto:vtkusers@vtk.org">vtkusers</A> </DIV>
<DIV
style="LINE-HEIGHT: normal; FONT-VARIANT: normal; FONT-STYLE: normal; FONT-SIZE: 9pt; FONT-WEIGHT: normal"><B>Date:
</B>2012-12-13, 07:34:12</DIV>
<DIV
style="LINE-HEIGHT: normal; FONT-VARIANT: normal; FONT-STYLE: normal; FONT-SIZE: 9pt; FONT-WEIGHT: normal"><B>Subject:
</B>Re: [vtkusers] Problem with color after using vtkClipPolyData</DIV>
<DIV><BR></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>
<DIV>Self-sufficient example would help.<BR>As is I can only guess that you
probably did not want to clip normal<BR>as you currently do<BR>and wanted to
clip read
polydata:<BR><BR> clipper->SetInput(reader->GetOutput());<BR><BR>Alex<BR><BR>On
Tue, Dec 11, 2012 at 10:18 PM, gongweixue <<A
href="mailto: gongweixue@sina.com">gongweixue@sina.com</A>> wrote:<BR>>
hi guys,<BR>> I used a vtkClipPolyData to clip polydata, and I found that
the color of<BR>> surfaces after clipping is changed.<BR>> So,dose
anybody know the reason?<BR>> here is my code.<BR>><BR>>
//////////////////////code/////////////////////////////<BR>>
vtkPolyDataReader *reader=vtkPolyDataReader::New();<BR>>
reader->SetFileName(FILENAME);<BR>> reader->Update();<BR>><BR>>
vtkClipPolyData * clipper=vtkClipPolyData::New();<BR>>
clipper->SetInput(normals->GetOutput());<BR>> vtkPlane * plane =
vtkPlane::New();<BR>> plane->SetOrigin(0.5,0,0);<BR>>
plane->SetNormal(1,1,1);<BR>>
clipper->SetClipFunction(plane);<BR>> clipper->SetValue(0.5);<BR>>
clipper->SetInsideOut(1);<BR>> clipper->Update();<BR>><BR>>
vtkPolyDataMapper *mapper=vtkPolyDataMapper::New();<BR>>
mapper->SetInput(clipper->GetOutput());<BR>> vtkActor
*actor=vtkActor::New();<BR>> actor->SetMapper(mapper);<BR>>
vtkRenderer *ren1= vtkRenderer::New();<BR>> ren1->AddActor( actor
);<BR>> ren1->SetBackground( 0.1, 0.2, 0.4 );<BR>> vtkRenderWindow
*renWin = vtkRenderWindow::New();<BR>> renWin->AddRenderer( ren1
);<BR>> renWin->SetSize( 600, 600 );<BR>> vtkRenderWindowInteractor
*iren = vtkRenderWindowInteractor::New();<BR>>
iren->SetRenderWindow(renWin);<BR>> vtkInteractorStyleTrackballCamera
*style =<BR>> vtkInteractorStyleTrackballCamera::New();<BR>>
iren->SetInteractorStyle(style);<BR>> iren->Initialize();<BR>>
iren->Start();<BR>>
///////////////////////////////////////////////<BR>> And here is the
pic:<BR>> <A
href="http://p13.freep.cn/p.aspx?u=v20_p13_photo_1212121410379520_0.jpg">http://p13.freep.cn/p.aspx?u=v20_p13_photo_1212121410379520_0.jpg</A><BR>><BR>>
I will appreciate any suggestion very much!<BR>><BR>><BR>>
_______________________________________________<BR>> Powered by
www.kitware.com<BR>><BR>> Visit other Kitware open-source projects
at<BR>> <A
href="http://www.kitware.com/opensource/opensource.html">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">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">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>><BR>_______________________________________________<BR>Powered
by www.kitware.com<BR><BR>Visit other Kitware open-source projects at <A
href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR><BR>Please
keep messages on-topic and check the VTK FAQ at: <A
href="http://www.vtk.org/Wiki/VTK_FAQ">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">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR><BR></DIV></DIV></BLOCKQUOTE></BODY></HTML>