[Insight-users] Python-wrapped ITK and vector<string> problem
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Sun Nov 25 17:40:04 EST 2007
Hi Mike,
I'm please to read that the binary package was useful for you :-)
About the std::vector<string> problem, I don't think there was any
effort made to fix that, so, unfortunately, I think there is still no
way to read the dicom series from python with wrapitk, without
writing a dedicated wrapper around the a custom class dedicated to
that job.
Gaëtan
Le 25 nov. 07 à 17:47, Mike K. a écrit :
>
> Hi fellas!
>
> I'm using Windows XP SP2 (and vista ultimate on another machine),
> Python 2.5
> and python/tcl/java-enabled ITK, kindly provided by Gaëtan
> (http://www.nabble.com/ITK-package-for-windows-with-python,-java-
> and-tcl-support-available-t4652875.html)
>
> Everything seems to work fine, except there is this nasty problem I
> couldn't
> solve.
> Here is a short example of what I'm doing:
>
> import itk
>
> filenamesReader = itk.DICOMSeriesFileNames.New()
> filenamesReader.SetDirectory("C:/images")
>
> filenames = filenamesReader.GetFileNames(True)
>
> GetFileNames() method returns a vector of strings, but it is not
> interpreted
> by Python as any kind of collection; except it is stored in
> filenames as a
> single string, containing a pointer address, or something like
> that. Same
> applies to GetSeriesUIDs method (and any other C++ function that
> returns
> vector<string>)
>
> I've done some searching on the forums, and found that there were
> similar
> problems in accessing vector<string> objects in Python.
> The last posting regarding this matter was made more than a year
> ago, and it
> seems there were no solution to this problem by that time.
> However, a year has passed, so maybe things have changed :)
> So, is there ANY way to get the actual list of elements from a
> function that
> returns vector<string>?
>
> P.S. I'm totally new to ITK, so please exuse me if I'm asking a dumb
> question. It's just I wasn't able to find any up-to-date answer to it.
>
> Best Regards,
> Mike.
> --
> View this message in context: http://www.nabble.com/Python-wrapped-
> ITK-and-vector%3Cstring%3E-problem-tf4870774.html#a13937275
> Sent from the ITK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: =?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=
Url : http://public.kitware.com/pipermail/insight-users/attachments/20071125/473030ac/PGP.pgp
More information about the Insight-users
mailing list