[vtkusers] Get number of cells

Bernard Giroux giroux at geo.polymtl.ca
Fri Jun 8 16:52:21 EDT 2007


Isidro Moreno a écrit :
> Hi! Here's the situation:
>  
> vtkLineSource *line->vtkLineSource::New();
> vtkPolyData *polydata->vtkPolyData::New();
> ...
> ...
> polydata=line->GetOutput();
> int nofc;
> nofc=polydata->GetNumberOfCells();
>  
> 1st) Why "GetNumberOfCells()" returns 0 ? ("line" it's just a straight 
> line).

Hi Isidoro,

Make sure you call line->Update() _before_ GetOutput()...


> 2st) polydata=line->GetOutput(): Is it the correct way to copy 
> vtkPolyData? I've tried ShallowCopy() and DeepCopy(), but nothing happened.
>  
> I'm using vtk 5.0, thanks everybody!!
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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


-- 
Bernard Giroux, ing., Ph.D.
Chercheur

http://geo.polymtl.ca/~giroux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3253 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070608/f0c15ba1/attachment.bin>


More information about the vtkusers mailing list