Error in reading the annotation files

Error in reading the annotation files

0

Hi All,

I have annotation files, which are included the location of the diagnostic tumor. I am trying to put a box around the tumor by using the annotation files through the following Python code running over the terminal:

python visualization.py --dicom-mode="CT" --dicom-path="/Users/Lung_Dx-A0229" --annotation-path="/Users/A0229" --classfile="/Users/category.txt"

But for some images, I got the following errors:

unknown label: a
Traceback (most recent call last):
  File "visualization.py", line 61, in <module>
    main()
  File "visualization.py", line 42, in main
    roi2rect(img_name=dcm_name, img_np=img_bitmap, img_data=image_data, label_list=class_list)
  File "/Users/mostafa/Documents/Mostafa/UM/Papers/Data/TCIA/Lung-PET-CT-Dx/VisualizationTools/roi2rect.py", line 43, in roi2rect
    index = int(np.where(label_array == np.float(1))[0])
TypeError: only size-1 arrays can be converted to Python scalars

I appreciate it if anyone knows how I can deal with this error. Thanks in advance!


PyRadiomics


Python

• 18 views

Read more here: Source link