[vtkusers] changes from 4.x to 5.x
Mathieu Malaterre
mathieu.malaterre at gmail.com
Tue Sep 9 03:52:44 EDT 2008
Dave,
On Tue, Sep 9, 2008 at 12:04 AM, Dave Reed <davelist at mac.com> wrote:
>
> I'm getting back to using VTK after being gone for a while so I'm trying to
> adjust to some of the changes between 4.x and 5.x. At the moment, I have
> 5.0.3 on my Mac because that was the easiest to get working via MacPorts.
>
> At the bottom of this message is some old Python code that worked on 4.x and
> printed the number of polygons that were rendered. I've also tried updating
> the code to use the SetInputConnection and GetOutputPort methods, but that
> has no effect.
>
> With 5.0.3 on my system, it says GetNumberOfPolys is not a valid attribute.
>
> The output says it's a vtkPolyData, but the Python dir command doesn't list
> many of the vtkPolyData methods. Here is the output:
>
> vtkPolyData
> ['AddObserver', 'BreakOnError', 'DebugOff', 'DebugOn', 'FastDelete',
> 'GetAddressAsString', 'GetClassName', 'GetDebug', 'GetGlobalWarningDisplay',
> 'GetMTime', 'GetReferenceCount', 'GlobalWarningDisplayOff',
> 'GlobalWarningDisplayOn', 'HasObserver', 'InvokeEvent', 'IsA', 'IsTypeOf',
> 'Modified', 'NewInstance', 'PrintRevisions', 'Register', 'RemoveObserver',
> 'RemoveObservers', 'SafeDownCast', 'SetDebug', 'SetGlobalWarningDisplay',
> 'SetReferenceCount', 'UnRegister']
You are missing all of the specific vtkPolyData member functions.
With VTK 5.2 I am getting:
['AddCellReference', 'AddReferenceToCell', 'Allocate', 'BuildCells',
'BuildLinks', 'ComputeBounds', 'CopyCells', 'CopyStructure',
'DeepCopy', 'DeleteCell', 'DeleteCells', 'DeleteLinks', 'DeletePoint',
'GetActualMemorySize', 'GetCell', 'GetCellBounds',
'GetCellEdgeNeighbors', 'GetCellNeighbors', 'GetCellPoints',
'GetCellType', 'GetClassName', 'GetDataObjectType', 'GetGhostLevel',
'GetLines', 'GetMaxCellSize', 'GetNumberOfCells', 'GetNumberOfLines',
'GetNumberOfPieces', 'GetNumberOfPolys', 'GetNumberOfStrips',
'GetNumberOfVerts', 'GetPiece', 'GetPointCells', 'GetPolys',
'GetStrips', 'GetUpdateExtent', 'GetVerts', 'Initialize',
'InsertNextCell', 'InsertNextLinkedPoint', 'IsA', 'IsEdge',
'IsPointUsedByCell', 'IsTriangle', 'NewInstance',
'RemoveCellReference', 'RemoveDeletedCells', 'RemoveGhostCells',
'RemoveReferenceToCell', 'ReplaceCellPoint', 'Reset',
'ResizeCellList', 'ReverseCell', 'SafeDownCast', 'SetLines',
'SetPolys', 'SetStrips', 'SetVerts', 'ShallowCopy', 'Squeeze']
I would think this is an issue with your MacPort package. Either raise
the question in there forums or try to rebuild VTK from scratch on
your system (if you have cmake on your system it should be easy).
2cts
--
Mathieu
More information about the vtkusers
mailing list