<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Dear all,<br>
I want to use vtkProgrammableFilter to create my own filter under vtk.<br>
The problem is that I don't know how to actually use it.<br>
When I say for example:<br>
<font face="Courier New, Courier, monospace"><br>
</font><font face="Courier New, Courier, monospace">filter5DTo3D = vtkProgrammableFilter()<br>
filter5DTo3D.SetInput=sliceVector5D.GetOutput<br>
filter5DTo3D.SetExecuteMethod(create3DFrom5D(part5D.GetOutput))<br>
<br>
def create3DFrom5D(matrix5D):<br>
matrix3D = Slice5DTo3D()<br>
matrix3D.SetSliceIndices(filter5DTo3D.GetOutput)<br>
<br>
<br>
<font face="Times New Roman, Times, serif">Vtk complains that </font></font><font
face="Courier New, Courier, monospace">create3DFrom5D <font
face="Times New Roman, Times, serif">is not defined.<br>
<br>
I can define </font> </font><font face="Courier New, Courier, monospace">create3DFrom5D
<font face="Times New Roman, Times, serif">before </font></font><font
face="Courier New, Courier, monospace">filter5DTo3D = vtkProgrammableFilter()<font
face="Times New Roman, Times, serif"> but than I cannot use<br>
</font></font><font face="Courier New, Courier, monospace">matrix3D.SetSliceIndices(filter5DTo3D.GetOutput)<font
face="Times New Roman, Times, serif">. <br>
How can I solve this.<br>
<br>
Does anyone have for me a simple example in python on how to use </font></font><font
face="Courier New, Courier, monospace">vtkProgrammableFilter().<br>
<font face="Times New Roman, Times, serif"><br>
Thanks,<br>
Maurice</font><br>
</font>
</body>
</html>