[vtkusers] vtkBandedPolyDataContourFilter and vtkStripper probelm ?

ckchen@CIS ckchen.cis89g at nctu.edu.tw
Mon May 2 10:11:32 EDT 2005


Hi~ Mathieu,
I try to use the latest CVS version of VTK and 
vtkBandedPolyDataContourFilter.cxx,
but still have the same problem.

When I modify the code:
***********************************************************
vbpdc->SetScalarModeToValue();   to   vbpdc->SetScalarModeToIndex();
***********************************************************
My program doesn't crash while executing

vbpdc->Update();

However, the result is not what I want.
According to those few clues, do you have any idea about what's wrong with 
my program ?
Any suggestion will be appreciated.
Kavin.


> Kavin,
> What release of VTK are you using ? You can access the latest revision of 
> this file going to our cvs web interface at:
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Graphics/vtkBandedPolyDataContourFilter.cxx?root=VTK
> My guess is that you need a patch similar to this one:
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Graphics/vtkBandedPolyDataContourFilter.cxx?r1=1.37&r2=1.38
> HTH
> Mathieu
> ckchen at CIS wrote:
>> Hi~
>> I tried to use vtkBandedPolyDataContourFilter to create the contour 
>> surface,
>> however, I found there might be some problem in my program or in 
>> vtkBandedPolyDataContourFilter.cxx
>> when I combine vtkStripper and vtkBandedPolyDataContourFilter together.
>> It seems that the input data set of the vtkBandedPolyDataContourFilter 
>> can not have any triangle stripper.
>>
>> Here is a fragment of my code:
>> *****************************************
>> vtkDataSet    *vds = vtkDataSet::New();
>> // .... read data in vds
>> vtkGeometryFilter *vgf = vtkGeometryFilter::New();
>> vtkTriangleFilter *vtf = vtkTriangleFilter::New();
>> vtkStripper *vs = vtkStripper::New();
>> vtkBandedPolyDataContourFilter *vbpdc = 
>> vtkBandedPolyDataContourFilter::New();
>>
>> vgf->SetInput(vds->GetOutput());
>> vtf->SetInput(vgf->GetOutput());
>> vs->SetInput(vtf->GetOutput());
>> vbpdc->SetInput(vs->GetOutput());
>> vbpdc->GenerateValues(10, vds->GetScalarRange());
>> vbpdc->SetScalarModeToValue();
>> vbpdc->Update();   <---- run time error !!
>> *****************************************
>> Does anyone can tell me what's wrong in my program?
>> Thx~
>> Kavin. 





More information about the vtkusers mailing list