[vtkusers] I 'm not sure if my mails be sent to the vtk users or not

Ali Habib ali.mahmoud.habib at gmail.com
Wed Oct 14 11:29:03 EDT 2009


Hi All,

this is my fourth time to send to your group asking the help , I amn't sure
if my questions be sent or not but this is my question again:

I created a 3D volumeof skull from 2D slices I want to create a Mesh on this
3D I tried alot of things and I found in an old question an algorithm but
when applying it always give bug and error said that VTKinttype array can't
load elements :I used getactualmemorysize and numberofcells and numberof
point:at marching, till normal steps I have 23799 kb , 6608388 cells , and
3306508 points ,I commented the delaunary part and return the same error :

the code is :

 ren1 = gcnew vtk::vtkRenderer();
renwM = r;
renwM::AddRenderer(ren1);
iren::SetRenderWindow(renwM);



  vtk::vtkMarchingCubes ^mcubes = gcnew vtk::vtkMarchingCubes();
mcubes->GetOutput()->ReleaseDataFlagOff();
mcubes->SetInput(VoxelData);
mcubes->SetValue(0, 4);
mcubes->ComputeGradientsOn();
mcubes->Update();
vtk::vtkSmoothPolyDataFilter ^smoother = gcnew
vtk::vtkSmoothPolyDataFilter();
smoother->GetOutput()->ReleaseDataFlagOff();
smoother->SetInput(mcubes->GetOutput());
smoother->SetNumberOfIterations(5);
smoother->SetRelaxationFactor(0.70);
smoother->SetFeatureAngle(70);
smoother->FeatureEdgeSmoothingOn();
smoother->BoundarySmoothingOn();

smoother->Update();
vtk::vtkPolyDataNormals ^normals = gcnew vtk::vtkPolyDataNormals();
normals->GetOutput()->ReleaseDataFlagOff();
normals->SetInput(smoother->GetOutput());
normals->SetFeatureAngle(80);
normals->Update();

  vtk::vtkDelaunay3D ^delaunay4 = gcnew vtkDelaunay3D();
try
{



delaunay4->SetInputConnection(normals->GetOutputPort());
delaunay4->Update();

}
catch(System::Exception ^ex)
{


MessageBox::Show(ex->Message);



}


vtkDataSetMapper ^mapper = gcnew vtk::vtkDataSetMapper();
mapper->SetInputConnection(delaunay4->GetOutputPort());

vtkActor ^actor = gcnew vtk::vtkActor();
actor->SetMapper(mapper);
actor->GetProperty()->SetRepresentationToWireframe();

ren1::AddActor(actor);

renwM::Render();
iren->Initialize();
iren::Enable();




Looking forward to your help

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091014/95384d27/attachment.htm>


More information about the vtkusers mailing list