[Insight-users] How to smooth the segmented surface
Xiaopeng Yang
yxp233 at postech.ac.kr
Tue Mar 20 09:03:32 EDT 2012
Thank you Jothy. I tried but still the stairs existed. Here is my code:
vtkContourFilter *iso = vtkContourFilter::New();
iso->SetInput(vtkImporter4->GetOutput());
iso->ComputeScalarsOn();
iso->SetValue(0,128.1);
vtkSmartPointer<vtkWindowedSincPolyDataFilter> smoother =
vtkSmartPointer<vtkWindowedSincPolyDataFilter>::New();
smoother->SetInputConnection(iso->GetOutputPort());
smoother->SetNumberOfIterations(15);
smoother->BoundarySmoothingOn();
smoother->FeatureEdgeSmoothingOn();
smoother->SetFeatureAngle(120.0);
smoother->SetEdgeAngle(90.0);
smoother->SetPassBand(0.001);
smoother->NonManifoldSmoothingOn();
smoother->NormalizeCoordinatesOn();
smoother->Update();
vtkPolyDataMapper *isoMapper = vtkPolyDataMapper::New();
isoMapper->SetInput(smoother->GetOutput());
isoMapper->ScalarVisibilityOff();
vtkActor *isoActor1 = vtkActor::New();
isoActor1->SetMapper(isoMapper);
isoActor1->GetProperty()->SetColor(1.0, 0.49, 0.25);
isoMapper->Delete();
ren_L->AddActor(isoActor1);
isoActor1->Delete();
Maybe the parameter are not properly set?
Thanks,
Xiaopeng
From: Jothybasu Selvaraj [mailto:jothybasu at gmail.com]
Sent: Tuesday, March 20, 2012 6:44 PM
To: Xiaopeng Yang
Cc: insight-users at itk.org
Subject: Re: [Insight-users] How to smooth the segmented surface
If you are visualizing it with vtk, run vtkWindowedSincPolyDataFilter filter on it.
Jothy
On Tue, Mar 20, 2012 at 6:21 AM, Xiaopeng Yang <yxp233 at postech.ac.kr> wrote:
Hi,
Here I attach an image of the segmented 3D liver. You can see stairs in the image. How to remove the stairs and make the image look like continuous and smooth?
http://uploadingit.com/file/ <http://uploadingit.com/file/zvg7xr2jjxmbanxe/Liver.png> zvg7xr2jjxmbanxe/Liver.png
Thanks a lot!
Xiaopeng
From: insight-users-bounces at itk.org [mailto:insight-users-bounces@ <mailto:insight-users-bounces at itk.org> itk.org] On Behalf Of Xiaopeng Yang
Sent: Tuesday, March 20, 2012 11:17 AM
To: insight-users at itk.org
Subject: [Insight-users] How to smooth the segmented surface
Dear Users,
I have tried to segment the liver from 5 mm CT slices. When I tried to visualize the segmented liver in 3D, I found that the surface of the 3D liver was discrete, just like stairs. I guess that is because of the 5 mm interval between CT slices. Do you guys have any good idea how to make the 3D surface of the liver look continuous and smooth?
Thanks,
Xiaopeng
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
--
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120320/59f319b1/attachment.htm>
More information about the Insight-users
mailing list