<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Greetings all,<br>
<br>
I refered the post below on this topic ,<br>
<br>
<a class="moz-txt-link-freetext" href="http://vtk.1045678.n5.nabble.com/Creating-a-3D-surface-mesh-from-a-stack-of-contours-td1245753.html">http://vtk.1045678.n5.nabble.com/Creating-a-3D-surface-mesh-from-a-stack-of-contours-td1245753.html</a><br>
<br>
In the solution given below , I don't understand the variable
"input_image" (which i assume of type vtkImageData). <br>
Is it the volume-data which is used to extract contours? Can't I
generate mesh only using contours without this image data?<br>
<br>
<br>
vtkAppendPolyData * app = vtkAppendPolyData::New();<br>
<br>
for (std::vector<vtkPolyData*>::iterator i =
roi.contours.begin(); i != roi.contours.end(); i++)<br>
app->AddInput(*i);<br>
<br>
vtkPolyDataWriter* w=vtkPolyDataWriter::New();<br>
vtkLinearExtrusionFilter * extrude=vtkLinearExtrusionFilter::New();<br>
extrude->SetInput(app->GetOutput());<br>
extrude->SetVector(0, 0, 3); //3 is the Z spacing between
contours<br>
extrude->CappingOn();<br>
extrude->Update();<br>
<br>
vtkPolyDataToImageStencil* sts=vtkPolyDataToImageStencil::New();<br>
vtkImageStencil* stencil=vtkImageStencil::New();<br>
sts->SetInput(extrude->GetOutput());<br>
sts->SetInformationInput(input_image); /////****** What is
this input_image ?<br>
sts->Update();<br>
stencil->SetStencil(sts->GetOutput());<br>
stencil->SetInput(input_image);<br>
<br>
vtkSmartPointer<vtkMarchingCubes> marching =
vtkSmartPointer<vtkMarchingCubes>::New();<br>
marching->SetInput(stencil->GetOutput());<br>
marching->SetValue(0,0.5);<br>
marching->Update(); <br>
<span class="ul-threaded" style="margin: 0.5em 0pt 0pt -20px;"><span
class="text-cell"><span> <b class="highlight"></b></span><span><br>
<br>
<br>
Thanks in advance.<br>
</span></span></span><br>
</body>
</html>