Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test run #8

Open
golansapir opened this issue Nov 2, 2020 · 14 comments · Fixed by #9
Open

test run #8

golansapir opened this issue Nov 2, 2020 · 14 comments · Fixed by #9

Comments

@golansapir
Copy link

Hey,
While trying to run the test file I've received this output-
sapir@wslinux57549:$ cd /home/sapir/aehrc-Mirorr-24cc630/test
sapir@wslinux57549:
/aehrc-Mirorr-24cc630/test$ '/home/sapir/aehrc-Mirorr-24cc630/test/test.sh'
/home/sapir/aehrc-Mirorr-24cc630/test/test.sh: line 3: ../build/bin/mirorr: No such file or directory

real 0m0.001s
user 0m0.001s
sys 0m0.001s
/home/sapir/aehrc-Mirorr-24cc630/test/test.sh: line 4: ../build/bin/mirorr: No such file or directory

real 0m0.001s
user 0m0.001s
sys 0m0.000s

I have installed the cmake build system and its gui by
sudo apt-get install cmake cmake-curses-gui
The bin folder exists, but it's empty.

Will be happy to receive your input.
Thank you!

@ashgillman
Copy link
Member

Hi there,

Would you be able to provide the details of the build? Did you follow the standard build instructions from the Readme?

Cheers,
Ash

@golansapir
Copy link
Author

golansapir commented Nov 17, 2020

Hey, thank you for your replay!

I installed everything from the beginning and tried the test.sh again.

sapir@wslinux57549:~/Mirorr-master/test$ ./test.sh
terminate called after throwing an instance of 'boost::wrapexceptboost::program_options::unknown_option'
what(): unrecognised option '-b'
./test.sh: line 3: 353194 Aborted (core dumped) /home/sapir/Mirorr-master/build/bin/mirorr -m Sample_Male_Pelvis_CT.nii.gz -f Sample_Male_Pelvis_MR.nii.gz -b 3 -c 3 -t rigid -l output/CT_to_MR-rigid.tfm --save-moving output/CT_in_MR-rigid.nii.gz --fresh

real 0m0.221s
user 0m0.054s
sys 0m0.016s
terminate called after throwing an instance of 'boost::wrapexceptboost::program_options::unknown_option'
what(): unrecognised option '-b'
./test.sh: line 4: 353196 Aborted (core dumped) /home/sapir/Mirorr-master/build/bin/mirorr -m Sample_Male_Pelvis_CT.nii.gz -f Sample_Male_Pelvis_MR.nii.gz -b 3 -c 3 -t affine -l output/CT_to_MR-affine.tfm --save-moving output/CT_in_MR-affine.nii.gz --fresh

real 0m0.120s
user 0m0.025s
sys 0m0.000s

*I deleted the -b from test.sh and ran I again with success.

@ashgillman
Copy link
Member

Ah, looks like you've found a bug there, -b was removed in this commit: 7c2260a

Removing -b should work though, did you remove it from both commands? It works for me.

Anyway, I will update master with the fix, let me know if it helps.

@ashgillman
Copy link
Member

Whoops, didn't mean to close this - let me know if it works.

@ashgillman ashgillman reopened this Nov 24, 2020
@golansapir
Copy link
Author

Hey, It ran after I removed -b from both commands.
I am trying to align brain PET scans to the MNI template, as I received a recommendation from Pierrick Bourgeat.
After the analysis, the PET scan is not perfectly aligned to the MNI template, but I assume it's the best outcome that can be archived.
Thank you,
Sapir

@ashgillman
Copy link
Member

You should be able to get very good alignment - are you able to share the parameters you used? Was the MNI contrast MR?

@golansapir
Copy link
Author

golansapir commented Nov 25, 2020

Hey,
yes the MNI is MR.
I used the same parameters for my analysis as in the test code:

time "/home/sapir/Mirorr-master/build/bin/mirorr" -m "/home/sapir/Mirorr-master/test/"$field2"_rst1PET-1-3.nii.gz" **-**f "/home/sapir/Mirorr-master/test/MNI152_T1_1mm_brain.nii.gz" -c 3 -t rigid -l "/home/sapir/Mirorr-master/test/output/"$field2"_PET-MNI-rigid.tfm" --save-moving "/home/sapir/Mirorr-master/test/output/"$field2"_PET-MNI-rigid.nii.gz" --fresh

@ashgillman
Copy link
Member

Hey Sapir,
Perhaps try removing the -c 3 argument. This tells the algorithm to stop after 3 levels, e.g. from the test script output:

Pyramid Schedule:                                                                                                                                             
Limits  Level   Spacing                                              Sampling rate                Image size
1st  -> 1       m[15.125 15.125  5.000] f[12.500 12.500  6.000]  m[16 16  2] f[ 8  8  4]  m[ 32  32  62] f[ 32  32  35]
        2       m[ 7.562  7.562  5.000] f[ 6.250  6.250  6.000]  m[ 8  8  2] f[ 4  4  4]  m[ 64  64  62] f[ 64  64  35]
Last -> 3       m[ 3.781  3.781  5.000] f[ 3.125  3.125  6.000]  m[ 4  4  2] f[ 2  2  4]  m[128 128  62] f[128 128  35]
        4       m[ 1.891  1.891  2.500] f[ 1.562  1.562  3.000]  m[ 2  2  1] f[ 1  1  2]  m[256 256 125] f[256 256  70]                                       
        5       m[ 0.945  0.945  2.500] f[ 1.562  1.562  1.500]  m[ 1  1  1] f[ 1  1  1]  m[512 512 125] f[256 256 140]

So the lowest resolution it goes to there is 3.8xx3.8x5 mm. You could also try using the `--blockmetric mi' argument, which would use mutual information (although I might have thought the default, normalized correlation, would be adequate.

Run mirorr --help for a full list of parameters you can use.

@ashgillman
Copy link
Member

You may also get better results if you can include a mask (--moving-mask or --fixed-mask)

@golansapir
Copy link
Author

Thank you I'll take a look at these options today and will update

@golansapir
Copy link
Author

Hey,
I was unable to find the full list of parameters you can use.
mirorr --help
did not execute.
Can you please assist?

@ashgillman
Copy link
Member

You'll have to give some more details sorry, that should work. It look like before you were using the full path for mirorr because it wasn't on your $PATH, did you do this?

@golansapir
Copy link
Author

Hey,
I've added the mirror master folder to my path as you suggested.

sapir@wslinux57549:~$ echo $PATH
/home/sapir/bin:/home/sapir/Mirorr-master

still,

sapir@wslinux57549:$ mirorr --help
mirorr: command not found
sapir@wslinux57549:
$ Mirorr --help
Mirorr: command not found

the mirror isn't recognized..

I assume there is something very basic that I don't understand.

@ashgillman
Copy link
Member

Hi Sapir, yes I think it is just that your $PATH is still not quite right.

You can either run /home/sapir/Mirorr-master/build/bin/mirorr --help

Or if you'd like to add it to your $PATH:

export PATH=$PATH:/home/sapir/Mirorr-master/build/bin
mirorr --help

Either should work, adding to your $PATH is just optional and for convenience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants