vsnnlab / AMaSiNe

14 stars 8 forks source link

/bin/bash: del: command not found #2

Open carlacwinter1 opened 3 years ago

carlacwinter1 commented 3 years ago

Hi there,

Thanks so much for providing this useful set of code!

I'm currently going through the tutorial with the example images you provide, but I'm running into an issue once I get to STEP_4 and beyond. When I try to run STEP_4 (and STEP_5), I get an error saying "/bin/bash: del: command not found".

>> STEP_4_Angle_Finder
/bin/bash: del: command not found
/bin/bash: del: command not found
STAGE 1 : Contrast Adjustment and AP Positioning
 mc os
    {'   Stage 1   :   240.9031  seconds   '}

Searching Stage 2 - Find Angles: Angle Resolution =8
Starting parallel pool (parpool) using the 'local' profile ...
Connected to the parallel pool (number of workers: 2).

yaw_stage2_max =

     8

pitch_stage2_max =

     0

    {'   Stage 2   :   1439.5458  seconds   '}

Searching Stage 3 - Find Angles: Angle Resolution =4

yaw_stage3_max =

     8

pitch_stage3_max =

     4

    {'   Stage 3   :   1241.2476  seconds   '}

Searching Stage 4 - Find Angles: Angle Resolution =2

yaw_stage4_max =

     8

pitch_stage4_max =

     2

    {'   Stage 4   :   1177.4981  seconds   '}

Searching Stage 5 - Find Angles: Angle Resolution =1

yaw_stage5_max =

     8

pitch_stage5_max =

     2

    {'   Stage 5   :   1213.8745  seconds   '}

Searching Stage 6 - Rough AP searching with angles found
1
2
    {'   Stage 6   :   204.4589  seconds   '}

Searching Stage 7 - Final AP searching
/bin/bash: del: command not found
/bin/bash: del: command not found

ans =

  single

    0.6582

ans =

  single

    0.6914

    {'   Stage 7   :   292.7339  seconds   '}

Unrecognized function or variable 'mc'.

Despite this error, STEP_4 completes and creates the "Step_4_Angle_Search_Result.mat" file, and finds corresponding slices.

I get no errors for Step_4to5

However, in STEP_5, I get the same error as in STEP_4 AND an additional error and then it quits:

>> STEP_5_Transform_and_ROI_drawing
/bin/bash: del: command not found
/bin/bash: del: command not found
  0%[>                              ]

ans =

     1

ans =

     2

*** ERROR: Unable to find elastix binary in system path. Quitting ***

*** ERROR: Unable to find elastix binary in system path. Quitting ***
Analyzing and transferring files to the workers ...done.

ans =

     1

ans =

     2

*** ERROR: Unable to find elastix binary in system path. Quitting ***
Error using STEP_5_Transform_and_ROI_drawing (line 66)
The source code
(/Users/carlawinter/Documents/MATLAB/AMaSiNe/Amasine_tutorial/STEP_5_Transform_and_ROI_drawing.m)
for the parfor-loop that is trying to execute on the worker could not be found.

Caused by:
    Unrecognized function or variable 'matched_img'.
    Error using remoteParallelFunction (line 84)
    Worker unable to find file.
        Unrecognized function or variable 'matched_img'.

I assume this is stemming from Elastix not being loaded properly into my system path. I am working on a Mac, and have added Elastix to the Path via the following in my terminal:

~ carlawinter$ echo $PATH
/opt/miniconda3/bin:/opt/miniconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin
(base) dhcp-10-29-247-182:~ carlawinter$ PATH_BACKUP=$PATH
(base) dhcp-10-29-247-182:~ carlawinter$ PATH=$PATH_BACKUP:/Users/carlawinter/Image_Analysis/Elastix/elastix-5.0.0-mac
(base) dhcp-10-29-247-182:~ carlawinter$ echo $PATH
/opt/miniconda3/bin:/opt/miniconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Users/carlawinter/Image_Analysis/Elastix/elastix-5.0.0-mac

So based on this, I think Elastix is correctly added to my system path. So I'm not sure where my error messages are coming from.

Any insight you have would be greatly appreciated. Thanks!

carlacwinter1 commented 3 years ago

Attached here is the full command output with errors:

command output.pdf

carlacwinter1 commented 3 years ago

RESOLVED:

LWitter commented 3 years ago

Did you get it to work in the end on Mac OS, or is it just a no-go? If Mac OS doesn't work, I'll have to think of another solution. So I hope there is a work-around.....

carlacwinter1 commented 3 years ago

I couldn't get it to work on a Mac. I believe "del" (where I was having initial error) is a windows command

You could partition Windows on your Mac with bootcamp

mdeutsch22 commented 3 years ago

Hi there,

I got exactly the same error with Mac OS M1. I tried to work it out but didn't found a solution. I am now using a Windows to run the example to see if it works here.

When somebody find something I am happy to try it with the Mac again.

mdeutsch22 commented 3 years ago

I forgot to mention that I was able to run elastix with Matlab by disabling the SIP in the recovery mode, adding the elastix PATH to .bashirsc and running Matlab with the terminal. (And enabling SIP again) However, this didn't resolve the del issue and I got the same error : Error using

Error using STEP_5_Transform_and_ROI_drawing (line 66) The source code (/Users/matthias/Documents/MATLAB/AMaSiNe/Amasine_test/STEP_5_Transform_and_ROI_drawing.m) for the parfor-loop that is trying to execute on the worker could not be found.

Caused by: Unrecognized function or variable 'matched_img'. Error using remoteParallelFunction (line 84) Worker unable to find file. Unrecognized function or variable 'matched_img'.

menage95 commented 2 years ago

Hey everyone,

I am also having the same issue (doesn't work on M1 mac) and now using a windows machine but I'm getting the matched image error message on step 5:

Error using STEP_5_Transform_and_ROI_drawing The source code (C:\AMaSiNe-master\STEP_5_Transform_and_ROI_drawing.m) for the parfor-loop that is trying to execute on the worker could not be found.

Caused by: Unrecognized function or variable 'matched_img'. Error using remoteParallelFunction Worker unable to find file. Unrecognized function or variable 'matched_img'.

How exactly did you fix this?

Thanks, Lucy