I still could not find debug this problem , pushing it up once again . <br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Darshan Pai</b> <span dir="ltr"><<a href="mailto:darshanpai@gmail.com">darshanpai@gmail.com</a>></span><br>
Date: Fri, Mar 2, 2012 at 2:03 AM<br>Subject: Problem with vtksmoothPolyDataFilter<br>To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br><br><br>Hello All,<br><br>I have been moving some of my old projects which are on VTK4.4 onto the new VTK nightly build . <br>
Following is the code I am using <br><br>vtkSmartPointer<<div>vtkImageThreshold> renderThreshold = vtkSmartPointer<vtkImageThreshold>::New();<br>
renderThreshold->ThresholdBetween(0, 0);<br> renderThreshold->SetInValue(0);<br> renderThreshold->SetOutValue(1);<br> renderThreshold->SetInput(ribbonsurface);<br><br> vtkSmartPointer<vtkImageIslandRemoval2D> renderIslandRemoval2D1 = vtkSmartPointer<vtkImageIslandRemoval2D>::New();<br>
renderIslandRemoval2D1->SetInputConnection(renderThreshold->GetOutputPort());<br> renderIslandRemoval2D1->SetAreaThreshold(100);<br> renderIslandRemoval2D1->SetIslandValue(1);<br> renderIslandRemoval2D1->SetReplaceValue(0);<br>
<br> vtkSmartPointer<vtkImageIslandRemoval2D> renderIslandRemoval2D2 = vtkSmartPointer<vtkImageIslandRemoval2D>::New();<br> renderIslandRemoval2D2->SetInputConnection(renderIslandRemoval2D1->GetOutputPort());<br>
renderIslandRemoval2D2->SetAreaThreshold(100);<br> renderIslandRemoval2D2->SetIslandValue(0);<br> renderIslandRemoval2D2->SetReplaceValue(1);<br><br> vtkSmartPointer<vtkImageContinuousErode3D> renderContinuousErode3D = vtkSmartPointer<vtkImageContinuousErode3D>::New();<br>
renderContinuousErode3D->SetInputConnection(renderIslandRemoval2D2->GetOutputPort());<br> renderContinuousErode3D->SetKernelSize(3, 3, 3);<br><br> vtkSmartPointer<vtkImageContinuousDilate3D> renderContinuousDilate3D = vtkSmartPointer<vtkImageContinuousDilate3D>::New();<br>
renderContinuousDilate3D->SetInputConnection(renderContinuousErode3D->GetOutputPort());<br> renderContinuousDilate3D->SetKernelSize(4, 4, 4);<br><br> vtkSmartPointer<vtkContourFilter> renderContourFilter = vtkSmartPointer<vtkContourFilter>::New();<br>
renderContourFilter->SetInputConnection(renderContinuousDilate3D->GetOutputPort());<br> renderContourFilter->SetValue(0,1);<br><br> vtkSmartPointer<vtkSmoothPolyDataFilter> renderSmoothPolyDataFilter = vtkSmartPointer<vtkSmoothPolyDataFilter>::New();<br>
renderSmoothPolyDataFilter->SetInputConnection(renderContourFilter->GetOutputPort());<br> renderSmoothPolyDataFilter->SetNumberOfIterations(20);<br> renderSmoothPolyDataFilter->SetRelaxationFactor(0.15);<br>
renderSmoothPolyDataFilter->SetFeatureAngle(40);<br> renderSmoothPolyDataFilter->FeatureEdgeSmoothingOff();<br> renderSmoothPolyDataFilter->BoundarySmoothingOff();<br> renderSmoothPolyDataFilter->SetConvergence(0);<br>
renderSmoothPolyDataFilter->Update();<br><br> vtkSmartPointer<vtkPolyDataMapper> ribbonpolydata = vtkSmartPointer<vtkPolyDataMapper>::New();<br> ribbonpolydata->SetInputConnection(renderSmoothPolyDataFilter->GetOutputPort());<br>
<br> ribbonactor = vtkSmartPointer<vtkActor>::New();<br> ribbonactor->SetMapper(ribbonpolydata);<br><br>I have attached the output . It looks as if everything up until the rendercontourFilter generates the exact same output in VTK 4.4 and the current VTK<br>
<br>But when I introduce the vtkSmoothPolyDataFilter , the output does not change . There is no smoothing on the polydata . <br><br>I cannot seem to pinpoint the problem . Hope someone can help<br><br>Regards<span class="HOEnZb"><font color="#888888"><br>
Darshan<br>
<br><br></font></span></div>
</div><br>