{"action":"closed","issue":{"url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/113","labels_url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/113/comments","events_url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/issues/113/events","html_url":"https://github.com/neuropoly/spinalcordtoolbox/issues/113","id":42546541,"number":113,"title":"sct_dmri_moco --> crash","user":{"login":"tanguyduval","id":7785316,"avatar_url":"https://avatars.githubusercontent.com/u/7785316?v=3","gravatar_id":"","url":"https://api.github.com/users/tanguyduval","html_url":"https://github.com/tanguyduval","followers_url":"https://api.github.com/users/tanguyduval/followers","following_url":"https://api.github.com/users/tanguyduval/following{/other_user}","gists_url":"https://api.github.com/users/tanguyduval/gists{/gist_id}","starred_url":"https://api.github.com/users/tanguyduval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanguyduval/subscriptions","organizations_url":"https://api.github.com/users/tanguyduval/orgs","repos_url":"https://api.github.com/users/tanguyduval/repos","events_url":"https://api.github.com/users/tanguyduval/events{/privacy}","received_events_url":"https://api.github.com/users/tanguyduval/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/neuropoly/spinalcordtoolbox/labels/priority:%20medium","name":"priority: medium","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"jcohenadad","id":2482071,"avatar_url":"https://avatars.githubusercontent.com/u/2482071?v=3","gravatar_id":"","url":"https://api.github.com/users/jcohenadad","html_url":"https://github.com/jcohenadad","followers_url":"https://api.github.com/users/jcohenadad/followers","following_url":"https://api.github.com/users/jcohenadad/following{/other_user}","gists_url":"https://api.github.com/users/jcohenadad/gists{/gist_id}","starred_url":"https://api.github.com/users/jcohenadad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcohenadad/subscriptions","organizations_url":"https://api.github.com/users/jcohenadad/orgs","repos_url":"https://api.github.com/users/jcohenadad/repos","events_url":"https://api.github.com/users/jcohenadad/events{/privacy}","received_events_url":"https://api.github.com/users/jcohenadad/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2014-09-11T16:55:15Z","updated_at":"2015-02-12T18:04:39Z","closed_at":"2015-02-12T18:04:39Z","body":"Doesn't work for too different dwi images (low and high bvalues) :\r\n\r\n![image](https://cloud.githubusercontent.com/assets/7785316/4237951/bcad3eb4-39d3-11e4-9fc3-cc3b78f8b661.png)\r\n\r\nbug:\r\n````\r\nDescription: itk::ERROR: MattesMutualInformationImageToImageMetricv4(0x7f972a700130): Too many samples map outside moving image buffer. There are only 4 valid points out of 320 total points. The images do not sufficiently overlap. They need to be initialized to have more overlap before this metric will work. For instance, you can align the image centers by translation.\r\n````\r\n\r\ncommand with path to DATA:\r\n~~~~\r\nsct_antsRegistration --dimensionality 2  --transform Affine[0.5] --metric MI[/Volumes/users_hd2/tanguy/data/Boston/2014-07/Connectome/HC_SC_007/moco2/tmp.140917172131/dwi_mean_0_Z0000.nii, /Volumes/users_hd2/tanguy/data/Boston/2014-07/Connectome/HC_SC_007/moco2/tmp.140917172131/dwi_averaged_groups_T0170_Z0000.nii, 1, 32] --convergence 10x5 --shrink-factors 2x1 --smoothing-sigmas 2x1mm --Restrict-Deformation 1x1x0 --output [/Volumes/users_hd2/tanguy/data/Boston/2014-07/Connectome/HC_SC_007/moco2/tmp.140917172131/mat_dwigroups/mat.T170_Z0,/Volumes/users_hd2/tanguy/data/Boston/2014-07/Connectome/HC_SC_007/moco2/tmp.140917172131/dwi_averaged_groups_T0170_Z0000_moco.nii] --interpolation NearestNeighbor\r\n~~~~\r\n\r\n````\r\nERROR! \r\nUsing double precision for computations.\r\n  number of levels = 2\r\n  fixed image: dwi_mean_0_Z0000.nii\r\n  moving image: dwi_averaged_groups_T0170_Z0000.nii\r\nDimension = 2\r\nNumber of stages = 1\r\nUse Histogram Matching false\r\nWinsorize Image Intensities false\r\nLower Quantile = 0\r\nUpper Quantile = 1\r\nStage 1 State\r\n   Metric = Mattes\r\n     Fixed Image = Image (0x7f972a10bf60)\r\n  RTTI typeinfo:   itk::Image<double, 2u>\r\n  Reference Count: 2\r\n  Modified Time: 571\r\n  Debug: Off\r\n  Object Name: \r\n  Observers: \r\n    none\r\n  Source: (none)\r\n  Source output name: (none)\r\n  Release Data: Off\r\n  Data Released: False\r\n  Global Release Data: Off\r\n  PipelineMTime: 0\r\n  UpdateMTime: 404\r\n  RealTimeStamp: 0 seconds \r\n  LargestPossibleRegion: \r\n    Dimension: 2\r\n    Index: [0, 0]\r\n    Size: [40, 32]\r\n  BufferedRegion: \r\n    Dimension: 2\r\n    Index: [0, 0]\r\n    Size: [40, 32]\r\n  RequestedRegion: \r\n    Dimension: 2\r\n    Index: [0, 0]\r\n    Size: [40, 32]\r\n  Spacing: [0.796875, 0.796875]\r\n  Origin: [-15.6429, 5.13441]\r\n  Direction: \r\n1 0\r\n0 -1\r\n\r\n  IndexToPointMatrix: \r\n0.796875 0\r\n0 -0.796875\r\n\r\n  PointToIndexMatrix: \r\n1.2549 0\r\n0 -1.2549\r\n\r\n  Inverse Direction: \r\n1 0\r\n0 -1\r\n\r\n  PixelContainer: \r\n    ImportImageContainer (0x7f972a10be80)\r\n      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>\r\n      Reference Count: 1\r\n      Modified Time: 401\r\n      Debug: Off\r\n      Object Name: \r\n      Observers: \r\n        none\r\n      Pointer: 0x7f9729817000\r\n      Container manages memory: true\r\n      Size: 1280\r\n      Capacity: 1280\r\n\r\n     Moving Image = Image (0x7f972a1106a0)\r\n  RTTI typeinfo:   itk::Image<double, 2u>\r\n  Reference Count: 2\r\n  Modified Time: 572\r\n  Debug: Off\r\n  Object Name: \r\n  Observers: \r\n    none\r\n  Source: (none)\r\n  Source output name: (none)\r\n  Release Data: Off\r\n  Data Released: False\r\n  Global Release Data: Off\r\n  PipelineMTime: 0\r\n  UpdateMTime: 569\r\n  RealTimeStamp: 0 seconds \r\n  LargestPossibleRegion: \r\n    Dimension: 2\r\n    Index: [0, 0]\r\n    Size: [40, 32]\r\n  BufferedRegion: \r\n    Dimension: 2\r\n    Index: [0, 0]\r\n    Size: [40, 32]\r\n  RequestedRegion: \r\n    Dimension: 2\r\n    Index: [0, 0]\r\n    Size: [40, 32]\r\n  Spacing: [0.796875, 0.796875]\r\n  Origin: [-15.6429, 5.13441]\r\n  Direction: \r\n1 0\r\n0 -1\r\n\r\n  IndexToPointMatrix: \r\n0.796875 0\r\n0 -0.796875\r\n\r\n  PointToIndexMatrix: \r\n1.2549 0\r\n0 -1.2549\r\n\r\n  Inverse Direction: \r\n1 0\r\n0 -1\r\n\r\n  PixelContainer: \r\n    ImportImageContainer (0x7f972a107580)\r\n      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>\r\n      Reference Count: 1\r\n      Modified Time: 566\r\n      Debug: Off\r\n      Object Name: \r\n      Observers: \r\n        none\r\n      Pointer: 0x7f9729819800\r\n      Container manages memory: true\r\n      Size: 1280\r\n      Capacity: 1280\r\n\r\n     Weighting = 1\r\n     Sampling Strategy = none\r\n     NumberOfBins = 32\r\n     Radius = 1\r\n     Sampling percentage  = 1\r\n   Transform = Affine\r\n     Gradient Step = 0.5\r\n     Update Field Sigma (voxel space) = 0\r\n     Total Field Sigma (voxel space) = 0\r\n     Update Field Time Sigma = 0\r\n     Total Field Time Sigma  = 0\r\n     Number of Time Indices = 0\r\n     Number of Time Point Samples = 0\r\nRegistration using 1 total stages.\r\n\r\nStage 0\r\n  iterations = 10x5\r\n  convergence threshold = 1e-06\r\n  convergence window size = 10\r\n  number of levels = 2\r\n  Shrink factors (level 1 out of 2): [2, 2]\r\n  Shrink factors (level 2 out of 2): [1, 1]\r\n  smoothing sigmas per level: [2, 1]\r\n  using the Mattes MI metric (number of bins = 32, weight = 1)\r\n  Using default NONE metricSamplingStrategy \r\n\r\n*** Running affine registration ***\r\n\r\n  Current level = 1 of 2\r\n    number of iterations = 10\r\n    shrink factors = [2, 2]\r\n    smoothing sigmas = 2 mm\r\n    required fixed parameters = []\r\nDIAGNOSTIC,Iteration,metricValue,convergenceValue,ITERATION_TIME_INDEX,SINCE_LAST\r\n 2DIAGNOSTIC,     1, -7.392634221011e-01, 1.797693134862e+308, 5.7671e-03, 5.7650e-03, \r\n 2DIAGNOSTIC,     2, -7.895385196820e-01, 1.797693134862e+308, 7.5693e-03, 1.8022e-03, \r\n 2DIAGNOSTIC,     3, -8.709397627476e-01, 1.797693134862e+308, 9.7022e-03, 2.1329e-03, \r\n 2DIAGNOSTIC,     4, -9.719838961166e-01, 1.797693134862e+308, 1.1806e-02, 2.1040e-03, \r\n 2DIAGNOSTIC,     5, -9.566196729374e-01, 1.797693134862e+308, 1.4379e-02, 2.5730e-03, \r\n 2DIAGNOSTIC,     6, -8.393054976708e-01, 1.797693134862e+308, 1.6046e-02, 1.6670e-03, \r\nException caught: \r\nitk::ExceptionObject (0x7f972a1150b8)\r\nLocation: \"unknown\" \r\nFile: /home/django/jcohen2/antsbin/ITKv4-install/include/ITK-4.5/itkMattesMutualInformationImageToImageMetricv4.hxx\r\nLine: 225\r\nDescription: itk::ERROR: MattesMutualInformationImageToImageMetricv4(0x7f972a700130): Too many samples map outside moving image buffer. There are only 4 valid points out of 320 total points. The images do not sufficiently overlap. They need to be initialized to have more overlap before this metric will work. For instance, you can align the image centers by translation.\r\n````"}}