{"action":"created","issue":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/446","labels_url":"https://api.github.com/repos/Slicer/Slicer/issues/446/labels{/name}","comments_url":"https://api.github.com/repos/Slicer/Slicer/issues/446/comments","events_url":"https://api.github.com/repos/Slicer/Slicer/issues/446/events","html_url":"https://github.com/Slicer/Slicer/pull/446","id":127397839,"number":446,"title":"Fix transform tests removing dynamic cast","user":{"login":"jcfr","id":219043,"avatar_url":"https://avatars.githubusercontent.com/u/219043?v=3","gravatar_id":"","url":"https://api.github.com/users/jcfr","html_url":"https://github.com/jcfr","followers_url":"https://api.github.com/users/jcfr/followers","following_url":"https://api.github.com/users/jcfr/following{/other_user}","gists_url":"https://api.github.com/users/jcfr/gists{/gist_id}","starred_url":"https://api.github.com/users/jcfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcfr/subscriptions","organizations_url":"https://api.github.com/users/jcfr/orgs","repos_url":"https://api.github.com/users/jcfr/repos","events_url":"https://api.github.com/users/jcfr/events{/privacy}","received_events_url":"https://api.github.com/users/jcfr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-19T09:09:30Z","updated_at":"2016-01-19T09:13:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Slicer/Slicer/pulls/446","html_url":"https://github.com/Slicer/Slicer/pull/446","diff_url":"https://github.com/Slicer/Slicer/pull/446.diff","patch_url":"https://github.com/Slicer/Slicer/pull/446.patch"},"body":"This PR fixes regressions introduced by InsightSoftwareConsortium/ITK@d1e9fe2 (BUG: Ensure Transform IO factories are  registered once.) and integrated in r24836 (ENH: Update ITKv4 to v4.9.0 release branch).\r\n\r\nFollowing this ITK commit, the ITKIO transform libraries are build as shared and dynamic_cast can NOT be used with templated classes that are instantiated in a translation unit different than the one where they are defined. It will work only if the classes are explicitly instantiated and exported.\r\n\r\nTo workaround the issue, code that was relying on `dynamic_cast` is updated to (1) ensure the objects are of the right type doing string comparison and (2) then use `static_cast` instead of `dynamic_cast`.\r\n\r\nTo summarize, the following tests that started to [fail on Ubuntu since January 8th](http://slicer.cdash.org/viewTest.php?buildid=750644&onlyfailed) will now pass:\r\n\r\n```\r\nEMSegCL_RunSetEverything\r\nEMSegCL_Task_BRAINS_MRIHumanBrain_scalartype_float_very_small\r\nEMSegCL_Task_BRAINS_MRIHumanBrain_scalartype_uint_very_small\r\nEMSegCL_Task_HumanEye_BRAINS_small\r\nEMSegCL_Task_MRIHumanBrain_BRAINS_small\r\nEMSegCL_Task_MRIHumanBrainExp_BRAINS_small\r\nEMSegCL_Task_MRIHumanBrainFullParcellation_BRAINS_small\r\nEMSegCL_Task_MRIHumanBrainParcellation_BRAINS_small\r\nEMSegCL_Task_NonHumanPrimate_BRAINS_small\r\n\r\nResampleScalarVectorDWIVolumeBSplineInterpolationTest\r\nResampleScalarVectorDWIVolumeBSplineWSInterpolationTest\r\nResampleScalarVectorDWIVolumeRotationAndAffineTest\r\nResampleScalarVectorDWIVolumeRotationNNTest\r\n\r\nResampleDTIVolumeRotationNNTest\r\nResampleDTIVolume2RigidTransformsLinearTest\r\nResampleDTIVolumeBSplineWSInterpolationTest\r\nResampleDTIVolumeBSplineInterpolationTest\r\n\r\nvtkSlicerTransformLogicTest1\r\nvtkMRMLNonlinearTransformNodeTest1\r\n```\r\n\r\nThe tests `EMSeg_SlicerCommonInterfaceTestGeneral` and `EMSegCL_Task_MRIHumanBrain_2CH`\r\nare failing because of issue with `N4ITKBiasFieldCorrection`. This is tracked in issue\r\n[#4130](http://na-mic.org/Mantis/view.php?id=4130).\r\n\r\n\r\nTest `vtkMRMLFiberBundleNodeTest1` failure is tracked in issue [#4129](http://na-mic.org/Mantis/view.php?id=4129).\r\n\r\nCc: @thewtex @fbudin69500 @lassoan @pieper @hjmjohnson "},"comment":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/comments/172783656","html_url":"https://github.com/Slicer/Slicer/pull/446#issuecomment-172783656","issue_url":"https://api.github.com/repos/Slicer/Slicer/issues/446","id":172783656,"user":{"login":"jcfr","id":219043,"avatar_url":"https://avatars.githubusercontent.com/u/219043?v=3","gravatar_id":"","url":"https://api.github.com/users/jcfr","html_url":"https://github.com/jcfr","followers_url":"https://api.github.com/users/jcfr/followers","following_url":"https://api.github.com/users/jcfr/following{/other_user}","gists_url":"https://api.github.com/users/jcfr/gists{/gist_id}","starred_url":"https://api.github.com/users/jcfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcfr/subscriptions","organizations_url":"https://api.github.com/users/jcfr/orgs","repos_url":"https://api.github.com/users/jcfr/repos","events_url":"https://api.github.com/users/jcfr/events{/privacy}","received_events_url":"https://api.github.com/users/jcfr/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T09:13:14Z","updated_at":"2016-01-19T09:13:14Z","body":"I suspect _issues_ with `N4ITKBiasFieldCorrection` are side effected of InsightSoftwareConsortium/ITK@51c2ff5 or InsightSoftwareConsortium/ITK@d0f5914"}}