[Insight-users] Re: itkLevelSetNodeF3 in itk 2.0?
Bruno Cassaro
bcdalava at cenpra.gov.br
Fri Jun 3 10:19:55 EDT 2005
Hi khadra,
I have had the same problem. ITK 2.0 and MAIN tag don't have python wrap for itkLevelSetNode and another several classes of ITK. I don't know why this happening, to each upgrade we have little number of classes in python. By the way solution in this particular case is to substitute the code of wrap_itkLevelSet.cxx in Insight\Wrapping\CSwig\CommonA. Put this one in our place and the project again. Any problem with it you can mail me. it so dificult to develop in python because the little numbers of devolper in insight-users. We con exchange some codes in python !!!
good lucky
bruno.
#include "itkLevelSet.h"
#include "itkVectorContainer.h"
#ifdef CABLE_CONFIGURATION
#include "itkCSwigMacros.h"
namespace _LSN_ {
typedef itk::LevelSetNode<float , 2 >::LevelSetNode itkLevelSetNodeF2 ;
typedef itk::LevelSetNode<double , 2 >::LevelSetNode itkLevelSetNodeD2 ;
typedef itk::LevelSetNode<unsigned char , 2 >::LevelSetNode itkLevelSetNodeUC2;
typedef itk::LevelSetNode<unsigned short, 2 >::LevelSetNode itkLevelSetNodeUS2;
typedef itk::LevelSetNode<unsigned int , 2 >::LevelSetNode itkLevelSetNodeUI2;
typedef itk::LevelSetNode<signed char , 2 >::LevelSetNode itkLevelSetNodeSC2;
typedef itk::LevelSetNode<signed short , 2 >::LevelSetNode itkLevelSetNodeSS2;
typedef itk::LevelSetNode<signed int , 2 >::LevelSetNode itkLevelSetNodeSI2;
typedef itk::LevelSetNode<float , 3 >::LevelSetNode itkLevelSetNodeF3 ;
typedef itk::LevelSetNode<double , 3 >::LevelSetNode itkLevelSetNodeD3 ;
typedef itk::LevelSetNode<unsigned char , 3 >::LevelSetNode itkLevelSetNodeUC3;
typedef itk::LevelSetNode<unsigned short, 3 >::LevelSetNode itkLevelSetNodeUS3;
typedef itk::LevelSetNode<unsigned int , 3 >::LevelSetNode itkLevelSetNodeUI3;
typedef itk::LevelSetNode<signed char , 3 >::LevelSetNode itkLevelSetNodeSC3;
typedef itk::LevelSetNode<signed short , 3 >::LevelSetNode itkLevelSetNodeSS3;
typedef itk::LevelSetNode<signed int , 3 >::LevelSetNode itkLevelSetNodeSI3;
}
namespace _cable_
{
const char* const group = ITK_WRAP_GROUP(itkLevelSet);
namespace wrappers
{
typedef itk::LevelSetNode<float , 2 >::LevelSetNode itkLevelSetNodeF2 ;
typedef itk::LevelSetNode<double , 2 >::LevelSetNode itkLevelSetNodeD2 ;
typedef itk::LevelSetNode<unsigned char , 2 >::LevelSetNode itkLevelSetNodeUC2;
typedef itk::LevelSetNode<unsigned short, 2 >::LevelSetNode itkLevelSetNodeUS2;
typedef itk::LevelSetNode<unsigned int , 2 >::LevelSetNode itkLevelSetNodeUI2;
typedef itk::LevelSetNode<signed char , 2 >::LevelSetNode itkLevelSetNodeSC2;
typedef itk::LevelSetNode<signed short , 2 >::LevelSetNode itkLevelSetNodeSS2;
typedef itk::LevelSetNode<signed int , 2 >::LevelSetNode itkLevelSetNodeSI2;
typedef itk::LevelSetNode<float , 3 >::LevelSetNode itkLevelSetNodeF3 ;
typedef itk::LevelSetNode<double , 3 >::LevelSetNode itkLevelSetNodeD3 ;
typedef itk::LevelSetNode<unsigned char , 3 >::LevelSetNode itkLevelSetNodeUC3;
typedef itk::LevelSetNode<unsigned short, 3 >::LevelSetNode itkLevelSetNodeUS3;
typedef itk::LevelSetNode<unsigned int , 3 >::LevelSetNode itkLevelSetNodeUI3;
typedef itk::LevelSetNode<signed char , 3 >::LevelSetNode itkLevelSetNodeSC3;
typedef itk::LevelSetNode<signed short , 3 >::LevelSetNode itkLevelSetNodeSS3;
typedef itk::LevelSetNode<signed int , 3 >::LevelSetNode itkLevelSetNodeSI3;
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeF2, itkNodeContainerF2);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeD2, itkNodeContainerD2);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeUC2, itkNodeContainerUC2);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeUS2, itkNodeContainerUS2);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeUI2, itkNodeContainerUI2);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeSC2, itkNodeContainerSC2);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeSS2, itkNodeContainerSS2);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeSI2, itkNodeContainerSI2);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeF3, itkNodeContainerF3);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeD3, itkNodeContainerD3);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeUC3, itkNodeContainerUC3);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeUS3, itkNodeContainerUS3);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeUI3, itkNodeContainerUI3);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeSC3, itkNodeContainerSC3);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeSS3, itkNodeContainerSS3);
ITK_WRAP_OBJECT2(VectorContainer, unsigned int, _LSN_::itkLevelSetNodeSI3, itkNodeContainerSI3);
}
}
#endif
>Message: 5
>Date: Fri, 03 Jun 2005 10:47:05 +0200
>From: "yasser.khadra" <yasser.khadra at creatis.insa-lyon.fr>
>Subject: [Insight-users] itkLevelSetNodeF3 in itk 2.0?
>To: insight-users at itk.org
>Message-ID:
><5.0.2.1.2.20050603104548.00b02a48 at pop3.creatis.insa-lyon.fr>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hi,
>I used itkFastMarchingFilter (itk 1.6) in Python this is part of my
>program: > ....... >
>
>SeedPosition=itkIndex3()
>seedValue =0
>
>node = itkLevelSetNodeF3()
>
>seeds = itkNodeContainerF3_New()
>seeds.Initialize()
>
>def AddSeed(self,x,y,z,i):
>SeedPosition.SetElement(0,int(x))
>SeedPosition.SetElement(1,int(y))
>SeedPosition.SetElement(2,int(z))
>node.SetValue(0)
>node.SetIndex(SeedPosition)
>seeds.InsertElement(i,node)
>
>,but now in "itk 2.0", I have an error :
>
>"module" object has no attribute "itkLevelSetNodeF3"
>
>I don't know how to get "itkLevelSetNodeF3" in itk 2.0 (in python)
>
>thanks in advance!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050603/63c5b389/attachment.html
More information about the Insight-users
mailing list