suzannelab / Dissect

Library to segment, explore and analyse networks, cells and tissues.
Mozilla Public License 2.0
0 stars 0 forks source link

image_aniso error #41

Open TatiaM opened 10 months ago

TatiaM commented 10 months ago

For an image, an error occur during the image_aniso function. Everything before this step works well (segmentation, cell perimeters, apical areas, junction lengths).


IndexError Traceback (most recent call last)

in ----> 1 aniso_face_image = segmentation.image_aniso() ~/anaconda3/envs/opencv-env/lib/python3.7/site-packages/Dissects-0.0.1-py3.7.egg/Dissects/segmentation/seg_3D_apical.py in image_aniso(self, normalize, normalize_max, factor, dilation_width) 546 tmp_image[coords[2], 547 coords[1], --> 548 [coords[0]]]([url](url)) = 1 549 #enlarge 550 if dilation_width!=0: IndexError: index 33 is out of bounds for axis 0 with size 33

Image and skeleton here: https://filesender.renater.fr/?s=download&token=913522bf-c572-431c-a032-c209e1519c71

sophietheis commented 10 months ago

You try to access an element of an array using an index that is out of the permissible range. In this case you are trying to draw the anisotropy outside the image. The parameter factor allows you to change the proportion of all the lines, thus reducing or increasing their overall length.

Also, as mentioned in the readme, this is an old version of the code. Please refer to Alain's repo.