[vtkusers] extract cylindrical part of a grid
Mathieu Malaterre
Mathieu.Malaterre at creatis.insa-lyon.fr
Fri May 30 11:40:53 EDT 2003
clipped->Update(); //important
clipped->GetOutput()->Print(cout); //output is not empty
HTH
mathieu
Steffen Oeltze wrote:
> Dear VTK-users,
>
> I try to extract a cylindrical region from a vtkRectilinear Grid (I'm only
> interested in knowing the cell midpoints which are inside the cylinder) using
> the vtkExtractGeometry and vtkCylinder classes. However, the output of
> vtkExtractGeometry is always empty. Below I have attached my source code. I
> would really appreciate if anybody could have a look at it.
> ------------------------------------------------------------------------
> vtkRectilinearGrid *grid = vtkRectilinearGrid::New();
> ...specifying the coordinates of the grid but no scalar values yet...
>
> // the implicit cylindrical function
> vtkCylinder *cyl = vtkCylinder::New();
> cyl->SetCenter(mid_point[0],mid_point[1],mid_point[2]);
> cyl->SetRadius(3.0f);
>
> vtkExtractGeometry *clipped = vtkExtractGeometry::New();
> clipped->SetInput(grid);
> clipped->SetImplicitFunction(cyl);
> clipped->ExtractInsideOn();
> clipped->ExtractBoundaryCellsOn();
> clipped->GetOutput()->Print(cout); //output is empty
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
--
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/
More information about the vtkusers
mailing list