[vtkusers] thinness change the 3D Object
vtk question
ayesilvtk at gmail.com
Mon May 11 14:10:59 EDT 2009
hi!
i have got 3D Object from CT Images using Marching Cubes algorithm, cutted
and got the Trachea.
i want to change thinness the Trachea rather 3D Object because the Object is
infinitely thin.
My Idea is with two actors. second Actor´s scale is %100 and first Actor´s
scale (only x and y) is for example %80. both Actors are centered and fill
between.
my code:
vtkBoxClipDataSet* clipper1 = vtkBoxClipDataSet::New();
clipper1->SetInput(marchingCubes->GetOutput());
// clipper1->GenerateClippedOutputOff();
clipper1->SetBoxClip(
minpoint4[0], maxpoint4[0],
minpoint4[1], maxpoint4[1],
minpoint4[2], maxpoint4[2]);
vtkDataSetSurfaceFilter* surface1 = vtkDataSetSurfaceFilter::New();
surface1->SetInputConnection(0, clipper1->GetOutputPort(0));
vtkPolyDataMapper* mapper1 = vtkPolyDataMapper::New();
mapper1->SetInputConnection(0, surface1->GetOutputPort(0));
vtkActor* actor1 = vtkActor::New();
vtkActor* actor2 = vtkActor::New();
actor1->SetMapper(mapper1);
actor2->SetMapper(mapper1);
vtkRenderer* renderer1 = vtkRenderer::New();
actor1->SetScale(0.8,0.8,1.0);
actor2->SetScale(1.0,1.0,1.0);
actor1->SetPosition(
actor2->GetCenter()[0] - actor1->GetCenter()[0]
,
actor2->GetCenter()[1]-actor1->GetCenter()[1] ,
0.0); // first centered over second
renderer1->AddActor(actor1);
renderer1->AddActor(actor2);
renderer1->SetBackground(0.0, 0.5, 0.5);
renWindow->AddRenderer(renderer1);
Has somebody some idea for filling or thinness change?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090511/1076d293/attachment.htm>
More information about the vtkusers
mailing list