[vtkusers] Problem in the inheritance of vtkCommand

Alexander.Wang zjjywmy at 163.com
Sun Jun 4 22:29:09 EDT 2006

Hi all,
I want to have some callback for the interaction. I defined a class vtkDicomObserver inherited from vtkCommand, but there is a problem in the method NEW. When compiling the code of this method, the compiler tell me: error C2660: 'new' : function does not take 3 parameters. The program is running under Windows XP and MSVC 6.0, as a SDI project. Can anyone give me some advice? Here is the reference code.
//Code Begin
class vtkDicomObserver : public vtkCommand
 virtual char const * GetClassName() const
  return "vtkDicomObserver";
 static vtkDicomObserver * New()
  return new vtkDicomObserver;
//error occurs when compiling this sentence
 virtual void Execute(vtkObject *, unsigned long event, void* )
 vtkImageViewer * ImageViewer;
 vtkRenderWindowInteractor * ImgRenderWindowInteractor;
 CPoint Point;

//Code End
Thanks in advance!
Yours sincerely,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060605/a347807a/attachment.htm>

More information about the vtkusers mailing list