Mirorr icon indicating copy to clipboard operation
Mirorr copied to clipboard

test run

Open golansapir opened this issue 5 years ago • 14 comments

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!

golansapir avatar Nov 02 '20 13:11 golansapir

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

ashgillman avatar Nov 10 '20 02:11 ashgillman

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.

golansapir avatar Nov 17 '20 08:11 golansapir

Ah, looks like you've found a bug there, -b was removed in this commit: https://github.com/aehrc/Mirorr/commit/7c2260a32d520621f0f72717f0e899684ad87023

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 avatar Nov 24 '20 02:11 ashgillman

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

ashgillman avatar Nov 24 '20 02:11 ashgillman

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

golansapir avatar Nov 24 '20 11:11 golansapir

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

ashgillman avatar Nov 24 '20 23:11 ashgillman

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

golansapir avatar Nov 25 '20 15:11 golansapir

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 avatar Nov 25 '20 23:11 ashgillman

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

ashgillman avatar Nov 25 '20 23:11 ashgillman

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

golansapir avatar Nov 26 '20 08:11 golansapir

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

golansapir avatar Nov 30 '20 13:11 golansapir

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?

ashgillman avatar Dec 01 '20 01:12 ashgillman

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.

golansapir avatar Dec 01 '20 08:12 golansapir

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

ashgillman avatar Dec 01 '20 11:12 ashgillman