[vtkusers] two question, please advice

Jérôme jerome.velut at gmail.com
Mon Oct 19 08:33:30 EDT 2009


Hi Ali,

1. You should be more precise about what you want exactly. There are a lot
of different ways for interpreting this question:
      - Do you want the bounding box of your volume? -> vtkOutlineFilter
      - Do you want a physical grid representing the volume?
      - Do you want to extract an iso-surface from your volume? ->
vtkContourFilter, vtkMarchingCube,...
      - vtkThreshold could be of help, but outputs an unstructured grid, not
a polydata.

2. Sorry for that, I cannot debug .NET code, since I don't know the concept
of "managed" objects. However, I wonder if gcnew does the same work as
::New() from VTK, regarding the reference count and garbage collector. VTK
guru's wanted!

HTH
Jerome

2009/10/19 Ali Habib <ali.mahmoud.habib at gmail.com>

> Dear All ,
>
> 1. How to convert vtkvolume and vtkimagedata to vtkpolydata
>
> 2.while running the following  code , a warning appear :
>  Generic Warning: In m:\dev\cur\vtkdotnet\branch\50\Common\vtkMath.cxx,
> line 394
> Unable to factor linear system:
>
> vtkSphereSource ^sphere = gcnew vtkSphereSource();
>      sphere->SetRadius(1.0);
>      sphere->SetThetaResolution(18);
>      sphere->SetPhiResolution(18);
>    vtkStripper ^v = gcnew vtkStripper();
>    v->SetInputConnection(sphere->GetOutputPort());
>    v->Update();
>    vtkDelaunay3D ^v3 = gcnew vtkDelaunay3D();
>    v3->SetInputConnection(v->GetOutputPort());
>    v3->Update()
>
>    vtkDataSetMapper ^mapper = gcnew vtkDataSetMapper();
>    mapper->SetInputConnection(v3->GetOutputPort());
>    vtkActor ^triangulation = gcnew vtkActor();
>    triangulation->SetMapper(mapper);
>    triangulation->GetProperty()->SetRepresentationToWireframe();
>    // Create the standard rendering stuff.
>    vtkRenderer ^ren1 = gcnew vtkRenderer();
>    vtkRenderWindow ^renWin = gcnew vtkRenderWindow();
>    renWin->AddRenderer(ren1);
>    vtkRenderWindowInteractor ^iren = gcnew vtkRenderWindowInteractor();
>    iren->SetRenderWindow(renWin);
>    // Add the actors to the renderer, set the background and size
>    //
>    ren1->AddActor(triangulation);
>    ren1->SetBackground(1, 1, 1);
>    renWin->SetSize(300, 300);
>    renWin->Render();
>
>    renWin->Render();
>    iren->Initialize();
>
>    iren->Start();
>
> any advice please
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091019/91a3f2bf/attachment.htm>


More information about the vtkusers mailing list