[vtkusers] Build vtk classes - HELP!!!

Leila Baghdadi baghdadi at sickkids.ca
Tue Jan 13 16:43:21 EST 2004


Hi

I have my own vtk classes sitting at
./VTK/Examples/Build/vtkLocal

you can just place both the header and the .cxx file in the same directory 
and then 

ccmake . 
and make

in

./VTK/Examples/Build/vtkLocal


that should do the job but keep in mind that
you have to load the extra module
for instance in python

from vtkpython import * 
from libvtkLocalPython import *



HTH

Leila


On Tue, 13 Jan 2004, Yi-Yu Chou wrote:

> 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
> 
> _________________________________________________________________
> ¥ß§Y¥Ó½Ð MSN Mobile ªA°È¡G¥Î¤â¾÷©M MSN Messenger ºô¤ÍÀH®É¥æ½Í  
> http://msn.com.tw/msnmobile 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 




More information about the vtkusers mailing list