[vtkusers] vtkThreshold - how it works?
rakesh patil
prakeshofficial at gmail.com
Wed Feb 23 23:38:50 EST 2011
Hello,
What will happen in the following case?
vtkSmartPointer<vtkGeometryFilter> gf =
vtkSmartPointer<vtkGeometryFilter>::New();
gf->SetInput(unGrid);
vtkSmartPointer<vtkThreshold> thr = vtkSmartPointer<vtkThreshold>::New();
thr->SetInputConnection(gf->GetOutputPort());
if( some_condition )
{
thr->ThresholdByLower( some_value );
}
vtkSmartPointer<vtkThreshold> bthr = vtkSmartPointer<vtkThreshold>::New();
bthr->SetInputConnection( thr->GetOutputPort() );
bthr->ThresholdByLower( BAD_VALUE );
vtkSmartPointer<vtkDataSetSurfaceFilter> surfFilter =
vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
surfFilter->SetInputConnection( bthr->GetOutputPort() );
...
...
How will 'thr' behave when 'some_condition' is false? Will there be any
thresholding? If so then what will be the threshold value? What values will
be passed to 'bthr'..??
I am asking this because, without
vtkSmartPointer<vtkThreshold> thr = vtkSmartPointer<vtkThreshold>::New();
thr->SetInputConnection(gf->GetOutputPort());
if( some_condition )
{
thr->ThresholdByLower( some_value );
}
part of code, previously it was displaying correct output. After inserting
this code, I am getting blank output.. Output is to display filled contour
for a grid.
Thanks
Regards
Rakesh Patil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110224/cefefff6/attachment.htm>
More information about the vtkusers
mailing list