[vtkusers] Build vtk classes - HELP!!!

Yi-Yu Chou chouyiyu at hotmail.com
Tue Jan 13 16:06:11 EST 2004


Hi all vtk users,

I am trying t build my own vtk classes but I encounter some problems.
I tried to change the example a little bit in 
VTK/Example/Build/vtkMy/Common/

// vtkBar.h
#ifndef __vtkBar_h
#define __vtkBar_h
#include "vtkObject.h"
#include "vtkmyCommonWin32Header.h"

class VTK_MY_COMMON_EXPORT vtkBar : public vtkObject
{
public:
  static vtkBar *New();
  vtkTypeRevisionMacro(vtkBar,vtkObject);
  int inData;
  int outData;
protected:
  vtkBar() ;
  ~vtkBar() ;
private:
  vtkBar(const vtkBar&);  // Not implemented.
  void operator=(const vtkBar&);  // Not implemented.
};
#endif 

// vtkBar.cxx
#include "vtkBar.h"
#include "vtkObjectFactory.h"

vtkCxxRevisionMacro(vtkBar, "$Revision: 1.3 $");
vtkStandardNewMacro(vtkBar);
vtkBar::vtkBar()
{
  this->inData = 0;
  this->outData = 0;
}

vtkBar::~vtkBar()
{
}
...............................................................................................................................

Under /VTK/Example/Build/vtkMy
I ran : ccmake . 
Press "c" twice, then press "g"
Enter : make
Go to /vtkMy/bin
Ran : python
>>> from vtk import *
>>> from libvtkmyCommonPython import *
>>> A = vtkBar()
>>> A.inData
Then I got the following error message :
AttributeError: inData 
What's wrong with my procedure.....??????
Please help me !!!
Thanks a lot !!

Best,
YY

_________________________________________________________________
立即申請 MSN Mobile 服務:用手機和 MSN Messenger 網友隨時交談  
http://msn.com.tw/msnmobile 




More information about the vtkusers mailing list