TESLA icon indicating copy to clipboard operation
TESLA copied to clipboard

[TESLA] multiple tumor/edge detectioins in one section

Open jpark27 opened this issue 10 months ago • 0 comments

Dear @jianhuupenn,

Hello! Hope you been well. I happen to have a slide that has two tumours and have been struggling to grasp [1] multiple contours [2] individually detect tumor/edge detection. Any insights would be really helpful to me.

[1] Task: accurately draw contours for two tumor chunks (1&2)

[2] current limitation in TESLA (1) : only grab big chunk ([2]) and ignore smaller chunk [1]. image image

  • tested previous solution on enquiry (https://github.com/jianhuupenn/TESLA/issues/11) but no contours presented

cnt=tesla.cv2_detect_contour(img, apertureSize=5, L2gradient = True, all_cnt_info=True) binary=np.zeros((img.shape[0:2]), dtype=np.uint8) for tmp in cnt: if tmp[2]>100: cnt=tmp[0] cv2.drawContours(binary, [cnt], -1, (1), thickness=-1) #cnt_enlarged = tesla.scale_contour(cnt, 1.05) #binary_enlarged = np.zeros(img.shape[0:2]) #cv2.drawContours(binary_enlarged, [cnt_enlarged], -1, (1), thickness=-1)

img_new = img.copy() cv2.drawContours(img_new, [cnt], -1, (255), thickness=50) img_new=cv2.resize(img_new, ((resize_width, resize_height)))

image

[3] current limitation in TESLA (2):

  • On detected edge of tumor chunk 2, TESLA tends to detect all surrounding boundary regardless of its biological context. For example, as shown on red arrows, user would not like to have tumour edge detection on either (a): boundary between tumour and empty space or (b, c): continous tumour chunks but limited by visium array window. Any chances one can confine detection take account such biological contexts? image

jpark27 avatar Apr 09 '24 07:04 jpark27