[vtkusers] vtkPowerCrustSurfaceReconstruction
Markus Losacker
m.losacker at fz-juelich.de
Fri Dec 9 03:44:24 EST 2005
Hi All,
I want to use vtkPowerCrustSurfaceReconstruction to create a mesh in
MITK. First I wrote my seed points into vtkpoints called
meshPts
mitk::PointSet::DataType::PointsContainerPointer points =
m_SeedPoints->GetPointSet()->GetPoints();
mitk::PointSet::DataType::PointsContainerIterator pointIt =
points->Begin();
mitk::PointSet::DataType::PointsContainerIterator pointEnd =
points->End();
//just counts
for(pointIt = points->Begin();pointIt!=pointEnd;++pointIt)
{
i++;
}
typedef mitk::PointSet::PointType PointType;
PointType pp;
int index;
meshPts->SetNumberOfPoints( i );
for (pointIt = points->Begin();pointIt!=pointEnd;pointIt++)
{
pp = pointIt.Value();
index = pointIt.Index();
double v[3];
v[0] = pp[0];
v[1] = pp[1];
v[2] = pp[2];
meshPts->SetPoint( index, v[1], v[2], v[3] );
For the next step I write the vtkPoints meshPts in a vtkPolydata called
inputMesh
inputMesh->SetPoints( meshPts );
Now I use the PowerCrust-Algorithm
// Use PowerCrust
vtkPowerCrustSurfaceReconstruction* surf =
vtkPowerCrustSurfaceReconstruction::New();
surf->SetInput(inputMesh);
// Show mesh
surf->Update();
outputMesh = surf->GetOutput();
outputMesh is another Vtk Polydata...
My Problem is that output Mesh is empty!!!
I testet it by
ver = outputMesh->GetNumberOfVerts();
lin = outputMesh->GetNumberOfLines();
and by writing outputMesh in another vtkpoints called testPnts an call
testPts = outputMesh->GetPoints();
The Value of test Pts is 0!
Has anybody an Idea why vtkPowerCrustSurfaceReconstruction doesn´t work?
bye
Markus
More information about the vtkusers
mailing list