[Insight-users] Re: itkLevelSetNodeF3 in itk 2.0?

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Jun 3 10:43:35 EDT 2005


Hi yasser,
Hi Bruno,

I'm trying to have a more consistent set of classes avaible in python.
Because of the size of the executable, it's impossible to wrap each type  
for each class, so  to be able to increase number of avaible classes, I  
reduce avaible types to unsigned short and and float for image dimension 2  
and 3 (US2, US3, F2, F3) and some other types for particular filters such  
as ImageFileWriter where UC2 and UC3 are also avaible.
I now have losts more filters with only a small increase a executable size.

I'm maintaining a branch of ITK where I store all changes changes I made  
to increase number of classe avaible in wrappers. It is avaible in a darcs  
repository ( www.darcs.net ) at http://voxel.jouy.inra.fr/darcs/itk-mima2  
. I keep this repository synchronized with main itk cvs (with tailor.py).

You are welcome if you want to contribute... there is still lots of work !

Regards,

Gaetan


On Fri, 03 Jun 2005 16:19:55 +0200, Bruno Cassaro <bcdalava at cenpra.gov.br>  
wrote:

> 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!
>>
>
>



-- 
Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr>
Tel: +33 1 34 65 29 66
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
Web: http://voxel.jouy.inra.fr


More information about the Insight-users mailing list