{"action":"created","issue":{"url":"https://api.github.com/repos/nipy/nipype/issues/2697","repository_url":"https://api.github.com/repos/nipy/nipype","labels_url":"https://api.github.com/repos/nipy/nipype/issues/2697/labels{/name}","comments_url":"https://api.github.com/repos/nipy/nipype/issues/2697/comments","events_url":"https://api.github.com/repos/nipy/nipype/issues/2697/events","html_url":"https://github.com/nipy/nipype/issues/2697","id":358013249,"node_id":"MDU6SXNzdWUzNTgwMTMyNDk=","number":2697,"title":"Different Coregistration results using spm GUI in matlab and nipype SPM interfaces!","user":{"login":"mrahimpour","id":41435220,"node_id":"MDQ6VXNlcjQxNDM1MjIw","avatar_url":"https://avatars2.githubusercontent.com/u/41435220?v=4","gravatar_id":"","url":"https://api.github.com/users/mrahimpour","html_url":"https://github.com/mrahimpour","followers_url":"https://api.github.com/users/mrahimpour/followers","following_url":"https://api.github.com/users/mrahimpour/following{/other_user}","gists_url":"https://api.github.com/users/mrahimpour/gists{/gist_id}","starred_url":"https://api.github.com/users/mrahimpour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrahimpour/subscriptions","organizations_url":"https://api.github.com/users/mrahimpour/orgs","repos_url":"https://api.github.com/users/mrahimpour/repos","events_url":"https://api.github.com/users/mrahimpour/events{/privacy}","received_events_url":"https://api.github.com/users/mrahimpour/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-07T10:33:34Z","updated_at":"2018-09-07T12:49:39Z","closed_at":null,"author_association":"NONE","body":"### Summary\r\nHi, \r\n\r\nI was trying to coregister PET and MR images using nipype spm interfaces, CalcCoregAffine to get the coregistration affine matrix and ApplyTransform to apply the transform (affine matrix) to the PET images. The coregisterd result was so distorted and also not right in orientation. So I tried coregistration using spm GUI in matlab  (Estimate & reslice) and got totally different result. I am expecting same affine matrix for PET/MR coregistration using nipype and smp GUI. should I set something else?\r\n\r\n### Actual behavior\r\n\r\n### Expected behavior\r\n\r\n### How to replicate the behavior\r\n\r\n### Script/Workflow details\r\nimport nipype.interfaces.spm as spm\r\nimport nipype.interfaces.spm.utils as spmu\r\n\r\nimport pdb\r\n\"\"\"\r\nMtalab-SPM path\r\n\"\"\"\r\nimport nipype.interfaces.matlab as mlab\r\n\r\nmlab.MatlabCommand.set_default_paths('/usr/local/MATLAB/R2018a/toolbox/spm12')\r\n\r\n\"\"\"\r\ncoreg = spmu.CalcCoregAffine(matlab_cmd='matlab spm')\r\ncoreg.inputs.target = '/home/PET_COREG_WF/Data/600136/anat_1/n600136_MPRAGE.nii'\r\ncoreg.inputs.moving = '/home/PET_COREG_WF/Data/600136/pet_1/n600136_KENNIS_FET_DYN.nii'\r\ncoreg.inputs.mat = '/home/PET_COREG_WF/func_to_struct.mat'\r\ncoreg.run() \r\n\r\n#pdb.set_trace()\r\n\"\"\"\r\napplymat = spmu.ApplyTransform()\r\napplymat.inputs.in_file = '/home/masoomeh/PET_COREG_WF/Data//600136/pet_1/n600136_KENNIS_FET_DYN.nii\"\r\napplymat.inputs.mat = '/home/PET_COREG_WF/func_to_struct.mat'\r\napplymat.run()\r\n\r\nPlease put URL to code or code here (if not too long).\r\n\r\n### Platform details:\r\n\r\n<!-- Please run the following code from your shell and place the output between the triple ticks, below.\r\npython -c \"import nipype; from pprint import pprint; pprint(nipype.get_info())\"\r\n-->\r\n\r\n```\r\n{'commit_hash': '%h',\r\n 'commit_source': 'archive substitution',\r\n 'networkx_version': '2.1',\r\n 'nibabel_version': '2.3.0',\r\n 'nipype_version': '1.1.2',\r\n 'numpy_version': '1.15.0',\r\n 'pkg_path': '/home/masoomeh/opt/anaconda3/lib/python3.5/site-packages/nipype',\r\n 'scipy_version': '1.1.0',\r\n 'sys_executable': '/home/masoomeh/opt/anaconda3/bin/python',\r\n 'sys_platform': 'linux',\r\n 'sys_version': '3.5.5 |Anaconda, Inc.| (default, May 13 2018, 21:12:35) \\n'\r\n                '[GCC 7.2.0]',\r\n 'traits_version': '4.6.0'}\r\n\r\n```\r\n\r\n### Execution environment\r\n\r\nChoose one\r\n- Container [Tag: ???]\r\n- My python environment inside container [Base Tag: ???]\r\n- My python environment outside container\r\n"},"comment":{"url":"https://api.github.com/repos/nipy/nipype/issues/comments/419429031","html_url":"https://github.com/nipy/nipype/issues/2697#issuecomment-419429031","issue_url":"https://api.github.com/repos/nipy/nipype/issues/2697","id":419429031,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTQyOTAzMQ==","user":{"login":"satra","id":184063,"node_id":"MDQ6VXNlcjE4NDA2Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/184063?v=4","gravatar_id":"","url":"https://api.github.com/users/satra","html_url":"https://github.com/satra","followers_url":"https://api.github.com/users/satra/followers","following_url":"https://api.github.com/users/satra/following{/other_user}","gists_url":"https://api.github.com/users/satra/gists{/gist_id}","starred_url":"https://api.github.com/users/satra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satra/subscriptions","organizations_url":"https://api.github.com/users/satra/orgs","repos_url":"https://api.github.com/users/satra/repos","events_url":"https://api.github.com/users/satra/events{/privacy}","received_events_url":"https://api.github.com/users/satra/received_events","type":"User","site_admin":false},"created_at":"2018-09-07T12:49:39Z","updated_at":"2018-09-07T12:49:39Z","author_association":"MEMBER","body":"the spm gui uses the Coregister function (with estwrite), hence you were comparing two different tools. could you describe the problem you are trying to address? it's possible that coregister is sufficient to address your use case. the estimate part of Coregister does save an affine matrix that can be applied using just coregister write."}}
{"actor":{"display_login":"satra"}}