DigitalSlideArchive / HistomicsTK

A Python toolkit for pathology image analysis algorithms.
https://digitalslidearchive.github.io/HistomicsTK/
Apache License 2.0
387 stars 114 forks source link

TypeError: 'tuple' does not have the buffer interface #452

Closed vaibhavkhanduja closed 6 years ago

vaibhavkhanduja commented 6 years ago

I running the example program for nuclei detection and running into issues with the API.

The API seems to have changed too as the names now differ from camel case to small case.


TypeError Traceback (most recent call last)

in () 1 ----> 2 imNucleiSegMask, Seeds, Max = htk.segmentation.nuclear.max_clustering(imLog, imFgndMask) 3 4 5 # filter out small objects /home/vaibhav/src/HistomicsTK/histomicstk/segmentation/nuclear/max_clustering.pyc in max_clustering(im_response, im_fgnd_mask, r) 53 # find local maxima of all foreground pixels 54 mval, mind = _max_clustering_cython( ---> 55 im_response, im_fgnd_mask.astype(np.int32), r 56 ) 57 _max_clustering_cython.pyx in HistomicsTK.histomicstk.segmentation.nuclear._max_clustering_cython._max_clustering_cython() /home/vaibhav/src/HistomicsTK/histomicstk/segmentation/nuclear/_max_clustering_cython.so in View.MemoryView.memoryview_cwrapper() /home/vaibhav/src/HistomicsTK/histomicstk/segmentation/nuclear/_max_clustering_cython.so in View.MemoryView.memoryview.__cinit__() **TypeError: 'tuple' does not have the buffer interface**
cdeepakroy commented 6 years ago

@vaibhavkhanduja Thank you for reporting the error. The error is due to changes in the API. The histomicstk.filters.shape.clog filter now returns two values instead of one.

I made a PR #454 that fixes this issue and updates the notebook to use the new API. I would appreciate it if you can take a look at this PR and confirm that it fixes the error.

cdeepakroy commented 6 years ago

Fixed by PR #454