Transfer from VTK to SimpleITK

The error indicates that size is invalid. So what is the value of size in your code?