- This topic has 10 replies, 3 voices, and was last updated 3 years, 6 months ago by 
Anonymous.
 
- 
		AuthorPosts
 - 
		
			
- 
June 15, 2019 at 9:50 pm #1837
Thank you for using BrainSuite and reporting this issue.
You can run the svreg on the command line in a single threaded mode using -U flag. - 
June 16, 2019 at 6:02 am #1838
Yes! That did start the process.
But it stops after a few minutes:…curvature resolution 10/10
Multiresolution curvature maps are calculated
Computing additive curvature
Performing curvature registration
Curvature registration at resolution 1/4
Error using imhist (line 76)
Invalid MEX-file ‘C:\Users\LARRYO~1\AppData\Local\Temp\Larry Olson\mcrCache9.0\svreg_0\toolbox\images\images\private\imhistc.mexw64’: The specified procedure could not be found.Error in histeq>computeCumulativeHistogram (line 181)
Error in histeq (line 138)
Error in register_images_elastic_anand_landmarks_cg (line 26)
Error in curvature_registration512g_wt_multi_bs_elastic_xyz_cg (line 129)
Error in curvature_registration_newbs_elastic_xyz (line 73)
Error in svreg_label_surf_hemi (line 165)
Error in svreg (line 180)
MATLAB:invalidMEXFileBut, oddly, if I look in ‘C:\Users\LARRYO~1\AppData\Local\Temp\Larry Olson\mcrCache9.0\svreg_0\toolbox\images\images\private\imhistc.mexw64’, imhistc.mexw64 is there
 - 
June 16, 2019 at 8:35 am #1839
See above. The svreg.exe with -U failed when I called it from Matlab 2019a. I just ran exactly the same call from the command prompt in Windows and it worked perfectly. I am puzzled…
 - 
June 16, 2019 at 10:50 am #1840
Did you install 32 bit windows MCR by any chance? A 64 bit version is required.
 - 
June 16, 2019 at 11:07 am #1841
No, it is 64 bit MCR
It works from the GUI
It works (with the same DOS command) from the Windows command prompt
*It just aborts part way through (with the same DOS command) when started within Matlab(MCR_R2015b_win64_installer.exe)
(but I also have other versions installed for creating Matlab standalone programs)That is so puzzling
 - 
June 16, 2019 at 1:25 pm #1842
It might be that it is trying to use a different runtime version when called from matlab.
Note that the environment variables and the path is different in dos and in matlab.
check environment variables in matlab by typing env. Make sure that the correct MCR is first on the path. - 
June 16, 2019 at 2:21 pm #1843
“check environment variables in matlab by typing env”
>’env’ is not recognized as an internal or external command, operable program or batch file.
(On Windows here)Actually I have only one Matlab Compiler Runtime: 7.13
But 3 Matlab Runtimes: 9.0, 9.5, 9.6Not sure how to check environment variables…
 - 
June 16, 2019 at 11:09 pm #1844
Can you just type path in the matlab command window?
How are you running the svreg execuable from witin matlab? Are you using !svreg.exe …. ?
Can you send me steps to reproduce the issue?
 - 
June 17, 2019 at 4:44 pm #1845
Of course this is done after having run the Cortical Extraction Sequence first.
Then, here is a bit of the Matlab code used to call svreg:Name = ’xnrT1.nii.gz’ %(skull stripped T1)
basename = string(name(1:(length(name)-7))) %(.nii.gz extension)
st=’svreg.exe ‘+ basename + ‘ -U’
dos(st)This results in:
basename= ‘xnrT1’
st=svreg.exe “C:\Users\Larry Olson\Desktop\jtTestCase\BS”\xnrT1 -U
these are the errors (from running the script OR from pasting into matlab command window):
…curvature resolution 8/10
curvature resolution 9/10
curvature resolution 10/10
Multiresolution curvature maps are calculated
Computing additive curvature
Performing curvature registration
Curvature registration at resolution 1/4
Error using imhist (line 76)
Invalid MEX-file ‘C:\Users\LARRYO~1\AppData\Local\Temp\Larry Olson\mcrCache9.0\svreg_1\toolbox\images\images\private\imhistc.mexw64’: The specified procedure could not be found.
Error in histeq>computeCumulativeHistogram (line 181)
Error in histeq (line 138)
Error in register_images_elastic_anand_landmarks_cg (line 26)
Error in curvature_registration512g_wt_multi_bs_elastic_xyz_cg (line 129)
Error in curvature_registration_newbs_elastic_xyz (line 73)
Error in svreg_label_surf_hemi (line 191)
Error in svreg (line 180)
MATLAB:invalidMEXFile
ans =
-1Note I pasted the exact same call into a DOS Command Prompt, and it ran all the way through:
svreg.exe “C:\Users\Larry Olson\Desktop\jtTestCase\BS”\xnrT1 –UHad to use the –U flag because this machine is only a dual core i5
 - 
April 14, 2022 at 8:30 am #3529
Anonymous
How did you made it start working?
I am on Windows 10 2-core i7
I have executed the CSE before SVReg with this command (it worked):
(in the 1 dataset folder I added the cse script to the path)
C:\Users\italo\Documents\BrainSuite_CMD>”C:\Users\italo\Documents\BrainSuite_Tools\BrainSuite21a_src\scripts\cortical_extraction” italot1.niiNote that I did not call cortical_extraction.exe (Did not recognize it)
Now with the SVReg Process.
I did the same with the SVReg script and typed:
C:\Users\italo\Documents\BrainSuite_CMD>”C:\Users\italo\Documents\BrainSuite_Tools\svreg_21a_build2317_source\scripts\svreg” italot1Returned me:
using SVReg in C:\Users\italo\Documents\BrainSuite_Tools\svreg_21a_build2317_source
‘”C:\Users\italo\Documents\BrainSuite_Tools\svreg_21a_build2317_source\scripts\svreg.exe”‘ is not recognized as an internal or external command,
operable program or batch file.So I decided to run the svreg on the BrainSuite Bin folder:
C:\Users\italo\Documents\BrainSuite_CMD>”C:\Program Files\BrainSuite21a\svreg\bin\svreg” italot1Returned me:
Not enough input arguments.
Error in svreg (line 24)
MATLAB:minrhsAny Suggestions to run SVReg on Command Line properly?
Regards, Italo
 
 - 
 - 
		AuthorPosts
 
- You must be logged in to reply to this topic.