View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011102VTK(No Category)public2010-08-06 16:462016-08-12 09:55
ReporterDavid Doria 
Assigned ToDave DeMarle 
PrioritynormalSeveritycrashReproducibilitysometimes
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0011102: vtkDelaunay2D with some pairs of datasets and transforms crashes
DescriptionWith the attached dataset and the transform defined in code below, vtkDelaunay2D crashes. With that dataset and a different transform all is well. With that transform and a different dataset all is well. I'm sure it has something to do with the degeneracy of the dataset, but there should be a check for that and an error thrown rather than a crash.

Additional InformationIt looks like it happens in vtkDelaunay2D::CheckEdge.


#include <vtkPolyData.h>
#include <vtkImageData.h>
#include <vtkSmartPointer.h>
#include <vtkMath.h>
#include <vtkPlane.h>
#include <vtkLandmarkTransform.h>
#include <vtkTransformFilter.h>
#include <vtkDelaunay2D.h>
#include <vtkPointSource.h>
#include <vtkXMLPolyDataReader.h>
#include <vtkPlaneSource.h>
#include <vtkXMLPolyDataWriter.h>

int main()
{
  vtkSmartPointer<vtkXMLPolyDataReader> reader =
    vtkSmartPointer<vtkXMLPolyDataReader>::New();
  reader->SetFileName("../polydata.vtp");
  reader->Update();

  double sourceOrigin[3] = {-.5, .5, 0};
  double sourceP1[3] = {.5, .5, 0};
  double sourceP2[3] = {-.5, .5, -1};

  vtkSmartPointer<vtkPoints> sourcePoints =
      vtkSmartPointer<vtkPoints>::New();
  sourcePoints->InsertNextPoint(sourceOrigin);
  sourcePoints->InsertNextPoint(sourceP1);
  sourcePoints->InsertNextPoint(sourceP2);

  vtkSmartPointer<vtkPoints> targetPoints =
      vtkSmartPointer<vtkPoints>::New();
  targetPoints->InsertNextPoint(0,0,0);
  targetPoints->InsertNextPoint(0,1,0);
  targetPoints->InsertNextPoint(1,0,0);

  vtkSmartPointer<vtkLandmarkTransform> landmarkTransform =
      vtkSmartPointer<vtkLandmarkTransform>::New();
  landmarkTransform->SetSourceLandmarks(sourcePoints);
  landmarkTransform->SetTargetLandmarks(targetPoints);
  landmarkTransform->SetModeToRigidBody();
  landmarkTransform->Update();

  vtkSmartPointer<vtkPolyData> polydata =
      vtkSmartPointer<vtkPolyData>::New();
  polydata->SetPoints ( reader->GetOutput()->GetPoints() );

  vtkSmartPointer<vtkDelaunay2D> delaunay =
      vtkSmartPointer<vtkDelaunay2D>::New();
  delaunay->SetTransform(landmarkTransform);
  delaunay->SetInput(polydata);
  delaunay->Update();

  return EXIT_SUCCESS;
}
TagsNo tags attached.
Project
Type
Attached Files? file icon polydata.vtp [^] (5,213 bytes) 2010-08-06 16:46

 Relationships
related to 0012178closedDave DeMarle vtkDelaunay2D fails to recover boundary 

  Notes
(0031195)
Dave DeMarle (administrator)
2013-07-22 18:20

If the bug is still present in 6.0.0, please reopen this report.
(0037190)
Kitware Robot (administrator)
2016-08-12 09:55

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
2010-08-06 16:46 David Doria New Issue
2010-08-06 16:46 David Doria File Added: polydata.vtp
2011-05-10 20:41 David Gobbi Relationship added related to 0012178
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2013-07-22 18:20 Dave DeMarle Note Added: 0031195
2013-07-22 18:20 Dave DeMarle Status backlog => expired
2013-07-22 18:20 Dave DeMarle Assigned To => Dave DeMarle
2016-08-12 09:55 Kitware Robot Note Added: 0037190
2016-08-12 09:55 Kitware Robot Status expired => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved


Copyright © 2000 - 2018 MantisBT Team