Print

Print


Dear Mark,

Thank you very much for your response. 

I have been trying to run the script, but I encountered some problems.

I figured out that I need to create another input for the $c as the roi (landmarks) should be in another order (instead of coordinate x y z 1 0 1 it should be coordinate x 1 coordinate y 0 coordinate z 1). When I use the fslmaths $outim... -add $outim $outim  twice, it will indeed give me two different roi's with different intensities in one mask, which is promising. 

However, after fixing this it is still not working in a loop. I tried both a 'for loop' as a 'while read line' script to apply fsl maths to all the landmarks, but it's not saving any of the landmarks due to a segmentation fault number 21672 (cored dumped). It does read the coordinates and echoes the lines with the coordinates per landmark.
Besides writing ' fslmaths $outim -mul 0 -add 1 -roi $c -mul $n -add $outim $outim'  in the loop, I also tried using fsl maths in a function and referring to the function in the loop, but I got the same error.

I hope you will have some suggestions. 
Thanks in advance.

Kind regards,

Liza