Open GoogleCodeExporter opened 9 years ago
I have noticed that this has already been reported elsewhere, e.g., in
http://stackoverflow.com/questions/4038500/going-from-numpy-array-to-itk-image
and pages linked therefrom.
Original comment by marktsuc...@gmail.com
on 10 Sep 2011 at 12:22
The fix above (int -> npy_intp) is needed only for the version of PyBuffer in
the ITK repository between ITK git commits
22c8a02323d482edc1b1508b88690a8c670f5909 (2009-05-22) and
0248e8fa1cb8b547cc04f84e708011c696518c23 (2011-01-23), not to the version here
(SVN r539) on Google Code.
ITK commit 22c8a023 (among other things) removed the use (12 lines down in the
same function) of PyArray_FromDimsAndData() (a deprecated function from the old
NumArray API) and replaced it with a call to PyArray_SimpleNewFromData() (the
equivalent modern NumPy API function), but forgot to change the type for the
second argument (from int* to npy_intp*), hence this bug. But this change has
not been merged into the Google Code SVN repository (as of r539).
ITK commit 0248e8fa imported WrapITK r539 from Google Code, thereby effectively
reverting the unmerged change (and perhaps others?). So this bug does not
manifest itself when compiling the version of PyBuffer that comes with, e.g.,
ITK 4.2. (But ITK 4.x's PyBuffer therefore continues to call the deprecated
function.)
Original comment by marktsuc...@gmail.com
on 10 Aug 2012 at 1:29
Original issue reported on code.google.com by
marktsuc...@gmail.com
on 31 Aug 2011 at 1:48