Dear Luca, 
       I tried to copy the .cxx and .h files in Contrib of vmtk and make the 
modifications but I am in a point where I get this message: 

[ 93%] Building CXX object 
vtkVmtk/Contrib/CMakeFiles/vtkvmtkContrib.dir/vtkvmtkPolyBallLine2.cxx.o
Linking CXX shared library ../../bin/libvtkvmtkContrib.so
[ 95%] Built target vtkvmtkContrib
[ 95%] Python Wrapping - generating vtkvmtkContribPythonInit.cxx
[ 95%] Python Wrapping - generating vtkvmtkModuleCarotidPython.cxx
Scanning dependencies of target vtkvmtkContribPythonD
[ 96%] Building CXX object 
vtkVmtk/Contrib/CMakeFiles/vtkvmtkContribPythonD.dir/vtkvmtkModuleCarotidPython.cxx.o
/home/lau/vmtk-build/VMTK-Build/vtkVmtk/Contrib/vtkvmtkModuleCarotidPython.cxx: 
In function ‘PyObject* PyvtkvmtkModuleCarotid_Carotid(PyObject*, PyObject*)’:
/home/lau/vmtk-build/VMTK-Build/vtkVmtk/Contrib/vtkvmtkModuleCarotidPython.cxx:35:
 error: invalid static_cast from type ‘vtkObjectBase*’ to type 
‘vtkvmtkModuleCarotid*’
make[5]: *** 
[vtkVmtk/Contrib/CMakeFiles/vtkvmtkContribPythonD.dir/vtkvmtkModuleCarotidPython.cxx.o]
 Error 1
make[4]: *** [vtkVmtk/Contrib/CMakeFiles/vtkvmtkContribPythonD.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [Stamp/VMTK/VMTK-build] Error 2
make[1]: *** [CMakeFiles/VMTK.dir/all] Error 2
make: *** [all] Error 2

My header file content is :

#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <set>
#include <algorithm>
#include <math.h>
#include "vtkvmtkWin32Header.h"
using namespace std;


class VTK_VMTK_CONTRIB_EXPORT vtkvmtkModuleCarotid //: public 
vtkImplicitFunction
{
  public: 
//static vtkvmtkModuleCarotid New();
 //vtkTypeRevisionMacro(vtkvmtkModuleCarotid,vtkImplicitFunction);

float dotm(vector <float> &vector1, vector <float> &vector2, vector <float> 
&vector3, int step, double Arr[]);

void Carotid();
/*protected:
  vtkvmtkModuleCarotid();
  ~vtkvmtkModuleCarotid();

  */
  
};

#endif

and my cxx file begin like:
#include "vtkvmtkModuleCarotid.h"
#include "vtkvmtkConstants.h"
#include "vtkObjectFactory.h"


//vtkCxxRevisionMacro(vtkvmtkModuleCarotid, "$Revision: 1.5 $");

//vtkStandardNewMacro(vtkvmtkModuleCarotid);
/*
vtkvmtkModuleCarotid::vtkvmtkModuleCarotid()
{
  ValCar = 1;
 
}
//----------------------------------------------------------------------------
vtkvmtkModuleCarotid::~vtkvmtkModuleCarotid()
{
  if (VarCar2==2)
      ValCar=0;
  
  
}*/


float vtkvmtkModuleCarotid::dotm(vector <float> &vector1, vector <float> 
&vector2, vector <float> &vector3, int step, double Arr[])
{
  float dotmt;
  dotmt=vector1[step]*Arr[0]+vector2[step]*Arr[1]+vector3[step]*Arr[2];

   
   return dotmt;
}

void vtkvmtkModuleCarotid::Carotid() 

{ ....content..... }

I tried some things like put a constructor and destructor for a variable and 
some other instruction/lines which I found in the modules of Contrib but 
nothing. Which can be the problem? 

Best regards,
Laurentiu
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
vmtk-users mailing list
vmtk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vmtk-users

Reply via email to