Skip to content

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

@carlacwinter1

Description

@carlacwinter1

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions