{"action":"created","issue":{"url":"https://api.github.com/repos/kaspermarstal/SimpleElastix/issues/30","repository_url":"https://api.github.com/repos/kaspermarstal/SimpleElastix","labels_url":"https://api.github.com/repos/kaspermarstal/SimpleElastix/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/kaspermarstal/SimpleElastix/issues/30/comments","events_url":"https://api.github.com/repos/kaspermarstal/SimpleElastix/issues/30/events","html_url":"https://github.com/kaspermarstal/SimpleElastix/issues/30","id":144142292,"number":30,"title":"Transformation map not working","user":{"login":"mongoose54","id":277391,"avatar_url":"https://avatars.githubusercontent.com/u/277391?v=3","gravatar_id":"","url":"https://api.github.com/users/mongoose54","html_url":"https://github.com/mongoose54","followers_url":"https://api.github.com/users/mongoose54/followers","following_url":"https://api.github.com/users/mongoose54/following{/other_user}","gists_url":"https://api.github.com/users/mongoose54/gists{/gist_id}","starred_url":"https://api.github.com/users/mongoose54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongoose54/subscriptions","organizations_url":"https://api.github.com/users/mongoose54/orgs","repos_url":"https://api.github.com/users/mongoose54/repos","events_url":"https://api.github.com/users/mongoose54/events{/privacy}","received_events_url":"https://api.github.com/users/mongoose54/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-29T03:05:55Z","updated_at":"2016-03-30T09:49:17Z","closed_at":null,"body":"@kaspermarstal So I am following I perform registration on 2 images and then I apply the transformation map on a 3rd image \"image.nii\"  and I get the following messages on the console:\r\n\r\n> transformix is started at Mon Mar 28 19:05:30 2016.\r\n>\r\n>Installing all components.\r\n>InstallingComponents was successful.\r\n>\r\n>ELASTIX version: 4.801\r\n>Command line options from ElastixBase:\r\n>-out      C:\\elastixtestlogs\r\n>-threads  unspecified, so all available threads are used\r\n>-def      unspecified, so no input points transformed\r\n>-jac      unspecified, so no det(dT/dx) computed\r\n>-jacmat   unspecified, so no dT/dx computed\r\n>\r\n>Reading input image ...\r\n>Reading input image took 0.000007 s\r\n>Calling all ReadFromFile()'s ...\r\n  >Calling all ReadFromFile()'s took 6.963650 s\r\n>Transforming points ...\r\n  >The command-line option \"-def\" is not used, so no points are transformed\r\n  Transforming points done, it took 0.00s\r\nCompute determinant of spatial Jacobian ...\r\n  The command-line option \"-jac\" is not used, so no det(dT/dx) computed.\r\n  Computing determinant of spatial Jacobian done, it took 0.00s\r\nCompute spatial Jacobian (full matrix) ...\r\n  The command-line option \"-jacmat\" is not used, so no dT/dx computed.\r\n  Computing spatial Jacobian done, it took 0.00s\r\nResampling image and writing to disk ...\r\n  >Resampling took 4.97s\r\n\r\n>Transformix has finished at Mon Mar 28 19:05:42 2016.\r\nElapsed time: 11.9s.\r\n\r\nHere is code. I don't understand what I need to pass to `transformix ` other than the transformation map calculated previously.\r\n\r\n`public void simpleelastixtest() {\r\n\r\nCastImageFilter caster = new CastImageFilter();\r\ncaster.setOutputPixelType(PixelIDValueEnum.sitkFloat32);\r\n\r\n// Instantiate SimpleElastix\r\norg.itk.simple.SimpleElastix elastix = new org.itk.simple.SimpleElastix();\r\n\r\n// Read input\r\norg.itk.simple.ImageFileReader reader1 = new org.itk.simple.ImageFileReader();\r\n\r\nreader1.setFileName(\"brain1.png\");\r\nImage castImage1 = caster.execute(reader1.execute());\r\nelastix.setFixedImage(castImage1);\r\n\r\norg.itk.simple.ImageFileReader reader2 = new org.itk.simple.ImageFileReader();\r\nreader2.setFileName(\"brain2.png\");\r\nImage castImage2 = caster.execute(reader2.execute());\r\nelastix.setMovingImage(castImage2);\r\n\r\nelastix.setParameterMap(elastix.getDefaultParameterMap(\"nonrigid\"));\r\nelastix.logToConsoleOn();\r\nelastix.logToFolder(\"\\\\elastixtestlogs\\\\\");\r\n\r\n// Perform registration\r\nelastix.execute();\r\n\r\n// Write result image\r\nImageFileWriter writer = new org.itk.simple.ImageFileWriter();\r\nwriter.execute(elastix.getResultImage(),\"output.nii\",false);\r\n\r\n\r\n//Apply transformation map\r\norg.itk.simple.ImageFileReader reader3 = new org.itk.simple.ImageFileReader();\r\nreader3.setFileName(\"image.nii\");\r\n\r\norg.itk.simple.SimpleTransformix transformix = new org.itk.simple.SimpleTransformix();\r\ntransformix.logToFolder(\"\\\\elastixtestlogs\\\\\");\r\ntransformix.setInputImage(reader3.execute());\r\ntransformix.setTransformParameterMap(elastix.getTransformParameterMap());\r\n\r\norg.itk.simple.Image resultMask = transformix.execute()\r\n\r\nwriter.execute(resultMask, \"result.nii\", false);\r\n\r\n}`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kaspermarstal/SimpleElastix/issues/comments/203352030","html_url":"https://github.com/kaspermarstal/SimpleElastix/issues/30#issuecomment-203352030","issue_url":"https://api.github.com/repos/kaspermarstal/SimpleElastix/issues/30","id":203352030,"user":{"login":"kaspermarstal","id":478833,"avatar_url":"https://avatars.githubusercontent.com/u/478833?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspermarstal","html_url":"https://github.com/kaspermarstal","followers_url":"https://api.github.com/users/kaspermarstal/followers","following_url":"https://api.github.com/users/kaspermarstal/following{/other_user}","gists_url":"https://api.github.com/users/kaspermarstal/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspermarstal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspermarstal/subscriptions","organizations_url":"https://api.github.com/users/kaspermarstal/orgs","repos_url":"https://api.github.com/users/kaspermarstal/repos","events_url":"https://api.github.com/users/kaspermarstal/events{/privacy}","received_events_url":"https://api.github.com/users/kaspermarstal/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T09:49:17Z","updated_at":"2016-03-30T09:49:17Z","body":"I should add a section to the documentation on how to interpret the log, I'd give you that :blush: "}}