View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004330VTK(No Category)public2007-01-17 18:002016-08-12 09:54
Reporterjohn platt 
Assigned ToWill Schroeder 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0004330: vtkBandedPolyDataContourFilter : VTK_SCALAR_MODE_VALUE is not honoured for verts & lines
DescriptionvtkBandedPolyDataContourFilter

1. VTK_SCALAR_MODE_VALUE is not honoured for verts & lines.
2. outScalars not deleted if polydata contains only lines.


The following edits have been tested on version 4.2.

vtkBandedPolyDataContourFilter.cxx
----------------------------------

At about line 300, after

  outPD->SetScalars(outScalars);

insert

  outScalars->Delete();


At about line 330, replace

      for (i=0; i<npts; i++)
        {
        newVerts->InsertNextCell(1,pts+i);
        idx = this->ComputeScalarIndex(inScalars->GetTuple1(pts[i]));
        newScalars->InsertTuple1(cellId++,idx);
        }

by

      for (i=0; i<npts; i++)
        {
        cellId = this->InsertCell( newVerts, 1, pts+i, cellId, inScalars->GetTuple1( pts[i] ), newScalars );
        }


At about line 400, replace


      for (i=0; i<(npts-1); i++)
        {
        v = pts[i];
        vR = pts[i+1];

        newLines->InsertNextCell(2);

        newScalars->InsertTuple1(cellId++,
                    this->ComputeScalarIndex(outScalars->GetTuple1(v)));
        newLines->InsertCellPoint(v);

        if ( (intLoc=edgeTable->IsEdge(v,vR)) != -1 )
          {
          intList->GetCell(intLoc,numIntPts,intPts);
          if ( v < vR ) {intsIdx = 0; intsInc=1;} //order of the edge
          else {intsIdx=numIntPts-1; intsInc=(-1);}

          for ( ; intsIdx >= 0 && intsIdx < numIntPts; intsIdx += intsInc )
            {
            newLines->InsertCellPoint(intPts[intsIdx]);
            newLines->InsertNextCell(2);

            newScalars->InsertTuple1(cellId++, this->ComputeScalarIndex(
              outScalars->GetTuple1(intPts[intsIdx])));
            newLines->InsertCellPoint(intPts[intsIdx]);
            }
          }
        newLines->InsertCellPoint(vR);
        }
      }

by

      for (i=0; i<(npts-1); i++)
        {
        v = pts[i];
        vR = pts[i+1];

        vtkIdType newLineIds[2];
        newLineIds[0] = v;
        if ( (intLoc=edgeTable->IsEdge(v,vR)) != -1 )
          {
          intList->GetCell(intLoc,numIntPts,intPts);
          if ( v < vR ) {intsIdx = 0; intsInc=1;} //order of the edge
          else {intsIdx=numIntPts-1; intsInc=(-1);}

          for ( ; intsIdx >= 0 && intsIdx < numIntPts; intsIdx += intsInc )
            {
            newLineIds[1] = intPts[ intsIdx ];
            cellId = this->InsertCell( newLines, 2, newLineIds, cellId,
                                       outScalars->GetTuple1( newLineIds[0] ), newScalars );
            newLineIds[0] = newLineIds[1];
            }
          }
        newLineIds[1] = vR;
        cellId = this->InsertCell( newLines, 2, newLineIds, cellId,
                                   outScalars->GetTuple1( newLineIds[0] ), newScalars );
        }



At about line 800, delete

    outScalars->Delete();
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0036899)
Kitware Robot (administrator)
2016-08-12 09:54

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:54 Kitware Robot Note Added: 0036899
2016-08-12 09:54 Kitware Robot Status expired => closed
2016-08-12 09:54 Kitware Robot Resolution open => moved


Copyright © 2000 - 2018 MantisBT Team