Menu

#157 Contour correction

closed
None
5
2012-07-20
2012-03-29
No

When I check "Spectrogram, Contour Plot" example, I found that some contour lines close to the center of circle are not continues. There must be some wrong.

After go through "qwt_raster_data.cpp", I found 2 bugs:

1. intersect function:
case 6:
// e(-1,1,0), e(1,0,-1)
line[0] = vertex[1].toPoint();
line[1] = intersection( vertex[0], vertex[1] );
break;
should be:
case 6:
// e(-1,1,0), e(1,0,-1)
line[0] = vertex[2].toPoint();
line[1] = intersection( vertex[0], vertex[1] );
break;

2. contourLines function:
if ( ignoreOutOfRange )
{
if ( !range.contains( zMin ) || !range.contains( zMax ) )
continue;
}
this is not correct. How about rang.max>zMax and rang.min<zMin?
should be:
if ( ignoreOutOfRange )
{
if ( range.maxValue()<Min ) || range.minValue()> zMax ) )
continue;
}

Discussion

  • Uwe Rathmann

    Uwe Rathmann - 2012-04-21
    • assigned_to: nobody --> rathmann
     
  • Uwe Rathmann

    Uwe Rathmann - 2012-07-20
    • status: open --> closed-fixed
     
  • Uwe Rathmann

    Uwe Rathmann - 2012-07-20

    The first one is indeed a bug - even if I don't see any visual effect from fixing it. The fix has been applied to trunk 6.0 and 5.2.

    The second one is no bug: AFAIR IgnoreOutOfRange is a flag to filter out invalid values for raster data with gaps, that are indicated by some special value outside the valid range. Of course this is somehow mysterious and I couldn't hardly remember the use case myself.

    So I modified the default setting of IgnoreOutOfRange ( to off ) in SVN trunk.

     

Anonymous
Anonymous

Add attachments
Cancel