Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 833
    • Issues 833
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 241
    • Merge requests 241
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #14340
Closed
Open
Issue created Oct 20, 2013 by Kitware Robot@kwrobotOwner

vtkGraph FindVertex failure

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


I highly suspect that the issue lies somewhere more specific (might be related to http://www.vtk.org/Bug/view.php?id=13143), and therefore suspect it might cause for more issues in different components eventually. In any case, see the code below.

#include <vtkSmartPointer.h> #include <vtkDataSetAttributes.h> #include <vtkIntArray.h> #include <vtkMutableUndirectedGraph.h>

int main(int, char *[]) { vtkSmartPointer g = vtkSmartPointer::New();

vtkIntArray *pedigreeIds = vtkIntArray::New();

g->GetVertexData()->SetPedigreeIds(pedigreeIds);

g->AddVertex(vtkVariant(0));
g->AddVertex(vtkVariant(1));
g->AddVertex(vtkVariant(16));
g->AddVertex(vtkVariant(17));
g->AddVertex(vtkVariant(24));

std::cout << g->FindVertex(vtkVariant(24)) << std::endl;

return EXIT_SUCCESS;

}

On my PC (Visual Studio 2010 Pro; build debug x86) it will output -1. Removing any value (except for the last one, 24) will make it output values as expected.

Assignee
Assign to
Time tracking