[vtkusers] contour lines and scalar color plot issues with vtkUnstructuredGrid

Burlen burlen at apollo.sr.unh.edu
Wed Feb 15 10:50:17 EST 2006


Hi, Thanks for your reply. 
I put the image I originally sent here for reference:
http://quaoar.sr.unh.edu/images/contours_not_closed.png

There may be more to this problem than interpolation error. I say this because 
in the past we have used rectilinear grids with non constant grid spacing and 
experienced no such issues. If my present problem were caused by 
interpolation error I would expect the same problem when using the 
irregularly spaced rectilinear grids.

It seems to me that the problem of open contours might be caused by the 
algorithm(s) used with unstructuredGrids built with the append filter. Could 
it have somehting to do with the fact that the boxes in my case are appended 
in a "willy nilly" order? adjacent boxes aren't necessarily appended one 
after the other.

In the vtk text it says something to the effect that there are two ways for 
the contouring process to terminate, 1) when a contour closes on itself, 2) 
when the edge of the dataset is reached. Since in the example I sent, the 
contours aren't closed, the contour generation process must have reached the 
edge of the dataset. So Maybe even though I appeneded the original 
vtkImageData into one vtkUnstructuredGrid vtk sees them as mulitiple 
datasets? 

Another reason I think the problems are caused by the vtkUnstructuredGrid 
algorithms is because I have experienced a similar issue when using the 
append filter on vtkImageData producing a vtkUnstructureGrid when the grid 
spacing is the same. In the resulting visualization one can make out the box 
boundaries. I have image illustrating this problem here:
http://quaoar.sr.unh.edu/images/boxes_problem.png

maybe I'm using the append filter in a way that it wasn't intended to be used? 
I'm hoping to find out a way to construct a dataset from a collection of 
multi resolution data in such a way that visualization leaves no indication 
of the underlying structure used to store/generate the data.

again, thanks for reply, any ideas are greatly appreciated.
Burlen


On Tuesday 14 February 2006 08:44 pm, David C. Thompson wrote:
> > Hi, I have an issue with contours of some multiresolution data. The data
> > is comprised of adjacent "boxes" that don't overlap represented using
> > vtkImageData. ... The
> > problem I'm having is that contours of the resulting dataset aren't
> > closed, and I can see that where they separate is where the grid spacing
> > changes. I think this is a result of less acurate interpolation in the
> > coarser spaced regions. even so shouldn't the contours be closed? Is this
> > an issue with the contouring algorithm in vtk or do I have to admit
> > defeat and forget about visualizing multi resolution datasets?
>
> This is not an error. It is a property of the interpolants you are
> using. If you have a large cell dx=3, it might have endpoint values of
> f=0 at x=0 and f=3 at x=3. But a neighboring region with dx=1 might have
> values of f=0 at x=0, f=2 at x=1, f=3 at x=2 and f=3 at x=3. If you ask
> for a contour showing where all cells take on the value x=1.5, this
> occurs in the large cell region at x=1.5. However, in the small cell
> region it occurs at x=0.75 (between nodes at x=0 and x=1). But why would
> discontinuities in your isocontours cause you to admit defeat and stop
> visualizing your solutions? The solutions weren't any better before you
> drew pictures of them. :-)
>
> 	David

-- 

Burlen Loring
Space Science Center
Institute for the Study of Earth, Oceans, and Space
University of New Hampshire
39 College Road, Durham, NH 03824
Phone: 603-862-1140



More information about the vtkusers mailing list