[vtkusers] Missing vtkCellArray Member Functions in Python Binding

Chih-Wei Chiu jwchiu at csie.nctu.edu.tw
Fri May 3 04:01:24 EDT 2002


VTK 4.0.

Some cell manipulation functions are missing ***intentionally*** ?

Attached is part of vtkCellArrayPython.cxx. As you can see, GetNextCell()
and GetCell() are missing.

Line 610:
<listing>
static PyMethodDef PyvtkCellArrayMethods[] = {
{"GetClassName", (PyCFunction)PyvtkCellArray_GetClassName, 1,
"V.GetClassName() -> string\nC++: const char *GetClassName ();\n\n"},
{"IsA", (PyCFunction)PyvtkCellArray_IsA, 1,
"V.IsA(string) -> int\nC++: int IsA (const char *name);\n\n"},
{"Allocate", (PyCFunction)PyvtkCellArray_Allocate, 1,
"V.Allocate(int, int) -> int\nC++: int Allocate (const long sz, const int
ext);\n\n Free any memory and reset to an empty state.\n"},
{"Initialize", (PyCFunction)PyvtkCellArray_Initialize, 1,
"V.Initialize()\nC++: void Initialize ();\n\n Get the number of cells in the
array.\n"},
{"GetNumberOfCells", (PyCFunction)PyvtkCellArray_GetNumberOfCells, 1,
"V.GetNumberOfCells() -> int\nC++: long GetNumberOfCells ();\n\n Utility
routines help manage memory of cell array. EstimateSize()\n returns a value
used to initialize and allocate memory for array based\n on number of cells
and maximum number of points making up cell. If \n every cell is the same
size (in terms of number of points), then the \n memory estimate is
guaranteed exact. (If not exact, use Squeeze() to\n reclaim any extra
memory.)\n"},
{"EstimateSize", (PyCFunction)PyvtkCellArray_EstimateSize, 1,
"V.EstimateSize(int, int) -> int\nC++: long EstimateSize (long numCells, int
maxPtsPerCell);\n\n A cell traversal methods that is more efficient than
vtkDataSet traversal\n methods. InitTraversal() initializes the traversal of
the list of cells.\n"},
{"InitTraversal", (PyCFunction)PyvtkCellArray_InitTraversal, 1,
"V.InitTraversal()\nC++: void InitTraversal ();\n\n A cell traversal methods
that is more efficient than vtkDataSet traversal\n methods. InitTraversal()
initializes the traversal of the list of cells.\n"},
{"GetSize", (PyCFunction)PyvtkCellArray_GetSize, 1,
"V.GetSize() -> int\nC++: long GetSize ();\n\n Get the total number of
entries (i.e., data values) in the connectivity \n array. This may be much
less than the allocated size (i.e., return value \n from GetSize().)\n"},
{"GetNumberOfConnectivityEntries",
(PyCFunction)PyvtkCellArray_GetNumberOfConnectivityEntries, 1,
"V.GetNumberOfConnectivityEntries() -> int\nC++: long
GetNumberOfConnectivityEntries ();\n\n Internal method used to retrieve a
cell given an offset into\n the internal array.\n"},
{"InsertNextCell", (PyCFunction)PyvtkCellArray_InsertNextCell, 1,
"V.InsertNextCell(vtkCell) -> int\nC++: long InsertNextCell (vtkCell
*cell);\nV.InsertNextCell(vtkIdList) -> int\nC++: long InsertNextCell
(vtkIdList *pts);\nV.InsertNextCell(int) -> int\nC++: long InsertNextCell
(int npts);\n\n Insert a cell object. Return the cell id of the cell.\n"},
{"InsertCellPoint", (PyCFunction)PyvtkCellArray_InsertCellPoint, 1,
"V.InsertCellPoint(int)\nC++: void InsertCellPoint (long id);\n\n Used in
conjunction with InsertNextCell(int npts) to add another point\n to the list
of cells.\n"},
{"UpdateCellCount", (PyCFunction)PyvtkCellArray_UpdateCellCount, 1,
"V.UpdateCellCount(int)\nC++: void UpdateCellCount (int npts);\n\n Used in
conjunction with InsertNextCell(int npts) and InsertCellPoint() to\n update
the number of points defining the cell.\n"},
{"GetInsertLocation", (PyCFunction)PyvtkCellArray_GetInsertLocation, 1,
"V.GetInsertLocation(int) -> int\nC++: long GetInsertLocation (int
npts);\n\n Computes the current insertion location within the internal
array. \n Used in conjunction with GetCell(int loc,...).\n"},
{"GetTraversalLocation", (PyCFunction)PyvtkCellArray_GetTraversalLocation,
1,
"V.GetTraversalLocation() -> int\nC++: long GetTraversalLocation
();\nV.GetTraversalLocation(int) -> int\nC++: long GetTraversalLocation
(long npts);\n\n Get/Set the current traversal location.\n"},
{"SetTraversalLocation", (PyCFunction)PyvtkCellArray_SetTraversalLocation,
1,
"V.SetTraversalLocation(int)\nC++: void SetTraversalLocation (long loc);\n\n
Computes the current traversal location within the internal array. Used \n
in conjunction with GetCell(int loc,...).\n"},
{"ReverseCell", (PyCFunction)PyvtkCellArray_ReverseCell, 1,
"V.ReverseCell(int)\nC++: void ReverseCell (long loc);\n\n Special method
inverts ordering of current cell. Must be called\n carefully or the cell
topology may be corrupted.\n"},
{"GetMaxCellSize", (PyCFunction)PyvtkCellArray_GetMaxCellSize, 1,
"V.GetMaxCellSize() -> int\nC++: int GetMaxCellSize ();\n\n Returns the size
of the largest cell. The size is the number of points\n defining the
cell.\n"},
{"SetCells", (PyCFunction)PyvtkCellArray_SetCells, 1,
"V.SetCells(int, vtkIdTypeArray)\nC++: void SetCells (long ncells,
vtkIdTypeArray *cells);\n\n Define multiple cells by providing a
connectivity list. The list is in\n the form (npts,p0,p1,...p(npts-1),
repeated for each cell). Be careful\n using this method because it discards
the old cells, and anything\n referring these cells becomes invalid (for
example, if BuildCells() has\n been called see vtkPolyData). The traversal
location is reset to the\n beginning of the list; the insertion location is
set to the end of the\n list.\n"},
{"DeepCopy", (PyCFunction)PyvtkCellArray_DeepCopy, 1,
"V.DeepCopy(vtkCellArray)\nC++: void DeepCopy (vtkCellArray *ca);\n\n
Perform a deep copy (no reference counting) of the given cell array.\n"},
{"GetData", (PyCFunction)PyvtkCellArray_GetData, 1,
"V.GetData() -> vtkDataArray\nC++: vtkDataArray *GetData ();\n\n Reuse list.
Reset to initial condition.\n"},
{"Reset", (PyCFunction)PyvtkCellArray_Reset, 1,
"V.Reset()\nC++: void Reset ();\n\n Reuse list. Reset to initial
condition.\n"},
{"Squeeze", (PyCFunction)PyvtkCellArray_Squeeze, 1,
"V.Squeeze()\nC++: void Squeeze ();\n\n Return the memory in kilobytes
consumed by this cell array. Used to\n support streaming and reading/writing
data. The value returned is\n guaranteed to be greater than or equal to the
memory required to\n actually represent the data represented by this object.
The \n information returned is valid only after the pipeline has \n been
updated.\n"},
{"GetActualMemorySize", (PyCFunction)PyvtkCellArray_GetActualMemorySize, 1,
"V.GetActualMemorySize() -> int\nC++: unsigned long GetActualMemorySize
();\n\n Return the memory in kilobytes consumed by this cell array. Used
to\n support streaming and reading/writing data. The value returned is\n
guaranteed to be greater than or equal to the memory required to\n actually
represent the data represented by this object. The \n information returned
is valid only after the pipeline has \n been updated.\n"},
{NULL, NULL}
};
<list>

--
Chih-Wei Chiu <http://www.csie.nctu.edu.tw/~jwchiu>
Computer Graphics and Geometry Modeling Laboratory,
Computer Science and Information Engineering Department,
National Chiao-Tung University, Taiwan




More information about the vtkusers mailing list