[vtkusers] how to connect between vtkDataObject and vtkunstructuredGrid?

Uriah Liggett uliggett at sark.com
Fri Jan 20 16:09:22 EST 2006


I'm not sure if this is the best way, but you can pull the point data 
from the unstructured grid and populate your image with it.  It should 
only contain the points that passed the threshold condition.  The code 
snippet below illustrates this for 2D images where outArr is the 
ScalarPointer to your data object

            vtkPoints * points = grid->GetPoints();

            for(int j=0; j < points->GetNumberOfPoints(); j++)
            {
                float point[3];
                points->GetPoint(j, point);
                outArr[int(point[1]) * dims[0] + int(point[0])] = color;
            }

LM wrote:

> I would like to ask some small question..
>
> I have the output of the threshold filter "unstructuredGrid"
> and the MarchingCubes take input of type "vtkDataObject" which is a 
> super class of the "vtkunstructuredGrid"
> how to connect between them???
> means.. that i want to get the output of the threshold filter.. and 
> input it into the marchingCubes..
>  
> thanks in advance
> LM
>
> ------------------------------------------------------------------------
> Yahoo! Photos
> Ring in the New Year with Photo Calendars 
> <http://us.rd.yahoo.com/mail_us/taglines/photos/*http://pa.yahoo.com/*http://us.rd.yahoo.com/mail_us/taglines/photos/evt=38087/*http://pg.photos.yahoo.com/ph//page?.file=calendar_splash.html&.dir=>. 
> Add photos, events, holidays, whatever.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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
>  
>




More information about the vtkusers mailing list