[vtkusers] vtkImageThreshold and vtkContourFilter Resolution

Paulo Henrique Junqueira Amorim paulojamorim at gmail.com
Wed Jul 28 10:05:46 EDT 2010


Hi,

I'm using vtkImageThreshold to segment an image and to generate
vtkContourFilter to generate the vtkPolyData, but the resolution of
vtkPolyData not getting good by comparison when it is used only the
vtkContourFilter to generate vtkPolyData (attached screens).

*Part of the code vtkImageThreshold and vtkContourFilter*

t = vtk.vtkImageThreshold()
t.SetInput(reader.GetOutput())
t.ThresholdBetween(226,3021)
t.SetOutValue(-1024)
t.Update()

contour = vtk.vtkContourFilter()
contour.SetInput(t.GetOutput())
contour.SetValue(0, 226) # Initial threshold
contour.SetValue(1, 3021) # final threshold
contour.ComputeScalarsOn()
contour.ComputeGradientsOn()

[image: vtkImageThreshold.PNG]

*



Part of the code only vtkContourFilter*

contour = vtk.vtkContourFilter()
contour.SetInput(reader.GetOutput())
contour.SetValue(0, 226) # Initial threshold
contour.SetValue(1, 3021) # final threshold
contour.ComputeScalarsOn()
contour.ComputeGradientsOn()


[image: vtkContourFilter.PNG]



Is it possible to use the vtkImageThreshold and vtkContourFilter but the end
result be equal to use only vtkContourFilter to generate polydata ??



Regards,
Paulo Amorim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100728/62eb29a1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 66517 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100728/62eb29a1/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 68538 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100728/62eb29a1/attachment-0001.png>


More information about the vtkusers mailing list