[vtkusers] existing filter to perform replace value on vtkImage

David Doria daviddoria+vtk at gmail.com
Wed Feb 17 15:11:08 EST 2010


On Wed, Feb 17, 2010 at 2:55 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> ImageThreshold should do the trick.

Looks like you want to do:

vtkSmartPointer<vtkImageThreshold> threshold =
  vtkSmartPointer<vtkImageThreshold>::New();
threshold->ReplaceOutOn();
threshold->SetOutValue(0.0);
threshold->ThresholdByUpper(255);
threshold->Update();

Give it a shot and let us know if it works. Maybe you could also
either append to  this example
(http://www.vtk.org/Wiki/VTK/Examples/Images/ImageThreshold) or make a
new one.

Thanks,

David



More information about the vtkusers mailing list