<br><br><blockquote><br>---------- Original message ----------<br>From:David Doria< daviddoria+vtk@gmail.com ><br>Date: 04 Jan 10 19:10:45<br>Subject: Re: [vtkusers] vtkContourFilter produces no data as its output<br>To: rakeshthp@in.com<br><br>On Mon, Jan 4, 2010 at 8:14 AM, Bill Lorensen <bill.lorensen@gmail.com> wrote:<br>> ContourFilter produces isosurfaces from the scalar data in a dataset.<br>> Your unstructured grid has no scalar data as far as I can see.<br>><br>><br>> On Mon, Jan 4, 2010 at 4:56 AM, Rakesh Patil <rakeshthp@in.com> wrote:<br>>> Hello there<br>>><br>>> After debugging for a long time, i found out that data exists till this part<br>>> of code<br>>><br>>><br>>> vtkPoints *pts = vtkPoints::New();<br>>> pts->SetData(scatter_data); // scatter_data is an instance of vtkDoubleArray<br>>> with three components<br>>><br>>> unsigned int num_ids = scatter_data->GetNumbe
rOfTuples();<br>>><br>>> vtkPolyVertex *poly = vtkPolyVertex::New();<br>>> poly->GetPointIds()->SetNumberOfIds(num_ids);<br>>><br>>> for ( unsigned int i = 0; i < num_ids; i++ )<br>>> poly->GetPointIds()->SetId(i,i);<br>>><br>>> vtkUnstructuredGrid *ugrid = vtkUnstructuredGrid::New();<br>>> ugrid->Allocate(1);<br>>> ugrid->InsertNextCell (poly->GetCellType(), poly->GetP ointIds());<br>>> ugrid->SetPoints(pts);<br>>><br>>> vtkDelaunay2D *del = vtkDelaunay2D::New();<br>>> del->SetInput(ugrid);<br>>> del->SetTolerance(0.001);<br>>><br>>> Once i execute, the following code,<br>>><br>>> vtkContourFilter *cf = vtkContourFilter::New();<br>>> cf-&g t;SetInputConnection(del->GetOutputPort());<br>>> cf->GenerateValues(10, -5, 20);<br>>> cf->Update();<br>>><br>>> all data vanishes..<br>>><b
r>>> I mean to say that, initially, the grid had, 22,000 points.. After<br>>> traingulating, i got 20000 of cells..<br>>><br>>> But after executing the contour filter class, i get 0 cells and 0 points as<br>>> output.. Where the data disappears all of a sudden, i'm not able to<br>>> understand.. Please i need a guidance from the most experienced and senior<br>>> person.. My mind is totally blank..<br>>><br>>> Thanks in advance<br>>><br>>><br>>><br>>> Dear vtkusers ! Get Yourself a cool, short @in.com Email ID now!<br>>> _______________________________________________<br>>> Powered by <a target=\"_blank\" href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>>><br>>> Visit other Kitware open-source projects at<br>>> <a target=\"_blank\" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.ht
ml</a><br>>><br>>> Please keep messages on-topic and check the VTK FAQ at:<br>>> <a target=\"_blank\" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>>><br><br>As Bill said, the vtkContourFilter does this:<br>http://www.vtk.org/doc/nightly/html/classvtkContourFilter.html#_details<br><br>Maybe you can come up with a very simple data set and describe exactly<br>what you are expecting to happen and maybe someone can point you to a<br>filter that does what you're looking for.<br><br>Thanks,<br><br>David<br>_______________________________________________<br><br><br>See basically, i have a file containing lat, lon and depth/bathymetry values. I read them in the form x, y and z<br>as a sample file, it looks like this:<br><br>71.2632 18.2712 -5<br>71.7762 18.6542 -5<br>72.1262 18.2735 -3.5<br>73.2123 19.6235 10<br>71.2612 18.2756 5.5<br>73.1122 19.7625 10<br>...<br>...<br>...<br><br>it go
es upto thousands of lines like this... so, based on the z (depth/bathymetry) values, i need to display contours..<br><br>So any ideas how to go about for this..??<br></rakeshthp@in.com></bill.lorensen@gmail.com></blockquote>