[Dcmlib] [gdcm-python] SerieHelper_SetDirectory

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Jul 30 18:15:50 CEST 2008


On Wed, Jul 30, 2008 at 6:02 PM, Pascal Cathier
<pascal.cathier at gmail.com> wrote:
> Hi,
>
> I can't get the SerieHelper_SetDirectory working:
>
>>>> serie_helper = _gdcm.SerieHelper_New()
>>>>_gdcm.SerieHelper_SetDirectory(serie_helper, r'c:\mydirectory')
> ---------------------------------------------------------------------------
> NotImplementedError                       Traceback (most recent call last)
>
> C:\Program Files\ProcessExplorer\<ipython console> in <module>()
>
> NotImplementedError: Wrong number of arguments for overloaded function
> 'SerieHelper_SetDirectory'.
>   Possible C/C++ prototypes are:
>     SetDirectory(GDCM_NAME_SPACE::SerieHelper *,std::string const &,bool)
>     SetDirectory(GDCM_NAME_SPACE::SerieHelper *,std::string const &)
>
>
> Is this because the path string has to be wrapped into a std::string object?
> I don't see any such wrapper provided by gdcmpython.


First thing first, did you read the message on:

http://www.creatis.insa-lyon.fr/Public/Gdcm/

about GDCM 2.x version ?

If this is ok with you and would like to stick to GDCM 1.3 for now, I
would suggest you try to use the member function instead of the fake
static member function, so you'll need an instance of the class.

sh = gdcm.SerieHelper()
sh.SetDirectory( '/tmp' )

HTH

-- 
Mathieu



More information about the Dcmlib mailing list