csudre / NMJ_Analyser

Performs analysis of NMJ data
Apache License 2.0
0 stars 1 forks source link

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed #4

Open ccbvib opened 6 months ago

ccbvib commented 6 months ago

I am trying to process some red and green tissue slides and I receive the following error. Do you have any idea what this means? I was able to get nmj_analyzer to work for the test data, but not our data.

Control_PNG user_name/$ nmj_analyzer X Resolution: "0.48" Z Resolution: "1.750" ID: "" threshold: "64" Path to images: "/Users/user_name/Documents/nmj_analyzer/new_NMJ_files/Control_PNG/" Path to saved output: "/Users/user_name/Documents/nmj_analyzer/new_NMJ_files/" 0 0 Exception in Tkinter callback Traceback (most recent call last): File "/Users/user_name/miniconda/envs/nmj_analyzer/lib/python3.7/tkinter/init.py", line 1705, in call return self.func(*args) File "/Users/user_name/miniconda/envs/nmj_analyzer/lib/python3.7/site-packages/nmj_analyzer/nmj_analyzer.py", line 99, in command=(lambda e=ents: fetch_and_process(e))) File "/Users/user_name/miniconda/envs/nmj_analyzer/lib/python3.7/site-packages/nmj_analyzer/nmj_analyzer.py", line 14, in fetch_and_process process_subject(dict_arg['path_images'], dict_arg['path_save'] , dict_arg['name'], thresh=thresh, pixdim=pixdim) File "/Users/user_name/miniconda/envs/nmj_analyzer/lib/python3.7/site-packages/nmj_analyzer/Processing.py", line 173, in process_subject array_img = np.reshape(np.asarray(list(img_file.getdata()))[:, 0], IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

alanmejiamaza commented 5 months ago

Hi,

If the test data worked, there can be the following:

Let me know if you fixed it.