<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">朱文武</b> <span dir="ltr"><<a href="mailto:cool.wenwu@gmail.com">cool.wenwu@gmail.com</a>></span><br>Date: Wed, Mar 31, 2010 at 10:11 PM<br>
Subject: Re: [vtkusers] an odd question about a plate which behind the actor<br>To: David Doria <<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>><br><br><br>David,<br> Thanks! sorry, i also do not know why the image was disappeared. I don't know whether the problem is related to the code. Because the same code can applied in other images(dataset), and the problem did not occurred. The related code was presented:<br>
<br> m_read = new vtkBMPReader();<br><div> skinExtractor = vtkMarchingCubes::New();//<div> skinNormals = vtkPolyDataNormals::New();//<br> triangle=vtkTriangleFilter::New();//<br>
deci=vtkDecimatePro::New();/<br> smoother=vtkSmoothPolyDataFilter::New();//<br> skinMapper = vtkPolyDataMapper::New();//<br> skin = vtkActor::New();<br></div><br> this->m_read->Update();//read the bmp image<br>
this->skinExtractor->SetInputConnection(m_read->GetOutputPort());<br> this->skinExtractor->SetValue(0,threshshold);<br> this->skinNormals->SetInputConnection(skinExtractor->GetOutputPort());/<br>
this->skinNormals->SetFeatureAngle(60.0);//<br> this->triangle->SetInputConnection(skinNormals->GetOutputPort());//<br> this->deci->SetInputConnection(triangle->GetOutputPort());//<br> this->deci->SetTargetReduction(predigestion);//<br>
this->deci->PreserveTopologyOn();//<br> this->smoother->SetInputConnection(deci->GetOutputPort());//<br> this->smoother->SetNumberOfIterations(smoothness);//<br> this->skinMapper->SetInputConnection(smoother->GetOutputPort());//<br>
this->skinMapper->ScalarVisibilityOff();//<br> this->skinMapper->SetColorModeToMapScalars();<br> this->skinMapper->SetScalarRange(-1,1);<br> <br> <br> // Link the actor<br> <br> this->skin->SetMapper(this->skinMapper);<br>
this->skin->GetProperty()->SetColor(0.94,0.83,0.45);</div><br><br>The image of the result:<br><br><img title="5.bmp" alt="5.bmp" src="cid:ii_127b714fc77cd415"><br><br>Thanks!<div><div></div><div class="h5"></div>
</div></div><br><div>Please keep the discussion on the mailing list so everyone can benefit/help.</div><div><br clear="all">Thanks,<br><br>David</div>