<html><head><style> body {height: 100%; color:#000000; font-size:12pt; font-family:Times New Roman;}</style></head><body>Hi everyone, <br>&nbsp;&nbsp; I'm searching a way to convert a class (developed by our laboratory) to ParaView plugin.<br>&nbsp;&nbsp; So, they have the&nbsp; vtkOtsuSphereSource.cxx and vtkOtsuSphereSource.h file as in the attachments.<br>&nbsp;&nbsp; With this class, they will be able to calculate the optimal threshold of an vtkImageData. The return value is this optimal threshold.<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; I have some questions to ask you about how to convert this class so it can be used as ParaView plugin.<br>&nbsp;&nbsp; - What does it means <strong>"vtkStandardNewMacro(vtkOtsuSphereSource)"</strong> and does it mandatory?<br>&nbsp;&nbsp; - Error when compiling <strong>vtkOtsuSphereSourceClientServer.cxx:13:10: error: â€˜New’ is not a member of â€˜vtkOtsuSphereSource’</strong>, so, it's because I don't have <strong>static vtkOtsuSphereSource* New();</strong> in the .h file. So I want to ask : what is this?<br>&nbsp;&nbsp; - When I added this <strong>static vtkOtsuSphereSource* New();</strong> in the .h file. another compiling error :<strong> /vtkOtsuSphereSource/bin/vtkOtsuSphereSourceClientServer.cxx:13:35: error: cannot convert â€˜vtkOtsuSphereSource*’ to â€˜vtkObjectBase*’ in return</strong> so my class is not a vtkObjectBase, but how can we go through this error?<br>&nbsp; <br>The following lines indicate the compiling error with <strong>static vtkOtsuSphereSource* New(); </strong>in .h file<br>&nbsp;<em> /home/thtran/ParaViewPlugins/vtkOtsuSphereSource/bin/vtkOtsuSphereSourceClientServer.cxx: In function â€˜int vtkOtsuSphereSourceCommand(vtkClientServerInterpreter*, vtkObjectBase*, const char*, const vtkClientServerStream&, vtkClientServerStream&)’:<br>/home/thtran/ParaViewPlugins/vtkOtsuSphereSource/bin/vtkOtsuSphereSourceClientServer.cxx:19:29: error: â€˜SafeDownCast’ is not a member of â€˜vtkOtsuSphereSource’<br>make[2]: *** [CMakeFiles/MyOtsuSphereSource.dir/vtkOtsuSphereSourceClientServer.o] Error 1<br>make[1]: *** [CMakeFiles/MyOtsuSphereSource.dir/all] Error 2</em><br>&nbsp; <br>&nbsp; Thank you very much in advance</body></html>