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

Can't run mrAnatLoadSpmVol in deployed mode #278

Open
soichih opened this issue Feb 15, 2018 · 9 comments
Open

Can't run mrAnatLoadSpmVol in deployed mode #278

soichih opened this issue Feb 15, 2018 · 9 comments

Comments

@soichih
Copy link
Contributor

soichih commented Feb 15, 2018

We are running vistasoft in deployed (compiled) mode, and we are having an issue with mrAnatLoadSpmVol function.

Error using spm>spm_version (line 1269)
Can't obtain SPM Revision information.

Error in spm (line 875)


Error in mrAnatLoadSpmVol (line 32)

We are using spm8 and I think this is really a spm issue, but I am not sure if spm8 is still maintained or not.. So the easiest fix for us is to patch mrAnatLoadSpmVol with following.

diff --git a/mrAnatomy/VolumeUtilities/mrAnatLoadSpmVol.m b/mrAnatomy/VolumeUtilities/mrAnatLoadSpmVol.m
index 0fed6d6..eba7e1a 100644
--- a/mrAnatomy/VolumeUtilities/mrAnatLoadSpmVol.m
+++ b/mrAnatomy/VolumeUtilities/mrAnatLoadSpmVol.m
@@ -29,7 +29,7 @@ elseif(isstruct(fname)&&isfield(fname,'nifti_type'))
         elseif(strcmp(type,'double')), type = 'float64'; end
         type = spm_type(type);
     end
-    if(strcmp(spm('Ver'),'SPM2'))
+    if(strcmp('SPM8','SPM2'))
         V.dim = [V.dim type];
     else
         V.dt = [type 0];

Unless vistasoft is still supporting spm2, I was wondering if it can simply drop spm2 unless people are still using it?

@francopestilli
Copy link
Member

@jyeatman @JWinawer @wandell would it be OK to remove the check for SPM2?

@JWinawer
Copy link
Member

JWinawer commented Feb 15, 2018 via email

@JWinawer
Copy link
Member

JWinawer commented Feb 15, 2018 via email

@jyeatman
Copy link
Contributor

jyeatman commented Feb 15, 2018 via email

@JWinawer
Copy link
Member

JWinawer commented Feb 15, 2018 via email

@francopestilli
Copy link
Member

Correct. The issue is with SPM2.

@JWinawer
Copy link
Member

JWinawer commented Mar 8, 2018

@francopestilli , @soichih , @jyeatman :
Is this resolved? It's just a short bit of code. We just need someone to test it and commit it, if it hasn't already been done.

@soichih
Copy link
Contributor Author

soichih commented Mar 8, 2018

I can test it if this is already updated upstream. We are still using our locally patched version of vistasoft.

@soichih
Copy link
Contributor Author

soichih commented May 22, 2018

Can you merge my PR? We are unable to use the official version of vistasoft and our branch is diverging and affecting our workflow.

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

No branches or pull requests

4 participants