[vtkusers] vtkBandedPolyDataContourFilter and vtkStripper probelm ?

ckchen@CIS ckchen.cis89g at nctu.edu.tw
Sun May 8 08:16:26 EDT 2005


Mathieu,
This patch fix the problem !
thank you !

Kavin.



> Kavin,
>
> I think I found your problem. Could you try this patch:
>
> $ cvs dif vtkBandedPolyDataContourFilter.cxx
>
> Index: vtkBandedPolyDataContourFilter.cxx
> ===================================================================
> RCS file: 
> /cvsroot/ParaView/ParaView/VTK/Graphics/vtkBandedPolyDataContourFilter.cxx,v
> retrieving revision 1.53
> diff -u -3 -p -r1.53 vtkBandedPolyDataContourFilter.cxx
> --- vtkBandedPolyDataContourFilter.cxx  21 Apr 2005 13:42:16 -0000 
> 1.53
> +++ vtkBandedPolyDataContourFilter.cxx  6 May 2005 21:07:40 -0000
> @@ -466,6 +466,10 @@ int vtkBandedPolyDataContourFilter::Requ
>
>      // Set up structures for processing polygons
>      maxCellSize = polys->GetMaxCellSize();
> +    if( maxCellSize == 0 )
> +      {
> +      maxCellSize = input->GetStrips()->GetMaxCellSize();
> +      }
>      maxCellSize *= (1 + this->NumberOfClipValues);
>
>      vtkIdType *newPolygon = new vtkIdType [maxCellSize];
>
> HTH
> Mathieu
>
> ckchen at CIS wrote:
>> Hi~ Mathieu,
>> I am sorry that I should (hope I can) cancel the letter I just reply to 
>> you.
>> When I modify the code:
>> vbpdc->SetScalarModeToValue();   to   vbpdc->SetScalarModeToIndex();
>> Still have the same problem !!
>>
>> My winXP seems unstable due to many crashes of my program, and may get
>> different results each time when running the program.
>> So I just reboot my PC but the problem still existed.
>>
>> 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.
>>>>
>>>> _______________________________________________
>>>> This is the private VTK discussion list. Please keep messages on-topic. 
>>>> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>
>>>
>>>
>>
>>
>>
>
>
> 





More information about the vtkusers mailing list