[vtkusers] an odd question about a plate which behind the actor
朱文武
cool.wenwu at gmail.com
Thu Apr 1 10:13:56 EDT 2010
Dear all and David,
Thanks! Firstly, I like to say sorry to david, it's my careless and
mistake ! Now, i present my problem again ! thanks for all any help !
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:
m_read = new vtkBMPReader();
skinExtractor = vtkMarchingCubes::New();//
skinNormals = vtkPolyDataNormals::New();//
triangle=vtkTriangleFilter::New();//
deci=vtkDecimatePro::New();/
smoother=vtkSmoothPolyDataFilter::New();//
skinMapper = vtkPolyDataMapper::New();//
skin = vtkActor::New();
this->m_read->Update();//read the bmp image
this->skinExtractor->SetInputConnection(m_read->GetOutputPort());
this->skinExtractor->SetValue(0,threshshold);
this->skinNormals->SetInputConnection(skinExtractor->GetOutputPort());/
this->skinNormals->SetFeatureAngle(60.0);//
this->triangle->SetInputConnection(skinNormals->GetOutputPort());//
this->deci->SetInputConnection(triangle->GetOutputPort());//
this->deci->SetTargetReduction(predigestion);//
this->deci->PreserveTopologyOn();//
this->smoother->SetInputConnection(deci->GetOutputPort());//
this->smoother->SetNumberOfIterations(smoothness);//
this->skinMapper->SetInputConnection(smoother->GetOutputPort());//
this->skinMapper->ScalarVisibilityOff();//
this->skinMapper->SetColorModeToMapScalars();
this->skinMapper->SetScalarRange(-1,1);
// Link the actor
this->skin->SetMapper(this->skinMapper);
this->skin->GetProperty()->SetColor(0.94,0.83,0.45);
The image of the result:
[image: 5.bmp]
Thanks,
WenWu
On Wed, Mar 31, 2010 at 9:33 AM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:
> On Tue, Mar 30, 2010 at 9:08 PM, 朱文武 <cool.wenwu at gmail.com> wrote:
>
>>
>> Why no people help me ? Is this question too easy?
>> I'm waiting!
>>
>
> I didn't see an attached image that you said you sent. Also, please post
> the smallest compilable code that demonstrates your problem.
>
> Thanks,
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100401/33cc1b9f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/bmp
Size: 47300 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100401/33cc1b9f/attachment.bin>
More information about the vtkusers
mailing list