[vtkusers] Issue with ProcrustesAlignmentFilter

-Daniel- ich_daniel at habmalnefrage.de
Sun Mar 6 07:45:26 EST 2016


Hi there,
I try the example from  here
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ProcrustesAlignmentFilter> 
.
But instead of the Spheres used there, I would like to work with a number of
points.
In my testing, however no points are visible. Probably vtkAppendPoints is
not the class for it. What could I use instead? Or how can I also use
POLYDATA Objects?

Code snippet of my attempt:/
public void testWithPoints(){
   ...
  vtkAppendPoints append1 = new vtkAppendPoints();  
  append1.AddInputConnection(getPointOutput(4.6, 20.6, 18.6));  
  append1.AddInputConnection(getPointOutput(4.7, 21.8, 16.9)); 
  append1.AddInputConnection(getPointOutput(6.6, 22.4, 17.7));
  append1.AddInputConnection(getPointOutput(8.2, 20.0, 18.9)); 

  vtkAppendPoints append2 = new vtkAppendPoints();
  append2.AddInputConnection(getPointOutput(5.7, 21.0, 19.0)); 
  append2.AddInputConnection(getPointOutput(5.0, 22.0, 17.2)); 
  append2.AddInputConnection(getPointOutput(7.0, 23.5, 18.3));
  append2.AddInputConnection(getPointOutput(9.2, 21.2, 19.5)); 
		
  ArrayList<vtkAlgorithmOutput> list = new ArrayList<>();
  list.add(append1.GetOutputPort());
  list.add(append2.GetOutputPort());

  vtkMultiBlockDataGroupFilter group = new vtkMultiBlockDataGroupFilter();
  for (vtkAlgorithmOutput output : list) {
    group.AddInputConnection(output);	 
  }

  // further as in the example
  ...
}

//test with vtkPointSource
private vtkAlgorithmOutput getPointOutput(double x, double y, double z) {
  vtkPointSource ps = new vtkPointSource();
  ps.SetNumberOfPoints(1);
  ps.SetCenter(x, y, z);
	
  return ps.GetOutputPort();
}/

Does anybody advice?



--
View this message in context: http://vtk.1045678.n5.nabble.com/Issue-with-ProcrustesAlignmentFilter-tp5737046.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list