[vtkusers] Drawing complex 3D surface.

Shriram Iyer shriram.uc at gmail.com
Tue Sep 18 11:57:54 EDT 2007


Did you do a SetDimensions(x,y,z) on your structured grid?


On 9/18/07, XViz <D_E at ukr.net> wrote:
>
>  Thank you vry much for answer. I constructed  vtkStructuredGrid and
> setted setpoints and getpointdata->setscalars().
> But what to do NEXT??? I tried to put it into vtkContourFilter, but it
> doesnt't work - it says I have a lot of points but no tuples!
>
>
> XViz, D_E at ukr.net<%3C%21--AID_FROMADDRESS_BEGIN--%3ED_E at ukr.net%3C%21--AID_FROMADDRESS_END--%3E>
> 2007-09-18
>
> ----- Получено следующее -----
> *От:* Shriram Iyer <shriram.uc at gmail.com>
> *Получатель:* D_E <D_E at ukr.net>
> *Время:* 2007-09-18, 00:46:30
> *Тема:* Re: [vtkusers] Drawing complex 3D surface.
>
>  Use vtkStructuredGrid and set the dimensions of the grid correctly using
> vtkStructuredGrid->SetDimensions(x,y,z).
> Then do setpoints and getpointdata->setscalars()
>
> -shriram
>
> On 9/17/07, XViz <D_E at ukr.net> wrote:
> >
> > Hello everyone,
> >
> > I started to work with VTK because it is much faster and powerfull than
> > TeeChart8 I used before. But VTK is more complex, so I'll be very thankful
> > if somebody could advise me how to complete the task described bellow.
> >
> > I've got a task to build isosurfaces from images that intersect ech
> > other: the seccond plane is inclined on 5 degrees to the first, the third to
> > 5 degrees to the seccond and so on - for 360 degrees. So I have cyinder fill
> > with planes. All planes consist from rectangular grid of float type points.
> > I converted this data to unstructured points (actually I can convert it to
> > complex structured grid, but I don't see how could it help me - I didn't
> > mannage to visualisate even two separate cylinders). The isosurface I need
> > to visualizate will consist from many connected/unconnected region. I tried
> > many filters, look through both VTK books and many examples, but I cannot
> > plot it ! :(
> > With vtkSurfaceReconstructionFilter it is something very strange and not
> > right. The only thing that workes is to manully set unstructured grid from
> > points with close intencity value and then put it to vtkGaussianSplatter ant
> > plot it like in finance.cxx example. But it is not real picture, because
> > all points are shrinked by vtkGaussianSplatter.
> > Here is the code I assume should work to draw my data (unfortunatelly in
> > doesn't - I don't know why):
> >
> > // Pl3D[i].x(,y,z,V) - is my point number i - x,y,z - coordinates, V -
> > values - all float type. This array I did manually before.
> >   vtkPoints *points = vtkPoints::New();
> >   vtkIntArray *newScalars = vtkIntArray::New();
> > // Then I fill arrays with point and scalars in the loop incrising id
> > for both arrays for each new point
> >   int po=0;
> >   for (int i=0; i<NumFull; i++)
> > // If I want to set manually intencity for single surface I put here: if
> > (Pl3D[i].V>LowLevel && Pl3D[i].V<HighLevel)
> >   { points->InsertPoint(po,Pl3D[i].x,Pl3D[i].y,Pl3D[i].z);
> >     newScalars->InsertValue(po,Pl3D[i].V);
> >     po++;
> >   };
> >   vtkUnstructuredGrid *PdataSet = vtkUnstructuredGrid::New();
> >     PdataSet->SetPoints(points);
> >     PdataSet->GetPointData()->SetScalars(newScalars);
> > //I putted here different filters, but everithing (but
> > vtkGaussianSplatter) didn't work
> >   vtkContourFilter *cf = vtkContourFilter::New();
> >     cf->SetInputConnection(someFilter->GetOutputPort());
> > //I tried to change SetValue for GenerateValues, or to set all values in
> > newScalars=1 and SetValue(0,1)
> >     cf->SetValue(0,0.0);
> >   vtkPolyDataMapper *map = vtkPolyDataMapper::New();
> >     map->SetInputConnection(cf->GetOutputPort());
> >   vtkActor *popActor = vtkActor::New();
> >     popActor->SetMapper(map);
> >
> >
> > As I wrote I tried to set all Scalar values for manyally selected
> > iso-points to 1, or didn't set it. I tried to put my points to
> > vtkPolyData->SetPoints() and use some filters...
> >
> > I'm trying to get this thing working for two weeks already. :(
> > It will be very nice if somebody could help me!
> > Thank you very much!
> >
> >
> > XViz, D_E at ukr.net
> > 2007-09-17
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the 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/20070918/20494d22/attachment.htm>


More information about the vtkusers mailing list