about marching cubes

Matthew Hall mahall at math.uiuc.edu
Mon Jul 19 14:57:51 EDT 1999


Emmanuelle Bourrat wrote:
> 
> Greetings,
> 
> I am a new user of vtk.
> I need a surface representation of a volume and I need to compute things
> on each cell of the surface representation, but I can't access the
> vtkCellArray.
> 
> First I am drawing a volume (I put it into a structuredPoints), then I
> am applying a MarchinCubes object, as follows :
> marching_cubes->DebugOn();
> marching_cubes->SetValue(0, 100);
> marching_cubes->SetInput(volume);
> 
> Then, I would like to access the the output of marching_cubes by
> marching_cubes->GetOutPut(), this method returns a vtkPolyData *, and
> then I would like to access the vtkCellArray* with GetPolys().
> The problem is that what I get with this method is an empty
> vtkCellArray., it is allocated, but empty.
> 
> Can anybody help?
> Thanks,
> 
> Emmanuelle.

It should work - you should make sure that you have actually updated the
pipeline - if not, no data processing will be done. You may either
render the scene (if you have a full pipeline, anding in a mapper), or
you may call: 
	marching_cubes->Update();
Either of these methods will cause the filters and readers to execute,
and the data in GetPolys will be valid.

-matt


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list