[vtkusers] Possible bug in CVS version ofvtkBandedPolyDataContourFilter?

Charles Boivin Charles.Boivin at rwdiwest.com
Tue Sep 21 10:27:44 EDT 2004


Hello Amy,

Well, I realized that I was simply using the class wrong to start with.
It was interesting, however... The bugfix in
vtkBandedContourPolyDataFilter made it such that the module could now
pass the point data along. I imagine that, before that, the point data
was simply lost.

Since most of my data is stored as point data originally, losing that
data meant that the mapper then used the cell data, if any was
available. The cell data, of course, is the one with the contours of a
solid color. However, when the point data is passed along, I need to
specifically ask for the cell data to be displayed; this was the step
that was missing from my code.

Thank you for your help,

Charles

>>> Amy Henderson <amy.henderson at kitware.com> 09/21/04 07:17am >>>
Hi Charles,

Did you take a look at
VTK/Graphics/Testing/Tcl/TestBandedContourFilter.tcl 
and VTK/Examples/VisualizationAlgorithms/Tcl/BandedContourTerrain.tcl?

(There is also a python version of the one in 
Examples/VisualizationAlgorithms.)  Both of these are managing to
display 
bands of cells with a different color per band.  Perhaps there is a
setting 
either on this filter or in the mapper that is set differently in these

examples than in your code.

- Amy

At 06:01 PM 9/20/2004, Charles Boivin wrote:
>Hello everyone,
>
>I have recently switched to the CVS version of VTK for a couple of
>reasons. In my application, I am using the
>vtkBandedPolyDataContourFilter module. I have noticed today that this
>stopped working the way it was before. I expect to get bands of cells
>that are all colored the same out of this filter; this certainly was
>what I was getting before with VTK 4.4.
>
>Now, the contours are generated properly but they are colored based
on
>the input scalar value, not using a scalar value that is uniform
within
>the contour. Hence I get a very smooth output in terms of color -- no
>specific contours can be distinguished. If I put the output in
wireframe
>mode, I can verify that the contours are indeed generated, just not
>colored properly.
>
>I checked the differences between version 4.4 of the C++ file, and
the
>version from CVS (updated a few minutes ago). There are some minor
>changes, but one caught my eye. At the beginning of the Execute()
member
>function, there is this:
>
> >From the CVS version:
>   vtkPointData *outPD = output->GetPointData();
>
>Now, in VTK 4.4, this was:
>   vtkPointData *outPD = input->GetPointData();
>
>Certainly, the CVS version seems correct, at least based on variable
>name. I tried changing "output" to "input" back, as it was in v4.4,
and
>this actually fixed my problem -- it created bands of uniformly
colored
>cells.
>
>It seems like the CVS version *should* be right (in terms of that
>declaration, at least), but it does not work for me... Am I possibly
>using this module wrong? Or is there a problem in the CVS version of
>this object?
>
>Thank you for your answers,
>
>Charles Boivin
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers 



_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list